@aracna/telegram-bot 2.0.9 → 2.0.11

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 (104) hide show
  1. package/apis/telegram-api.d.ts +1 -1
  2. package/apis/telegram-api.js +1 -64
  3. package/apis/telegram-file-api.d.ts +1 -1
  4. package/apis/telegram-file-api.js +1 -24
  5. package/classes/client.d.ts +2 -2
  6. package/classes/client.js +1 -420
  7. package/definitions/constants.d.ts +1 -1
  8. package/definitions/constants.js +1 -57
  9. package/definitions/enums.js +1 -7
  10. package/definitions/interfaces.d.ts +1 -1
  11. package/definitions/interfaces.js +0 -2
  12. package/definitions/types.d.ts +1 -1
  13. package/definitions/types.js +0 -2
  14. package/index.cjs +1 -1
  15. package/index.js +1 -273
  16. package/loggers/class-logger.js +1 -6
  17. package/package.json +1 -1
  18. package/requests/add-requests.d.ts +1 -1
  19. package/requests/add-requests.js +1 -14
  20. package/requests/answer-requests.d.ts +1 -1
  21. package/requests/answer-requests.js +1 -23
  22. package/requests/approve-requests.d.ts +1 -1
  23. package/requests/approve-requests.js +1 -7
  24. package/requests/ban-requests.d.ts +1 -1
  25. package/requests/ban-requests.js +1 -11
  26. package/requests/business-requests.d.ts +1 -1
  27. package/requests/business-requests.js +1 -63
  28. package/requests/close-requests.d.ts +1 -1
  29. package/requests/close-requests.js +1 -11
  30. package/requests/copy-requests.d.ts +1 -1
  31. package/requests/copy-requests.js +1 -11
  32. package/requests/create-requests.d.ts +1 -1
  33. package/requests/create-requests.js +1 -30
  34. package/requests/decline-requests.d.ts +1 -1
  35. package/requests/decline-requests.js +1 -7
  36. package/requests/delete-requests.d.ts +1 -1
  37. package/requests/delete-requests.js +1 -35
  38. package/requests/download-requests.d.ts +1 -1
  39. package/requests/download-requests.js +1 -29
  40. package/requests/edit-requests.d.ts +2 -2
  41. package/requests/edit-requests.js +1 -50
  42. package/requests/export-requests.d.ts +1 -1
  43. package/requests/export-requests.js +1 -7
  44. package/requests/forward-requests.d.ts +1 -1
  45. package/requests/forward-requests.js +1 -11
  46. package/requests/get-requests.d.ts +1 -1
  47. package/requests/get-requests.js +1 -88
  48. package/requests/gift-requests.d.ts +1 -1
  49. package/requests/gift-requests.js +1 -27
  50. package/requests/hide-requests.d.ts +1 -1
  51. package/requests/hide-requests.js +1 -7
  52. package/requests/leave-requests.d.ts +1 -1
  53. package/requests/leave-requests.js +1 -7
  54. package/requests/log-requests.d.ts +1 -1
  55. package/requests/log-requests.js +1 -7
  56. package/requests/pin-requests.d.ts +1 -1
  57. package/requests/pin-requests.js +1 -7
  58. package/requests/promote-requests.d.ts +1 -1
  59. package/requests/promote-requests.js +1 -7
  60. package/requests/refund-requests.d.ts +1 -1
  61. package/requests/refund-requests.js +1 -7
  62. package/requests/reopen-requests.d.ts +1 -1
  63. package/requests/reopen-requests.js +1 -11
  64. package/requests/replace-requests.d.ts +1 -1
  65. package/requests/replace-requests.js +1 -14
  66. package/requests/restrict-requests.d.ts +1 -1
  67. package/requests/restrict-requests.js +1 -7
  68. package/requests/revoke-requests.d.ts +1 -1
  69. package/requests/revoke-requests.js +1 -7
  70. package/requests/save-requests.d.ts +1 -1
  71. package/requests/save-requests.js +1 -7
  72. package/requests/send-requests.d.ts +1 -1
  73. package/requests/send-requests.js +1 -106
  74. package/requests/set-requests.d.ts +1 -1
  75. package/requests/set-requests.js +1 -99
  76. package/requests/stop-requests.d.ts +1 -1
  77. package/requests/stop-requests.js +1 -11
  78. package/requests/story-requests.d.ts +1 -1
  79. package/requests/story-requests.js +1 -15
  80. package/requests/unban-requests.d.ts +1 -1
  81. package/requests/unban-requests.js +1 -11
  82. package/requests/unhide-requests.d.ts +1 -1
  83. package/requests/unhide-requests.js +1 -7
  84. package/requests/unpin-requests.d.ts +1 -1
  85. package/requests/unpin-requests.js +1 -19
  86. package/requests/upload-requests.d.ts +1 -1
  87. package/requests/upload-requests.js +1 -7
  88. package/requests/verification-requests.d.ts +1 -1
  89. package/requests/verification-requests.js +1 -19
  90. package/requests/webhook-requests.d.ts +1 -1
  91. package/requests/webhook-requests.js +1 -20
  92. package/utils/callback-query-utils.d.ts +1 -1
  93. package/utils/callback-query-utils.js +1 -25
  94. package/utils/command-utils.d.ts +1 -1
  95. package/utils/command-utils.js +1 -28
  96. package/utils/context-utils.d.ts +2 -2
  97. package/utils/context-utils.js +1 -42
  98. package/utils/html-utils.js +1 -18
  99. package/utils/inline-keyboard-utils.d.ts +1 -1
  100. package/utils/inline-keyboard-utils.js +1 -43
  101. package/utils/reply-to-message-utils.d.ts +1 -1
  102. package/utils/reply-to-message-utils.js +1 -36
  103. package/utils/start-message-utils.d.ts +1 -1
  104. package/utils/start-message-utils.js +1 -40
@@ -1,4 +1,4 @@
1
1
  import type { FetchError } from '@aracna/core';
2
2
  import type { ApproveChatJoinRequest } from '@aracna/telegram-bot-types';
3
- import type { TelegramApiConfig } from '../definitions/interfaces';
3
+ import type { TelegramApiConfig } from '../definitions/interfaces.js';
4
4
  export declare function approveChatJoinRequest(body: ApproveChatJoinRequest, config?: TelegramApiConfig): Promise<boolean | FetchError>;
