@divyacon/piece-telegram-bot 0.0.0-stage → 0.1.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.
Files changed (223) hide show
  1. package/LICENSE.MIT-AP +24 -0
  2. package/README.md +8 -2
  3. package/dist/index.d.ts +3 -0
  4. package/dist/index.d.ts.map +1 -0
  5. package/dist/index.js +122 -0
  6. package/dist/index.js.map +1 -0
  7. package/dist/lib/action/answer-callback-query.action.d.ts +8 -0
  8. package/dist/lib/action/answer-callback-query.action.d.ts.map +1 -0
  9. package/dist/lib/action/answer-callback-query.action.js +63 -0
  10. package/dist/lib/action/answer-callback-query.action.js.map +1 -0
  11. package/dist/lib/action/create-invite-link.d.ts +9 -0
  12. package/dist/lib/action/create-invite-link.d.ts.map +1 -0
  13. package/dist/lib/action/create-invite-link.js +66 -0
  14. package/dist/lib/action/create-invite-link.js.map +1 -0
  15. package/dist/lib/action/delete-message.action.d.ts +6 -0
  16. package/dist/lib/action/delete-message.action.d.ts.map +1 -0
  17. package/dist/lib/action/delete-message.action.js +42 -0
  18. package/dist/lib/action/delete-message.action.js.map +1 -0
  19. package/dist/lib/action/edit-message-text.action.d.ts +12 -0
  20. package/dist/lib/action/edit-message-text.action.d.ts.map +1 -0
  21. package/dist/lib/action/edit-message-text.action.js +76 -0
  22. package/dist/lib/action/edit-message-text.action.js.map +1 -0
  23. package/dist/lib/action/forward-message.action.d.ts +10 -0
  24. package/dist/lib/action/forward-message.action.d.ts.map +1 -0
  25. package/dist/lib/action/forward-message.action.js +59 -0
  26. package/dist/lib/action/forward-message.action.js.map +1 -0
  27. package/dist/lib/action/get-chat-member.d.ts +6 -0
  28. package/dist/lib/action/get-chat-member.d.ts.map +1 -0
  29. package/dist/lib/action/get-chat-member.js +49 -0
  30. package/dist/lib/action/get-chat-member.js.map +1 -0
  31. package/dist/lib/action/get-chat.action.d.ts +5 -0
  32. package/dist/lib/action/get-chat.action.d.ts.map +1 -0
  33. package/dist/lib/action/get-chat.action.js +42 -0
  34. package/dist/lib/action/get-chat.action.js.map +1 -0
  35. package/dist/lib/action/get-file.action.d.ts +5 -0
  36. package/dist/lib/action/get-file.action.d.ts.map +1 -0
  37. package/dist/lib/action/get-file.action.js +69 -0
  38. package/dist/lib/action/get-file.action.js.map +1 -0
  39. package/dist/lib/action/pin-message.action.d.ts +7 -0
  40. package/dist/lib/action/pin-message.action.d.ts.map +1 -0
  41. package/dist/lib/action/pin-message.action.js +50 -0
  42. package/dist/lib/action/pin-message.action.js.map +1 -0
  43. package/dist/lib/action/request-approval-message.d.ts +7 -0
  44. package/dist/lib/action/request-approval-message.d.ts.map +1 -0
  45. package/dist/lib/action/request-approval-message.js +84 -0
  46. package/dist/lib/action/request-approval-message.js.map +1 -0
  47. package/dist/lib/action/send-audio.action.d.ts +18 -0
  48. package/dist/lib/action/send-audio.action.d.ts.map +1 -0
  49. package/dist/lib/action/send-audio.action.js +128 -0
  50. package/dist/lib/action/send-audio.action.js.map +1 -0
  51. package/dist/lib/action/send-chat-action.action.d.ts +7 -0
  52. package/dist/lib/action/send-chat-action.action.d.ts.map +1 -0
  53. package/dist/lib/action/send-chat-action.action.js +61 -0
  54. package/dist/lib/action/send-chat-action.action.js.map +1 -0
  55. package/dist/lib/action/send-document.action.d.ts +15 -0
  56. package/dist/lib/action/send-document.action.d.ts.map +1 -0
  57. package/dist/lib/action/send-document.action.js +104 -0
  58. package/dist/lib/action/send-document.action.js.map +1 -0
  59. package/dist/lib/action/send-location.action.d.ts +16 -0
  60. package/dist/lib/action/send-location.action.d.ts.map +1 -0
  61. package/dist/lib/action/send-location.action.js +83 -0
  62. package/dist/lib/action/send-location.action.js.map +1 -0
  63. package/dist/lib/action/send-media-group.action.d.ts +11 -0
  64. package/dist/lib/action/send-media-group.action.d.ts.map +1 -0
  65. package/dist/lib/action/send-media-group.action.js +97 -0
  66. package/dist/lib/action/send-media-group.action.js.map +1 -0
  67. package/dist/lib/action/send-media.action.d.ts +14 -0
  68. package/dist/lib/action/send-media.action.d.ts.map +1 -0
  69. package/dist/lib/action/send-media.action.js +198 -0
  70. package/dist/lib/action/send-media.action.js.map +1 -0
  71. package/dist/lib/action/send-poll.action.d.ts +21 -0
  72. package/dist/lib/action/send-poll.action.d.ts.map +1 -0
  73. package/dist/lib/action/send-poll.action.js +145 -0
  74. package/dist/lib/action/send-poll.action.js.map +1 -0
  75. package/dist/lib/action/send-text-message.action.d.ts +14 -0
  76. package/dist/lib/action/send-text-message.action.d.ts.map +1 -0
  77. package/dist/lib/action/send-text-message.action.js +63 -0
  78. package/dist/lib/action/send-text-message.action.js.map +1 -0
  79. package/dist/lib/action/telegram-answer-callback-query.d.ts +8 -0
  80. package/dist/lib/action/telegram-answer-callback-query.d.ts.map +1 -0
  81. package/dist/lib/action/telegram-answer-callback-query.js +68 -0
  82. package/dist/lib/action/telegram-answer-callback-query.js.map +1 -0
  83. package/dist/lib/action/telegram-create-invite-link.d.ts +8 -0
  84. package/dist/lib/action/telegram-create-invite-link.d.ts.map +1 -0
  85. package/dist/lib/action/telegram-create-invite-link.js +68 -0
  86. package/dist/lib/action/telegram-create-invite-link.js.map +1 -0
  87. package/dist/lib/action/telegram-delete-message.d.ts +5 -0
  88. package/dist/lib/action/telegram-delete-message.d.ts.map +1 -0
  89. package/dist/lib/action/telegram-delete-message.js +44 -0
  90. package/dist/lib/action/telegram-delete-message.js.map +1 -0
  91. package/dist/lib/action/telegram-edit-message-text.d.ts +10 -0
  92. package/dist/lib/action/telegram-edit-message-text.d.ts.map +1 -0
  93. package/dist/lib/action/telegram-edit-message-text.js +93 -0
  94. package/dist/lib/action/telegram-edit-message-text.js.map +1 -0
  95. package/dist/lib/action/telegram-forward-message.d.ts +9 -0
  96. package/dist/lib/action/telegram-forward-message.d.ts.map +1 -0
  97. package/dist/lib/action/telegram-forward-message.js +61 -0
  98. package/dist/lib/action/telegram-forward-message.js.map +1 -0
  99. package/dist/lib/action/telegram-get-bot-info.d.ts +2 -0
  100. package/dist/lib/action/telegram-get-bot-info.d.ts.map +1 -0
  101. package/dist/lib/action/telegram-get-bot-info.js +39 -0
  102. package/dist/lib/action/telegram-get-bot-info.js.map +1 -0
  103. package/dist/lib/action/telegram-get-chat-administrators.d.ts +4 -0
  104. package/dist/lib/action/telegram-get-chat-administrators.d.ts.map +1 -0
  105. package/dist/lib/action/telegram-get-chat-administrators.js +44 -0
  106. package/dist/lib/action/telegram-get-chat-administrators.js.map +1 -0
  107. package/dist/lib/action/telegram-get-chat-member-count.d.ts +4 -0
  108. package/dist/lib/action/telegram-get-chat-member-count.d.ts.map +1 -0
  109. package/dist/lib/action/telegram-get-chat-member-count.js +44 -0
  110. package/dist/lib/action/telegram-get-chat-member-count.js.map +1 -0
  111. package/dist/lib/action/telegram-get-chat-member.d.ts +5 -0
  112. package/dist/lib/action/telegram-get-chat-member.d.ts.map +1 -0
  113. package/dist/lib/action/telegram-get-chat-member.js +51 -0
  114. package/dist/lib/action/telegram-get-chat-member.js.map +1 -0
  115. package/dist/lib/action/telegram-get-chat.d.ts +4 -0
  116. package/dist/lib/action/telegram-get-chat.d.ts.map +1 -0
  117. package/dist/lib/action/telegram-get-chat.js +44 -0
  118. package/dist/lib/action/telegram-get-chat.js.map +1 -0
  119. package/dist/lib/action/telegram-get-file.d.ts +5 -0
  120. package/dist/lib/action/telegram-get-file.d.ts.map +1 -0
  121. package/dist/lib/action/telegram-get-file.js +72 -0
  122. package/dist/lib/action/telegram-get-file.js.map +1 -0
  123. package/dist/lib/action/telegram-pin-message.d.ts +6 -0
  124. package/dist/lib/action/telegram-pin-message.d.ts.map +1 -0
  125. package/dist/lib/action/telegram-pin-message.js +52 -0
  126. package/dist/lib/action/telegram-pin-message.js.map +1 -0
  127. package/dist/lib/action/telegram-send-audio.d.ts +16 -0
  128. package/dist/lib/action/telegram-send-audio.d.ts.map +1 -0
  129. package/dist/lib/action/telegram-send-audio.js +149 -0
  130. package/dist/lib/action/telegram-send-audio.js.map +1 -0
  131. package/dist/lib/action/telegram-send-chat-action.d.ts +6 -0
  132. package/dist/lib/action/telegram-send-chat-action.d.ts.map +1 -0
  133. package/dist/lib/action/telegram-send-chat-action.js +67 -0
  134. package/dist/lib/action/telegram-send-chat-action.js.map +1 -0
  135. package/dist/lib/action/telegram-send-document.d.ts +13 -0
  136. package/dist/lib/action/telegram-send-document.d.ts.map +1 -0
  137. package/dist/lib/action/telegram-send-document.js +125 -0
  138. package/dist/lib/action/telegram-send-document.js.map +1 -0
  139. package/dist/lib/action/telegram-send-location.d.ts +15 -0
  140. package/dist/lib/action/telegram-send-location.d.ts.map +1 -0
  141. package/dist/lib/action/telegram-send-location.js +93 -0
  142. package/dist/lib/action/telegram-send-location.js.map +1 -0
  143. package/dist/lib/action/telegram-send-media-group.d.ts +10 -0
  144. package/dist/lib/action/telegram-send-media-group.d.ts.map +1 -0
  145. package/dist/lib/action/telegram-send-media-group.js +115 -0
  146. package/dist/lib/action/telegram-send-media-group.js.map +1 -0
  147. package/dist/lib/action/telegram-send-message.d.ts +12 -0
  148. package/dist/lib/action/telegram-send-message.d.ts.map +1 -0
  149. package/dist/lib/action/telegram-send-message.js +84 -0
  150. package/dist/lib/action/telegram-send-message.js.map +1 -0
  151. package/dist/lib/action/telegram-send-photo-or-video.d.ts +12 -0
  152. package/dist/lib/action/telegram-send-photo-or-video.d.ts.map +1 -0
  153. package/dist/lib/action/telegram-send-photo-or-video.js +219 -0
  154. package/dist/lib/action/telegram-send-photo-or-video.js.map +1 -0
  155. package/dist/lib/action/telegram-send-poll.d.ts +20 -0
  156. package/dist/lib/action/telegram-send-poll.d.ts.map +1 -0
  157. package/dist/lib/action/telegram-send-poll.js +167 -0
  158. package/dist/lib/action/telegram-send-poll.js.map +1 -0
  159. package/dist/lib/action/telegram-unpin-message.d.ts +5 -0
  160. package/dist/lib/action/telegram-unpin-message.d.ts.map +1 -0
  161. package/dist/lib/action/telegram-unpin-message.js +45 -0
  162. package/dist/lib/action/telegram-unpin-message.js.map +1 -0
  163. package/dist/lib/action/unpin-message.action.d.ts +6 -0
  164. package/dist/lib/action/unpin-message.action.d.ts.map +1 -0
  165. package/dist/lib/action/unpin-message.action.js +43 -0
  166. package/dist/lib/action/unpin-message.action.js.map +1 -0
  167. package/dist/lib/common/index.d.ts +25 -0
  168. package/dist/lib/common/index.d.ts.map +1 -0
  169. package/dist/lib/common/index.js +104 -0
  170. package/dist/lib/common/index.js.map +1 -0
  171. package/dist/lib/output-schemas.d.ts +41 -0
  172. package/dist/lib/output-schemas.d.ts.map +1 -0
  173. package/dist/lib/output-schemas.js +1853 -0
  174. package/dist/lib/output-schemas.js.map +1 -0
  175. package/dist/lib/trigger/new-message.d.ts +15 -0
  176. package/dist/lib/trigger/new-message.d.ts.map +1 -0
  177. package/dist/lib/trigger/new-message.js +121 -0
  178. package/dist/lib/trigger/new-message.js.map +1 -0
  179. package/package.json +44 -3
  180. package/src/index.ts +119 -0
  181. package/src/lib/action/answer-callback-query.action.ts +58 -0
  182. package/src/lib/action/create-invite-link.ts +59 -0
  183. package/src/lib/action/delete-message.action.ts +34 -0
  184. package/src/lib/action/edit-message-text.action.ts +71 -0
  185. package/src/lib/action/forward-message.action.ts +50 -0
  186. package/src/lib/action/get-chat-member.ts +40 -0
  187. package/src/lib/action/get-chat.action.ts +33 -0
  188. package/src/lib/action/get-file.action.ts +79 -0
  189. package/src/lib/action/pin-message.action.ts +41 -0
  190. package/src/lib/action/request-approval-message.ts +85 -0
  191. package/src/lib/action/send-audio.action.ts +123 -0
  192. package/src/lib/action/send-chat-action.action.ts +53 -0
  193. package/src/lib/action/send-document.action.ts +105 -0
  194. package/src/lib/action/send-location.action.ts +76 -0
  195. package/src/lib/action/send-media-group.action.ts +98 -0
  196. package/src/lib/action/send-media.action.ts +209 -0
  197. package/src/lib/action/send-poll.action.ts +140 -0
  198. package/src/lib/action/send-text-message.action.ts +54 -0
  199. package/src/lib/action/telegram-answer-callback-query.ts +64 -0
  200. package/src/lib/action/telegram-create-invite-link.ts +62 -0
  201. package/src/lib/action/telegram-delete-message.ts +37 -0
  202. package/src/lib/action/telegram-edit-message-text.ts +92 -0
  203. package/src/lib/action/telegram-forward-message.ts +54 -0
  204. package/src/lib/action/telegram-get-bot-info.ts +31 -0
  205. package/src/lib/action/telegram-get-chat-administrators.ts +36 -0
  206. package/src/lib/action/telegram-get-chat-member-count.ts +36 -0
  207. package/src/lib/action/telegram-get-chat-member.ts +43 -0
  208. package/src/lib/action/telegram-get-chat.ts +36 -0
  209. package/src/lib/action/telegram-get-file.ts +83 -0
  210. package/src/lib/action/telegram-pin-message.ts +45 -0
  211. package/src/lib/action/telegram-send-audio.ts +157 -0
  212. package/src/lib/action/telegram-send-chat-action.ts +61 -0
  213. package/src/lib/action/telegram-send-document.ts +136 -0
  214. package/src/lib/action/telegram-send-location.ts +89 -0
  215. package/src/lib/action/telegram-send-media-group.ts +119 -0
  216. package/src/lib/action/telegram-send-message.ts +79 -0
  217. package/src/lib/action/telegram-send-photo-or-video.ts +238 -0
  218. package/src/lib/action/telegram-send-poll.ts +170 -0
  219. package/src/lib/action/telegram-unpin-message.ts +38 -0
  220. package/src/lib/action/unpin-message.action.ts +36 -0
  221. package/src/lib/common/index.ts +147 -0
  222. package/src/lib/output-schemas.ts +1909 -0
  223. package/src/lib/trigger/new-message.ts +127 -0
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.telegramForwardMessage = void 0;
4
+ const tslib_1 = require("tslib");
5
+ // Vendored from Activepieces packages/pieces/community/telegram-bot/src/lib/action/telegram-forward-message.ts (MIT).
6
+ // Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
7
+ const pieces_framework_1 = require("@agnocon/pieces-framework");
8
+ const pieces_common_1 = require("@agnocon/pieces-common");
9
+ const common_1 = require("../common");
10
+ const __1 = require("../..");
11
+ const output_schemas_1 = require("../output-schemas");
12
+ exports.telegramForwardMessage = (0, pieces_framework_1.createAction)({
13
+ auth: __1.telegramBotAuth,
14
+ name: 'telegram_forward_message',
15
+ displayName: 'Forward Message',
16
+ description: 'Forward a message from one chat to another.',
17
+ audience: 'ai',
18
+ aiMetadata: {
19
+ description: 'Forwards an existing message from a source chat (from_chat_id) to a target chat (chat_id), preserving original sender attribution. chat_id and from_chat_id are each a numeric id or @channelusername the bot can reach; message_id comes from the New Message trigger or a prior send action. Use to relay content the bot can access between chats; the bot must be able to read the source and post to the target. Not idempotent: each call creates a new forwarded message.',
20
+ idempotent: false,
21
+ },
22
+ outputSchema: output_schemas_1.telegramForwardMessageActionOutputSchema,
23
+ props: {
24
+ chat_id: pieces_framework_1.Property.ShortText({
25
+ displayName: 'Target Chat Id',
26
+ description: 'Chat the message will be forwarded to (a numeric id or @channelusername the bot can reach).',
27
+ required: true,
28
+ }),
29
+ from_chat_id: pieces_framework_1.Property.ShortText({
30
+ displayName: 'From Chat Id',
31
+ description: 'Chat the original message came from.',
32
+ required: true,
33
+ }),
34
+ message_id: pieces_framework_1.Property.ShortText({
35
+ displayName: 'Message Id',
36
+ description: 'Identifier of the message to forward.',
37
+ required: true,
38
+ }),
39
+ message_thread_id: common_1.telegramCommons.messageThreadIdProp(),
40
+ disable_notification: common_1.telegramCommons.disableNotificationProp(),
41
+ protect_content: common_1.telegramCommons.protectContentProp(),
42
+ },
43
+ run(ctx) {
44
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
45
+ var _a, _b, _c;
46
+ return yield pieces_common_1.httpClient.sendRequest({
47
+ method: pieces_common_1.HttpMethod.POST,
48
+ url: common_1.telegramCommons.getApiUrl(ctx.auth, 'forwardMessage'),
49
+ body: {
50
+ chat_id: ctx.propsValue.chat_id,
51
+ from_chat_id: ctx.propsValue.from_chat_id,
52
+ message_id: ctx.propsValue.message_id,
53
+ message_thread_id: (_a = ctx.propsValue.message_thread_id) !== null && _a !== void 0 ? _a : undefined,
54
+ disable_notification: (_b = ctx.propsValue.disable_notification) !== null && _b !== void 0 ? _b : false,
55
+ protect_content: (_c = ctx.propsValue.protect_content) !== null && _c !== void 0 ? _c : false,
56
+ },
57
+ });
58
+ });
59
+ },
60
+ });
61
+ //# sourceMappingURL=telegram-forward-message.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"telegram-forward-message.js","sourceRoot":"","sources":["../../../src/lib/action/telegram-forward-message.ts"],"names":[],"mappings":";;;;AAAA,sHAAsH;AACtH,qEAAqE;AACrE,gEAAmE;AACnE,0DAAgE;AAChE,sCAA4C;AAC5C,6BAAwC;AACxC,sDAA6E;AAEhE,QAAA,sBAAsB,GAAG,IAAA,+BAAY,EAAC;IACjD,IAAI,EAAE,mBAAe;IACrB,IAAI,EAAE,0BAA0B;IAChC,WAAW,EAAE,iBAAiB;IAC9B,WAAW,EAAE,6CAA6C;IAC1D,QAAQ,EAAE,IAAI;IACd,UAAU,EAAE;QACV,WAAW,EACT,kdAAkd;QACpd,UAAU,EAAE,KAAK;KAClB;IACD,YAAY,EAAE,yDAAwC;IACtD,KAAK,EAAE;QACL,OAAO,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC1B,WAAW,EAAE,gBAAgB;YAC7B,WAAW,EACT,6FAA6F;YAC/F,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,YAAY,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC/B,WAAW,EAAE,cAAc;YAC3B,WAAW,EAAE,sCAAsC;YACnD,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,UAAU,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC7B,WAAW,EAAE,YAAY;YACzB,WAAW,EAAE,uCAAuC;YACpD,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,iBAAiB,EAAE,wBAAe,CAAC,mBAAmB,EAAE;QACxD,oBAAoB,EAAE,wBAAe,CAAC,uBAAuB,EAAE;QAC/D,eAAe,EAAE,wBAAe,CAAC,kBAAkB,EAAE;KACtD;IACK,GAAG,CAAC,GAAG;;;YACX,OAAO,MAAM,0BAAU,CAAC,WAAW,CAAQ;gBACzC,MAAM,EAAE,0BAAU,CAAC,IAAI;gBACvB,GAAG,EAAE,wBAAe,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,EAAE,gBAAgB,CAAC;gBAC1D,IAAI,EAAE;oBACJ,OAAO,EAAE,GAAG,CAAC,UAAU,CAAC,OAAO;oBAC/B,YAAY,EAAE,GAAG,CAAC,UAAU,CAAC,YAAY;oBACzC,UAAU,EAAE,GAAG,CAAC,UAAU,CAAC,UAAU;oBACrC,iBAAiB,EAAE,MAAA,GAAG,CAAC,UAAU,CAAC,iBAAiB,mCAAI,SAAS;oBAChE,oBAAoB,EAAE,MAAA,GAAG,CAAC,UAAU,CAAC,oBAAoB,mCAAI,KAAK;oBAClE,eAAe,EAAE,MAAA,GAAG,CAAC,UAAU,CAAC,eAAe,mCAAI,KAAK;iBACzD;aACF,CAAC,CAAC;QACL,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const telegramGetBotInfo: import("@agnocon/pieces-framework").IAction<import("@agnocon/pieces-framework").SecretTextProperty<true>, {}>;
2
+ //# sourceMappingURL=telegram-get-bot-info.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"telegram-get-bot-info.d.ts","sourceRoot":"","sources":["../../../src/lib/action/telegram-get-bot-info.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,kBAAkB,+GAwB7B,CAAC"}
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.telegramGetBotInfo = void 0;
4
+ const tslib_1 = require("tslib");
5
+ // Vendored from Activepieces packages/pieces/community/telegram-bot/src/lib/action/telegram-get-bot-info.ts (MIT).
6
+ // Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
7
+ const pieces_common_1 = require("@agnocon/pieces-common");
8
+ const pieces_framework_1 = require("@agnocon/pieces-framework");
9
+ const common_1 = require("../common");
10
+ const __1 = require("../..");
11
+ const output_schemas_1 = require("../output-schemas");
12
+ exports.telegramGetBotInfo = (0, pieces_framework_1.createAction)({
13
+ auth: __1.telegramBotAuth,
14
+ name: 'telegram_get_bot_info',
15
+ displayName: 'Get Bot Info',
16
+ description: "Get the authenticated bot's own identity and capabilities.",
17
+ audience: 'ai',
18
+ aiMetadata: {
19
+ description: "Returns the authenticated bot's own identity and capabilities (id, username, name, and which features such as inline mode or group joins are enabled). Use to confirm which bot the connection points at or to read the bot's @username before building an invite or mention. Read-only and takes no input.",
20
+ idempotent: true,
21
+ },
22
+ outputSchema: output_schemas_1.telegramGetBotInfoActionOutputSchema,
23
+ props: {},
24
+ run(ctx) {
25
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
26
+ try {
27
+ const response = yield pieces_common_1.httpClient.sendRequest({
28
+ method: pieces_common_1.HttpMethod.POST,
29
+ url: common_1.telegramCommons.getApiUrl(ctx.auth, 'getMe'),
30
+ });
31
+ return response.body;
32
+ }
33
+ catch (error) {
34
+ return error.errorMessage().response.body;
35
+ }
36
+ });
37
+ },
38
+ });
39
+ //# sourceMappingURL=telegram-get-bot-info.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"telegram-get-bot-info.js","sourceRoot":"","sources":["../../../src/lib/action/telegram-get-bot-info.ts"],"names":[],"mappings":";;;;AAAA,mHAAmH;AACnH,qEAAqE;AACrE,0DAA2E;AAC3E,gEAAyD;AACzD,sCAA4C;AAC5C,6BAAwC;AACxC,sDAAyE;AAE5D,QAAA,kBAAkB,GAAG,IAAA,+BAAY,EAAC;IAC7C,IAAI,EAAE,mBAAe;IACrB,IAAI,EAAE,uBAAuB;IAC7B,WAAW,EAAE,cAAc;IAC3B,WAAW,EAAE,4DAA4D;IACzE,QAAQ,EAAE,IAAI;IACd,UAAU,EAAE;QACV,WAAW,EACT,6SAA6S;QAC/S,UAAU,EAAE,IAAI;KACjB;IACD,YAAY,EAAE,qDAAoC;IAClD,KAAK,EAAE,EAAE;IACH,GAAG,CAAC,GAAG;;YACX,IAAI,CAAC;gBACH,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAQ;oBACnD,MAAM,EAAE,0BAAU,CAAC,IAAI;oBACvB,GAAG,EAAE,wBAAe,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,EAAE,OAAO,CAAC;iBAClD,CAAC,CAAC;gBACH,OAAO,QAAQ,CAAC,IAAI,CAAC;YACvB,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,OAAQ,KAAmB,CAAC,YAAY,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC;YAC3D,CAAC;QACH,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ export declare const telegramGetChatAdministrators: import("@agnocon/pieces-framework").IAction<import("@agnocon/pieces-framework").SecretTextProperty<true>, {
2
+ chat_id: import("@agnocon/pieces-framework").ShortTextProperty<true>;
3
+ }>;
4
+ //# sourceMappingURL=telegram-get-chat-administrators.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"telegram-get-chat-administrators.d.ts","sourceRoot":"","sources":["../../../src/lib/action/telegram-get-chat-administrators.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,6BAA6B;;EA6BxC,CAAC"}
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.telegramGetChatAdministrators = void 0;
4
+ const tslib_1 = require("tslib");
5
+ // Vendored from Activepieces packages/pieces/community/telegram-bot/src/lib/action/telegram-get-chat-administrators.ts (MIT).
6
+ // Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
7
+ const pieces_common_1 = require("@agnocon/pieces-common");
8
+ const pieces_framework_1 = require("@agnocon/pieces-framework");
9
+ const common_1 = require("../common");
10
+ const __1 = require("../..");
11
+ const output_schemas_1 = require("../output-schemas");
12
+ exports.telegramGetChatAdministrators = (0, pieces_framework_1.createAction)({
13
+ auth: __1.telegramBotAuth,
14
+ name: 'telegram_get_chat_administrators',
15
+ displayName: 'Get Chat Administrators',
16
+ description: 'List the administrators of a Telegram chat.',
17
+ audience: 'ai',
18
+ aiMetadata: {
19
+ description: "Lists the administrators of a chat by chat_id (a numeric id or @channelusername) — each admin's user, status (creator/administrator), and granted rights. Use to discover who can moderate a chat, or to find a user_id before checking one member with telegram_get_chat_member. Returns an empty list for private chats. Read-only.",
20
+ idempotent: true,
21
+ },
22
+ outputSchema: output_schemas_1.telegramGetChatAdministratorsActionOutputSchema,
23
+ props: {
24
+ chat_id: common_1.telegramCommons.chatIdProp(),
25
+ },
26
+ run(ctx) {
27
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
28
+ try {
29
+ const response = yield pieces_common_1.httpClient.sendRequest({
30
+ method: pieces_common_1.HttpMethod.POST,
31
+ url: common_1.telegramCommons.getApiUrl(ctx.auth, 'getChatAdministrators'),
32
+ body: {
33
+ chat_id: ctx.propsValue.chat_id,
34
+ },
35
+ });
36
+ return response.body;
37
+ }
38
+ catch (error) {
39
+ return error.errorMessage().response.body;
40
+ }
41
+ });
42
+ },
43
+ });
44
+ //# sourceMappingURL=telegram-get-chat-administrators.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"telegram-get-chat-administrators.js","sourceRoot":"","sources":["../../../src/lib/action/telegram-get-chat-administrators.ts"],"names":[],"mappings":";;;;AAAA,8HAA8H;AAC9H,qEAAqE;AACrE,0DAA2E;AAC3E,gEAAyD;AACzD,sCAA4C;AAC5C,6BAAwC;AACxC,sDAAoF;AAEvE,QAAA,6BAA6B,GAAG,IAAA,+BAAY,EAAC;IACxD,IAAI,EAAE,mBAAe;IACrB,IAAI,EAAE,kCAAkC;IACxC,WAAW,EAAE,yBAAyB;IACtC,WAAW,EAAE,6CAA6C;IAC1D,QAAQ,EAAE,IAAI;IACd,UAAU,EAAE;QACV,WAAW,EACT,uUAAuU;QACzU,UAAU,EAAE,IAAI;KACjB;IACD,YAAY,EAAE,gEAA+C;IAC7D,KAAK,EAAE;QACL,OAAO,EAAE,wBAAe,CAAC,UAAU,EAAE;KACtC;IACK,GAAG,CAAC,GAAG;;YACX,IAAI,CAAC;gBACH,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAQ;oBACnD,MAAM,EAAE,0BAAU,CAAC,IAAI;oBACvB,GAAG,EAAE,wBAAe,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,EAAE,uBAAuB,CAAC;oBACjE,IAAI,EAAE;wBACJ,OAAO,EAAE,GAAG,CAAC,UAAU,CAAC,OAAO;qBAChC;iBACF,CAAC,CAAC;gBACH,OAAO,QAAQ,CAAC,IAAI,CAAC;YACvB,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,OAAQ,KAAmB,CAAC,YAAY,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC;YAC3D,CAAC;QACH,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ export declare const telegramGetChatMemberCount: import("@agnocon/pieces-framework").IAction<import("@agnocon/pieces-framework").SecretTextProperty<true>, {
2
+ chat_id: import("@agnocon/pieces-framework").ShortTextProperty<true>;
3
+ }>;
4
+ //# sourceMappingURL=telegram-get-chat-member-count.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"telegram-get-chat-member-count.d.ts","sourceRoot":"","sources":["../../../src/lib/action/telegram-get-chat-member-count.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,0BAA0B;;EA6BrC,CAAC"}
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.telegramGetChatMemberCount = void 0;
4
+ const tslib_1 = require("tslib");
5
+ // Vendored from Activepieces packages/pieces/community/telegram-bot/src/lib/action/telegram-get-chat-member-count.ts (MIT).
6
+ // Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
7
+ const pieces_common_1 = require("@agnocon/pieces-common");
8
+ const pieces_framework_1 = require("@agnocon/pieces-framework");
9
+ const common_1 = require("../common");
10
+ const __1 = require("../..");
11
+ const output_schemas_1 = require("../output-schemas");
12
+ exports.telegramGetChatMemberCount = (0, pieces_framework_1.createAction)({
13
+ auth: __1.telegramBotAuth,
14
+ name: 'telegram_get_chat_member_count',
15
+ displayName: 'Get Chat Member Count',
16
+ description: 'Get the number of members in a Telegram chat.',
17
+ audience: 'ai',
18
+ aiMetadata: {
19
+ description: 'Returns the number of members in a chat by chat_id (a numeric id or @channelusername). Use to size a group or channel before posting or to monitor membership; for per-user details use telegram_get_chat_member. Read-only.',
20
+ idempotent: true,
21
+ },
22
+ outputSchema: output_schemas_1.telegramGetChatMemberCountActionOutputSchema,
23
+ props: {
24
+ chat_id: common_1.telegramCommons.chatIdProp(),
25
+ },
26
+ run(ctx) {
27
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
28
+ try {
29
+ const response = yield pieces_common_1.httpClient.sendRequest({
30
+ method: pieces_common_1.HttpMethod.POST,
31
+ url: common_1.telegramCommons.getApiUrl(ctx.auth, 'getChatMemberCount'),
32
+ body: {
33
+ chat_id: ctx.propsValue.chat_id,
34
+ },
35
+ });
36
+ return response.body;
37
+ }
38
+ catch (error) {
39
+ return error.errorMessage().response.body;
40
+ }
41
+ });
42
+ },
43
+ });
44
+ //# sourceMappingURL=telegram-get-chat-member-count.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"telegram-get-chat-member-count.js","sourceRoot":"","sources":["../../../src/lib/action/telegram-get-chat-member-count.ts"],"names":[],"mappings":";;;;AAAA,4HAA4H;AAC5H,qEAAqE;AACrE,0DAA2E;AAC3E,gEAAyD;AACzD,sCAA4C;AAC5C,6BAAwC;AACxC,sDAAiF;AAEpE,QAAA,0BAA0B,GAAG,IAAA,+BAAY,EAAC;IACrD,IAAI,EAAE,mBAAe;IACrB,IAAI,EAAE,gCAAgC;IACtC,WAAW,EAAE,uBAAuB;IACpC,WAAW,EAAE,+CAA+C;IAC5D,QAAQ,EAAE,IAAI;IACd,UAAU,EAAE;QACV,WAAW,EACT,8NAA8N;QAChO,UAAU,EAAE,IAAI;KACjB;IACD,YAAY,EAAE,6DAA4C;IAC1D,KAAK,EAAE;QACL,OAAO,EAAE,wBAAe,CAAC,UAAU,EAAE;KACtC;IACK,GAAG,CAAC,GAAG;;YACX,IAAI,CAAC;gBACH,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAQ;oBACnD,MAAM,EAAE,0BAAU,CAAC,IAAI;oBACvB,GAAG,EAAE,wBAAe,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,EAAE,oBAAoB,CAAC;oBAC9D,IAAI,EAAE;wBACJ,OAAO,EAAE,GAAG,CAAC,UAAU,CAAC,OAAO;qBAChC;iBACF,CAAC,CAAC;gBACH,OAAO,QAAQ,CAAC,IAAI,CAAC;YACvB,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,OAAQ,KAAmB,CAAC,YAAY,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC;YAC3D,CAAC;QACH,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,5 @@
1
+ export declare const telegramGetChatMember: import("@agnocon/pieces-framework").IAction<import("@agnocon/pieces-framework").SecretTextProperty<true>, {
2
+ chat_id: import("@agnocon/pieces-framework").ShortTextProperty<true>;
3
+ user_id: import("@agnocon/pieces-framework").ShortTextProperty<true>;
4
+ }>;
5
+ //# sourceMappingURL=telegram-get-chat-member.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"telegram-get-chat-member.d.ts","sourceRoot":"","sources":["../../../src/lib/action/telegram-get-chat-member.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,qBAAqB;;;EAoChC,CAAC"}
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.telegramGetChatMember = void 0;
4
+ const tslib_1 = require("tslib");
5
+ // Vendored from Activepieces packages/pieces/community/telegram-bot/src/lib/action/telegram-get-chat-member.ts (MIT).
6
+ // Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
7
+ const pieces_common_1 = require("@agnocon/pieces-common");
8
+ const pieces_framework_1 = require("@agnocon/pieces-framework");
9
+ const __1 = require("../..");
10
+ const common_1 = require("../common");
11
+ const output_schemas_1 = require("../output-schemas");
12
+ exports.telegramGetChatMember = (0, pieces_framework_1.createAction)({
13
+ auth: __1.telegramBotAuth,
14
+ name: 'telegram_get_chat_member',
15
+ displayName: 'Get Chat Member',
16
+ description: 'Get membership info for a user in a Telegram chat.',
17
+ audience: 'ai',
18
+ aiMetadata: {
19
+ description: "Looks up one user's membership in a chat by chat_id (a numeric id or @channelusername) and user_id, returning their status (member, administrator, creator, restricted, left, kicked) and permissions. Use to check whether a user belongs to a chat or what rights they hold before acting; to list all admins use telegram_get_chat_administrators. Read-only.",
20
+ idempotent: true,
21
+ },
22
+ outputSchema: output_schemas_1.telegramGetChatMemberActionOutputSchema,
23
+ props: {
24
+ chat_id: common_1.telegramCommons.chatIdProp(),
25
+ user_id: pieces_framework_1.Property.ShortText({
26
+ displayName: 'User Id',
27
+ description: 'Unique identifier for the user (e.g. from the New Message trigger payload).',
28
+ required: true,
29
+ }),
30
+ },
31
+ run(ctx) {
32
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
33
+ try {
34
+ const response = yield pieces_common_1.httpClient.sendRequest({
35
+ method: pieces_common_1.HttpMethod.POST,
36
+ url: common_1.telegramCommons.getApiUrl(ctx.auth, 'getChatMember'),
37
+ headers: {},
38
+ body: {
39
+ chat_id: ctx.propsValue.chat_id,
40
+ user_id: ctx.propsValue.user_id,
41
+ },
42
+ });
43
+ return response.body;
44
+ }
45
+ catch (error) {
46
+ return error.errorMessage().response.body;
47
+ }
48
+ });
49
+ },
50
+ });
51
+ //# sourceMappingURL=telegram-get-chat-member.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"telegram-get-chat-member.js","sourceRoot":"","sources":["../../../src/lib/action/telegram-get-chat-member.ts"],"names":[],"mappings":";;;;AAAA,sHAAsH;AACtH,qEAAqE;AACrE,0DAA2E;AAC3E,gEAAmE;AACnE,6BAAwC;AACxC,sCAA4C;AAC5C,sDAA4E;AAE/D,QAAA,qBAAqB,GAAG,IAAA,+BAAY,EAAC;IAChD,IAAI,EAAE,mBAAe;IACrB,IAAI,EAAE,0BAA0B;IAChC,WAAW,EAAE,iBAAiB;IAC9B,WAAW,EAAE,oDAAoD;IACjE,QAAQ,EAAE,IAAI;IACd,UAAU,EAAE;QACV,WAAW,EACT,kWAAkW;QACpW,UAAU,EAAE,IAAI;KACjB;IACD,YAAY,EAAE,wDAAuC;IACrD,KAAK,EAAE;QACL,OAAO,EAAE,wBAAe,CAAC,UAAU,EAAE;QACrC,OAAO,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC1B,WAAW,EAAE,SAAS;YACtB,WAAW,EAAE,6EAA6E;YAC1F,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG,CAAC,GAAG;;YACX,IAAI,CAAC;gBACH,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAQ;oBACnD,MAAM,EAAE,0BAAU,CAAC,IAAI;oBACvB,GAAG,EAAE,wBAAe,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,EAAE,eAAe,CAAC;oBACzD,OAAO,EAAE,EAAE;oBACX,IAAI,EAAE;wBACJ,OAAO,EAAE,GAAG,CAAC,UAAU,CAAC,OAAO;wBAC/B,OAAO,EAAE,GAAG,CAAC,UAAU,CAAC,OAAO;qBAChC;iBACF,CAAC,CAAC;gBACH,OAAO,QAAQ,CAAC,IAAI,CAAC;YACvB,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,OAAQ,KAAmB,CAAC,YAAY,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC;YAC3D,CAAC;QACH,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ export declare const telegramGetChat: import("@agnocon/pieces-framework").IAction<import("@agnocon/pieces-framework").SecretTextProperty<true>, {
2
+ chat_id: import("@agnocon/pieces-framework").ShortTextProperty<true>;
3
+ }>;
4
+ //# sourceMappingURL=telegram-get-chat.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"telegram-get-chat.d.ts","sourceRoot":"","sources":["../../../src/lib/action/telegram-get-chat.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,eAAe;;EA6B1B,CAAC"}
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.telegramGetChat = void 0;
4
+ const tslib_1 = require("tslib");
5
+ // Vendored from Activepieces packages/pieces/community/telegram-bot/src/lib/action/telegram-get-chat.ts (MIT).
6
+ // Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
7
+ const pieces_common_1 = require("@agnocon/pieces-common");
8
+ const pieces_framework_1 = require("@agnocon/pieces-framework");
9
+ const common_1 = require("../common");
10
+ const __1 = require("../..");
11
+ const output_schemas_1 = require("../output-schemas");
12
+ exports.telegramGetChat = (0, pieces_framework_1.createAction)({
13
+ auth: __1.telegramBotAuth,
14
+ name: 'telegram_get_chat',
15
+ displayName: 'Get Chat',
16
+ description: 'Get up-to-date information about a Telegram chat.',
17
+ audience: 'ai',
18
+ aiMetadata: {
19
+ description: 'Looks up current details about a chat (title, description, type, photo, member count) by chat_id (a numeric id or @channelusername). Use to resolve or inspect a chat before acting on it, or to confirm the bot can reach it; the bot must be a member of or have access to the chat. Read-only and safe to retry.',
20
+ idempotent: true,
21
+ },
22
+ outputSchema: output_schemas_1.telegramGetChatActionOutputSchema,
23
+ props: {
24
+ chat_id: common_1.telegramCommons.chatIdProp(),
25
+ },
26
+ run(ctx) {
27
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
28
+ try {
29
+ const response = yield pieces_common_1.httpClient.sendRequest({
30
+ method: pieces_common_1.HttpMethod.POST,
31
+ url: common_1.telegramCommons.getApiUrl(ctx.auth, 'getChat'),
32
+ body: {
33
+ chat_id: ctx.propsValue.chat_id,
34
+ },
35
+ });
36
+ return response.body;
37
+ }
38
+ catch (error) {
39
+ return error.errorMessage().response.body;
40
+ }
41
+ });
42
+ },
43
+ });
44
+ //# sourceMappingURL=telegram-get-chat.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"telegram-get-chat.js","sourceRoot":"","sources":["../../../src/lib/action/telegram-get-chat.ts"],"names":[],"mappings":";;;;AAAA,+GAA+G;AAC/G,qEAAqE;AACrE,0DAA2E;AAC3E,gEAAyD;AACzD,sCAA4C;AAC5C,6BAAwC;AACxC,sDAAsE;AAEzD,QAAA,eAAe,GAAG,IAAA,+BAAY,EAAC;IAC1C,IAAI,EAAE,mBAAe;IACrB,IAAI,EAAE,mBAAmB;IACzB,WAAW,EAAE,UAAU;IACvB,WAAW,EAAE,mDAAmD;IAChE,QAAQ,EAAE,IAAI;IACd,UAAU,EAAE;QACV,WAAW,EACT,qTAAqT;QACvT,UAAU,EAAE,IAAI;KACjB;IACD,YAAY,EAAE,kDAAiC;IAC/C,KAAK,EAAE;QACL,OAAO,EAAE,wBAAe,CAAC,UAAU,EAAE;KACtC;IACK,GAAG,CAAC,GAAG;;YACX,IAAI,CAAC;gBACH,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAQ;oBACnD,MAAM,EAAE,0BAAU,CAAC,IAAI;oBACvB,GAAG,EAAE,wBAAe,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,EAAE,SAAS,CAAC;oBACnD,IAAI,EAAE;wBACJ,OAAO,EAAE,GAAG,CAAC,UAAU,CAAC,OAAO;qBAChC;iBACF,CAAC,CAAC;gBACH,OAAO,QAAQ,CAAC,IAAI,CAAC;YACvB,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,OAAQ,KAAmB,CAAC,YAAY,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC;YAC3D,CAAC;QACH,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,5 @@
1
+ export declare const telegramGetFile: import("@agnocon/pieces-framework").IAction<import("@agnocon/pieces-framework").SecretTextProperty<true>, {
2
+ file_id: import("@agnocon/pieces-framework").ShortTextProperty<true>;
3
+ download: import("@agnocon/pieces-framework").CheckboxProperty<false>;
4
+ }>;
5
+ //# sourceMappingURL=telegram-get-file.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"telegram-get-file.d.ts","sourceRoot":"","sources":["../../../src/lib/action/telegram-get-file.ts"],"names":[],"mappings":"AAoBA,eAAO,MAAM,eAAe;;;EAgE1B,CAAC"}
@@ -0,0 +1,72 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.telegramGetFile = void 0;
4
+ const tslib_1 = require("tslib");
5
+ // Vendored from Activepieces packages/pieces/community/telegram-bot/src/lib/action/telegram-get-file.ts (MIT).
6
+ // Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
7
+ const pieces_framework_1 = require("@agnocon/pieces-framework");
8
+ const pieces_common_1 = require("@agnocon/pieces-common");
9
+ const common_1 = require("../common");
10
+ const __1 = require("../..");
11
+ const output_schemas_1 = require("../output-schemas");
12
+ exports.telegramGetFile = (0, pieces_framework_1.createAction)({
13
+ auth: __1.telegramBotAuth,
14
+ name: 'telegram_get_file',
15
+ displayName: 'Get File',
16
+ description: 'Resolve a Telegram file_id to its metadata and download URL.',
17
+ audience: 'ai',
18
+ aiMetadata: {
19
+ description: 'Resolves a Telegram file_id (from a message the bot received) to its file metadata and download URL, and optionally downloads the content as base64 when download is enabled. Use to retrieve a file attached to an incoming message; the download URL Telegram returns is time-limited. Read-only and safe to retry.',
20
+ idempotent: true,
21
+ },
22
+ outputSchema: output_schemas_1.telegramGetFileActionOutputSchema,
23
+ props: {
24
+ file_id: pieces_framework_1.Property.ShortText({
25
+ displayName: 'File ID',
26
+ description: 'File identifier to get information about (from a received message).',
27
+ required: true,
28
+ }),
29
+ download: pieces_framework_1.Property.Checkbox({
30
+ displayName: 'Download File',
31
+ description: 'If enabled, the file is downloaded and returned as base64.',
32
+ required: false,
33
+ defaultValue: false,
34
+ }),
35
+ },
36
+ run(ctx) {
37
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
38
+ const fileInfoResponse = yield pieces_common_1.httpClient.sendRequest({
39
+ method: pieces_common_1.HttpMethod.POST,
40
+ url: common_1.telegramCommons.getApiUrl(ctx.auth, 'getFile'),
41
+ body: {
42
+ file_id: ctx.propsValue.file_id,
43
+ },
44
+ });
45
+ if (!fileInfoResponse.body.ok) {
46
+ throw new Error(`Failed to get file info: ${JSON.stringify(fileInfoResponse.body)}`);
47
+ }
48
+ const fileInfo = fileInfoResponse.body.result;
49
+ const fileUrl = fileInfo.file_path
50
+ ? `https://api.telegram.org/file/bot${ctx.auth.secret_text}/${fileInfo.file_path}`
51
+ : undefined;
52
+ if (ctx.propsValue.download && fileUrl) {
53
+ const fileResponse = yield pieces_common_1.httpClient.sendRequest({
54
+ method: pieces_common_1.HttpMethod.GET,
55
+ url: fileUrl,
56
+ responseType: 'arraybuffer',
57
+ });
58
+ const base64Content = Buffer.from(fileResponse.body).toString('base64');
59
+ return {
60
+ file_info: fileInfo,
61
+ file_url: fileUrl,
62
+ file_content_base64: base64Content,
63
+ };
64
+ }
65
+ return {
66
+ file_info: fileInfo,
67
+ file_url: fileUrl,
68
+ };
69
+ });
70
+ },
71
+ });
72
+ //# sourceMappingURL=telegram-get-file.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"telegram-get-file.js","sourceRoot":"","sources":["../../../src/lib/action/telegram-get-file.ts"],"names":[],"mappings":";;;;AAAA,+GAA+G;AAC/G,qEAAqE;AACrE,gEAAmE;AACnE,0DAAgE;AAChE,sCAA4C;AAC5C,6BAAwC;AACxC,sDAAsE;AAczD,QAAA,eAAe,GAAG,IAAA,+BAAY,EAAC;IAC1C,IAAI,EAAE,mBAAe;IACrB,IAAI,EAAE,mBAAmB;IACzB,WAAW,EAAE,UAAU;IACvB,WAAW,EAAE,8DAA8D;IAC3E,QAAQ,EAAE,IAAI;IACd,UAAU,EAAE;QACV,WAAW,EACT,uTAAuT;QACzT,UAAU,EAAE,IAAI;KACjB;IACD,YAAY,EAAE,kDAAiC;IAC/C,KAAK,EAAE;QACL,OAAO,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC1B,WAAW,EAAE,SAAS;YACtB,WAAW,EAAE,qEAAqE;YAClF,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,QAAQ,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YAC1B,WAAW,EAAE,eAAe;YAC5B,WAAW,EAAE,4DAA4D;YACzE,QAAQ,EAAE,KAAK;YACf,YAAY,EAAE,KAAK;SACpB,CAAC;KACH;IACK,GAAG,CAAC,GAAG;;YACX,MAAM,gBAAgB,GAAG,MAAM,0BAAU,CAAC,WAAW,CAA0B;gBAC7E,MAAM,EAAE,0BAAU,CAAC,IAAI;gBACvB,GAAG,EAAE,wBAAe,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,EAAE,SAAS,CAAC;gBACnD,IAAI,EAAE;oBACJ,OAAO,EAAE,GAAG,CAAC,UAAU,CAAC,OAAO;iBAChC;aACF,CAAC,CAAC;YAEH,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC;gBAC9B,MAAM,IAAI,KAAK,CAAC,4BAA4B,IAAI,CAAC,SAAS,CAAC,gBAAgB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YACvF,CAAC;YAED,MAAM,QAAQ,GAAG,gBAAgB,CAAC,IAAI,CAAC,MAAM,CAAC;YAC9C,MAAM,OAAO,GAAG,QAAQ,CAAC,SAAS;gBAChC,CAAC,CAAC,oCAAoC,GAAG,CAAC,IAAI,CAAC,WAAW,IAAI,QAAQ,CAAC,SAAS,EAAE;gBAClF,CAAC,CAAC,SAAS,CAAC;YAEd,IAAI,GAAG,CAAC,UAAU,CAAC,QAAQ,IAAI,OAAO,EAAE,CAAC;gBACvC,MAAM,YAAY,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAS;oBACxD,MAAM,EAAE,0BAAU,CAAC,GAAG;oBACtB,GAAG,EAAE,OAAO;oBACZ,YAAY,EAAE,aAAa;iBAC5B,CAAC,CAAC;gBAEH,MAAM,aAAa,GAAG,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;gBAExE,OAAO;oBACL,SAAS,EAAE,QAAQ;oBACnB,QAAQ,EAAE,OAAO;oBACjB,mBAAmB,EAAE,aAAa;iBACnC,CAAC;YACJ,CAAC;YAED,OAAO;gBACL,SAAS,EAAE,QAAQ;gBACnB,QAAQ,EAAE,OAAO;aAClB,CAAC;QACJ,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,6 @@
1
+ export declare const telegramPinMessage: import("@agnocon/pieces-framework").IAction<import("@agnocon/pieces-framework").SecretTextProperty<true>, {
2
+ chat_id: import("@agnocon/pieces-framework").ShortTextProperty<true>;
3
+ message_id: import("@agnocon/pieces-framework").ShortTextProperty<true>;
4
+ disable_notification: import("@agnocon/pieces-framework").CheckboxProperty<false>;
5
+ }>;
6
+ //# sourceMappingURL=telegram-pin-message.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"telegram-pin-message.d.ts","sourceRoot":"","sources":["../../../src/lib/action/telegram-pin-message.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,kBAAkB;;;;EAsC7B,CAAC"}
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.telegramPinMessage = void 0;
4
+ const tslib_1 = require("tslib");
5
+ // Vendored from Activepieces packages/pieces/community/telegram-bot/src/lib/action/telegram-pin-message.ts (MIT).
6
+ // Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
7
+ const pieces_framework_1 = require("@agnocon/pieces-framework");
8
+ const pieces_common_1 = require("@agnocon/pieces-common");
9
+ const common_1 = require("../common");
10
+ const __1 = require("../..");
11
+ const output_schemas_1 = require("../output-schemas");
12
+ exports.telegramPinMessage = (0, pieces_framework_1.createAction)({
13
+ auth: __1.telegramBotAuth,
14
+ name: 'telegram_pin_message',
15
+ displayName: 'Pin Message',
16
+ description: 'Pin a message in a Telegram chat.',
17
+ audience: 'ai',
18
+ aiMetadata: {
19
+ description: 'Pins an existing message in a chat, targeted by chat_id (a numeric id or @channelusername the bot can reach) and message_id (from a prior send action or the New Message trigger); the bot must be an administrator with pin rights. Use to highlight an announcement or important message; to remove the pin use telegram_unpin_message. Idempotent: pinning an already-pinned message leaves it pinned.',
20
+ idempotent: true,
21
+ },
22
+ outputSchema: output_schemas_1.telegramPinMessageActionOutputSchema,
23
+ props: {
24
+ chat_id: common_1.telegramCommons.chatIdProp(),
25
+ message_id: pieces_framework_1.Property.ShortText({
26
+ displayName: 'Message Id',
27
+ description: 'Identifier of the message to pin.',
28
+ required: true,
29
+ }),
30
+ disable_notification: pieces_framework_1.Property.Checkbox({
31
+ displayName: 'Disable Notification',
32
+ description: 'Pass True if it is not necessary to send a notification to all chat members.',
33
+ required: false,
34
+ defaultValue: false,
35
+ }),
36
+ },
37
+ run(ctx) {
38
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
39
+ var _a;
40
+ return yield pieces_common_1.httpClient.sendRequest({
41
+ method: pieces_common_1.HttpMethod.POST,
42
+ url: common_1.telegramCommons.getApiUrl(ctx.auth, 'pinChatMessage'),
43
+ body: {
44
+ chat_id: ctx.propsValue.chat_id,
45
+ message_id: ctx.propsValue.message_id,
46
+ disable_notification: (_a = ctx.propsValue.disable_notification) !== null && _a !== void 0 ? _a : false,
47
+ },
48
+ });
49
+ });
50
+ },
51
+ });
52
+ //# sourceMappingURL=telegram-pin-message.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"telegram-pin-message.js","sourceRoot":"","sources":["../../../src/lib/action/telegram-pin-message.ts"],"names":[],"mappings":";;;;AAAA,kHAAkH;AAClH,qEAAqE;AACrE,gEAAmE;AACnE,0DAAgE;AAChE,sCAA4C;AAC5C,6BAAwC;AACxC,sDAAyE;AAE5D,QAAA,kBAAkB,GAAG,IAAA,+BAAY,EAAC;IAC7C,IAAI,EAAE,mBAAe;IACrB,IAAI,EAAE,sBAAsB;IAC5B,WAAW,EAAE,aAAa;IAC1B,WAAW,EAAE,mCAAmC;IAChD,QAAQ,EAAE,IAAI;IACd,UAAU,EAAE;QACV,WAAW,EACT,2YAA2Y;QAC7Y,UAAU,EAAE,IAAI;KACjB;IACD,YAAY,EAAE,qDAAoC;IAClD,KAAK,EAAE;QACL,OAAO,EAAE,wBAAe,CAAC,UAAU,EAAE;QACrC,UAAU,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC7B,WAAW,EAAE,YAAY;YACzB,WAAW,EAAE,mCAAmC;YAChD,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,oBAAoB,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YACtC,WAAW,EAAE,sBAAsB;YACnC,WAAW,EACT,8EAA8E;YAChF,QAAQ,EAAE,KAAK;YACf,YAAY,EAAE,KAAK;SACpB,CAAC;KACH;IACK,GAAG,CAAC,GAAG;;;YACX,OAAO,MAAM,0BAAU,CAAC,WAAW,CAAQ;gBACzC,MAAM,EAAE,0BAAU,CAAC,IAAI;gBACvB,GAAG,EAAE,wBAAe,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,EAAE,gBAAgB,CAAC;gBAC1D,IAAI,EAAE;oBACJ,OAAO,EAAE,GAAG,CAAC,UAAU,CAAC,OAAO;oBAC/B,UAAU,EAAE,GAAG,CAAC,UAAU,CAAC,UAAU;oBACrC,oBAAoB,EAAE,MAAA,GAAG,CAAC,UAAU,CAAC,oBAAoB,mCAAI,KAAK;iBACnE;aACF,CAAC,CAAC;QACL,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,16 @@
1
+ export declare const telegramSendAudio: import("@agnocon/pieces-framework").IAction<import("@agnocon/pieces-framework").SecretTextProperty<true>, {
2
+ chat_id: import("@agnocon/pieces-framework").ShortTextProperty<true>;
3
+ audio: import("@agnocon/pieces-framework").FileProperty<false, false>;
4
+ audio_id: import("@agnocon/pieces-framework").ShortTextProperty<false>;
5
+ caption: import("@agnocon/pieces-framework").LongTextProperty<false>;
6
+ format: import("@agnocon/pieces-framework").StaticDropdownProperty<string, false>;
7
+ duration: import("@agnocon/pieces-framework").NumberProperty<false>;
8
+ performer: import("@agnocon/pieces-framework").ShortTextProperty<false>;
9
+ title: import("@agnocon/pieces-framework").ShortTextProperty<false>;
10
+ message_thread_id: import("@agnocon/pieces-framework").ShortTextProperty<false>;
11
+ disable_notification: import("@agnocon/pieces-framework").CheckboxProperty<false>;
12
+ protect_content: import("@agnocon/pieces-framework").CheckboxProperty<false>;
13
+ reply_to_message_id: import("@agnocon/pieces-framework").NumberProperty<false>;
14
+ reply_markup: import("@agnocon/pieces-framework").JsonProperty<false>;
15
+ }>;
16
+ //# sourceMappingURL=telegram-send-audio.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"telegram-send-audio.d.ts","sourceRoot":"","sources":["../../../src/lib/action/telegram-send-audio.ts"],"names":[],"mappings":"AAiBA,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;EA6I5B,CAAC"}