@mtkruto/node 0.124.0 → 0.126.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 (65) hide show
  1. package/esm/3_types.d.ts +3 -0
  2. package/esm/3_types.d.ts.map +1 -1
  3. package/esm/3_types.js +3 -0
  4. package/esm/client/0_params.d.ts +14 -0
  5. package/esm/client/0_params.d.ts.map +1 -1
  6. package/esm/client/1_client_generic.d.ts +112 -19
  7. package/esm/client/1_client_generic.d.ts.map +1 -1
  8. package/esm/client/2_account_manager.d.ts +2 -1
  9. package/esm/client/2_account_manager.d.ts.map +1 -1
  10. package/esm/client/2_account_manager.js +6 -0
  11. package/esm/client/2_story_album_manager.d.ts +36 -0
  12. package/esm/client/2_story_album_manager.d.ts.map +1 -0
  13. package/esm/client/2_story_album_manager.js +99 -0
  14. package/esm/client/4_contact_manager.d.ts +2 -1
  15. package/esm/client/4_contact_manager.d.ts.map +1 -1
  16. package/esm/client/4_contact_manager.js +5 -0
  17. package/esm/client/4_story_manager.js +4 -4
  18. package/esm/client/6_client.d.ts +112 -19
  19. package/esm/client/6_client.d.ts.map +1 -1
  20. package/esm/client/6_client.js +140 -18
  21. package/esm/client/6_client_dispatcher.d.ts +113 -19
  22. package/esm/client/6_client_dispatcher.d.ts.map +1 -1
  23. package/esm/client/6_client_dispatcher.js +135 -17
  24. package/esm/types/2_story_album_icon.d.ts +35 -0
  25. package/esm/types/2_story_album_icon.d.ts.map +1 -0
  26. package/esm/types/2_story_album_icon.js +20 -0
  27. package/esm/types/3_story_album.d.ts +32 -0
  28. package/esm/types/3_story_album.d.ts.map +1 -0
  29. package/esm/types/3_story_album.js +50 -0
  30. package/esm/types/4_album_story_list.d.ts +33 -0
  31. package/esm/types/4_album_story_list.d.ts.map +1 -0
  32. package/esm/types/4_album_story_list.js +32 -0
  33. package/package.json +1 -1
  34. package/script/3_types.d.ts +3 -0
  35. package/script/3_types.d.ts.map +1 -1
  36. package/script/3_types.js +3 -0
  37. package/script/client/0_params.d.ts +14 -0
  38. package/script/client/0_params.d.ts.map +1 -1
  39. package/script/client/1_client_generic.d.ts +112 -19
  40. package/script/client/1_client_generic.d.ts.map +1 -1
  41. package/script/client/2_account_manager.d.ts +2 -1
  42. package/script/client/2_account_manager.d.ts.map +1 -1
  43. package/script/client/2_account_manager.js +6 -0
  44. package/script/client/2_story_album_manager.d.ts +36 -0
  45. package/script/client/2_story_album_manager.d.ts.map +1 -0
  46. package/script/client/2_story_album_manager.js +103 -0
  47. package/script/client/4_contact_manager.d.ts +2 -1
  48. package/script/client/4_contact_manager.d.ts.map +1 -1
  49. package/script/client/4_contact_manager.js +5 -0
  50. package/script/client/4_story_manager.js +4 -4
  51. package/script/client/6_client.d.ts +112 -19
  52. package/script/client/6_client.d.ts.map +1 -1
  53. package/script/client/6_client.js +140 -18
  54. package/script/client/6_client_dispatcher.d.ts +113 -19
  55. package/script/client/6_client_dispatcher.d.ts.map +1 -1
  56. package/script/client/6_client_dispatcher.js +135 -17
  57. package/script/types/2_story_album_icon.d.ts +35 -0
  58. package/script/types/2_story_album_icon.d.ts.map +1 -0
  59. package/script/types/2_story_album_icon.js +21 -0
  60. package/script/types/3_story_album.d.ts +32 -0
  61. package/script/types/3_story_album.d.ts.map +1 -0
  62. package/script/types/3_story_album.js +53 -0
  63. package/script/types/4_album_story_list.d.ts +33 -0
  64. package/script/types/4_album_story_list.d.ts.map +1 -0
  65. package/script/types/4_album_story_list.js +35 -0