@@ -1,7 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.approveChatJoinRequest = approveChatJoinRequest;
4
- const telegram_api_1 = require("../apis/telegram-api");
5
- async function approveChatJoinRequest(body, config) {
6
- return telegram_api_1.TelegramAPI.post('approveChatJoinRequest', body, config);
7
- }
1
+ import{TelegramAPI as r}from"../apis/telegram-api.js";async function p(e,o){return r.post("approveChatJoinRequest",e,o)}export{p as approveChatJoinRequest};
@@ -1,5 +1,5 @@
1
1
  import type { FetchError } from '@aracna/core';
2
2
  import type { BanChatMember, BanChatSenderChat } from '@aracna/telegram-bot-types';
3
- import type { TelegramApiConfig } from '../definitions/interfaces';
3
+ import type { TelegramApiConfig } from '../definitions/interfaces.js';
4
4
  export declare function banChatMember(body: BanChatMember, config?: TelegramApiConfig): Promise<boolean | FetchError>;
5
5
  export declare function banChatSenderChat(body: BanChatSenderChat, config?: TelegramApiConfig): Promise<boolean | FetchError>;
@@ -1,11 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.banChatMember = banChatMember;
4
- exports.banChatSenderChat = banChatSenderChat;
5
- const telegram_api_1 = require("../apis/telegram-api");
6
- async function banChatMember(body, config) {
7
- return telegram_api_1.TelegramAPI.post('banChatMember', body, config);
8
- }
9
- async function banChatSenderChat(body, config) {
10
- return telegram_api_1.TelegramAPI.post('banChatSenderChat', body, config);
11
- }
1
+ import{TelegramAPI as a}from"../apis/telegram-api.js";async function n(e,r){return a.post("banChatMember",e,r)}async function o(e,r){return a.post("banChatSenderChat",e,r)}export{n as banChatMember,o as banChatSenderChat};
@@ -1,6 +1,6 @@
1
1
  import { type FetchError } from '@aracna/core';
2
2
  import type { BusinessConnection, DeleteBusinessMessages, GetBusinessAccountGifts, GetBusinessAccountStarBalance, GetBusinessConnection, OwnedGifts, ReadBusinessMessage, RemoveBusinessAccountProfilePhoto, SetBusinessAccountBio, SetBusinessAccountGiftSettings, SetBusinessAccountName, SetBusinessAccountProfilePhoto, SetBusinessAccountUsername, TransferBusinessAccountStars } from '@aracna/telegram-bot-types';
3
- import type { TelegramApiConfig } from '../definitions/interfaces';
3
+ import type { TelegramApiConfig } from '../definitions/interfaces.js';
4
4
  export declare function deleteBusinessMessages(body: DeleteBusinessMessages, config?: TelegramApiConfig): Promise<boolean | FetchError>;
5
5
  export declare function getBusinessAccountGifts(body: GetBusinessAccountGifts, config?: TelegramApiConfig): Promise<OwnedGifts | FetchError>;
6
6
  export declare function getBusinessAccountStarBalance(body: GetBusinessAccountStarBalance, config?: TelegramApiConfig): Promise<number | FetchError>;
@@ -1,63 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.deleteBusinessMessages = deleteBusinessMessages;
4
- exports.getBusinessAccountGifts = getBusinessAccountGifts;
5
- exports.getBusinessAccountStarBalance = getBusinessAccountStarBalance;
6
- exports.getBusinessConnection = getBusinessConnection;
7
- exports.readBusinessMessage = readBusinessMessage;
8
- exports.removeBusinessAccountProfilePhoto = removeBusinessAccountProfilePhoto;
9
- exports.setBusinessAccountBio = setBusinessAccountBio;
10
- exports.setBusinessAccountGiftSettings = setBusinessAccountGiftSettings;
11
- exports.setBusinessAccountName = setBusinessAccountName;
12
- exports.setBusinessAccountProfilePhoto = setBusinessAccountProfilePhoto;
13
- exports.setBusinessAccountUsername = setBusinessAccountUsername;
14
- exports.transferBusinessAccountStars = transferBusinessAccountStars;
15
- const telegram_api_1 = require("../apis/telegram-api");
16
- async function deleteBusinessMessages(body, config) {
17
- return telegram_api_1.TelegramAPI.post('deleteBusinessMessages', body, config);
18
- }
19
- async function getBusinessAccountGifts(body, config) {
20
- return telegram_api_1.TelegramAPI.post('getBusinessAccountGifts', body, config);
21
- }
22
- async function getBusinessAccountStarBalance(body, config) {
23
- return telegram_api_1.TelegramAPI.post('getBusinessAccountStarBalance', body, config);
24
- }
25
- async function getBusinessConnection(body, config) {
26
- return telegram_api_1.TelegramAPI.post('getBusinessConnection', body, config);
27
- }
28
- async function readBusinessMessage(body, config) {
29
- return telegram_api_1.TelegramAPI.post('readBusinessMessage', body, config);
30
- }
31
- async function removeBusinessAccountProfilePhoto(body, config) {
32
- return telegram_api_1.TelegramAPI.post('removeBusinessAccountProfilePhoto', body, config);
33
- }
34
- async function setBusinessAccountBio(body, config) {
35
- return telegram_api_1.TelegramAPI.post('setBusinessAccountBio', body, config);
36
- }
37
- async function setBusinessAccountGiftSettings(body, config) {
38
- return telegram_api_1.TelegramAPI.post('setBusinessAccountGiftSettings', body, config);
39
- }
40
- async function setBusinessAccountName(body, config) {
41
- return telegram_api_1.TelegramAPI.post('setBusinessAccountName', body, config);
42
- }
43
- async function setBusinessAccountProfilePhoto(body, config) {
44
- return telegram_api_1.TelegramAPI.post('setBusinessAccountProfilePhoto', {
45
- ...body,
46
- photo: 'animation' in body.photo && body.photo.animation instanceof Blob
47
- ? { ...body.photo, animation: 'attach://photo_blob' }
48
- : 'photo' in body.photo && body.photo.photo instanceof Blob
49
- ? { ...body.photo, photo: 'attach://photo_blob' }
50
- : body.photo,
51
- ...('animation' in body.photo && body.photo.animation instanceof Blob
52
- ? { photo_blob: body.photo.animation }
53
- : 'photo' in body.photo && body.photo.photo instanceof Blob
54
- ? { photo_blob: body.photo.photo }
55
- : {})
56
- }, config);
57
- }
58
- async function setBusinessAccountUsername(body, config) {
59
- return telegram_api_1.TelegramAPI.post('setBusinessAccountUsername', body, config);
60
- }
61
- async function transferBusinessAccountStars(body, config) {
62
- return telegram_api_1.TelegramAPI.post('transferBusinessAccountStars', body, config);
63
- }
1
+ import{TelegramAPI as o}from"../apis/telegram-api.js";async function i(e,s){return o.post("deleteBusinessMessages",e,s)}async function r(e,s){return o.post("getBusinessAccountGifts",e,s)}async function c(e,s){return o.post("getBusinessAccountStarBalance",e,s)}async function u(e,s){return o.post("getBusinessConnection",e,s)}async function a(e,s){return o.post("readBusinessMessage",e,s)}async function B(e,s){return o.post("removeBusinessAccountProfilePhoto",e,s)}async function p(e,s){return o.post("setBusinessAccountBio",e,s)}async function f(e,s){return o.post("setBusinessAccountGiftSettings",e,s)}async function l(e,s){return o.post("setBusinessAccountName",e,s)}async function A(e,s){return o.post("setBusinessAccountProfilePhoto",{...e,photo:"animation"in e.photo&&e.photo.animation instanceof Blob?{...e.photo,animation:"attach://photo_blob"}:"photo"in e.photo&&e.photo.photo instanceof Blob?{...e.photo,photo:"attach://photo_blob"}:e.photo,..."animation"in e.photo&&e.photo.animation instanceof Blob?{photo_blob:e.photo.animation}:"photo"in e.photo&&e.photo.photo instanceof Blob?{photo_blob:e.photo.photo}:{}},s)}async function m(e,s){return o.post("setBusinessAccountUsername",e,s)}async function g(e,s){return o.post("transferBusinessAccountStars",e,s)}export{i as deleteBusinessMessages,r as getBusinessAccountGifts,c as getBusinessAccountStarBalance,u as getBusinessConnection,a as readBusinessMessage,B as removeBusinessAccountProfilePhoto,p as setBusinessAccountBio,f as setBusinessAccountGiftSettings,l as setBusinessAccountName,A as setBusinessAccountProfilePhoto,m as setBusinessAccountUsername,g as transferBusinessAccountStars};
@@ -1,5 +1,5 @@
1
1
  import type { FetchError } from '@aracna/core';
2
2
  import type { CloseForumTopic, CloseGeneralForumTopic } from '@aracna/telegram-bot-types';
3
- import type { TelegramApiConfig } from '../definitions/interfaces';
3
+ import type { TelegramApiConfig } from '../definitions/interfaces.js';
4
4
  export declare function closeForumTopic(body: CloseForumTopic, config?: TelegramApiConfig): Promise<boolean | FetchError>;
5
5
  export declare function closeGeneralForumTopic(body: CloseGeneralForumTopic, config?: TelegramApiConfig): Promise<boolean | FetchError>;
@@ -1,11 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.closeForumTopic = closeForumTopic;
4
- exports.closeGeneralForumTopic = closeGeneralForumTopic;
5
- const telegram_api_1 = require("../apis/telegram-api");
6
- async function closeForumTopic(body, config) {
7
- return telegram_api_1.TelegramAPI.post('closeForumTopic', body, config);
8
- }
9
- async function closeGeneralForumTopic(body, config) {
10
- return telegram_api_1.TelegramAPI.post('closeGeneralForumTopic', body, config);
11
- }
1
+ import{TelegramAPI as r}from"../apis/telegram-api.js";async function c(o,e){return r.post("closeForumTopic",o,e)}async function m(o,e){return r.post("closeGeneralForumTopic",o,e)}export{c as closeForumTopic,m as closeGeneralForumTopic};
@@ -1,5 +1,5 @@
1
1
  import type { FetchError } from '@aracna/core';
2
2
  import type { CopyMessage, CopyMessages, MessageId } from '@aracna/telegram-bot-types';
3
- import type { TelegramApiConfig } from '../definitions/interfaces';
3
+ import type { TelegramApiConfig } from '../definitions/interfaces.js';
4
4
  export declare function copyMessage(body: CopyMessage, config?: TelegramApiConfig): Promise<MessageId | FetchError>;
5
5
  export declare function copyMessages(body: CopyMessages, config?: TelegramApiConfig): Promise<MessageId[] | FetchError>;
@@ -1,11 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.copyMessage = copyMessage;
4
- exports.copyMessages = copyMessages;
5
- const telegram_api_1 = require("../apis/telegram-api");
6
- async function copyMessage(body, config) {
7
- return telegram_api_1.TelegramAPI.post('copyMessage', body, config);
8
- }
9
- async function copyMessages(body, config) {
10
- return telegram_api_1.TelegramAPI.post('copyMessages', body, config);
11
- }
1
+ import{TelegramAPI as o}from"../apis/telegram-api.js";async function a(e,s){return o.post("copyMessage",e,s)}async function p(e,s){return o.post("copyMessages",e,s)}export{a as copyMessage,p as copyMessages};
@@ -1,6 +1,6 @@
1
1
  import { type FetchError } from '@aracna/core';
2
2
  import type { ChatInviteLink, CreateChatInviteLink, CreateChatSubscriptionInviteLink, CreateForumTopic, CreateInvoiceLink, CreateNewStickerSet, ForumTopic } from '@aracna/telegram-bot-types';
3
- import type { TelegramApiConfig } from '../definitions/interfaces';
3
+ import type { TelegramApiConfig } from '../definitions/interfaces.js';
4
4
  export declare function createChatInviteLink(body: CreateChatInviteLink, config?: TelegramApiConfig): Promise<ChatInviteLink | FetchError>;
5
5
  export declare function createChatSubscriptionInviteLink(body: CreateChatSubscriptionInviteLink, config?: TelegramApiConfig): Promise<ChatInviteLink | FetchError>;
