@frogbotai/piece-telegram-bot 0.5.0

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 FrogBot
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,46 @@
1
+ import { type PieceFactoryConfig } from "frogbot/pieces";
2
+ export declare const telegramBotActions: readonly ["send_text_message", "send_media", "send_document", "send_location", "edit_message_text", "get_chat"];
3
+ export declare const telegramBotScopes: readonly [];
4
+ export declare function createTelegramBot(config?: PieceFactoryConfig): import("frogbot/pieces").Piece & {
5
+ /** Send Text Message: Send a text message through a Telegram bot */
6
+ sendTextMessage: import("node_modules/frogbot/dist/types/tool").AnyTool;
7
+ /** Send Media: Send a media message (photo, video, sticker, GIF) through a Telegram bot */
8
+ sendMedia: import("node_modules/frogbot/dist/types/tool").AnyTool;
9
+ /** Send Document: Send a generic file (document) to a Telegram chat */
10
+ sendDocument: import("node_modules/frogbot/dist/types/tool").AnyTool;
11
+ /** Send Audio: Send an audio file to a Telegram chat (.MP3/.M4A — shown in the music player) */
12
+ sendAudio: import("node_modules/frogbot/dist/types/tool").AnyTool;
13
+ /** Send Location: Send a geographic location (latitude/longitude) to a Telegram chat */
14
+ sendLocation: import("node_modules/frogbot/dist/types/tool").AnyTool;
15
+ /** Send Media Group: Send a group of 2–10 photos, videos, documents or audios as an album to a chat */
16
+ sendMediaGroup: import("node_modules/frogbot/dist/types/tool").AnyTool;
17
+ /** Send Poll: Send a native Telegram poll (regular or quiz) to a chat */
18
+ sendPoll: import("node_modules/frogbot/dist/types/tool").AnyTool;
19
+ /** Send Chat Action: Show a status (typing, uploading photo, recording voice, etc.) on behalf of the bot in a chat. The status is shown for up to 5 seconds. */
20
+ sendChatAction: import("node_modules/frogbot/dist/types/tool").AnyTool;
21
+ /** Edit Message Text: Edit the text of a previously sent message or an inline message */
22
+ editMessageText: import("node_modules/frogbot/dist/types/tool").AnyTool;
23
+ /** Delete Message: Delete a message sent in a chat. Bots can delete their own messages and messages in groups where they are admins. */
24
+ deleteMessage: import("node_modules/frogbot/dist/types/tool").AnyTool;
25
+ /** Forward Message: Forward a message from one chat to another */
26
+ forwardMessage: import("node_modules/frogbot/dist/types/tool").AnyTool;
27
+ /** Pin Message: Pin a message in a chat. The bot must be an administrator in the chat for this to work. */
28
+ pinMessage: import("node_modules/frogbot/dist/types/tool").AnyTool;
29
+ /** Unpin Message: Unpin a message in a chat. Leave Message Id empty to unpin the most recent pinned message. */
30
+ unpinMessage: import("node_modules/frogbot/dist/types/tool").AnyTool;
31
+ /** Get Chat: Get up-to-date information about a chat (name, description, photo, member count, etc.) */
32
+ getChat: import("node_modules/frogbot/dist/types/tool").AnyTool;
33
+ /** Get Chat Member: Get member info (or null) for the provided chat id and user id */
34
+ getChatMember: import("node_modules/frogbot/dist/types/tool").AnyTool;
35
+ /** Get File: Get file information and optionally download a file from Telegram */
36
+ getFile: import("node_modules/frogbot/dist/types/tool").AnyTool;
37
+ /** Create Invite Link: Create an invite link for a chat */
38
+ createInviteLink: import("node_modules/frogbot/dist/types/tool").AnyTool;
39
+ /** Answer Callback Query: Respond to a callback query sent by an inline keyboard button. Shows a notification or alert to the user. */
40
+ answerCallbackQuery: import("node_modules/frogbot/dist/types/tool").AnyTool;
41
+ /** Request Approval Message: Send an approval message to a chat and wait until the message is approved or disapproved */
42
+ requestApprovalMessage: import("node_modules/frogbot/dist/types/tool").AnyTool;
43
+ /** Custom API Call: Make a custom API call to a specific endpoint */
44
+ customApiCall: import("node_modules/frogbot/dist/types/tool").AnyTool;
45
+ };
46
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAA2B,KAAK,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAElF,eAAO,MAAM,kBAAkB,iHAAkH,CAAC;AAClJ,eAAO,MAAM,iBAAiB,aAAc,CAAC;AAE7C,wBAAgB,iBAAiB,CAAC,MAAM,CAAC,EAAE,kBAAkB;IAUzD,oEAAoE;;IAEpE,2FAA2F;;IAE3F,uEAAuE;;IAEvE,gGAAgG;;IAEhG,wFAAwF;;IAExF,uGAAuG;;IAEvG,yEAAyE;;IAEzE,gKAAgK;;IAEhK,yFAAyF;;IAEzF,wIAAwI;;IAExI,kEAAkE;;IAElE,2GAA2G;;IAE3G,gHAAgH;;IAEhH,uGAAuG;;IAEvG,sFAAsF;;IAEtF,kFAAkF;;IAElF,2DAA2D;;IAE3D,uIAAuI;;IAEvI,yHAAyH;;IAEzH,qEAAqE;;EAGxE"}
package/dist/index.js ADDED
@@ -0,0 +1,57 @@
1
+ import * as module from '@activepieces/piece-telegram-bot';
2
+ import { createActivepiecesPiece } from "frogbot/pieces";
3
+ export const telegramBotActions = ['send_text_message', 'send_media', 'send_document', 'send_location', 'edit_message_text', 'get_chat'];
4
+ export const telegramBotScopes = [];
5
+ export function createTelegramBot(config) {
6
+ const piece = createActivepiecesPiece({
7
+ module: module,
8
+ service: "telegram_bot",
9
+ credentialType: "secret_text",
10
+ defaultActions: telegramBotActions,
11
+ scopes: telegramBotScopes,
12
+ config,
13
+ });
14
+ return Object.assign(piece, {
15
+ /** Send Text Message: Send a text message through a Telegram bot */
16
+ sendTextMessage: piece.tool("send_text_message"),
17
+ /** Send Media: Send a media message (photo, video, sticker, GIF) through a Telegram bot */
18
+ sendMedia: piece.tool("send_media"),
19
+ /** Send Document: Send a generic file (document) to a Telegram chat */
20
+ sendDocument: piece.tool("send_document"),
21
+ /** Send Audio: Send an audio file to a Telegram chat (.MP3/.M4A — shown in the music player) */
22
+ sendAudio: piece.tool("send_audio"),
23
+ /** Send Location: Send a geographic location (latitude/longitude) to a Telegram chat */
24
+ sendLocation: piece.tool("send_location"),
25
+ /** Send Media Group: Send a group of 2–10 photos, videos, documents or audios as an album to a chat */
26
+ sendMediaGroup: piece.tool("send_media_group"),
27
+ /** Send Poll: Send a native Telegram poll (regular or quiz) to a chat */
28
+ sendPoll: piece.tool("send_poll"),
29
+ /** Send Chat Action: Show a status (typing, uploading photo, recording voice, etc.) on behalf of the bot in a chat. The status is shown for up to 5 seconds. */
30
+ sendChatAction: piece.tool("send_chat_action"),
31
+ /** Edit Message Text: Edit the text of a previously sent message or an inline message */
32
+ editMessageText: piece.tool("edit_message_text"),
33
+ /** Delete Message: Delete a message sent in a chat. Bots can delete their own messages and messages in groups where they are admins. */
34
+ deleteMessage: piece.tool("delete_message"),
35
+ /** Forward Message: Forward a message from one chat to another */
36
+ forwardMessage: piece.tool("forward_message"),
37
+ /** Pin Message: Pin a message in a chat. The bot must be an administrator in the chat for this to work. */
38
+ pinMessage: piece.tool("pin_message"),
39
+ /** Unpin Message: Unpin a message in a chat. Leave Message Id empty to unpin the most recent pinned message. */
40
+ unpinMessage: piece.tool("unpin_message"),
41
+ /** Get Chat: Get up-to-date information about a chat (name, description, photo, member count, etc.) */
42
+ getChat: piece.tool("get_chat"),
43
+ /** Get Chat Member: Get member info (or null) for the provided chat id and user id */
44
+ getChatMember: piece.tool("get_chat_member"),
45
+ /** Get File: Get file information and optionally download a file from Telegram */
46
+ getFile: piece.tool("get_file"),
47
+ /** Create Invite Link: Create an invite link for a chat */
48
+ createInviteLink: piece.tool("create_invite_link"),
49
+ /** Answer Callback Query: Respond to a callback query sent by an inline keyboard button. Shows a notification or alert to the user. */
50
+ answerCallbackQuery: piece.tool("answer_callback_query"),
51
+ /** Request Approval Message: Send an approval message to a chat and wait until the message is approved or disapproved */
52
+ requestApprovalMessage: piece.tool("request_approval_message"),
53
+ /** Custom API Call: Make a custom API call to a specific endpoint */
54
+ customApiCall: piece.tool("custom_api_call"),
55
+ });
56
+ }
57
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,kCAAkC,CAAC;AAC3D,OAAO,EAAE,uBAAuB,EAA2B,MAAM,gBAAgB,CAAC;AAElF,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,mBAAmB,EAAE,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,mBAAmB,EAAE,UAAU,CAAU,CAAC;AAClJ,MAAM,CAAC,MAAM,iBAAiB,GAAG,EAAW,CAAC;AAE7C,MAAM,UAAU,iBAAiB,CAAC,MAA2B;IAC3D,MAAM,KAAK,GAAG,uBAAuB,CAAC;QACpC,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,cAAc;QACvB,cAAc,EAAE,aAAa;QAC7B,cAAc,EAAE,kBAAkB;QAClC,MAAM,EAAE,iBAAiB;QACzB,MAAM;KACP,CAAC,CAAC;IACH,OAAO,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE;QAC1B,oEAAoE;QACpE,eAAe,EAAE,KAAK,CAA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QACxD,yHAAyH;QACzH,sBAAsB,EAAE,KAAK,CAAC,IAAI,CAAC,0BAA0B,CAAC;QAC9D,qEAAqE;QACrE,aAAa,EAAE,KAAK,CAAC,IAAI,CAAC,iBAAiB,CAAC;KAC7C,CAAC,CAAC;AACL,CAAC"}
package/package.json ADDED
@@ -0,0 +1,39 @@
1
+ {
2
+ "name": "@frogbotai/piece-telegram-bot",
3
+ "version": "0.5.0",
4
+ "description": "Telegram Bot tools for FrogBot.",
5
+ "license": "MIT",
6
+ "author": "Colby Gilbert",
7
+ "type": "module",
8
+ "main": "./dist/index.js",
9
+ "types": "./dist/index.d.ts",
10
+ "exports": {
11
+ ".": {
12
+ "import": "./dist/index.js",
13
+ "types": "./dist/index.d.ts",
14
+ "default": "./dist/index.js"
15
+ }
16
+ },
17
+ "files": [
18
+ "dist"
19
+ ],
20
+ "sideEffects": false,
21
+ "dependencies": {
22
+ "@activepieces/piece-telegram-bot": "0.6.5"
23
+ },
24
+ "peerDependencies": {
25
+ "frogbot": "0.5.0"
26
+ },
27
+ "devDependencies": {
28
+ "typescript": "5.6.2",
29
+ "frogbot": "0.5.0"
30
+ },
31
+ "publishConfig": {
32
+ "access": "public"
33
+ },
34
+ "scripts": {
35
+ "build": "tsc -p tsconfig.json",
36
+ "clean": "rm -rf dist",
37
+ "typecheck": "tsc --noEmit"
38
+ }
39
+ }