@aracna/telegram-bot 2.0.3 → 2.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/apis/telegram-api.d.ts +7 -5
  2. package/apis/telegram-api.js +13 -4
  3. package/apis/telegram-file-api.d.ts +6 -4
  4. package/apis/telegram-file-api.js +12 -2
  5. package/classes/client.js +7 -7
  6. package/definitions/interfaces.d.ts +12 -0
  7. package/index.d.ts +150 -152
  8. package/package.json +2 -2
  9. package/requests/add-requests.d.ts +2 -1
  10. package/requests/add-requests.js +2 -2
  11. package/requests/answer-requests.d.ts +6 -5
  12. package/requests/answer-requests.js +10 -10
  13. package/requests/approve-requests.d.ts +2 -1
  14. package/requests/approve-requests.js +2 -2
  15. package/requests/ban-requests.d.ts +3 -2
  16. package/requests/ban-requests.js +4 -4
  17. package/requests/close-requests.d.ts +3 -2
  18. package/requests/close-requests.js +4 -4
  19. package/requests/copy-requests.d.ts +3 -2
  20. package/requests/copy-requests.js +4 -4
  21. package/requests/create-requests.d.ts +6 -5
  22. package/requests/create-requests.js +10 -10
  23. package/requests/decline-requests.d.ts +2 -1
  24. package/requests/decline-requests.js +2 -2
  25. package/requests/delete-requests.d.ts +9 -8
  26. package/requests/delete-requests.js +16 -16
  27. package/requests/download-requests.d.ts +3 -2
  28. package/requests/download-requests.js +6 -6
  29. package/requests/edit-requests.d.ts +10 -9
  30. package/requests/edit-requests.js +18 -18
  31. package/requests/export-requests.d.ts +2 -1
  32. package/requests/export-requests.js +2 -2
  33. package/requests/forward-requests.d.ts +3 -2
  34. package/requests/forward-requests.js +4 -4
  35. package/requests/get-requests.d.ts +22 -21
  36. package/requests/get-requests.js +42 -42
  37. package/requests/hide-requests.d.ts +2 -1
  38. package/requests/hide-requests.js +2 -2
  39. package/requests/leave-requests.d.ts +2 -1
  40. package/requests/leave-requests.js +2 -2
  41. package/requests/log-requests.d.ts +2 -1
  42. package/requests/log-requests.js +2 -2
  43. package/requests/pin-requests.d.ts +2 -1
  44. package/requests/pin-requests.js +2 -2
  45. package/requests/promote-requests.d.ts +2 -1
  46. package/requests/promote-requests.js +2 -2
  47. package/requests/refund-requests.d.ts +2 -1
  48. package/requests/refund-requests.js +2 -2
  49. package/requests/reopen-requests.d.ts +3 -2
  50. package/requests/reopen-requests.js +4 -4
  51. package/requests/replace-requests.d.ts +2 -1
  52. package/requests/replace-requests.js +2 -2
  53. package/requests/restrict-requests.d.ts +2 -1
  54. package/requests/restrict-requests.js +2 -2
  55. package/requests/revoke-requests.d.ts +2 -1
  56. package/requests/revoke-requests.js +2 -2
  57. package/requests/send-requests.d.ts +22 -22
  58. package/requests/send-requests.js +44 -44
  59. package/requests/set-requests.d.ts +23 -22
  60. package/requests/set-requests.js +44 -44
  61. package/requests/stop-requests.d.ts +3 -2
  62. package/requests/stop-requests.js +4 -4
  63. package/requests/unban-requests.d.ts +3 -2
  64. package/requests/unban-requests.js +4 -4
  65. package/requests/unhide-requests.d.ts +2 -1
  66. package/requests/unhide-requests.js +2 -2
  67. package/requests/unpin-requests.d.ts +5 -4
  68. package/requests/unpin-requests.js +8 -8
  69. package/requests/upload-requests.d.ts +2 -1
  70. package/requests/upload-requests.js +2 -2
  71. package/requests/webhook-requests.d.ts +5 -4
  72. package/requests/webhook-requests.js +8 -8
  73. package/utils/reply-to-message-utils.d.ts +3 -3
  74. package/utils/reply-to-message-utils.js +1 -1
  75. package/utils/start-message-utils.d.ts +3 -3
  76. package/definitions/telegram-api-definitions.d.ts +0 -12
  77. package/definitions/telegram-api-definitions.js +0 -2