6
6
  export declare function createForumTopic(body: CreateForumTopic, config?: TelegramApiConfig): Promise<ForumTopic | FetchError>;
@@ -1,30 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createChatInviteLink = createChatInviteLink;
4
- exports.createChatSubscriptionInviteLink = createChatSubscriptionInviteLink;
5
- exports.createForumTopic = createForumTopic;
6
- exports.createInvoiceLink = createInvoiceLink;
7
- exports.createNewStickerSet = createNewStickerSet;
8
- const telegram_api_1 = require("../apis/telegram-api");
9
- async function createChatInviteLink(body, config) {
10
- return telegram_api_1.TelegramAPI.post('createChatInviteLink', body, config);
11
- }
12
- async function createChatSubscriptionInviteLink(body, config) {
13
- return telegram_api_1.TelegramAPI.post('createChatSubscriptionInviteLink', body, config);
14
- }
15
- async function createForumTopic(body, config) {
16
- return telegram_api_1.TelegramAPI.post('createForumTopic', body, config);
17
- }
18
- async function createInvoiceLink(body, config) {
19
- return telegram_api_1.TelegramAPI.post('createInvoiceLink', body, config);
20
- }
21
- async function createNewStickerSet(body, config) {
22
- return telegram_api_1.TelegramAPI.post('createNewStickerSet', {
23
- ...body,
24
- stickers: body.stickers.map((sticker, index) => ({
25
- ...sticker,
26
- sticker: sticker.sticker instanceof Blob ? `attach://sticker_${index}` : sticker.sticker
27
- })),
28
- ...body.stickers.reduce((result, sticker, index) => ({ ...result, [`sticker_${index}`]: sticker.sticker }), {})
29
- }, config);
30
- }
1
+ import{TelegramAPI as i}from"../apis/telegram-api.js";async function p(e,t){return i.post("createChatInviteLink",e,t)}async function s(e,t){return i.post("createChatSubscriptionInviteLink",e,t)}async function C(e,t){return i.post("createForumTopic",e,t)}async function k(e,t){return i.post("createInvoiceLink",e,t)}async function m(e,t){return i.post("createNewStickerSet",{...e,stickers:e.stickers.map((r,n)=>({...r,sticker:r.sticker instanceof Blob?`attach://sticker_${n}`:r.sticker})),...e.stickers.reduce((r,n,o)=>({...r,[`sticker_${o}`]:n.sticker}),{})},t)}export{p as createChatInviteLink,s as createChatSubscriptionInviteLink,C as createForumTopic,k as createInvoiceLink,m as createNewStickerSet};
@@ -1,4 +1,4 @@
1
1
  import type { FetchError } from '@aracna/core';
2
2
  import type { DeclineChatJoinRequest } from '@aracna/telegram-bot-types';
3
- import type { TelegramApiConfig } from '../definitions/interfaces';
3
+ import type { TelegramApiConfig } from '../definitions/interfaces.js';
4
4
  export declare function declineChatJoinRequest(body: DeclineChatJoinRequest, config?: TelegramApiConfig): Promise<boolean | FetchError>;
@@ -1,7 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.declineChatJoinRequest = declineChatJoinRequest;
4
- const telegram_api_1 = require("../apis/telegram-api");
5
- async function declineChatJoinRequest(body, config) {
6
- return telegram_api_1.TelegramAPI.post('declineChatJoinRequest', body, config);
7
- }
1
+ import{TelegramAPI as t}from"../apis/telegram-api.js";async function i(e,o){return t.post("declineChatJoinRequest",e,o)}export{i as declineChatJoinRequest};
@@ -1,6 +1,6 @@
1
1
  import type { FetchError } from '@aracna/core';
2
2
  import type { DeleteChatPhoto, DeleteChatStickerSet, DeleteForumTopic, DeleteMessage, DeleteMessages, DeleteMyCommands, DeleteStickerFromSet, DeleteStickerSet } from '@aracna/telegram-bot-types';
3
- import type { TelegramApiConfig } from '../definitions/interfaces';
3
+ import type { TelegramApiConfig } from '../definitions/interfaces.js';
4
4
  export declare function deleteChatPhoto(body: DeleteChatPhoto, config?: TelegramApiConfig): Promise<boolean | FetchError>;
5
5
  export declare function deleteChatStickerSet(body: DeleteChatStickerSet, config?: TelegramApiConfig): Promise<boolean | FetchError>;
6
6
  export declare function deleteForumTopic(body: DeleteForumTopic, config?: TelegramApiConfig): Promise<boolean | FetchError>;
@@ -1,35 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.deleteChatPhoto = deleteChatPhoto;
4
- exports.deleteChatStickerSet = deleteChatStickerSet;
5
- exports.deleteForumTopic = deleteForumTopic;
6
- exports.deleteMessage = deleteMessage;
7
- exports.deleteMessages = deleteMessages;
8
- exports.deleteMyCommands = deleteMyCommands;
9
- exports.deleteStickerFromSet = deleteStickerFromSet;
10
- exports.deleteStickerSet = deleteStickerSet;
11
- const telegram_api_1 = require("../apis/telegram-api");
12
- async function deleteChatPhoto(body, config) {
13
- return telegram_api_1.TelegramAPI.post('deleteChatPhoto', body, config);
14
- }
15
- async function deleteChatStickerSet(body, config) {
16
- return telegram_api_1.TelegramAPI.post('deleteChatStickerSet', body, config);
17
- }
18
- async function deleteForumTopic(body, config) {
19
- return telegram_api_1.TelegramAPI.post('deleteForumTopic', body, config);
20
- }
21
- async function deleteMessage(body, config) {
22
- return telegram_api_1.TelegramAPI.post('deleteMessage', body, config);
23
- }
24
- async function deleteMessages(body, config) {
25
- return telegram_api_1.TelegramAPI.post('deleteMessages', body, config);
26
- }
27
- async function deleteMyCommands(body, config) {
28
- return telegram_api_1.TelegramAPI.post('deleteMyCommands', body, config);
29
- }
30
- async function deleteStickerFromSet(body, config) {
31
- return telegram_api_1.TelegramAPI.post('deleteStickerFromSet', body, config);
32
- }
33
- async function deleteStickerSet(body, config) {
34
- return telegram_api_1.TelegramAPI.post('deleteStickerSet', body, config);
35
- }
1
+ import{TelegramAPI as o}from"../apis/telegram-api.js";async function a(e,t){return o.post("deleteChatPhoto",e,t)}async function l(e,t){return o.post("deleteChatStickerSet",e,t)}async function n(e,t){return o.post("deleteForumTopic",e,t)}async function i(e,t){return o.post("deleteMessage",e,t)}async function s(e,t){return o.post("deleteMessages",e,t)}async function c(e,t){return o.post("deleteMyCommands",e,t)}async function m(e,t){return o.post("deleteStickerFromSet",e,t)}async function p(e,t){return o.post("deleteStickerSet",e,t)}export{a as deleteChatPhoto,l as deleteChatStickerSet,n as deleteForumTopic,i as deleteMessage,s as deleteMessages,c as deleteMyCommands,m as deleteStickerFromSet,p as deleteStickerSet};
@@ -1,4 +1,4 @@
1
1
  import type { FetchError } from '@aracna/core';
2
- import type { TelegramApiConfig, TelegramFileApiConfig } from '../definitions/interfaces';
2
+ import type { TelegramApiConfig, TelegramFileApiConfig } from '../definitions/interfaces.js';
3
3
  export declare function downloadFile(fileID: string, config?: TelegramApiConfig & TelegramFileApiConfig): Promise<Blob | FetchError>;
4
4
  export declare function downloadUserFirstProfilePhoto(userID: bigint | number, config?: TelegramApiConfig & TelegramFileApiConfig): Promise<Blob | FetchError | Error>;
@@ -1,29 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.downloadFile = downloadFile;
4
- exports.downloadUserFirstProfilePhoto = downloadUserFirstProfilePhoto;
5
- const telegram_file_api_1 = require("../apis/telegram-file-api");
6
- const get_requests_1 = require("./get-requests");
7
- async function downloadFile(fileID, config) {
8
- let file, blob;
9
- file = await (0, get_requests_1.getFile)({ file_id: fileID }, config);
10
- if (file instanceof Error)
11
- return file;
12
- blob = await telegram_file_api_1.TelegramFileAPI.get(file.file_path ?? '', config);
13
- if (blob instanceof Error)
14
- return blob;
15
- return blob;
16
- }
17
- async function downloadUserFirstProfilePhoto(userID, config) {
18
- let photos, sizes, blob;
19
- photos = await (0, get_requests_1.getUserProfilePhotos)({ limit: 1, user_id: userID }, config);
20
- if (photos instanceof Error)
21
- return photos;
22
- sizes = photos.photos;
23
- if (sizes.length <= 0)
24
- return new Error(JSON.stringify(photos));
25
- blob = await downloadFile(sizes[0].reduce((r, v) => (v.height + v.width > r.height + r.width ? v : r), sizes[0][0]).file_id, config);
26
- if (blob instanceof Error)
27
- return blob;
28
- return blob;
29
- }
1
+ import{TelegramFileAPI as a}from"../apis/telegram-file-api.js";import{getFile as f,getUserProfilePhotos as s}from"./get-requests.js";async function h(t,o){let r,e;return r=await f({file_id:t},o),r instanceof Error?r:(e=await a.get(r.file_path??"",o),e instanceof Error,e)}async function p(t,o){let r,e,i;return r=await s({limit:1,user_id:t},o),r instanceof Error?r:(e=r.photos,e.length<=0?new Error(JSON.stringify(r)):(i=await h(e[0].reduce((n,l)=>l.height+l.width>n.height+n.width?l:n,e[0][0]).file_id,o),i instanceof Error,i))}export{h as downloadFile,p as downloadUserFirstProfilePhoto};
@@ -1,7 +1,7 @@
1
1
  import type { FetchError } from '@aracna/core';
2
2
  import type { ChatInviteLink, EditChatInviteLink, EditChatSubscriptionInviteLink, EditForumTopic, EditGeneralForumTopic, EditMessageCaption, EditMessageLiveLocation, EditMessageReplyMarkup, EditMessageText, EditUserStarSubscription, Message } from '@aracna/telegram-bot-types';
3
- import type { TelegramApiConfig } from '../definitions/interfaces';
4
- import { EditMessageMediaAlternative } from '../definitions/interfaces';
3
+ import type { TelegramApiConfig } from '../definitions/interfaces.js';
4
+ import { EditMessageMediaAlternative } from '../definitions/interfaces.js';
5
5
  export declare function editChatInviteLink(body: EditChatInviteLink, config?: TelegramApiConfig): Promise<ChatInviteLink | FetchError>;
6
6
  export declare function editChatSubscriptionInviteLink(body: EditChatSubscriptionInviteLink, config?: TelegramApiConfig): Promise<ChatInviteLink | FetchError>;
7
7
  export declare function editForumTopic(body: EditForumTopic, config?: TelegramApiConfig): Promise<boolean | FetchError>;
@@ -1,50 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.editChatInviteLink = editChatInviteLink;
4
- exports.editChatSubscriptionInviteLink = editChatSubscriptionInviteLink;
5
- exports.editForumTopic = editForumTopic;
6
- exports.editGeneralForumTopic = editGeneralForumTopic;
7
- exports.editMessageCaption = editMessageCaption;
8
- exports.editMessageLiveLocation = editMessageLiveLocation;
9
- exports.editMessageMedia = editMessageMedia;
10
- exports.editMessageReplyMarkup = editMessageReplyMarkup;
11
- exports.editMessageText = editMessageText;
12
- exports.editUserStarSubscription = editUserStarSubscription;
13
- const telegram_api_1 = require("../apis/telegram-api");
14
- async function editChatInviteLink(body, config) {
15
- return telegram_api_1.TelegramAPI.post('editChatInviteLink', body, config);
16
- }
17
- async function editChatSubscriptionInviteLink(body, config) {
18
- return telegram_api_1.TelegramAPI.post('editChatSubscriptionInviteLink', body, config);
19
- }
20
- async function editForumTopic(body, config) {
21
- return telegram_api_1.TelegramAPI.post('editForumTopic', body, config);
22
- }
23
- async function editGeneralForumTopic(body, config) {
24
- return telegram_api_1.TelegramAPI.post('editGeneralForumTopic', body, config);
25
- }
26
- async function editMessageCaption(body, config) {
27
- return telegram_api_1.TelegramAPI.post('editMessageCaption', body, config);
28
- }
29
- async function editMessageLiveLocation(body, config) {
30
- return telegram_api_1.TelegramAPI.post('editMessageLiveLocation', body, config);
31
- }
32
- async function editMessageMedia(body, config) {
33
- return telegram_api_1.TelegramAPI.post('editMessageMedia', {
34
- ...body,
35
- media: {
36
- ...body.media,
37
- media: body.media.media instanceof Blob ? `attach://media_blob` : body.media.media
38
- },
39
- ...(body.media.media instanceof Blob ? { media_blob: body.media.media } : {})
40
- }, config);
41
- }
42
- async function editMessageReplyMarkup(body, config) {
43
- return telegram_api_1.TelegramAPI.post('editMessageReplyMarkup', body, config);
44
- }
45
- async function editMessageText(body, config) {
46
- return telegram_api_1.TelegramAPI.post('editMessageText', body, config);
47
- }
48
- async function editUserStarSubscription(body, config) {
49
- return telegram_api_1.TelegramAPI.post('editUserStarSubscription', body, config);
50
- }
1
+ import{TelegramAPI as t}from"../apis/telegram-api.js";async function s(e,i){return t.post("editChatInviteLink",e,i)}async function n(e,i){return t.post("editChatSubscriptionInviteLink",e,i)}async function p(e,i){return t.post("editForumTopic",e,i)}async function d(e,i){return t.post("editGeneralForumTopic",e,i)}async function c(e,i){return t.post("editMessageCaption",e,i)}async function g(e,i){return t.post("editMessageLiveLocation",e,i)}async function m(e,i){return t.post("editMessageMedia",{...e,media:{...e.media,media:e.media.media instanceof Blob?"attach://media_blob":e.media.media},...e.media.media instanceof Blob?{media_blob:e.media.media}:{}},i)}async function M(e,i){return t.post("editMessageReplyMarkup",e,i)}async function u(e,i){return t.post("editMessageText",e,i)}async function E(e,i){return t.post("editUserStarSubscription",e,i)}export{s as editChatInviteLink,n as editChatSubscriptionInviteLink,p as editForumTopic,d as editGeneralForumTopic,c as editMessageCaption,g as editMessageLiveLocation,m as editMessageMedia,M as editMessageReplyMarkup,u as editMessageText,E as editUserStarSubscription};
@@ -1,4 +1,4 @@
1
1
  import type { FetchError } from '@aracna/core';
2
2
  import type { ExportChatInviteLink } from '@aracna/telegram-bot-types';
3
- import type { TelegramApiConfig } from '../definitions/interfaces';
3
+ import type { TelegramApiConfig } from '../definitions/interfaces.js';
4
4
  export declare function exportChatInviteLink(body: ExportChatInviteLink, config?: TelegramApiConfig): Promise<string | FetchError>;
@@ -1,7 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.exportChatInviteLink = exportChatInviteLink;
4
- const telegram_api_1 = require("../apis/telegram-api");
5
- async function exportChatInviteLink(body, config) {
6
- return telegram_api_1.TelegramAPI.post('exportChatInviteLink', body, config);
7
- }
1
+ import{TelegramAPI as e}from"../apis/telegram-api.js";async function o(t,r){return e.post("exportChatInviteLink",t,r)}export{o as exportChatInviteLink};
@@ -1,5 +1,5 @@
1
1
  import type { FetchError } from '@aracna/core';
2
2
  import type { ForwardMessage, ForwardMessages, Message, MessageId } from '@aracna/telegram-bot-types';
3
- import type { TelegramApiConfig } from '../definitions/interfaces';
3
+ import type { TelegramApiConfig } from '../definitions/interfaces.js';
4
4
  export declare function forwardMessage(body: ForwardMessage, config?: TelegramApiConfig): Promise<Message | FetchError>;
5
5
  export declare function forwardMessages(body: ForwardMessages, config?: TelegramApiConfig): Promise<MessageId[] | FetchError>;
@@ -1,11 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.forwardMessage = forwardMessage;
4
- exports.forwardMessages = forwardMessages;
5
- const telegram_api_1 = require("../apis/telegram-api");
6
- async function forwardMessage(body, config) {
7
- return telegram_api_1.TelegramAPI.post('forwardMessage', body, config);
8
- }
9
- async function forwardMessages(body, config) {
10
- return telegram_api_1.TelegramAPI.post('forwardMessages', body, config);
11
- }
1
+ import{TelegramAPI as s}from"../apis/telegram-api.js";async function o(e,r){return s.post("forwardMessage",e,r)}async function g(e,r){return s.post("forwardMessages",e,r)}export{o as forwardMessage,g as forwardMessages};
@@ -1,6 +1,6 @@
1
1
  import type { FetchError } from '@aracna/core';
2
2
  import type { BotCommand, BotDescription, BotName, BotShortDescription, Chat, ChatAdministratorRights, ChatMember, File, GameHighScore, GetChat, GetChatAdministrators, GetChatMember, GetChatMemberCount, GetChatMenuButton, GetCustomEmojiStickers, GetFile, GetGameHighScores, GetMyCommands, GetMyDefaultAdministratorRights, GetMyDescription, GetMyName, GetMyShortDescription, GetStarTransactions, GetStickerSet, GetUpdates, GetUserChatBoosts, GetUserProfilePhotos, MenuButton, StarTransactions, Sticker, StickerSet, Update, User, UserChatBoosts, UserProfilePhotos } from '@aracna/telegram-bot-types';
3
- import type { TelegramApiConfig } from '../definitions/interfaces';
3
+ import type { TelegramApiConfig } from '../definitions/interfaces.js';
4
4
  export declare function getChat(body: GetChat, config?: TelegramApiConfig): Promise<Chat | FetchError>;
5
5
  export declare function getChatAdministrators(body: GetChatAdministrators, config?: TelegramApiConfig): Promise<ChatMember[] | FetchError>;
6
6
  export declare function getChatMember(body: GetChatMember, config?: TelegramApiConfig): Promise<ChatMember | FetchError>;