@@ -44,6 +44,7 @@ const _2_network_statistics_manager_js_1 = require("./2_network_statistics_manag
44
44
  const _2_payment_manager_js_1 = require("./2_payment_manager.js");
45
45
  const _2_reaction_manager_js_1 = require("./2_reaction_manager.js");
46
46
  const _2_sign_in_js_1 = require("./2_sign_in.js");
47
+ const _2_story_album_manager_js_1 = require("./2_story_album_manager.js");
47
48
  const _2_translations_manager_js_1 = require("./2_translations_manager.js");
48
49
  const _2_update_manager_js_1 = require("./2_update_manager.js");
49
50
  const _3_client_encrypted_pool_js_1 = require("./3_client_encrypted_pool.js");
@@ -85,6 +86,7 @@ class Client extends _5_composer_js_1.Composer {
85
86
  #networkStatisticsManager;
86
87
  #paymentManager;
87
88
  #reactionManager;
89
+ #storyAlbumManager;
88
90
  #translationsManager;
89
91
  #updateManager;
90
92
  // 3_
@@ -116,6 +118,7 @@ class Client extends _5_composer_js_1.Composer {
116
118
  networkStatisticsManager: this.#networkStatisticsManager,
117
119
  paymentManager: this.#paymentManager,
118
120
  reactionManager: this.#reactionManager,
121
+ storyAlbumManager: this.#storyAlbumManager,
119
122
  translationsManager: this.#translationsManager,
120
123
  updateManager: this.#updateManager,
121
124
  // 3_
@@ -241,6 +244,7 @@ class Client extends _5_composer_js_1.Composer {
241
244
  this.#networkStatisticsManager = new _2_network_statistics_manager_js_1.NetworkStatisticsManager(c);
242
245
  this.#paymentManager = new _2_payment_manager_js_1.PaymentManager(c);
243
246
  this.#reactionManager = new _2_reaction_manager_js_1.ReactionManager(c);
247
+ this.#storyAlbumManager = new _2_story_album_manager_js_1.StoryAlbumManager(c);
244
248
  this.#translationsManager = new _2_translations_manager_js_1.TranslationsManager(c);
245
249
  this.#updateManager = new _2_update_manager_js_1.UpdateManager(c);
246
250
  // 3_
@@ -1453,7 +1457,7 @@ class Client extends _5_composer_js_1.Composer {
1453
1457
  return await this.#accountManager.resolveUsername(username, params);
1454
1458
  }
1455
1459
  /**
1456
- * Resolve a phone number.
1460
+ * Resolve a phone number. User-only.
1457
1461
  *
1458
1462
  * @method ac
1459
1463
  * @param username The phone number to resolve.
@@ -1462,13 +1466,23 @@ class Client extends _5_composer_js_1.Composer {
1462
1466
  return await this.#accountManager.resolvePhoneNumber(phoneNumber);
1463
1467
  }
1464
1468
  /**
1465
- * Set the list of close friends.
1469
+ * Set the list of close friends. User-only.
1466
1470
  *
1467
1471
  * @method ac
1468
1472
  * @param userIds The identifiers of users to set as close friends.
1469
1473
  */
1470
1474
  async setCloseFriends(userIds) {
1471
- return await this.#accountManager.setCloseFriends(userIds);
1475
+ await this.#accountManager.setCloseFriends(userIds);
1476
+ }
1477
+ /**
1478
+ * Suggest a birthday. User-only.
1479
+ *
1480
+ * @method ac
1481
+ * @param userId The identifier of the user to suggest a birthday for.
1482
+ * @param birthday The birthday to suggest.
1483
+ */
1484
+ async suggestBirthday(userId, birthday) {
1485
+ await this.#accountManager.suggestBirthday(userId, birthday);
1472
1486
  }
1473
1487
  //
1474
1488
  // ========================= MESSAGES ========================= //
@@ -3013,7 +3027,7 @@ class Client extends _5_composer_js_1.Composer {
3013
3027
  /**
3014
3028
  * Set the bot's description in the given language. Bot-only.
3015
3029
  *
3016
- * @method bs
3030
+ * @method bo
3017
3031
  */
3018
3032
  async setMyDescription(params) {
3019
3033
  await this.#botInfoManager.setMyDescription(params);
@@ -3021,7 +3035,7 @@ class Client extends _5_composer_js_1.Composer {
3021
3035
  /**
3022
3036
  * Set the bot's name in the given language. Bot-only.
3023
3037
  *
3024
- * @method bs
3038
+ * @method bo
3025
3039
  */
3026
3040
  async setMyName(params) {
3027
3041
  await this.#botInfoManager.setMyName(params);
@@ -3029,7 +3043,7 @@ class Client extends _5_composer_js_1.Composer {
3029
3043
  /**
3030
3044
  * Set the bot's short description in the given language. Bot-only.
3031
3045
  *
3032
- * @method bs
3046
+ * @method bo
3033
3047
  */
3034
3048
  async setMyShortDescription(params) {
3035
3049
  await this.#botInfoManager.setMyShortDescription(params);
@@ -3037,7 +3051,7 @@ class Client extends _5_composer_js_1.Composer {
3037
3051
  /**
3038
3052
  * Get the bot's description in the given language. Bot-only.
3039
3053
  *
3040
- * @method bs
3054
+ * @method bo
3041
3055
  * @returns The current bot's description in the specified language.
3042
3056
  */
3043
3057
  async getMyDescription(params) {
@@ -3046,7 +3060,7 @@ class Client extends _5_composer_js_1.Composer {
3046
3060
  /**
3047
3061
  * Get the bot's name in the given language. Bot-only.
3048
3062
  *
3049
- * @method bs
3063
+ * @method bo
3050
3064
  * @returns The current bot's name in the specified language.
3051
3065
  */
3052
3066
  async getMyName(params) {
@@ -3055,7 +3069,7 @@ class Client extends _5_composer_js_1.Composer {
3055
3069
  /**
3056
3070
  * Get the bot's short description in the given language. Bot-only.
3057
3071
  *
3058
- * @method bs
3072
+ * @method bo
3059
3073
  * @returns The current bot's short description in the specified language.
3060
3074
  */
3061
3075
  async getMyShortDescription(params) {
@@ -3064,7 +3078,7 @@ class Client extends _5_composer_js_1.Composer {
3064
3078
  /**
3065
3079
  * Set the bot's commands in the given scope and/or language. Bot-only.
3066
3080
  *
3067
- * @method bs
3081
+ * @method bo
3068
3082
  * @param commands The commands to set.
3069
3083
  */
3070
3084
  async setMyCommands(commands, params) {
@@ -3073,7 +3087,7 @@ class Client extends _5_composer_js_1.Composer {
3073
3087
  /**
3074
3088
  * Get the bot's commands in the given scope and/or language. Bot-only.
3075
3089
  *
3076
- * @method bs
3090
+ * @method bo
3077
3091
  * @returns The current bot's commands in the specified language.
3078
3092
  */
3079
3093
  async getMyCommands(params) {
@@ -3214,6 +3228,105 @@ class Client extends _5_composer_js_1.Composer {
3214
3228
  await this.#storyManager.removeStoryFromHighlights(chatId, storyId);
3215
3229
  }
3216
3230
  //
3231
+ // ========================= STORY ALBUMS ========================= //
3232
+ //
3233
+ /**
3234
+ * Create a story album. User-only.
3235
+ *
3236
+ * @method sa
3237
+ * @param chatId The identifier of the chat to create the album in.
3238
+ * @param name The name of the album.
3239
+ * @param storyIds The initial stories inside the album.
3240
+ */
3241
+ async createStoryAlbum(chatId, name, storyIds) {
3242
+ return await this.#storyAlbumManager.createStoryAlbum(chatId, name, storyIds);
3243
+ }
3244
+ /**
3245
+ * Set the name of a story album. User-only.
3246
+ *
3247
+ * @method sa
3248
+ * @param chatId The identifier of the chat including the album.
3249
+ * @param albumId The identifier of the album to rename.
3250
+ * @param name The new name of the album.
3251
+ */
3252
+ async setStoryAlbumName(chatId, albumId, name) {
3253
+ return await this.#storyAlbumManager.setStoryAlbumName(chatId, albumId, name);
3254
+ }
3255
+ /**
3256
+ * Add multiple stories to an album. User-only.
3257
+ *
3258
+ * @method sa
3259
+ * @param chatId The identifier of the chat including the album.
3260
+ * @param albumId The identifier of an album.
3261
+ * @param storyIds The identifiers of the stories to add.
3262
+ */
3263
+ async addStoriesToAlbum(chatId, albumId, storyIds) {
3264
+ return await this.#storyAlbumManager.addStoriesToAlbum(chatId, albumId, storyIds);
3265
+ }
3266
+ /**
3267
+ * Add a single story to an album. User-only.
3268
+ *
3269
+ * @method sa
3270
+ * @param chatId The identifier of the chat including the album.
3271
+ * @param albumId The identifier of an album.
3272
+ * @param storyIds The identifier of the story to add.
3273
+ */
3274
+ async addStoryToAlbum(chatId, albumId, storyId) {
3275
+ return await this.#storyAlbumManager.addStoryToAlbum(chatId, albumId, storyId);
3276
+ }
3277
+ /**
3278
+ * Remove multiple stories from an album. User-only.
3279
+ *
3280
+ * @method sa
3281
+ * @param chatId The identifier of the chat including the album.
3282
+ * @param albumId The identifier of an album.
3283
+ * @param storyIds The identifiers of the stories to remove.
3284
+ */
3285
+ async removeStoriesFromAlbum(chatId, albumId, storyIds) {
3286
+ return await this.#storyAlbumManager.removeStoriesFromAlbum(chatId, albumId, storyIds);
3287
+ }
3288
+ /**
3289
+ * Remove a single story from an album. User-only.
3290
+ *
3291
+ * @method sa
3292
+ * @param chatId The identifier of the chat including the album.
3293
+ * @param albumId The identifier of an album.
3294
+ * @param storyIds The identifier of the story to remove.
3295
+ */
3296
+ async removeStoryFromAlbum(chatId, albumId, storyId) {
3297
+ return await this.#storyAlbumManager.removeStoryFromAlbum(chatId, albumId, storyId);
3298
+ }
3299
+ /**
3300
+ * Reorder stories in an album. User-only.
3301
+ *
3302
+ * @method sa
3303
+ * @param chatId The identifier of the chat including the album.
3304
+ * @param albumId The identifier of an album.
3305
+ * @param storyIds The new order of stories.
3306
+ */
3307
+ async reorderStoriesInAlbum(chatId, albumId, storyIds) {
3308
+ return await this.#storyAlbumManager.reorderStoriesInAlbum(chatId, albumId, storyIds);
3309
+ }
3310
+ /**
3311
+ * Get story albums in a chat. User-only.
3312
+ *
3313
+ * @method sa
3314
+ * @param chatId The identifier of a chat including albums.
3315
+ */
3316
+ async getStoryAlbums(chatId) {
3317
+ return await this.#storyAlbumManager.getStoryAlbums(chatId);
3318
+ }
3319
+ /**
3320
+ * Get stories inside an album. User-only.
3321
+ *
3322
+ * @method sa
3323
+ * @param chatId The identifier of the chat including albums.
3324
+ * @param albumId The identifier of an album.
3325
+ */
3326
+ async getStoriesInAlbum(chatId, albumId) {
3327
+ return await this.#storyAlbumManager.getStoriesInAlbum(chatId, albumId);
3328
+ }
3329
+ //
3217
3330
  // ========================= MISC ========================= //
3218
3331
  //
3219
3332
  /**
@@ -3388,6 +3501,15 @@ class Client extends _5_composer_js_1.Composer {
3388
3501
  async addContact(userId, firstName, params) {
3389
3502
  await this.#contactManager.addContact(userId, firstName, params);
3390
3503
  }
3504
+ /**
3505
+ * Set a contact note.
3506
+ *
3507
+ * @method co
3508
+ * @param userId The identifier of the user to update the note for.
3509
+ */
3510
+ async setContactNote(userId, params) {
3511
+ await this.#contactManager.setContactNote(userId, params);
3512
+ }
3391
3513
  //
3392
3514
  // ========================= TRANSLATIONS ========================= //
3393
3515
  //
@@ -3471,7 +3593,7 @@ class Client extends _5_composer_js_1.Composer {
3471
3593
  // ========================= GIFT COLLECTIONS ========================= //
3472
3594
  //
3473
3595
  /**
3474
- * Get gift collections of a chat.
3596
+ * Get gift collections of a chat. User-only.
3475
3597
  *
3476
3598
  * @method gc
3477
3599
  * @param chatId The identifier of a chat to get gift collections for.
@@ -3480,7 +3602,7 @@ class Client extends _5_composer_js_1.Composer {
3480
3602
  return await this.#giftCollectionManager.getGiftCollections(chatId);
3481
3603
  }
3482
3604
  /**
3483
- * Create a gift collection.
3605
+ * Create a gift collection. User-only.
3484
3606
  *
3485
3607
  * @method gc
3486
3608
  * @param chatId The identifier of a chat to create the gift collection in.
@@ -3491,7 +3613,7 @@ class Client extends _5_composer_js_1.Composer {
3491
3613
  return await this.#giftCollectionManager.createGiftCollection(chatId, name, gifts);
3492
3614
  }
3493
3615
  /**
3494
- * Set the name of a gift collection.
3616
+ * Set the name of a gift collection. User-only.
3495
3617
  *
3496
3618
  * @method gc
3497
3619
  * @param chatId The identifier of the chat that includes the gift collection.
@@ -3502,7 +3624,7 @@ class Client extends _5_composer_js_1.Composer {
3502
3624
  return await this.#giftCollectionManager.setGiftCollectionName(chatId, collectionId, name);
3503
3625
  }
3504
3626
  /**
3505
- * Add gifts to a gift collection.
3627
+ * Add gifts to a gift collection. User-only.
3506
3628
  *
3507
3629
  * @method gc
3508
3630
  * @param chatId The identifier of the chat that includes the gift collection.
@@ -3513,7 +3635,7 @@ class Client extends _5_composer_js_1.Composer {
3513
3635
  return await this.#giftCollectionManager.addGiftsToCollection(chatId, collectionId, gifts);
3514
3636
  }
3515
3637
  /**
3516
- * Remove gifts from a gift collection.
3638
+ * Remove gifts from a gift collection. User-only.
3517
3639
  *
3518
3640
  * @method gc
3519
3641
  * @param chatId The identifier of the chat that includes the gift collection.
@@ -3524,7 +3646,7 @@ class Client extends _5_composer_js_1.Composer {
3524
3646
  return await this.#giftCollectionManager.removeGiftsFromCollection(chatId, collectionId, gifts);
3525
3647
  }
3526
3648
  /**
3527
- * Reorder gifts in a gift collection.
3649
+ * Reorder gifts in a gift collection. User-only.
3528
3650
  *
3529
3651
  * @method gc
3530
3652
  * @param chatId The identifier of the chat that includes the gift collection.
@@ -3535,7 +3657,7 @@ class Client extends _5_composer_js_1.Composer {
3535
3657
  return await this.#giftCollectionManager.reorderGiftsInCollection(chatId, collectionId, gifts);
3536
3658
  }
3537
3659
  /**
3538
- * Delete a gift collection.
3660
+ * Delete a gift collection. User-only.
3539
3661
  *
3540
3662
  * @method gc
3541
3663
  * @param chatId The identifier of the chat that includes the gift collection.
@@ -1,7 +1,8 @@
1
1
  import type { Api, Mtproto } from "../2_tl.js";
2
2
  import type { DC } from "../3_transport.js";
3
- import type { BotCommand, BotTokenCheckResult, BusinessConnection, CallbackQueryAnswer, CallbackQueryQuestion, Chat, ChatActionType, ChatListItem, ChatMember, ChatP, ChatPChannel, ChatPGroup, ChatPPrivate, ChatPSupergroup, ChatSettings, ClaimedGifts, CodeCheckResult, FailedInvitation, FileSource, Gift, GiftCollection, ID, InactiveChat, InlineQueryAnswer, InlineQueryResult, InputChecklistItem, InputEmojiStatus, InputGift, InputMedia, InputPollOption, InputStoryContent, InviteLink, JoinRequest, LinkPreview, LiveStreamChannel, Message, MessageAnimation, MessageAudio, MessageChecklist, MessageContact, MessageDice, MessageDocument, MessageInvoice, MessageList, MessageLocation, MessagePhoto, MessagePoll, MessageReactionList, MessageSticker, MessageText, MessageVenue, MessageVideo, MessageVideoNote, MessageVoice, MiniAppInfo, NetworkStatistics, ParseMode, PasswordCheckResult, Poll, PriceTag, Reaction, SavedChats, SlowModeDuration, Sticker, StickerSet, Story, Topic, Translation, User, VideoChat, VideoChatActive, VideoChatScheduled, VoiceTranscription } from "../3_types.js";
4
- import type { AddChatMemberParams, AddContactParams, AddReactionParams, AnswerCallbackQueryParams, AnswerInlineQueryParams, AnswerPreCheckoutQueryParams, ApproveJoinRequestsParams, BanChatMemberParams, CheckUsernameParams, CreateChannelParams, CreateGroupParams, CreateInviteLinkParams, CreateStoryParams, CreateSupergroupParams, CreateTopicParams, DeclineJoinRequestsParams, DeleteMessageParams, DeleteMessagesParams, DownloadLiveStreamSegmentParams, DownloadParams, EditInlineMessageCaptionParams, EditInlineMessageMediaParams, EditInlineMessageTextParams, EditMessageCaptionParams, EditMessageLiveLocationParams, EditMessageMediaParams, EditMessageReplyMarkupParams, EditMessageTextParams, EditTopicParams, EnableSignaturesParams, ForwardMessagesParams, GetChatMembersParams, GetChatsParams, GetClaimedGiftsParams, GetCommonChatsParams, GetCreatedInviteLinksParams, GetHistoryParams, GetJoinRequestsParams, GetLinkPreviewParams, GetMessageReactionsParams, GetMyCommandsParams, GetSavedChatsParams, GetSavedMessagesParams, GetTranslationsParams, InvokeParams, JoinVideoChatParams, OpenChatParams, OpenMiniAppParams, PinMessageParams, PromoteChatMemberParams, ResolveUsernameParams, ScheduleVideoChatParams, SearchMessagesParams, SendAnimationParams, SendAudioParams, SendChecklistParams, SendContactParams, SendDiceParams, SendDocumentParams, SendGiftParams, SendInlineQueryParams, SendInvoiceParams, SendLocationParams, SendMediaGroupParams, SendMessageDraftParams, SendMessageParams, SendPhotoParams, SendPollParams, SendStickerParams, SendVenueParams, SendVideoNoteParams, SendVideoParams, SendVoiceParams, SetBirthdayParams, SetChatMemberRightsParams, SetChatMemberTagParams, SetChatPhotoParams, SetEmojiStatusParams, SetLocationParams, SetMyCommandsParams, SetNameColorParams, SetPersonalChannelParams, SetProfileColorParams, SetReactionsParams, SetWorkingHoursParams, SignInParams, StartBotParams, StartVideoChatParams, StopPollParams, UnpinMessageParams, UnpinMessagesParams, UpdateChecklistParams, UpdateProfileParams } from "./0_params.js";
3
+ import type { Birthday, BotCommand, BotTokenCheckResult, BusinessConnection, CallbackQueryAnswer, CallbackQueryQuestion, Chat, ChatActionType, ChatListItem, ChatMember, ChatP, ChatPChannel, ChatPGroup, ChatPPrivate, ChatPSupergroup, ChatSettings, ClaimedGifts, CodeCheckResult, FailedInvitation, FileSource, Gift, GiftCollection, ID, InactiveChat, InlineQueryAnswer, InlineQueryResult, InputChecklistItem, InputEmojiStatus, InputGift, InputMedia, InputPollOption, InputStoryContent, InviteLink, JoinRequest, LinkPreview, LiveStreamChannel, Message, MessageAnimation, MessageAudio, MessageChecklist, MessageContact, MessageDice, MessageDocument, MessageInvoice, MessageList, MessageLocation, MessagePhoto, MessagePoll, MessageReactionList, MessageSticker, MessageText, MessageVenue, MessageVideo, MessageVideoNote, MessageVoice, MiniAppInfo, NetworkStatistics, ParseMode, PasswordCheckResult, Poll, PriceTag, Reaction, SavedChats, SlowModeDuration, Sticker, StickerSet, Story, StoryAlbum, Topic, Translation, User, VideoChat, VideoChatActive, VideoChatScheduled, VoiceTranscription } from "../3_types.js";
4
+ import type { AlbumStoryList } from "../types/4_album_story_list.js";
5
+ import type { AddChatMemberParams, AddContactParams, AddReactionParams, AnswerCallbackQueryParams, AnswerInlineQueryParams, AnswerPreCheckoutQueryParams, ApproveJoinRequestsParams, BanChatMemberParams, CheckUsernameParams, CreateChannelParams, CreateGroupParams, CreateInviteLinkParams, CreateStoryParams, CreateSupergroupParams, CreateTopicParams, DeclineJoinRequestsParams, DeleteMessageParams, DeleteMessagesParams, DownloadLiveStreamSegmentParams, DownloadParams, EditInlineMessageCaptionParams, EditInlineMessageMediaParams, EditInlineMessageTextParams, EditMessageCaptionParams, EditMessageLiveLocationParams, EditMessageMediaParams, EditMessageReplyMarkupParams, EditMessageTextParams, EditTopicParams, EnableSignaturesParams, ForwardMessagesParams, GetChatMembersParams, GetChatsParams, GetClaimedGiftsParams, GetCommonChatsParams, GetCreatedInviteLinksParams, GetHistoryParams, GetJoinRequestsParams, GetLinkPreviewParams, GetMessageReactionsParams, GetMyCommandsParams, GetSavedChatsParams, GetSavedMessagesParams, GetTranslationsParams, InvokeParams, JoinVideoChatParams, OpenChatParams, OpenMiniAppParams, PinMessageParams, PromoteChatMemberParams, ResolveUsernameParams, ScheduleVideoChatParams, SearchMessagesParams, SendAnimationParams, SendAudioParams, SendChecklistParams, SendContactParams, SendDiceParams, SendDocumentParams, SendGiftParams, SendInlineQueryParams, SendInvoiceParams, SendLocationParams, SendMediaGroupParams, SendMessageDraftParams, SendMessageParams, SendPhotoParams, SendPollParams, SendStickerParams, SendVenueParams, SendVideoNoteParams, SendVideoParams, SendVoiceParams, SetBirthdayParams, SetChatMemberRightsParams, SetChatMemberTagParams, SetChatPhotoParams, SetContactNoteParams, SetEmojiStatusParams, SetLocationParams, SetMyCommandsParams, SetNameColorParams, SetPersonalChannelParams, SetProfileColorParams, SetReactionsParams, SetWorkingHoursParams, SignInParams, StartBotParams, StartVideoChatParams, StopPollParams, UnpinMessageParams, UnpinMessagesParams, UpdateChecklistParams, UpdateProfileParams } from "./0_params.js";
5
6
  import type { WorkerRequest } from "./0_worker_request.js";
6
7
  import type { ClientGeneric } from "./1_client_generic.js";
7
8
  import { type InvokeErrorHandler } from "./1_invoke_middleware.js";
@@ -343,19 +344,27 @@ export declare class ClientDispatcher<C extends Context = Context> extends Compo
343
344
  */
344
345
  resolveUsername(username: string, params?: ResolveUsernameParams): Promise<ChatP>;
345
346
  /**
346
- * Resolve a phone number.
347
+ * Resolve a phone number. User-only.
347
348
  *
348
349
  * @method ac
349
350
  * @param username The phone number to resolve.
350
351
  */
351
352
  resolvePhoneNumber(phoneNumber: string): Promise<User>;
352
353
  /**
353
- * Set the list of close friends.
354
+ * Set the list of close friends. User-only.
354
355
  *
355
356
  * @method ac
356
357
  * @param userIds The identifiers of users to set as close friends.
357
358
  */
358
359
  setCloseFriends(userIds: ID[]): Promise<void>;
360
+ /**
361
+ * Suggest a birthday. User-only.
362
+ *
363
+ * @method ac
364
+ * @param userId The identifier of the user to suggest a birthday for.
365
+ * @param birthday The birthday to suggest.
366
+ */
367
+ suggestBirthday(userId: ID, birthday: Birthday): Promise<void>;
359
368
  /**
360
369
  * Send a text message.
361
370
  *
@@ -1566,7 +1575,7 @@ export declare class ClientDispatcher<C extends Context = Context> extends Compo
1566
1575
  /**
1567
1576
  * Set the bot's description in the given language. Bot-only.
1568
1577
  *
1569
- * @method bs
1578
+ * @method bo
1570
1579
  */
1571
1580
  setMyDescription(params?: {
1572
1581
  description?: string;
@@ -1575,7 +1584,7 @@ export declare class ClientDispatcher<C extends Context = Context> extends Compo
1575
1584
  /**
1576
1585
  * Set the bot's name in the given language. Bot-only.
1577
1586
  *
1578
- * @method bs
1587
+ * @method bo
1579
1588
  */
1580
1589
  setMyName(params?: {
1581
1590
  name?: string;
@@ -1584,7 +1593,7 @@ export declare class ClientDispatcher<C extends Context = Context> extends Compo
1584
1593
  /**
1585
1594
  * Set the bot's short description in the given language. Bot-only.
1586
1595
  *
1587
- * @method bs
1596
+ * @method bo
1588
1597
  */
1589
1598
  setMyShortDescription(params?: {
1590
1599
  shortDescription?: string;
@@ -1593,7 +1602,7 @@ export declare class ClientDispatcher<C extends Context = Context> extends Compo
1593
1602
  /**
1594
1603
  * Get the bot's description in the given language. Bot-only.
1595
1604
  *
1596
- * @method bs
1605
+ * @method bo
1597
1606
  * @returns The current bot's description in the specified language.
1598
1607
  */
1599
1608
  getMyDescription(params?: {
@@ -1602,7 +1611,7 @@ export declare class ClientDispatcher<C extends Context = Context> extends Compo
1602
1611
  /**
1603
1612
  * Get the bot's name in the given language. Bot-only.
1604
1613
  *
1605
- * @method bs
1614
+ * @method bo
1606
1615
  * @returns The current bot's name in the specified language.
1607
1616
  */
1608
1617
  getMyName(params?: {
@@ -1611,7 +1620,7 @@ export declare class ClientDispatcher<C extends Context = Context> extends Compo
1611
1620
  /**
1612
1621
  * Get the bot's short description in the given language. Bot-only.
1613
1622
  *
1614
- * @method bs
1623
+ * @method bo
1615
1624
  * @returns The current bot's short description in the specified language.
1616
1625
  */
1617
1626
  getMyShortDescription(params?: {
@@ -1620,14 +1629,14 @@ export declare class ClientDispatcher<C extends Context = Context> extends Compo
1620
1629
  /**
1621
1630
  * Set the bot's commands in the given scope and/or language. Bot-only.
1622
1631
  *
1623
- * @method bs
1632
+ * @method bo
1624
1633
  * @param commands The commands to set.
1625
1634
  */
1626
1635
  setMyCommands(commands: BotCommand[], params?: SetMyCommandsParams): Promise<void>;
1627
1636
  /**
1628
1637
  * Get the bot's commands in the given scope and/or language. Bot-only.
1629
1638
  *
1630
- * @method bs
1639
+ * @method bo
1631
1640
  * @returns The current bot's commands in the specified language.
1632
1641
  */
1633
1642
  getMyCommands(params?: GetMyCommandsParams): Promise<BotCommand[]>;
@@ -1732,6 +1741,84 @@ export declare class ClientDispatcher<C extends Context = Context> extends Compo
1732
1741
  * @param storyId The identifier of the story to remove from highlights.
1733
1742
  */
1734
1743
  removeStoryFromHighlights(chatId: ID, storyId: number): Promise<void>;
1744
+ /**
1745
+ * Create a story album. User-only.
1746
+ *
1747
+ * @method sa
1748
+ * @param chatId The identifier of the chat to create the album in.
1749
+ * @param name The name of the album.
1750
+ * @param storyIds The initial stories inside the album.
1751
+ */
1752
+ createStoryAlbum(chatId: ID, name: string, storyIds: number[]): Promise<StoryAlbum>;
1753
+ /**
1754
+ * Set the name of a story album. User-only.
1755
+ *
1756
+ * @method sa
1757
+ * @param chatId The identifier of the chat including the album.
1758
+ * @param albumId The identifier of the album to rename.
1759
+ * @param name The new name of the album.
1760
+ */
1761
+ setStoryAlbumName(chatId: ID, albumId: number, name: string): Promise<StoryAlbum>;
1762
+ /**
1763
+ * Add multiple stories to an album. User-only.
1764
+ *
1765
+ * @method sa
1766
+ * @param chatId The identifier of the chat including the album.
1767
+ * @param albumId The identifier of an album.
1768
+ * @param storyIds The identifiers of the stories to add.
1769
+ */
1770
+ addStoriesToAlbum(chatId: ID, albumId: number, storyIds: number[]): Promise<StoryAlbum>;
1771
+ /**
1772
+ * Add a single story to an album. User-only.
1773
+ *
1774
+ * @method sa
1775
+ * @param chatId The identifier of the chat including the album.
1776
+ * @param albumId The identifier of an album.
1777
+ * @param storyIds The identifier of the story to add.
1778
+ */
1779
+ addStoryToAlbum(chatId: ID, albumId: number, storyId: number): Promise<StoryAlbum>;
1780
+ /**
1781
+ * Remove multiple stories from an album. User-only.
1782
+ *
1783
+ * @method sa
1784
+ * @param chatId The identifier of the chat including the album.
1785
+ * @param albumId The identifier of an album.
1786
+ * @param storyIds The identifiers of the stories to remove.
1787
+ */
1788
+ removeStoriesFromAlbum(chatId: ID, albumId: number, storyIds: number[]): Promise<StoryAlbum>;
1789
+ /**
1790
+ * Remove a single story from an album. User-only.
1791
+ *
1792
+ * @method sa
1793
+ * @param chatId The identifier of the chat including the album.
1794
+ * @param albumId The identifier of an album.
1795
+ * @param storyIds The identifier of the story to remove.
1796
+ */
1797
+ removeStoryFromAlbum(chatId: ID, albumId: number, storyId: number): Promise<StoryAlbum>;
1798
+ /**
1799
+ * Reorder stories in an album. User-only.
1800
+ *
1801
+ * @method sa
1802
+ * @param chatId The identifier of the chat including the album.
1803
+ * @param albumId The identifier of an album.
1804
+ * @param storyIds The new order of stories.
1805
+ */
1806
+ reorderStoriesInAlbum(chatId: ID, albumId: number, storyIds: number[]): Promise<StoryAlbum>;
1807
+ /**
1808
+ * Get story albums in a chat. User-only.
1809
+ *
1810
+ * @method sa
1811
+ * @param chatId The identifier of a chat including albums.
1812
+ */
1813
+ getStoryAlbums(chatId: ID): Promise<StoryAlbum[]>;
1814
+ /**
1815
+ * Get stories inside an album. User-only.
1816
+ *
1817
+ * @method sa
1818
+ * @param chatId The identifier of the chat including albums.
1819
+ * @param albumId The identifier of an album.
1820
+ */
1821
+ getStoriesInAlbum(chatId: ID, albumId: number): Promise<AlbumStoryList>;
1735
1822
  /**
1736
1823
  * Get network statistics. This might not always be available.
1737
1824
  *
@@ -1861,6 +1948,13 @@ export declare class ClientDispatcher<C extends Context = Context> extends Compo
1861
1948
  * @param firstName The contact's first name.
1862
1949
  */
1863
1950
  addContact(userId: ID, firstName: string, params?: AddContactParams): Promise<void>;
1951
+ /**
1952
+ * Set a contact note.
1953
+ *
1954
+ * @method co
1955
+ * @param userId The identifier of the user to update the note for.
1956
+ */
1957
+ setContactNote(userId: ID, params?: SetContactNoteParams): Promise<void>;
1864
1958
  /**
1865
1959
  * Get translations. User-only.
1866
1960
  *
@@ -1919,14 +2013,14 @@ export declare class ClientDispatcher<C extends Context = Context> extends Compo
1919
2013
  */
1920
2014
  transferGift(chatId: ID, gift: InputGift): Promise<void>;
1921
2015
  /**
1922
- * Get gift collections of a chat.
2016
+ * Get gift collections of a chat. User-only.
1923
2017
  *
1924
2018
  * @method gc
1925
2019
  * @param chatId The identifier of a chat to get gift collections for.
1926
2020
  */
1927
2021
  getGiftCollections(chatId: ID): Promise<GiftCollection[]>;
1928
2022
  /**
1929
- * Create a gift collection.
2023
+ * Create a gift collection. User-only.
1930
2024
  *
1931
2025
  * @method gc
1932
2026
  * @param chatId The identifier of a chat to create the gift collection in.
@@ -1935,7 +2029,7 @@ export declare class ClientDispatcher<C extends Context = Context> extends Compo
1935
2029
  */
1936
2030
  createGiftCollection(chatId: ID, name: string, gifts: InputGift[]): Promise<GiftCollection>;
1937
2031
  /**
1938
- * Set the name of a gift collection.
2032
+ * Set the name of a gift collection. User-only.
1939
2033
  *
1940
2034
  * @method gc
1941
2035
  * @param chatId The identifier of the chat that includes the gift collection.
@@ -1944,7 +2038,7 @@ export declare class ClientDispatcher<C extends Context = Context> extends Compo
1944
2038
  */
1945
2039
  setGiftCollectionName(chatId: ID, collectionId: number, name: string): Promise<GiftCollection>;
1946
2040
  /**
1947
- * Add gifts to a gift collection.
2041
+ * Add gifts to a gift collection. User-only.
1948
2042
  *
1949
2043
  * @method gc
1950
2044
  * @param chatId The identifier of the chat that includes the gift collection.
@@ -1953,7 +2047,7 @@ export declare class ClientDispatcher<C extends Context = Context> extends Compo
1953
2047
  */
1954
2048
  addGiftsToCollection(chatId: ID, collectionId: number, gifts: InputGift[]): Promise<GiftCollection>;
1955
2049
  /**
1956
- * Remove gifts from a gift collection.
2050
+ * Remove gifts from a gift collection. User-only.
1957
2051
  *
1958
2052
  * @method gc
1959
2053
  * @param chatId The identifier of the chat that includes the gift collection.
@@ -1962,7 +2056,7 @@ export declare class ClientDispatcher<C extends Context = Context> extends Compo
1962
2056
  */
1963
2057
  removeGiftsFromCollection(chatId: ID, collectionId: number, gifts: InputGift[]): Promise<GiftCollection>;
1964
2058
  /**
1965
- * Reorder gifts in a gift collection.
2059
+ * Reorder gifts in a gift collection. User-only.
1966
2060
  *
1967
2061
  * @method gc
1968
2062
  * @param chatId The identifier of the chat that includes the gift collection.
@@ -1971,7 +2065,7 @@ export declare class ClientDispatcher<C extends Context = Context> extends Compo
1971
2065
  */
1972
2066
  reorderGiftsInCollection(chatId: ID, collectionId: number, gifts: InputGift[]): Promise<GiftCollection>;
1973
2067
  /**
1974
- * Delete a gift collection.
2068
+ * Delete a gift collection. User-only.
1975
2069
  *
1976
2070
  * @method gc
1977
2071
  * @param chatId The identifier of the chat that includes the gift collection.