@mtkruto/node 0.1.132 → 0.1.133

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 (69) hide show
  1. package/esm/3_types.d.ts +3 -0
  2. package/esm/3_types.js +3 -0
  3. package/esm/4_constants.d.ts +2 -2
  4. package/esm/4_constants.js +2 -2
  5. package/esm/client/0_utilities.d.ts +2 -2
  6. package/esm/client/0_utilities.js +3 -5
  7. package/esm/client/3_types.d.ts +10 -5
  8. package/esm/client/4_composer.d.ts +4 -4
  9. package/esm/client/4_composer.js +13 -1
  10. package/esm/client/5_client.d.ts +36 -36
  11. package/esm/client/5_client.js +181 -177
  12. package/esm/tl/2_types.d.ts +313 -24
  13. package/esm/tl/2_types.js +982 -46
  14. package/esm/tl/3_functions.d.ts +95 -32
  15. package/esm/tl/3_functions.js +227 -66
  16. package/esm/types/0_chat_photo.d.ts +22 -21
  17. package/esm/types/0_giveaway_parameters.d.ts +9 -0
  18. package/esm/types/0_giveaway_parameters.js +9 -0
  19. package/esm/types/0_message_entity.d.ts +93 -74
  20. package/esm/types/0_reaction.d.ts +13 -10
  21. package/esm/types/0_reaction.js +16 -1
  22. package/esm/types/1_bot_command_scope.d.ts +32 -27
  23. package/esm/types/1_chat_p.d.ts +76 -68
  24. package/esm/types/1_giveaway.d.ts +8 -0
  25. package/esm/types/1_giveaway.js +7 -0
  26. package/esm/types/1_keyboard_button.d.ts +62 -56
  27. package/esm/types/1_keyboard_button.js +3 -0
  28. package/esm/types/1_message_reaction.d.ts +14 -0
  29. package/esm/types/1_message_reaction.js +22 -0
  30. package/esm/types/1_user.d.ts +2 -2
  31. package/esm/types/2_inline_keyboard_button.d.ts +44 -37
  32. package/esm/types/3_message.d.ts +170 -113
  33. package/esm/types/3_message.js +218 -121
  34. package/esm/types/4_chat.d.ts +32 -29
  35. package/package.json +1 -1
  36. package/script/3_types.d.ts +3 -0
  37. package/script/3_types.js +3 -0
  38. package/script/4_constants.d.ts +2 -2
  39. package/script/4_constants.js +2 -2
  40. package/script/client/0_utilities.d.ts +2 -2
  41. package/script/client/0_utilities.js +3 -5
  42. package/script/client/3_types.d.ts +10 -5
  43. package/script/client/4_composer.d.ts +4 -4
  44. package/script/client/4_composer.js +13 -1
  45. package/script/client/5_client.d.ts +36 -36
  46. package/script/client/5_client.js +180 -176
  47. package/script/tl/2_types.d.ts +313 -24
  48. package/script/tl/2_types.js +1169 -217
  49. package/script/tl/3_functions.d.ts +95 -32
  50. package/script/tl/3_functions.js +241 -77
  51. package/script/types/0_chat_photo.d.ts +22 -21
  52. package/script/types/0_giveaway_parameters.d.ts +9 -0
  53. package/script/types/0_giveaway_parameters.js +13 -0
  54. package/script/types/0_message_entity.d.ts +93 -74
  55. package/script/types/0_reaction.d.ts +13 -10
  56. package/script/types/0_reaction.js +19 -0
  57. package/script/types/1_bot_command_scope.d.ts +32 -27
  58. package/script/types/1_chat_p.d.ts +76 -68
  59. package/script/types/1_giveaway.d.ts +8 -0
  60. package/script/types/1_giveaway.js +11 -0
  61. package/script/types/1_keyboard_button.d.ts +62 -56
  62. package/script/types/1_keyboard_button.js +3 -0
  63. package/script/types/1_message_reaction.d.ts +14 -0
  64. package/script/types/1_message_reaction.js +26 -0
  65. package/script/types/1_user.d.ts +2 -2
  66. package/script/types/2_inline_keyboard_button.d.ts +44 -37
  67. package/script/types/3_message.d.ts +170 -113
  68. package/script/types/3_message.js +220 -122
  69. package/script/types/4_chat.d.ts +32 -29