@@ -1,88 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getChat = getChat;
4
- exports.getChatAdministrators = getChatAdministrators;
5
- exports.getChatMember = getChatMember;
6
- exports.getChatMemberCount = getChatMemberCount;
7
- exports.getChatMenuButton = getChatMenuButton;
8
- exports.getCustomEmojiStickers = getCustomEmojiStickers;
9
- exports.getFile = getFile;
10
- exports.getForumTopicIconStickers = getForumTopicIconStickers;
11
- exports.getGameHighScores = getGameHighScores;
12
- exports.getMe = getMe;
13
- exports.getMyCommands = getMyCommands;
14
- exports.getMyDefaultAdministratorRights = getMyDefaultAdministratorRights;
15
- exports.getMyDescription = getMyDescription;
16
- exports.getMyName = getMyName;
17
- exports.getMyShortDescription = getMyShortDescription;
18
- exports.getStarTransactions = getStarTransactions;
19
- exports.getStickerSet = getStickerSet;
20
- exports.getUpdates = getUpdates;
21
- exports.getUserChatBoosts = getUserChatBoosts;
22
- exports.getUserProfilePhotos = getUserProfilePhotos;
23
- const telegram_api_1 = require("../apis/telegram-api");
24
- const constants_1 = require("../definitions/constants");
25
- async function getChat(body, config) {
26
- return telegram_api_1.TelegramAPI.post('getChat', body, config);
27
- }
28
- async function getChatAdministrators(body, config) {
29
- return telegram_api_1.TelegramAPI.post('getChatAdministrators', body, config);
30
- }
31
- async function getChatMember(body, config) {
32
- return telegram_api_1.TelegramAPI.post('getChatMember', body, config);
33
- }
34
- async function getChatMemberCount(body, config) {
35
- return telegram_api_1.TelegramAPI.post('getChatMemberCount', body, config);
36
- }
37
- async function getChatMenuButton(body, config) {
38
- return telegram_api_1.TelegramAPI.post('getChatMenuButton', body, config);
39
- }
40
- async function getCustomEmojiStickers(body, config) {
41
- return telegram_api_1.TelegramAPI.post('getCustomEmojiStickers', body, config);
42
- }
43
- async function getFile(body, config) {
44
- return telegram_api_1.TelegramAPI.post('getFile', body, config);
45
- }
46
- async function getForumTopicIconStickers(config) {
47
- return telegram_api_1.TelegramAPI.post('getForumTopicIconStickers', undefined, config);
48
- }
49
- async function getGameHighScores(body, config) {
50
- return telegram_api_1.TelegramAPI.post('getGameHighScores', body, config);
51
- }
52
- async function getMe(config) {
53
- return telegram_api_1.TelegramAPI.post('getMe', undefined, config);
54
- }
55
- async function getMyCommands(body, config) {
56
- return telegram_api_1.TelegramAPI.post('getMyCommands', body, config);
57
- }
58
- async function getMyDefaultAdministratorRights(body, config) {
59
- return telegram_api_1.TelegramAPI.post('getMyDefaultAdministratorRights', body, config);
60
- }
61
- async function getMyDescription(body, config) {
62
- return telegram_api_1.TelegramAPI.post('getMyDescription', body, config);
63
- }
64
- async function getMyName(body, config) {
65
- return telegram_api_1.TelegramAPI.post('getMyName', body, config);
66
- }
67
- async function getMyShortDescription(body, config) {
68
- return telegram_api_1.TelegramAPI.post('getMyShortDescription', body, config);
69
- }
70
- async function getStarTransactions(body, config) {
71
- return telegram_api_1.TelegramAPI.post('getStarTransactions', body, config);
72
- }
73
- async function getStickerSet(body, config) {
74
- return telegram_api_1.TelegramAPI.post('getStickerSet', body, config);
75
- }
76
- async function getUpdates(body, config) {
77
- let updates;
78
- updates = await telegram_api_1.TelegramAPI.post('getUpdates', { allowed_updates: constants_1.DEFAULT_ALLOWED_UPDATES, ...body }, config);
79
- if (updates instanceof Error)
80
- return updates;
81
- return Array.isArray(updates) ? updates : [updates];
82
- }
83
- async function getUserChatBoosts(body, config) {
84
- return telegram_api_1.TelegramAPI.post('getUserChatBoosts', body, config);
85
- }
86
- async function getUserProfilePhotos(body, config) {
87
- return telegram_api_1.TelegramAPI.post('getUserProfilePhotos', body, config);
88
- }
1
+ import{TelegramAPI as r}from"../apis/telegram-api.js";import{DEFAULT_ALLOWED_UPDATES as i}from"../definitions/constants.js";async function a(t,e){return r.post("getChat",t,e)}async function m(t,e){return r.post("getChatAdministrators",t,e)}async function c(t,e){return r.post("getChatMember",t,e)}async function g(t,e){return r.post("getChatMemberCount",t,e)}async function p(t,e){return r.post("getChatMenuButton",t,e)}async function h(t,e){return r.post("getCustomEmojiStickers",t,e)}async function C(t,e){return r.post("getFile",t,e)}async function u(t){return r.post("getForumTopicIconStickers",void 0,t)}async function f(t,e){return r.post("getGameHighScores",t,e)}async function G(t){return r.post("getMe",void 0,t)}async function S(t,e){return r.post("getMyCommands",t,e)}async function y(t,e){return r.post("getMyDefaultAdministratorRights",t,e)}async function M(t,e){return r.post("getMyDescription",t,e)}async function l(t,e){return r.post("getMyName",t,e)}async function d(t,e){return r.post("getMyShortDescription",t,e)}async function A(t,e){return r.post("getStarTransactions",t,e)}async function P(t,e){return r.post("getStickerSet",t,e)}async function T(t,e){let o;return o=await r.post("getUpdates",{allowed_updates:i,...t},e),o instanceof Error||Array.isArray(o)?o:[o]}async function F(t,e){return r.post("getUserChatBoosts",t,e)}async function E(t,e){return r.post("getUserProfilePhotos",t,e)}export{a as getChat,m as getChatAdministrators,c as getChatMember,g as getChatMemberCount,p as getChatMenuButton,h as getCustomEmojiStickers,C as getFile,u as getForumTopicIconStickers,f as getGameHighScores,G as getMe,S as getMyCommands,y as getMyDefaultAdministratorRights,M as getMyDescription,l as getMyName,d as getMyShortDescription,A as getStarTransactions,P as getStickerSet,T as getUpdates,F as getUserChatBoosts,E as getUserProfilePhotos};
@@ -1,6 +1,6 @@
1
1
  import type { FetchError } from '@aracna/core';