@@ -23,73 +23,73 @@ exports.setStickerPositionInSet = setStickerPositionInSet;
23
23
  exports.setStickerSetThumbnail = setStickerSetThumbnail;
24
24
  exports.setStickerSetTitle = setStickerSetTitle;
25
25
  const telegram_api_1 = require("../apis/telegram-api");
26
- async function setChatAdministratorCustomTitle(token, body) {
27
- return telegram_api_1.TelegramAPI.post('setChatAdministratorCustomTitle', body, { token });
26
+ async function setChatAdministratorCustomTitle(body, config) {
27
+ return telegram_api_1.TelegramAPI.post('setChatAdministratorCustomTitle', body, config);
28
28
  }
29
- async function setChatDescription(token, body) {
30
- return telegram_api_1.TelegramAPI.post('setChatDescription', body, { token });
29
+ async function setChatDescription(body, config) {
30
+ return telegram_api_1.TelegramAPI.post('setChatDescription', body, config);
31
31
  }
32
- async function setChatMenuButton(token, body) {
33
- return telegram_api_1.TelegramAPI.post('setChatMenuButton', body, { token });
32
+ async function setChatMenuButton(body, config) {
33
+ return telegram_api_1.TelegramAPI.post('setChatMenuButton', body, config);
34
34
  }
35
- async function setChatPermissions(token, body) {
36
- return telegram_api_1.TelegramAPI.post('setChatPermissions', body, { token });
35
+ async function setChatPermissions(body, config) {
36
+ return telegram_api_1.TelegramAPI.post('setChatPermissions', body, config);
37
37
  }
38
- async function setChatPhoto(token, body) {
38
+ async function setChatPhoto(body, config) {
39
39
  return telegram_api_1.TelegramAPI.post('setChatPhoto', {
40
40
  ...body,
41
41
  photo: body.photo instanceof Blob ? `attach://photo_blob` : body.photo,
42
42
  ...(body.photo instanceof Blob ? { photo_blob: body.photo } : {})
43
- }, { token });
43
+ }, config);
44
44
  }
45
- async function setChatStickerSet(token, body) {
46
- return telegram_api_1.TelegramAPI.post('setChatStickerSet', body, { token });
45
+ async function setChatStickerSet(body, config) {
46
+ return telegram_api_1.TelegramAPI.post('setChatStickerSet', body, config);
47
47
  }
48
- async function setChatTitle(token, body) {
49
- return telegram_api_1.TelegramAPI.post('setChatTitle', body, { token });
48
+ async function setChatTitle(body, config) {
49
+ return telegram_api_1.TelegramAPI.post('setChatTitle', body, config);
50
50
  }
51
- async function setCustomEmojiStickerSetThumbnail(token, body) {
52
- return telegram_api_1.TelegramAPI.post('setCustomEmojiStickerSetThumbnail', body, { token });
51
+ async function setCustomEmojiStickerSetThumbnail(body, config) {
52
+ return telegram_api_1.TelegramAPI.post('setCustomEmojiStickerSetThumbnail', body, config);
53
53
  }
54
- async function setGameScore(token, body) {
55
- return telegram_api_1.TelegramAPI.post('setGameScore', body, { token });
54
+ async function setGameScore(body, config) {
55
+ return telegram_api_1.TelegramAPI.post('setGameScore', body, config);
56
56
  }
57
- async function setMessageReaction(token, body) {
58
- return telegram_api_1.TelegramAPI.post('setMessageReaction', body, { token });
57
+ async function setMessageReaction(body, config) {
58
+ return telegram_api_1.TelegramAPI.post('setMessageReaction', body, config);
59
59
  }
60
- async function setMyCommands(token, body) {
61
- return telegram_api_1.TelegramAPI.post('setMyCommands', body, { token });
60
+ async function setMyCommands(body, config) {
61
+ return telegram_api_1.TelegramAPI.post('setMyCommands', body, config);
62
62
  }
63
- async function setMyDefaultAdministratorRights(token, body) {
64
- return telegram_api_1.TelegramAPI.post('setMyDefaultAdministratorRights', body, { token });
63
+ async function setMyDefaultAdministratorRights(body, config) {
64
+ return telegram_api_1.TelegramAPI.post('setMyDefaultAdministratorRights', body, config);
65
65
  }
66
- async function setMyDescription(token, body) {
67
- return telegram_api_1.TelegramAPI.post('setMyDescription', body, { token });
66
+ async function setMyDescription(body, config) {
67
+ return telegram_api_1.TelegramAPI.post('setMyDescription', body, config);
68
68
  }
69
- async function setMyName(token, body) {
70
- return telegram_api_1.TelegramAPI.post('setMyName', body, { token });
69
+ async function setMyName(body, config) {
70
+ return telegram_api_1.TelegramAPI.post('setMyName', body, config);
71
71
  }
72
- async function setMyShortDescription(token, body) {
73
- return telegram_api_1.TelegramAPI.post('setMyShortDescription', body, { token });
72
+ async function setMyShortDescription(body, config) {
73
+ return telegram_api_1.TelegramAPI.post('setMyShortDescription', body, config);
74
74
  }
75
- async function setPassportDataErrors(token, body) {
76
- return telegram_api_1.TelegramAPI.post('setPassportDataErrors', body, { token });
75
+ async function setPassportDataErrors(body, config) {
76
+ return telegram_api_1.TelegramAPI.post('setPassportDataErrors', body, config);
77
77
  }
78
- async function setStickerEmojiList(token, body) {
79
- return telegram_api_1.TelegramAPI.post('setStickerEmojiList', body, { token });
78
+ async function setStickerEmojiList(body, config) {
79
+ return telegram_api_1.TelegramAPI.post('setStickerEmojiList', body, config);
80
80
  }
81
- async function setStickerKeywords(token, body) {
82
- return telegram_api_1.TelegramAPI.post('setStickerKeywords', body, { token });
81
+ async function setStickerKeywords(body, config) {
82
+ return telegram_api_1.TelegramAPI.post('setStickerKeywords', body, config);
83
83
  }
84
- async function setStickerMaskPosition(token, body) {
85
- return telegram_api_1.TelegramAPI.post('setStickerMaskPosition', body, { token });
84
+ async function setStickerMaskPosition(body, config) {
85
+ return telegram_api_1.TelegramAPI.post('setStickerMaskPosition', body, config);
86
86
  }
87
- async function setStickerPositionInSet(token, body) {
88
- return telegram_api_1.TelegramAPI.post('setStickerPositionInSet', body, { token });
87
+ async function setStickerPositionInSet(body, config) {
88
+ return telegram_api_1.TelegramAPI.post('setStickerPositionInSet', body, config);
89
89
  }
90
- async function setStickerSetThumbnail(token, body) {
91
- return telegram_api_1.TelegramAPI.post('setStickerSetThumbnail', body, { token });
90
+ async function setStickerSetThumbnail(body, config) {
91
+ return telegram_api_1.TelegramAPI.post('setStickerSetThumbnail', body, config);
92
92
  }
93
- async function setStickerSetTitle(token, body) {
94
- return telegram_api_1.TelegramAPI.post('setStickerSetTitle', body, { token });
93
+ async function setStickerSetTitle(body, config) {
94
+ return telegram_api_1.TelegramAPI.post('setStickerSetTitle', body, config);
95
95
  }
@@ -1,4 +1,5 @@
1
1
  import type { FetchError } from '@aracna/core';
2
2
  import type { Message, Poll, StopMessageLiveLocation, StopPoll } from '@aracna/telegram-bot-types';
3
- export declare function stopMessageLiveLocation(token: string, body: StopMessageLiveLocation): Promise<Message | boolean | FetchError>;
4
- export declare function stopPoll(token: string, body: StopPoll): Promise<Poll | FetchError>;
3
+ import type { TelegramApiConfig } from '../definitions/interfaces';
4
+ export declare function stopMessageLiveLocation(body: StopMessageLiveLocation, config?: TelegramApiConfig): Promise<Message | boolean | FetchError>;
5
+ export declare function stopPoll(body: StopPoll, config?: TelegramApiConfig): Promise<Poll | FetchError>;
@@ -3,9 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.stopMessageLiveLocation = stopMessageLiveLocation;
4
4
  exports.stopPoll = stopPoll;
5
5
  const telegram_api_1 = require("../apis/telegram-api");
6
- async function stopMessageLiveLocation(token, body) {
7
- return telegram_api_1.TelegramAPI.post('stopMessageLiveLocation', body, { token });
6
+ async function stopMessageLiveLocation(body, config) {
7
+ return telegram_api_1.TelegramAPI.post('stopMessageLiveLocation', body, config);
8
8
  }
9
- async function stopPoll(token, body) {
10
- return telegram_api_1.TelegramAPI.post('stopPoll', body, { token });
9
+ async function stopPoll(body, config) {
10
+ return telegram_api_1.TelegramAPI.post('stopPoll', body, config);
11
11
  }
@@ -1,4 +1,5 @@
1
1
  import type { FetchError } from '@aracna/core';
2
2
  import type { UnbanChatMember, UnbanChatSenderChat } from '@aracna/telegram-bot-types';
3
- export declare function unbanChatMember(token: string, body: UnbanChatMember): Promise<boolean | FetchError>;
4
- export declare function unbanChatSenderChat(token: string, body: UnbanChatSenderChat): Promise<boolean | FetchError>;
3
+ import type { TelegramApiConfig } from '../definitions/interfaces';
4
+ export declare function unbanChatMember(body: UnbanChatMember, config?: TelegramApiConfig): Promise<boolean | FetchError>;
5
+ export declare function unbanChatSenderChat(body: UnbanChatSenderChat, config?: TelegramApiConfig): Promise<boolean | FetchError>;
@@ -3,9 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.unbanChatMember = unbanChatMember;
4
4
  exports.unbanChatSenderChat = unbanChatSenderChat;
5
5
  const telegram_api_1 = require("../apis/telegram-api");
6
- async function unbanChatMember(token, body) {
7
- return telegram_api_1.TelegramAPI.post('unbanChatMember', body, { token });
6
+ async function unbanChatMember(body, config) {
7
+ return telegram_api_1.TelegramAPI.post('unbanChatMember', body, config);
8
8
  }
9
- async function unbanChatSenderChat(token, body) {
10
- return telegram_api_1.TelegramAPI.post('unbanChatSenderChat', body, { token });
9
+ async function unbanChatSenderChat(body, config) {
10
+ return telegram_api_1.TelegramAPI.post('unbanChatSenderChat', body, config);
11
11
  }
@@ -1,3 +1,4 @@
1
1
  import type { FetchError } from '@aracna/core';
2
2
  import type { HideGeneralForumTopic } from '@aracna/telegram-bot-types';
3
- export declare function unhideGeneralForumTopic(token: string, body: HideGeneralForumTopic): Promise<boolean | FetchError>;
3
+ import type { TelegramApiConfig } from '../definitions/interfaces';
4
+ export declare function unhideGeneralForumTopic(body: HideGeneralForumTopic, config?: TelegramApiConfig): Promise<boolean | FetchError>;
@@ -2,6 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.unhideGeneralForumTopic = unhideGeneralForumTopic;
4
4
  const telegram_api_1 = require("../apis/telegram-api");
5
- async function unhideGeneralForumTopic(token, body) {
6
- return telegram_api_1.TelegramAPI.post('unhideGeneralForumTopic', body, { token });
5
+ async function unhideGeneralForumTopic(body, config) {
6
+ return telegram_api_1.TelegramAPI.post('unhideGeneralForumTopic', body, config);
7
7
  }
@@ -1,6 +1,7 @@
1
1
  import type { FetchError } from '@aracna/core';
2
2
  import type { UnpinAllChatMessages, UnpinAllForumTopicMessages, UnpinAllGeneralForumTopicMessages, UnpinChatMessage } from '@aracna/telegram-bot-types';
3
- export declare function unpinAllChatMessages(token: string, body: UnpinAllChatMessages): Promise<boolean | FetchError>;
4
- export declare function unpinAllForumTopicMessages(token: string, body: UnpinAllForumTopicMessages): Promise<boolean | FetchError>;
5
- export declare function unpinAllGeneralForumTopicMessages(token: string, body: UnpinAllGeneralForumTopicMessages): Promise<boolean | FetchError>;
6
- export declare function unpinChatMessage(token: string, body: UnpinChatMessage): Promise<boolean | FetchError>;
3
+ import type { TelegramApiConfig } from '../definitions/interfaces';
4
+ export declare function unpinAllChatMessages(body: UnpinAllChatMessages, config?: TelegramApiConfig): Promise<boolean | FetchError>;
5
+ export declare function unpinAllForumTopicMessages(body: UnpinAllForumTopicMessages, config?: TelegramApiConfig): Promise<boolean | FetchError>;
6
+ export declare function unpinAllGeneralForumTopicMessages(body: UnpinAllGeneralForumTopicMessages, config?: TelegramApiConfig): Promise<boolean | FetchError>;
7
+ export declare function unpinChatMessage(body: UnpinChatMessage, config?: TelegramApiConfig): Promise<boolean | FetchError>;
@@ -5,15 +5,15 @@ exports.unpinAllForumTopicMessages = unpinAllForumTopicMessages;
5
5
  exports.unpinAllGeneralForumTopicMessages = unpinAllGeneralForumTopicMessages;
6
6
  exports.unpinChatMessage = unpinChatMessage;
7
7
  const telegram_api_1 = require("../apis/telegram-api");
8
- async function unpinAllChatMessages(token, body) {
9
- return telegram_api_1.TelegramAPI.post('unpinAllChatMessages', body, { token });
8
+ async function unpinAllChatMessages(body, config) {
9
+ return telegram_api_1.TelegramAPI.post('unpinAllChatMessages', body, config);
10
10
  }
11
- async function unpinAllForumTopicMessages(token, body) {
12
- return telegram_api_1.TelegramAPI.post('unpinAllForumTopicMessages', body, { token });
11
+ async function unpinAllForumTopicMessages(body, config) {
12
+ return telegram_api_1.TelegramAPI.post('unpinAllForumTopicMessages', body, config);
13
13
  }
14
- async function unpinAllGeneralForumTopicMessages(token, body) {
15
- return telegram_api_1.TelegramAPI.post('unpinAllGeneralForumTopicMessages', body, { token });
14
+ async function unpinAllGeneralForumTopicMessages(body, config) {
15
+ return telegram_api_1.TelegramAPI.post('unpinAllGeneralForumTopicMessages', body, config);
16
16
  }
17
- async function unpinChatMessage(token, body) {
18
- return telegram_api_1.TelegramAPI.post('unpinChatMessage', body, { token });
17
+ async function unpinChatMessage(body, config) {
18
+ return telegram_api_1.TelegramAPI.post('unpinChatMessage', body, config);
19
19
  }
@@ -1,3 +1,4 @@
1
1
  import type { FetchError } from '@aracna/core';
2
2
  import type { File, UploadStickerFile } from '@aracna/telegram-bot-types';
3
- export declare function uploadStickerFile(token: string, body: UploadStickerFile): Promise<File | FetchError>;
3
+ import type { TelegramApiConfig } from '../definitions/interfaces';
4
+ export declare function uploadStickerFile(body: UploadStickerFile, config?: TelegramApiConfig): Promise<File | FetchError>;
@@ -2,6 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.uploadStickerFile = uploadStickerFile;
4
4
  const telegram_api_1 = require("../apis/telegram-api");
5
- async function uploadStickerFile(token, body) {
6
- return telegram_api_1.TelegramAPI.post('uploadStickerFile', body, { token });
5
+ async function uploadStickerFile(body, config) {
6
+ return telegram_api_1.TelegramAPI.post('uploadStickerFile', body, config);
7
7
  }
@@ -1,6 +1,7 @@
1
1
  import type { FetchError } from '@aracna/core';
2
2
  import type { DeleteWebhook, SetWebhook, WebhookInfo } from '@aracna/telegram-bot-types';
3
- export declare function closeWebhook(token: string): Promise<boolean | FetchError>;
4
- export declare function deleteWebhook(token: string, body?: DeleteWebhook): Promise<boolean | FetchError>;
5
- export declare function getWebhookInfo(token: string): Promise<WebhookInfo | FetchError>;
6
- export declare function setWebhook(token: string, body: SetWebhook): Promise<boolean | FetchError>;
3
+ import type { TelegramApiConfig } from '../definitions/interfaces';
4
+ export declare function closeWebhook(config?: TelegramApiConfig): Promise<boolean | FetchError>;
5
+ export declare function deleteWebhook(body?: DeleteWebhook, config?: TelegramApiConfig): Promise<boolean | FetchError>;
6
+ export declare function getWebhookInfo(config?: TelegramApiConfig): Promise<WebhookInfo | FetchError>;
7
+ export declare function setWebhook(body: SetWebhook, config?: TelegramApiConfig): Promise<boolean | FetchError>;
@@ -6,15 +6,15 @@ exports.getWebhookInfo = getWebhookInfo;
6
6
  exports.setWebhook = setWebhook;
7
7
  const telegram_api_1 = require("../apis/telegram-api");
8
8
  const constants_1 = require("../definitions/constants");
9
- async function closeWebhook(token) {
10
- return telegram_api_1.TelegramAPI.post('close', undefined, { token });
9
+ async function closeWebhook(config) {
10
+ return telegram_api_1.TelegramAPI.post('close', undefined, config);
11
11
  }
12
- async function deleteWebhook(token, body) {
13
- return telegram_api_1.TelegramAPI.post('deleteWebhook', body, { token });
12
+ async function deleteWebhook(body, config) {
13
+ return telegram_api_1.TelegramAPI.post('deleteWebhook', body, config);
14
14
  }
15
- async function getWebhookInfo(token) {
16
- return telegram_api_1.TelegramAPI.post('getWebhookInfo', undefined, { token });
15
+ async function getWebhookInfo(config) {
16
+ return telegram_api_1.TelegramAPI.post('getWebhookInfo', undefined, config);
17
17
  }
18
- async function setWebhook(token, body) {
19
- return telegram_api_1.TelegramAPI.post('setWebhook', { allowed_updates: constants_1.DEFAULT_ALLOWED_UPDATES, ...body }, { token });
18
+ async function setWebhook(body, config) {
19
+ return telegram_api_1.TelegramAPI.post('setWebhook', { allowed_updates: constants_1.DEFAULT_ALLOWED_UPDATES, ...body }, config);
20
20
  }
@@ -1,6 +1,6 @@
1
1
  import type { MessageEntity } from '@aracna/telegram-bot-types';
2
2
  import type { EncodeReplyToMessageBodyOptions, ReplyToMessageBody } from '../definitions/interfaces';
3
3
  export declare function decodeReplyToMessageBody<T>(entities: MessageEntity[]): ReplyToMessageBody<T>;
4
- export declare function encodeReplyToMessageBody<T>(options?: EncodeReplyToMessageBodyOptions): string;
5
- export declare function encodeReplyToMessageBodyToAnchorTag<T>(options?: EncodeReplyToMessageBodyOptions): string;
6
- export declare function encodeReplyToMessageBodyToURL<T>(options?: EncodeReplyToMessageBodyOptions): string;
4
+ export declare function encodeReplyToMessageBody<T>(options?: EncodeReplyToMessageBodyOptions<T>): string;
5
+ export declare function encodeReplyToMessageBodyToAnchorTag<T>(options?: EncodeReplyToMessageBodyOptions<T>): string;
6
+ export declare function encodeReplyToMessageBodyToURL<T>(options?: EncodeReplyToMessageBodyOptions<T>): string;
@@ -29,7 +29,7 @@ function encodeReplyToMessageBody(options) {
29
29
  return (0, core_1.encodeBase64)((0, core_1.encodeText)((0, core_1.encodeJSON)(body, (0, constants_1.DEFAULT_ENCODE_JSON_OPTIONS)(), '{}')));
30
30
  }
31
31
  function encodeReplyToMessageBodyToAnchorTag(options) {
32
- return `\n<a href="${encodeReplyToMessageBodyToURL(options)}">ㅤ</a>`;
32
+ return `<a href="${encodeReplyToMessageBodyToURL(options)}"> </a>`;
33
33
  }
34
34
  function encodeReplyToMessageBodyToURL(options) {
35
35
  return (0, core_1.appendSearchParamsToURL)('https://t.me', { a: encodeReplyToMessageBody(options) });
@@ -1,6 +1,6 @@
1
1
  import type { EncodeStartBodyOptions, StartBody } from '../definitions/interfaces';
2
2
  export declare function decodeStartBody<T>(text: string | undefined): StartBody<T>;
3
3
  export declare function encodeStartBody<T>(options?: EncodeStartBodyOptions): string;
4
- export declare function encodeStartBodyToAnchorTag<T>(username: string, children: string, options?: EncodeStartBodyOptions): string;
5
- export declare function encodeStartBodyToText<T>(options?: EncodeStartBodyOptions): string;
6
- export declare function encodeStartBodyToURL<T>(username: string, options?: EncodeStartBodyOptions): string;
4
+ export declare function encodeStartBodyToAnchorTag<T>(username: string, children: string, options?: EncodeStartBodyOptions<T>): string;
5
+ export declare function encodeStartBodyToText<T>(options?: EncodeStartBodyOptions<T>): string;
6
+ export declare function encodeStartBodyToURL<T>(username: string, options?: EncodeStartBodyOptions<T>): string;
@@ -1,12 +0,0 @@
1
- import type { FetchResponse, RestApiConfig } from '@aracna/core';
2
- export declare namespace TelegramApiDefinitions {
3
- interface Config extends RestApiConfig {
4
- token: string | undefined;
5
- }
6
- interface Response<T> extends FetchResponse<ResponseData<T>> {
7
- }
8
- interface ResponseData<T> {
9
- ok: boolean;
10
- result: T;
11
- }
12
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });