@mtkruto/browser 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.
@@ -19,8 +19,9 @@
19
19
  */
20
20
  import type { Api, Mtproto } from "../2_tl.js";
21
21
  import type { DC } from "../3_transport.js";
22
- 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";
23
- 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";
22
+ 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";
23
+ import type { AlbumStoryList } from "../types/4_album_story_list.js";
24
+ 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";
24
25
  import type { WorkerRequest } from "./0_worker_request.js";
25
26
  import type { ClientGeneric } from "./1_client_generic.js";
26
27
  import { type InvokeErrorHandler } from "./1_invoke_middleware.js";
@@ -362,19 +363,27 @@ export declare class ClientDispatcher<C extends Context = Context> extends Compo
362
363
  */
363
364
  resolveUsername(username: string, params?: ResolveUsernameParams): Promise<ChatP>;
364
365
  /**
365
- * Resolve a phone number.
366
+ * Resolve a phone number. User-only.
366
367
  *
367
368
  * @method ac
368
369
  * @param username The phone number to resolve.
369
370
  */
370
371
  resolvePhoneNumber(phoneNumber: string): Promise<User>;
371
372
  /**
372
- * Set the list of close friends.
373
+ * Set the list of close friends. User-only.
373
374
  *
374
375
  * @method ac
375
376
  * @param userIds The identifiers of users to set as close friends.
376
377
  */
377
378
  setCloseFriends(userIds: ID[]): Promise<void>;
379
+ /**
380
+ * Suggest a birthday. User-only.
381
+ *
382
+ * @method ac
383
+ * @param userId The identifier of the user to suggest a birthday for.
384
+ * @param birthday The birthday to suggest.
385
+ */
386
+ suggestBirthday(userId: ID, birthday: Birthday): Promise<void>;
378
387
  /**
379
388
  * Send a text message.
380
389
  *
@@ -1585,7 +1594,7 @@ export declare class ClientDispatcher<C extends Context = Context> extends Compo
1585
1594
  /**
1586
1595
  * Set the bot's description in the given language. Bot-only.
1587
1596
  *
1588
- * @method bs
1597
+ * @method bo
1589
1598
  */