2
2
  import type { ConvertGiftToStars, GiftPremiumSubscription, Gifts, SendGift, TransferGift, UpgradeGift } from '@aracna/telegram-bot-types';
3
- import type { TelegramApiConfig } from '../definitions/interfaces';
3
+ import type { TelegramApiConfig } from '../definitions/interfaces.js';
4
4
  export declare function convertGiftToStars(body: ConvertGiftToStars, config?: TelegramApiConfig): Promise<boolean | FetchError>;
5
5
  export declare function getAvailableGifts(config?: TelegramApiConfig): Promise<Gifts | FetchError>;
6
6
  export declare function giftPremiumSubscription(body: GiftPremiumSubscription, config?: TelegramApiConfig): Promise<boolean | FetchError>;
@@ -1,27 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.convertGiftToStars = convertGiftToStars;
4
- exports.getAvailableGifts = getAvailableGifts;
5
- exports.giftPremiumSubscription = giftPremiumSubscription;
6
- exports.sendGift = sendGift;
7
- exports.transferGift = transferGift;
8
- exports.upgradeGift = upgradeGift;
9
- const telegram_api_1 = require("../apis/telegram-api");
10
- async function convertGiftToStars(body, config) {
11
- return telegram_api_1.TelegramAPI.post('convertGiftToStars', body, config);
12
- }
13
- async function getAvailableGifts(config) {
14
- return telegram_api_1.TelegramAPI.post('getAvailableGifts', undefined, config);
15
- }
16
- async function giftPremiumSubscription(body, config) {
17
- return telegram_api_1.TelegramAPI.post('giftPremiumSubscription', body, config);
18
- }
19
- async function sendGift(body, config) {
20
- return telegram_api_1.TelegramAPI.post('sendGift', body, config);
21
- }
22
- async function transferGift(body, config) {
23
- return telegram_api_1.TelegramAPI.post('transferGift', body, config);
24
- }
25
- async function upgradeGift(body, config) {
26
- return telegram_api_1.TelegramAPI.post('upgradeGift', body, config);
27
- }
1
+ import{TelegramAPI as t}from"../apis/telegram-api.js";async function i(r,e){return t.post("convertGiftToStars",r,e)}async function n(r){return t.post("getAvailableGifts",void 0,r)}async function f(r,e){return t.post("giftPremiumSubscription",r,e)}async function a(r,e){return t.post("sendGift",r,e)}async function s(r,e){return t.post("transferGift",r,e)}async function p(r,e){return t.post("upgradeGift",r,e)}export{i as convertGiftToStars,n as getAvailableGifts,f as giftPremiumSubscription,a as sendGift,s as transferGift,p as upgradeGift};
@@ -1,4 +1,4 @@
1
1
  import type { FetchError } from '@aracna/core';
2
2
  import type { HideGeneralForumTopic } from '@aracna/telegram-bot-types';
3
- import type { TelegramApiConfig } from '../definitions/interfaces';
3
+ import type { TelegramApiConfig } from '../definitions/interfaces.js';
4
4
  export declare function hideGeneralForumTopic(body: HideGeneralForumTopic, config?: TelegramApiConfig): Promise<boolean | FetchError>;
@@ -1,7 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.hideGeneralForumTopic = hideGeneralForumTopic;
4
- const telegram_api_1 = require("../apis/telegram-api");
5
- async function hideGeneralForumTopic(body, config) {
6
- return telegram_api_1.TelegramAPI.post('hideGeneralForumTopic', body, config);
7
- }
1
+ import{TelegramAPI as o}from"../apis/telegram-api.js";async function a(e,r){return o.post("hideGeneralForumTopic",e,r)}export{a as hideGeneralForumTopic};
@@ -1,4 +1,4 @@
1
1
  import type { FetchError } from '@aracna/core';
2
2
  import type { LeaveChat } from '@aracna/telegram-bot-types';
3
- import type { TelegramApiConfig } from '../definitions/interfaces';
3
+ import type { TelegramApiConfig } from '../definitions/interfaces.js';
4
4
  export declare function leaveChat(body: LeaveChat, config?: TelegramApiConfig): Promise<boolean | FetchError>;
@@ -1,7 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.leaveChat = leaveChat;
4
- const telegram_api_1 = require("../apis/telegram-api");
5
- async function leaveChat(body, config) {
6
- return telegram_api_1.TelegramAPI.post('leaveChat', body, config);
7
- }
1
+ import{TelegramAPI as a}from"../apis/telegram-api.js";async function t(e,r){return a.post("leaveChat",e,r)}export{t as leaveChat};
@@ -1,3 +1,3 @@
1
1
  import type { FetchError } from '@aracna/core';
2
- import type { TelegramApiConfig } from '../definitions/interfaces';
2
+ import type { TelegramApiConfig } from '../definitions/interfaces.js';
3
3
  export declare function logOut(config?: TelegramApiConfig): Promise<boolean | FetchError>;
@@ -1,7 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.logOut = logOut;
4
- const telegram_api_1 = require("../apis/telegram-api");
5
- async function logOut(config) {
6
- return telegram_api_1.TelegramAPI.post('logOut', undefined, config);
7
- }
1
+ import{TelegramAPI as e}from"../apis/telegram-api.js";async function t(r){return e.post("logOut",void 0,r)}export{t as logOut};
@@ -1,4 +1,4 @@
1
1
  import type { FetchError } from '@aracna/core';
2
2
  import type { PinChatMessage } from '@aracna/telegram-bot-types';
3
- import type { TelegramApiConfig } from '../definitions/interfaces';
3
+ import type { TelegramApiConfig } from '../definitions/interfaces.js';
4
4
  export declare function pinChatMessage(body: PinChatMessage, config?: TelegramApiConfig): Promise<boolean | FetchError>;