@@ -5330,6 +5330,74 @@ Object.defineProperty(account_getDefaultBackgroundEmojis_, "__F", {
5330
5330
  writable: true,
5331
5331
  value: Symbol()
5332
5332
  });
5333
+ export class account_getChannelDefaultEmojiStatuses_ extends Function_ {
5334
+ get [id]() {
5335
+ return 0x7727A7D5;
5336
+ }
5337
+ static get [name]() {
5338
+ return "account.getChannelDefaultEmojiStatuses";
5339
+ }
5340
+ static get [paramDesc]() {
5341
+ return [
5342
+ ["hash", "bigint", "long"],
5343
+ ];
5344
+ }
5345
+ get [params]() {
5346
+ return [
5347
+ [this.hash, "bigint", "long"],
5348
+ ];
5349
+ }
5350
+ constructor(params) {
5351
+ super();
5352
+ Object.defineProperty(this, "hash", {
5353
+ enumerable: true,
5354
+ configurable: true,
5355
+ writable: true,
5356
+ value: void 0
5357
+ });
5358
+ this.hash = params.hash;
5359
+ }
5360
+ }
5361
+ Object.defineProperty(account_getChannelDefaultEmojiStatuses_, "__F", {
5362
+ enumerable: true,
5363
+ configurable: true,
5364
+ writable: true,
5365
+ value: Symbol()
5366
+ });
5367
+ export class account_getChannelRestrictedStatusEmojis_ extends Function_ {
5368
+ get [id]() {
5369
+ return 0x35A9E0D5;
5370
+ }
5371
+ static get [name]() {
5372
+ return "account.getChannelRestrictedStatusEmojis";
5373
+ }
5374
+ static get [paramDesc]() {
5375
+ return [
5376
+ ["hash", "bigint", "long"],
5377
+ ];
5378
+ }
5379
+ get [params]() {
5380
+ return [
5381
+ [this.hash, "bigint", "long"],
5382
+ ];
5383
+ }
5384
+ constructor(params) {
5385
+ super();
5386
+ Object.defineProperty(this, "hash", {
5387
+ enumerable: true,
5388
+ configurable: true,
5389
+ writable: true,
5390
+ value: void 0
5391
+ });
5392
+ this.hash = params.hash;
5393
+ }
5394
+ }
5395
+ Object.defineProperty(account_getChannelRestrictedStatusEmojis_, "__F", {
5396
+ enumerable: true,
5397
+ configurable: true,
5398
+ writable: true,
5399
+ value: Symbol()
5400
+ });
5333
5401
  export class users_getUsers_ extends Function_ {
5334
5402
  get [id]() {
5335
5403
  return 0x0D91A548;
@@ -16009,7 +16077,7 @@ Object.defineProperty(messages_getDefaultHistoryTTL_, "__F", {
16009
16077
  });
16010
16078
  export class messages_sendBotRequestedPeer_ extends Function_ {
16011
16079
  get [id]() {
16012
- return 0xFE38D01B;
16080
+ return 0x91B2D060;
16013
16081
  }
16014
16082
  static get [name]() {
16015
16083
  return "messages.sendBotRequestedPeer";
@@ -16019,7 +16087,7 @@ export class messages_sendBotRequestedPeer_ extends Function_ {
16019
16087
  ["peer", types._InputPeer, "InputPeer"],
16020
16088
  ["msg_id", "number", "int"],
16021
16089
  ["button_id", "number", "int"],
16022
- ["requested_peer", types._InputPeer, "InputPeer"],
16090
+ ["requested_peers", [types._InputPeer], "Vector<InputPeer>"],
16023
16091
  ];
16024
16092
  }
16025
16093
  get [params]() {
@@ -16027,7 +16095,7 @@ export class messages_sendBotRequestedPeer_ extends Function_ {
16027
16095
  [this.peer, types._InputPeer, "InputPeer"],
16028
16096
  [this.msg_id, "number", "int"],
16029
16097
  [this.button_id, "number", "int"],
16030
- [this.requested_peer, types._InputPeer, "InputPeer"],
16098
+ [this.requested_peers, [types._InputPeer], "Vector<InputPeer>"],
16031
16099
  ];
16032
16100
  }
16033
16101
  constructor(params) {
@@ -16050,7 +16118,7 @@ export class messages_sendBotRequestedPeer_ extends Function_ {
16050
16118
  writable: true,
16051
16119
  value: void 0
16052
16120
  });
16053
- Object.defineProperty(this, "requested_peer", {
16121
+ Object.defineProperty(this, "requested_peers", {
16054
16122
  enumerable: true,
16055
16123
  configurable: true,
16056
16124
  writable: true,
@@ -16059,7 +16127,7 @@ export class messages_sendBotRequestedPeer_ extends Function_ {
16059
16127
  this.peer = params.peer;
16060
16128
  this.msg_id = params.msg_id;
16061
16129
  this.button_id = params.button_id;
16062
- this.requested_peer = params.requested_peer;
16130
+ this.requested_peers = params.requested_peers;
16063
16131
  }
16064
16132
  }
16065
16133
  Object.defineProperty(messages_sendBotRequestedPeer_, "__F", {
@@ -17557,40 +17625,6 @@ Object.defineProperty(help_getSupport_, "__F", {
17557
17625
  writable: true,
17558
17626
  value: Symbol()
17559
17627
  });
17560
- export class help_getAppChangelog_ extends Function_ {
17561
- get [id]() {
17562
- return 0x9010EF6F;
17563
- }
17564
- static get [name]() {
17565
- return "help.getAppChangelog";
17566
- }
17567
- static get [paramDesc]() {
17568
- return [
17569
- ["prev_app_version", "string", "string"],
17570
- ];
17571
- }
17572
- get [params]() {
17573
- return [
17574
- [this.prev_app_version, "string", "string"],
17575
- ];
17576
- }
17577
- constructor(params) {
17578
- super();
17579
- Object.defineProperty(this, "prev_app_version", {
17580
- enumerable: true,
17581
- configurable: true,
17582
- writable: true,
17583
- value: void 0
17584
- });
17585
- this.prev_app_version = params.prev_app_version;
17586
- }
17587
- }
17588
- Object.defineProperty(help_getAppChangelog_, "__F", {
17589
- enumerable: true,
17590
- configurable: true,
17591
- writable: true,
17592
- value: Symbol()
17593
- });
17594
17628
  export class help_setBotUpdatesStatus_ extends Function_ {
17595
17629
  get [id]() {
17596
17630
  return 0xEC22CFCD;
@@ -20876,7 +20910,7 @@ Object.defineProperty(channels_clickSponsoredMessage_, "__F", {
20876
20910
  });
20877
20911
  export class channels_updateColor_ extends Function_ {
20878
20912
  get [id]() {
20879
- return 0x621A201F;
20913
+ return 0xD8AA3671;
20880
20914
  }
20881
20915
  static get [name]() {
20882
20916
  return "channels.updateColor";
@@ -20884,21 +20918,29 @@ export class channels_updateColor_ extends Function_ {
20884
20918
  static get [paramDesc]() {
20885
20919
  return [
20886
20920
  ["flags", flags, "#"],
20921
+ ["for_profile", "true", "flags.1?true"],
20887
20922
  ["channel", types._InputChannel, "InputChannel"],
20888
- ["color", "number", "int"],
20923
+ ["color", "number", "flags.2?int"],
20889
20924
  ["background_emoji_id", "bigint", "flags.0?long"],
20890
20925
  ];
20891
20926
  }
20892
20927
  get [params]() {
20893
20928
  return [
20894
20929
  ["flags", flags, "#"],
20930
+ [this.for_profile ?? null, "true", "flags.1?true"],
20895
20931
  [this.channel, types._InputChannel, "InputChannel"],
20896
- [this.color, "number", "int"],
20932
+ [this.color ?? null, "number", "flags.2?int"],
20897
20933
  [this.background_emoji_id ?? null, "bigint", "flags.0?long"],
20898
20934
  ];
20899
20935
  }
20900
20936
  constructor(params) {
20901
20937
  super();
20938
+ Object.defineProperty(this, "for_profile", {
20939
+ enumerable: true,
20940
+ configurable: true,
20941
+ writable: true,
20942
+ value: void 0
20943
+ });
20902
20944
  Object.defineProperty(this, "channel", {
20903
20945
  enumerable: true,
20904
20946
  configurable: true,
@@ -20917,6 +20959,7 @@ export class channels_updateColor_ extends Function_ {
20917
20959
  writable: true,
20918
20960
  value: void 0
20919
20961
  });
20962
+ this.for_profile = params.for_profile;
20920
20963
  this.channel = params.channel;
20921
20964
  this.color = params.color;
20922
20965
  this.background_emoji_id = params.background_emoji_id;
@@ -21005,6 +21048,49 @@ Object.defineProperty(channels_getChannelRecommendations_, "__F", {
21005
21048
  writable: true,
21006
21049
  value: Symbol()
21007
21050
  });
21051
+ export class channels_updateEmojiStatus_ extends Function_ {
21052
+ get [id]() {
21053
+ return 0xF0D3E6A8;
21054
+ }
21055
+ static get [name]() {
21056
+ return "channels.updateEmojiStatus";
21057
+ }
21058
+ static get [paramDesc]() {
21059
+ return [
21060
+ ["channel", types._InputChannel, "InputChannel"],
21061
+ ["emoji_status", types._EmojiStatus, "EmojiStatus"],
21062
+ ];
21063
+ }
21064
+ get [params]() {
21065
+ return [
21066
+ [this.channel, types._InputChannel, "InputChannel"],
21067
+ [this.emoji_status, types._EmojiStatus, "EmojiStatus"],
21068
+ ];
21069
+ }
21070
+ constructor(params) {
21071
+ super();
21072
+ Object.defineProperty(this, "channel", {
21073
+ enumerable: true,
21074
+ configurable: true,
21075
+ writable: true,
21076
+ value: void 0
21077
+ });
21078
+ Object.defineProperty(this, "emoji_status", {
21079
+ enumerable: true,
21080
+ configurable: true,
21081
+ writable: true,
21082
+ value: void 0
21083
+ });
21084
+ this.channel = params.channel;
21085
+ this.emoji_status = params.emoji_status;
21086
+ }
21087
+ }
21088
+ Object.defineProperty(channels_updateEmojiStatus_, "__F", {
21089
+ enumerable: true,
21090
+ configurable: true,
21091
+ writable: true,
21092
+ value: Symbol()
21093
+ });
21008
21094
  export class bots_sendCustomRequest_ extends Function_ {
21009
21095
  get [id]() {
21010
21096
  return 0xAA2769ED;
@@ -24843,7 +24929,7 @@ Object.defineProperty(stats_getMegagroupStats_, "__F", {
24843
24929
  });
24844
24930
  export class stats_getMessagePublicForwards_ extends Function_ {
24845
24931
  get [id]() {
24846
- return 0x5630281B;
24932
+ return 0x5F150144;
24847
24933
  }
24848
24934
  static get [name]() {
24849
24935
  return "stats.getMessagePublicForwards";
@@ -24852,9 +24938,7 @@ export class stats_getMessagePublicForwards_ extends Function_ {
24852
24938
  return [
24853
24939
  ["channel", types._InputChannel, "InputChannel"],
24854
24940
  ["msg_id", "number", "int"],
24855
- ["offset_rate", "number", "int"],
24856
- ["offset_peer", types._InputPeer, "InputPeer"],
24857
- ["offset_id", "number", "int"],
24941
+ ["offset", "string", "string"],
24858
24942
  ["limit", "number", "int"],
24859
24943
  ];
24860
24944
  }
@@ -24862,9 +24946,7 @@ export class stats_getMessagePublicForwards_ extends Function_ {
24862
24946
  return [
24863
24947
  [this.channel, types._InputChannel, "InputChannel"],
24864
24948
  [this.msg_id, "number", "int"],
24865
- [this.offset_rate, "number", "int"],
24866
- [this.offset_peer, types._InputPeer, "InputPeer"],
24867
- [this.offset_id, "number", "int"],
24949
+ [this.offset, "string", "string"],
24868
24950
  [this.limit, "number", "int"],
24869
24951
  ];
24870
24952
  }
@@ -24882,19 +24964,7 @@ export class stats_getMessagePublicForwards_ extends Function_ {
24882
24964
  writable: true,
24883
24965
  value: void 0
24884
24966
  });
24885
- Object.defineProperty(this, "offset_rate", {
24886
- enumerable: true,
24887
- configurable: true,
24888
- writable: true,
24889
- value: void 0
24890
- });
24891
- Object.defineProperty(this, "offset_peer", {
24892
- enumerable: true,
24893
- configurable: true,
24894
- writable: true,
24895
- value: void 0
24896
- });
24897
- Object.defineProperty(this, "offset_id", {
24967
+ Object.defineProperty(this, "offset", {
24898
24968
  enumerable: true,
24899
24969
  configurable: true,
24900
24970
  writable: true,
@@ -24908,9 +24978,7 @@ export class stats_getMessagePublicForwards_ extends Function_ {
24908
24978
  });
24909
24979
  this.channel = params.channel;
24910
24980
  this.msg_id = params.msg_id;
24911
- this.offset_rate = params.offset_rate;
24912
- this.offset_peer = params.offset_peer;
24913
- this.offset_id = params.offset_id;
24981
+ this.offset = params.offset;
24914
24982
  this.limit = params.limit;
24915
24983
  }
24916
24984
  }
@@ -26242,6 +26310,7 @@ export class stories_getStoryViewsList_ extends Function_ {
26242
26310
  ["flags", flags, "#"],
26243
26311
  ["just_contacts", "true", "flags.0?true"],
26244
26312
  ["reactions_first", "true", "flags.2?true"],
26313
+ ["forwards_first", "true", "flags.3?true"],
26245
26314
  ["peer", types._InputPeer, "InputPeer"],
26246
26315
  ["q", "string", "flags.1?string"],
26247
26316
  ["id", "number", "int"],
@@ -26254,6 +26323,7 @@ export class stories_getStoryViewsList_ extends Function_ {
26254
26323
  ["flags", flags, "#"],
26255
26324
  [this.just_contacts ?? null, "true", "flags.0?true"],
26256
26325
  [this.reactions_first ?? null, "true", "flags.2?true"],
26326
+ [this.forwards_first ?? null, "true", "flags.3?true"],
26257
26327
  [this.peer, types._InputPeer, "InputPeer"],
26258
26328
  [this.q ?? null, "string", "flags.1?string"],
26259
26329
  [this.id, "number", "int"],
@@ -26275,6 +26345,12 @@ export class stories_getStoryViewsList_ extends Function_ {
26275
26345
  writable: true,
26276
26346
  value: void 0
26277
26347
  });
26348
+ Object.defineProperty(this, "forwards_first", {
26349
+ enumerable: true,
26350
+ configurable: true,
26351
+ writable: true,
26352
+ value: void 0
26353
+ });
26278
26354
  Object.defineProperty(this, "peer", {
26279
26355
  enumerable: true,
26280
26356
  configurable: true,
@@ -26307,6 +26383,7 @@ export class stories_getStoryViewsList_ extends Function_ {
26307
26383
  });
26308
26384
  this.just_contacts = params.just_contacts;
26309
26385
  this.reactions_first = params.reactions_first;
26386
+ this.forwards_first = params.forwards_first;
26310
26387
  this.peer = params.peer;
26311
26388
  this.q = params.q;
26312
26389
  this.id = params.id;
@@ -26732,6 +26809,87 @@ Object.defineProperty(stories_togglePeerStoriesHidden_, "__F", {
26732
26809
  writable: true,
26733
26810
  value: Symbol()
26734
26811
  });
26812
+ export class stories_getStoryReactionsList_ extends Function_ {
26813
+ get [id]() {
26814
+ return 0xB9B2881F;
26815
+ }
26816
+ static get [name]() {
26817
+ return "stories.getStoryReactionsList";
26818
+ }
26819
+ static get [paramDesc]() {
26820
+ return [
26821
+ ["flags", flags, "#"],
26822
+ ["forwards_first", "true", "flags.2?true"],
26823
+ ["peer", types._InputPeer, "InputPeer"],
26824
+ ["id", "number", "int"],
26825
+ ["reaction", types._Reaction, "flags.0?Reaction"],
26826
+ ["offset", "string", "flags.1?string"],
26827
+ ["limit", "number", "int"],
26828
+ ];
26829
+ }
26830
+ get [params]() {
26831
+ return [
26832
+ ["flags", flags, "#"],
26833
+ [this.forwards_first ?? null, "true", "flags.2?true"],
26834
+ [this.peer, types._InputPeer, "InputPeer"],
26835
+ [this.id, "number", "int"],
26836
+ [this.reaction ?? null, types._Reaction, "flags.0?Reaction"],
26837
+ [this.offset ?? null, "string", "flags.1?string"],
26838
+ [this.limit, "number", "int"],
26839
+ ];
26840
+ }
26841
+ constructor(params) {
26842
+ super();
26843
+ Object.defineProperty(this, "forwards_first", {
26844
+ enumerable: true,
26845
+ configurable: true,
26846
+ writable: true,
26847
+ value: void 0
26848
+ });
26849
+ Object.defineProperty(this, "peer", {
26850
+ enumerable: true,
26851
+ configurable: true,
26852
+ writable: true,
26853
+ value: void 0
26854
+ });
26855
+ Object.defineProperty(this, "id", {
26856
+ enumerable: true,
26857
+ configurable: true,
26858
+ writable: true,
26859
+ value: void 0
26860
+ });
26861
+ Object.defineProperty(this, "reaction", {
26862
+ enumerable: true,
26863
+ configurable: true,
26864
+ writable: true,
26865
+ value: void 0
26866
+ });
26867
+ Object.defineProperty(this, "offset", {
26868
+ enumerable: true,
26869
+ configurable: true,
26870
+ writable: true,
26871
+ value: void 0
26872
+ });
26873
+ Object.defineProperty(this, "limit", {
26874
+ enumerable: true,
26875
+ configurable: true,
26876
+ writable: true,
26877
+ value: void 0
26878
+ });
26879
+ this.forwards_first = params.forwards_first;
26880
+ this.peer = params.peer;
26881
+ this.id = params.id;
26882
+ this.reaction = params.reaction;
26883
+ this.offset = params.offset;
26884
+ this.limit = params.limit;
26885
+ }
26886
+ }
26887
+ Object.defineProperty(stories_getStoryReactionsList_, "__F", {
26888
+ enumerable: true,
26889
+ configurable: true,
26890
+ writable: true,
26891
+ value: Symbol()
26892
+ });
26735
26893
  export class premium_getBoostsList_ extends Function_ {
26736
26894
  get [id]() {
26737
26895
  return 0x60F67660;
@@ -27073,6 +27231,8 @@ export const functions = {
27073
27231
  invalidateSignInCodes: account_invalidateSignInCodes_,
27074
27232
  updateColor: account_updateColor_,
27075
27233
  getDefaultBackgroundEmojis: account_getDefaultBackgroundEmojis_,
27234
+ getChannelDefaultEmojiStatuses: account_getChannelDefaultEmojiStatuses_,
27235
+ getChannelRestrictedStatusEmojis: account_getChannelRestrictedStatusEmojis_,
27076
27236
  },
27077
27237
  users: {
27078
27238
  getUsers: users_getUsers_,
@@ -27324,7 +27484,6 @@ export const functions = {
27324
27484
  getAppUpdate: help_getAppUpdate_,
27325
27485
  getInviteText: help_getInviteText_,
27326
27486
  getSupport: help_getSupport_,
27327
- getAppChangelog: help_getAppChangelog_,
27328
27487
  setBotUpdatesStatus: help_setBotUpdatesStatus_,
27329
27488
  getCdnConfig: help_getCdnConfig_,
27330
27489
  getRecentMeUrls: help_getRecentMeUrls_,
@@ -27405,6 +27564,7 @@ export const functions = {
27405
27564
  updateColor: channels_updateColor_,
27406
27565
  toggleViewForumAsMessages: channels_toggleViewForumAsMessages_,
27407
27566
  getChannelRecommendations: channels_getChannelRecommendations_,
27567
+ updateEmojiStatus: channels_updateEmojiStatus_,
27408
27568
  },
27409
27569
  bots: {
27410
27570
  sendCustomRequest: bots_sendCustomRequest_,
@@ -27543,6 +27703,7 @@ export const functions = {
27543
27703
  getPeerMaxIDs: stories_getPeerMaxIDs_,
27544
27704
  getChatsToSend: stories_getChatsToSend_,
27545
27705
  togglePeerStoriesHidden: stories_togglePeerStoriesHidden_,
27706
+ getStoryReactionsList: stories_getStoryReactionsList_,
27546
27707
  },
27547
27708
  premium: {
27548
27709
  getBoostsList: premium_getBoostsList_,
@@ -1,24 +1,25 @@
1
1
  import { types } from "../2_tl.js";
2
- export declare namespace ChatPhoto {
3
- interface Base {
4
- /** A file identifier that can be used to download or reuse the small version of the chat photo (160x160). */
5
- smallFileId: string;
6
- /** A file identifier that can be used to identify the small version of the chat photo (160x160). */
7
- smallFileUniqueId: string;
8
- /** A file identifier that can be used to download or reuse the big version of the chat photo (640x640). */
9
- bigFileId: string;
10
- /** A file identifier that can be used to identify the big version of the chat photo (640x640). */
11
- bigFileUniqueId: string;
12
- /** Whether the chat photo is animated. */
13
- hasVideo: boolean;
14
- }
15
- interface User extends Base {
16
- /** Differentiates between user profile photos. */
17
- personal: true;
18
- }
19
- type Chat = Base;
2
+ /** @unlisted */
3
+ export interface ChatPhotoBase {
4
+ /** A file identifier that can be used to download or reuse the small version of the chat photo (160x160). */
5
+ smallFileId: string;
6
+ /** A file identifier that can be used to identify the small version of the chat photo (160x160). */
7
+ smallFileUniqueId: string;
8
+ /** A file identifier that can be used to download or reuse the big version of the chat photo (640x640). */
9
+ bigFileId: string;
10
+ /** A file identifier that can be used to identify the big version of the chat photo (640x640). */
11
+ bigFileUniqueId: string;
12
+ /** Whether the chat photo is animated. */
13
+ hasVideo: boolean;
20
14
  }
15
+ /** @unlisted */
16
+ export interface ChatPhotoUser extends ChatPhotoBase {
17
+ /** Differentiates between user profile photos. */
18
+ personal: true;
19
+ }
20
+ /** @unlisted */
21
+ export type ChatPhotoChat = ChatPhotoBase;
21
22
  /** This object represents a chat photo. */
22
- export type ChatPhoto = ChatPhoto.User | ChatPhoto.Chat;
23
- export declare function constructChatPhoto(photo: types.ChatPhoto, chatId: number, chatAccessHash: bigint): ChatPhoto.Chat;
24
- export declare function constructChatPhoto(photo: types.UserProfilePhoto, chatId: number, chatAccessHash: bigint): ChatPhoto.User;
23
+ export type ChatPhoto = ChatPhotoUser | ChatPhotoChat;
24
+ export declare function constructChatPhoto(photo: types.ChatPhoto, chatId: number, chatAccessHash: bigint): ChatPhotoChat;
25
+ export declare function constructChatPhoto(photo: types.UserProfilePhoto, chatId: number, chatAccessHash: bigint): ChatPhotoUser;
@@ -0,0 +1,9 @@
1
+ import { types } from "../2_tl.js";
2
+ export interface GiveawayParameters {
3
+ boostedChatId: number;
4
+ additionalChatIds: number[];
5
+ winnerSelectionDate: Date;
6
+ onlyNewMembers: boolean;
7
+ countries: string[];
8
+ }
9
+ export declare function constructGiveawayParameters(g: types.MessageMediaGiveaway): GiveawayParameters;
@@ -0,0 +1,9 @@
1
+ import { peerToChatId, types } from "../2_tl.js";
2
+ export function constructGiveawayParameters(g) {
3
+ const countries = g.countries_iso2 ?? [];
4
+ const boostedChatId = peerToChatId(new types.PeerChannel({ channel_id: g.channels[0] }));
5
+ const additionalChatIds = g.channels.slice(1).map((v) => peerToChatId(new types.PeerChannel({ channel_id: v })));
6
+ const onlyNewMembers = g.only_new_subscribers ? true : false;
7
+ const winnerSelectionDate = new Date(g.until_date * 1000);
8
+ return { boostedChatId, additionalChatIds, winnerSelectionDate, onlyNewMembers, countries };
9
+ }