1590
1599
  setMyDescription(params?: {
1591
1600
  description?: string;
@@ -1594,7 +1603,7 @@ export declare class ClientDispatcher<C extends Context = Context> extends Compo
1594
1603
  /**
1595
1604
  * Set the bot's name in the given language. Bot-only.
1596
1605
  *
1597
- * @method bs
1606
+ * @method bo
1598
1607
  */
1599
1608
  setMyName(params?: {
1600
1609
  name?: string;
@@ -1603,7 +1612,7 @@ export declare class ClientDispatcher<C extends Context = Context> extends Compo
1603
1612
  /**
1604
1613
  * Set the bot's short description in the given language. Bot-only.
1605
1614
  *
1606
- * @method bs
1615
+ * @method bo
1607
1616
  */
1608
1617
  setMyShortDescription(params?: {
1609
1618
  shortDescription?: string;
@@ -1612,7 +1621,7 @@ export declare class ClientDispatcher<C extends Context = Context> extends Compo
1612
1621
  /**
1613
1622
  * Get the bot's description in the given language. Bot-only.
1614
1623
  *
1615
- * @method bs
1624
+ * @method bo
1616
1625
  * @returns The current bot's description in the specified language.
1617
1626
  */
1618
1627
  getMyDescription(params?: {
@@ -1621,7 +1630,7 @@ export declare class ClientDispatcher<C extends Context = Context> extends Compo
1621
1630
  /**
1622
1631
  * Get the bot's name in the given language. Bot-only.
1623
1632
  *
1624
- * @method bs
1633
+ * @method bo
1625
1634
  * @returns The current bot's name in the specified language.
1626
1635
  */
1627
1636
  getMyName(params?: {
@@ -1630,7 +1639,7 @@ export declare class ClientDispatcher<C extends Context = Context> extends Compo
1630
1639
  /**
1631
1640
  * Get the bot's short description in the given language. Bot-only.
1632
1641
  *
1633
- * @method bs
1642
+ * @method bo
1634
1643
  * @returns The current bot's short description in the specified language.
1635
1644
  */
1636
1645
  getMyShortDescription(params?: {
@@ -1639,14 +1648,14 @@ export declare class ClientDispatcher<C extends Context = Context> extends Compo
1639
1648
  /**
1640
1649
  * Set the bot's commands in the given scope and/or language. Bot-only.
1641
1650
  *
1642
- * @method bs
1651
+ * @method bo
1643
1652
  * @param commands The commands to set.
1644
1653
  */
1645
1654
  setMyCommands(commands: BotCommand[], params?: SetMyCommandsParams): Promise<void>;
1646
1655
  /**
1647
1656
  * Get the bot's commands in the given scope and/or language. Bot-only.
1648
1657
  *
1649
- * @method bs
1658
+ * @method bo
1650
1659
  * @returns The current bot's commands in the specified language.
1651
1660
  */
1652
1661
  getMyCommands(params?: GetMyCommandsParams): Promise<BotCommand[]>;
@@ -1751,6 +1760,84 @@ export declare class ClientDispatcher<C extends Context = Context> extends Compo
1751
1760
  * @param storyId The identifier of the story to remove from highlights.
1752
1761
  */
1753
1762
  removeStoryFromHighlights(chatId: ID, storyId: number): Promise<void>;
1763
+ /**
1764
+ * Create a story album. User-only.
1765
+ *
1766
+ * @method sa
1767
+ * @param chatId The identifier of the chat to create the album in.
1768
+ * @param name The name of the album.
1769
+ * @param storyIds The initial stories inside the album.
1770
+ */
1771
+ createStoryAlbum(chatId: ID, name: string, storyIds: number[]): Promise<StoryAlbum>;
1772
+ /**
1773
+ * Set the name of a story album. User-only.
1774
+ *
1775
+ * @method sa
1776
+ * @param chatId The identifier of the chat including the album.
1777
+ * @param albumId The identifier of the album to rename.
1778
+ * @param name The new name of the album.
1779
+ */
1780
+ setStoryAlbumName(chatId: ID, albumId: number, name: string): Promise<StoryAlbum>;
1781
+ /**
1782
+ * Add multiple stories to an album. User-only.
1783
+ *
1784
+ * @method sa
1785
+ * @param chatId The identifier of the chat including the album.
1786
+ * @param albumId The identifier of an album.
1787
+ * @param storyIds The identifiers of the stories to add.
1788
+ */
1789
+ addStoriesToAlbum(chatId: ID, albumId: number, storyIds: number[]): Promise<StoryAlbum>;
1790
+ /**
1791
+ * Add a single story to an album. User-only.
1792
+ *
1793
+ * @method sa
1794
+ * @param chatId The identifier of the chat including the album.
1795
+ * @param albumId The identifier of an album.
1796
+ * @param storyIds The identifier of the story to add.
1797
+ */
1798
+ addStoryToAlbum(chatId: ID, albumId: number, storyId: number): Promise<StoryAlbum>;
1799
+ /**
1800
+ * Remove multiple stories from an album. User-only.
1801
+ *
1802
+ * @method sa
1803
+ * @param chatId The identifier of the chat including the album.
1804
+ * @param albumId The identifier of an album.
1805
+ * @param storyIds The identifiers of the stories to remove.
1806
+ */
1807
+ removeStoriesFromAlbum(chatId: ID, albumId: number, storyIds: number[]): Promise<StoryAlbum>;
1808
+ /**
1809
+ * Remove a single story from an album. User-only.
1810
+ *
1811
+ * @method sa
1812
+ * @param chatId The identifier of the chat including the album.
1813
+ * @param albumId The identifier of an album.
1814
+ * @param storyIds The identifier of the story to remove.
1815
+ */
1816
+ removeStoryFromAlbum(chatId: ID, albumId: number, storyId: number): Promise<StoryAlbum>;
1817
+ /**
1818
+ * Reorder stories in an album. User-only.
1819
+ *
1820
+ * @method sa
1821
+ * @param chatId The identifier of the chat including the album.
1822
+ * @param albumId The identifier of an album.
1823
+ * @param storyIds The new order of stories.
1824
+ */
1825
+ reorderStoriesInAlbum(chatId: ID, albumId: number, storyIds: number[]): Promise<StoryAlbum>;
1826
+ /**
1827
+ * Get story albums in a chat. User-only.
1828
+ *
1829
+ * @method sa
1830
+ * @param chatId The identifier of a chat including albums.
1831
+ */
1832
+ getStoryAlbums(chatId: ID): Promise<StoryAlbum[]>;
1833
+ /**
1834
+ * Get stories inside an album. User-only.
1835
+ *
1836
+ * @method sa
1837
+ * @param chatId The identifier of the chat including albums.
1838
+ * @param albumId The identifier of an album.
1839
+ */
1840
+ getStoriesInAlbum(chatId: ID, albumId: number): Promise<AlbumStoryList>;
1754
1841
  /**
1755
1842
  * Get network statistics. This might not always be available.
1756
1843
  *
@@ -1880,6 +1967,13 @@ export declare class ClientDispatcher<C extends Context = Context> extends Compo
1880
1967
  * @param firstName The contact's first name.
1881
1968
  */
1882
1969
  addContact(userId: ID, firstName: string, params?: AddContactParams): Promise<void>;
1970
+ /**
1971
+ * Set a contact note.
1972
+ *
1973
+ * @method co
1974
+ * @param userId The identifier of the user to update the note for.
1975
+ */
1976
+ setContactNote(userId: ID, params?: SetContactNoteParams): Promise<void>;
1883
1977
  /**
1884
1978
  * Get translations. User-only.
1885
1979
  *
@@ -1938,14 +2032,14 @@ export declare class ClientDispatcher<C extends Context = Context> extends Compo
1938
2032
  */
1939
2033
  transferGift(chatId: ID, gift: InputGift): Promise<void>;
1940
2034
  /**
1941
- * Get gift collections of a chat.
2035
+ * Get gift collections of a chat. User-only.
1942
2036
  *
1943
2037
  * @method gc
1944
2038
  * @param chatId The identifier of a chat to get gift collections for.
1945
2039
  */
1946
2040
  getGiftCollections(chatId: ID): Promise<GiftCollection[]>;
1947
2041
  /**
1948
- * Create a gift collection.
2042
+ * Create a gift collection. User-only.
1949
2043
  *
1950
2044
  * @method gc
1951
2045
  * @param chatId The identifier of a chat to create the gift collection in.
@@ -1954,7 +2048,7 @@ export declare class ClientDispatcher<C extends Context = Context> extends Compo
1954
2048
  */
1955
2049
  createGiftCollection(chatId: ID, name: string, gifts: InputGift[]): Promise<GiftCollection>;
1956
2050
  /**
1957
- * Set the name of a gift collection.
2051
+ * Set the name of a gift collection. User-only.
1958
2052
  *
1959
2053
  * @method gc
1960
2054
  * @param chatId The identifier of the chat that includes the gift collection.
@@ -1963,7 +2057,7 @@ export declare class ClientDispatcher<C extends Context = Context> extends Compo
1963
2057
  */
1964
2058
  setGiftCollectionName(chatId: ID, collectionId: number, name: string): Promise<GiftCollection>;
1965
2059
  /**
1966
- * Add gifts to a gift collection.
2060
+ * Add gifts to a gift collection. User-only.
1967
2061
  *
1968
2062
  * @method gc
1969
2063
  * @param chatId The identifier of the chat that includes the gift collection.
@@ -1972,7 +2066,7 @@ export declare class ClientDispatcher<C extends Context = Context> extends Compo
1972
2066
  */
1973
2067
  addGiftsToCollection(chatId: ID, collectionId: number, gifts: InputGift[]): Promise<GiftCollection>;
1974
2068
  /**
1975
- * Remove gifts from a gift collection.
2069
+ * Remove gifts from a gift collection. User-only.
1976
2070
  *
1977
2071
  * @method gc
1978
2072
  * @param chatId The identifier of the chat that includes the gift collection.
@@ -1981,7 +2075,7 @@ export declare class ClientDispatcher<C extends Context = Context> extends Compo
1981
2075
  */
1982
2076
  removeGiftsFromCollection(chatId: ID, collectionId: number, gifts: InputGift[]): Promise<GiftCollection>;
1983
2077
  /**
1984
- * Reorder gifts in a gift collection.
2078
+ * Reorder gifts in a gift collection. User-only.
1985
2079
  *
1986
2080
  * @method gc
1987
2081
  * @param chatId The identifier of the chat that includes the gift collection.
@@ -1990,7 +2084,7 @@ export declare class ClientDispatcher<C extends Context = Context> extends Compo
1990
2084
  */
1991
2085
  reorderGiftsInCollection(chatId: ID, collectionId: number, gifts: InputGift[]): Promise<GiftCollection>;
1992
2086
  /**
1993
- * Delete a gift collection.
2087
+ * Delete a gift collection. User-only.
1994
2088
  *
1995
2089
  * @method gc
1996
2090
  * @param chatId The identifier of the chat that includes the gift collection.