@mtcute/core 0.30.0 → 0.30.2

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 (148) hide show
  1. package/client.cjs +8 -0
  2. package/client.js +8 -0
  3. package/highlevel/client.d.cts +63 -1
  4. package/highlevel/client.d.ts +63 -1
  5. package/highlevel/methods/files/download-iterable.cjs +80 -45
  6. package/highlevel/methods/files/download-iterable.js +80 -45
  7. package/highlevel/methods/files/normalize-input-media.cjs +9 -1
  8. package/highlevel/methods/files/normalize-input-media.js +10 -2
  9. package/highlevel/methods/files/upload-file.cjs +6 -1
  10. package/highlevel/methods/files/upload-file.js +6 -1
  11. package/highlevel/methods/messages/create-rich-streaming-draft.cjs +39 -0
  12. package/highlevel/methods/messages/create-rich-streaming-draft.d.cts +42 -0
  13. package/highlevel/methods/messages/create-rich-streaming-draft.d.ts +42 -0
  14. package/highlevel/methods/messages/create-rich-streaming-draft.js +34 -0
  15. package/highlevel/methods/messages/normalize-rich-message.cjs +168 -0
  16. package/highlevel/methods/messages/normalize-rich-message.d.cts +10 -0
  17. package/highlevel/methods/messages/normalize-rich-message.d.ts +10 -0
  18. package/highlevel/methods/messages/normalize-rich-message.js +163 -0
  19. package/highlevel/methods/messages/send-common.cjs +3 -2
  20. package/highlevel/methods/messages/send-common.d.cts +4 -1
  21. package/highlevel/methods/messages/send-common.d.ts +4 -1
  22. package/highlevel/methods/messages/send-common.js +3 -2
  23. package/highlevel/methods/messages/send-rich-message.cjs +49 -0
  24. package/highlevel/methods/messages/send-rich-message.d.cts +38 -0
  25. package/highlevel/methods/messages/send-rich-message.d.ts +38 -0
  26. package/highlevel/methods/messages/send-rich-message.js +44 -0
  27. package/highlevel/methods.d.cts +3 -0
  28. package/highlevel/methods.d.ts +3 -0
  29. package/highlevel/types/bots/inline-message/factories.cjs +14 -0
  30. package/highlevel/types/bots/inline-message/factories.d.cts +9 -1
  31. package/highlevel/types/bots/inline-message/factories.d.ts +9 -1
  32. package/highlevel/types/bots/inline-message/factories.js +14 -0
  33. package/highlevel/types/bots/inline-message/types.d.cts +17 -1
  34. package/highlevel/types/bots/inline-message/types.d.ts +17 -1
  35. package/highlevel/types/files/utils.d.cts +9 -0
  36. package/highlevel/types/files/utils.d.ts +9 -0
  37. package/highlevel/types/media/input-media/types.d.cts +1 -1
  38. package/highlevel/types/media/input-media/types.d.ts +1 -1
  39. package/highlevel/types/messages/index.d.cts +1 -1
  40. package/highlevel/types/messages/index.d.ts +1 -1
  41. package/highlevel/types/messages/message.cjs +1 -1
  42. package/highlevel/types/messages/message.d.cts +1 -1
  43. package/highlevel/types/messages/message.d.ts +1 -1
  44. package/highlevel/types/messages/message.js +1 -1
  45. package/highlevel/types/messages/rich/index.d.cts +4 -0
  46. package/highlevel/types/messages/rich/index.d.ts +4 -0
  47. package/highlevel/types/messages/rich/inner.cjs +219 -0
  48. package/highlevel/types/messages/rich/inner.d.cts +127 -0
  49. package/highlevel/types/messages/rich/inner.d.ts +127 -0
  50. package/highlevel/types/messages/rich/inner.js +214 -0
  51. package/highlevel/types/messages/{rich-message.cjs → rich/rich-message.cjs} +6 -6
  52. package/highlevel/types/messages/{rich-message.d.cts → rich/rich-message.d.cts} +5 -5
  53. package/highlevel/types/messages/{rich-message.d.ts → rich/rich-message.d.ts} +5 -5
  54. package/highlevel/types/messages/{rich-message.js → rich/rich-message.js} +6 -6
  55. package/highlevel/types/messages/rich/types.d.cts +76 -0
  56. package/highlevel/types/messages/rich/types.d.ts +76 -0
  57. package/highlevel/updates/manager.cjs +10 -169
  58. package/highlevel/updates/manager.js +10 -169
  59. package/highlevel/utils/entities.cjs +176 -0
  60. package/highlevel/utils/entities.d.cts +18 -0
  61. package/highlevel/utils/entities.d.ts +18 -0
  62. package/highlevel/utils/entities.js +177 -1
  63. package/highlevel/utils/index.d.cts +1 -0
  64. package/highlevel/utils/index.d.ts +1 -0
  65. package/highlevel/utils/walk-page-blocks.cjs +164 -0
  66. package/highlevel/utils/walk-page-blocks.d.cts +9 -0
  67. package/highlevel/utils/walk-page-blocks.d.ts +9 -0
  68. package/highlevel/utils/walk-page-blocks.js +159 -0
  69. package/index.cjs +3 -1
  70. package/index.js +3 -1
  71. package/methods.cjs +4 -0
  72. package/methods.js +4 -0
  73. package/network/authorization.cjs +1 -1
  74. package/network/authorization.js +1 -1
  75. package/network/delay-gate.cjs +29 -0
  76. package/network/delay-gate.d.cts +5 -0
  77. package/network/delay-gate.d.ts +5 -0
  78. package/network/delay-gate.js +24 -0
  79. package/network/delay-gate.test.d.cts +1 -0
  80. package/network/delay-gate.test.d.ts +1 -0
  81. package/network/message-id-store.cjs +30 -0
  82. package/network/message-id-store.d.cts +7 -0
  83. package/network/message-id-store.d.ts +7 -0
  84. package/network/message-id-store.js +25 -0
  85. package/network/message-id-store.test.d.cts +1 -0
  86. package/network/message-id-store.test.d.ts +1 -0
  87. package/network/middlewares/bundle.cjs +2 -0
  88. package/network/middlewares/bundle.d.cts +1 -0
  89. package/network/middlewares/bundle.d.ts +1 -0
  90. package/network/middlewares/bundle.js +2 -0
  91. package/network/middlewares/default.cjs +6 -1
  92. package/network/middlewares/default.js +6 -1
  93. package/network/middlewares/flood-waiter.test.d.cts +1 -0
  94. package/network/middlewares/flood-waiter.test.d.ts +1 -0
  95. package/network/middlewares/internal-errors.test.d.cts +1 -0
  96. package/network/middlewares/internal-errors.test.d.ts +1 -0
  97. package/network/middlewares/media-throttle.cjs +65 -0
  98. package/network/middlewares/media-throttle.d.cts +5 -0
  99. package/network/middlewares/media-throttle.d.ts +5 -0
  100. package/network/middlewares/media-throttle.js +60 -0
  101. package/network/middlewares/media-throttle.test.d.cts +1 -0
  102. package/network/middlewares/media-throttle.test.d.ts +1 -0
  103. package/network/middlewares/on-error.test.d.cts +1 -0
  104. package/network/middlewares/on-error.test.d.ts +1 -0
  105. package/network/middlewares/on-method.test.d.cts +1 -0
  106. package/network/middlewares/on-method.test.d.ts +1 -0
  107. package/network/mtproto-session.cjs +9 -2
  108. package/network/mtproto-session.d.cts +5 -2
  109. package/network/mtproto-session.d.ts +5 -2
  110. package/network/mtproto-session.js +9 -2
  111. package/network/mtproxy/_fake-tls.cjs +169 -107
  112. package/network/mtproxy/_fake-tls.js +169 -107
  113. package/network/mtproxy/_fake-tls.test.d.cts +1 -0
  114. package/network/mtproxy/_fake-tls.test.d.ts +1 -0
  115. package/network/multi-session-connection.cjs +7 -0
  116. package/network/multi-session-connection.d.cts +2 -0
  117. package/network/multi-session-connection.d.ts +2 -0
  118. package/network/multi-session-connection.js +7 -0
  119. package/network/network-manager.cjs +7 -1
  120. package/network/network-manager.js +7 -1
  121. package/network/resource-limiter.cjs +60 -0
  122. package/network/resource-limiter.d.cts +11 -0
  123. package/network/resource-limiter.d.ts +11 -0
  124. package/network/resource-limiter.js +55 -0
  125. package/network/resource-limiter.test.d.cts +1 -0
  126. package/network/resource-limiter.test.d.ts +1 -0
  127. package/network/server-salt.cjs +7 -3
  128. package/network/server-salt.d.cts +2 -0
  129. package/network/server-salt.d.ts +2 -0
  130. package/network/server-salt.js +7 -3
  131. package/network/session-connection.cjs +106 -20
  132. package/network/session-connection.d.cts +11 -0
  133. package/network/session-connection.d.ts +11 -0
  134. package/network/session-connection.js +106 -20
  135. package/package.json +1 -1
  136. package/tl/api-schema.json +1 -1
  137. package/tl/binary/reader.cjs +115 -109
  138. package/tl/binary/reader.js +115 -109
  139. package/tl/binary/writer.cjs +243 -245
  140. package/tl/binary/writer.js +243 -245
  141. package/tl/index.d.cts +227 -216
  142. package/tl/index.d.ts +227 -216
  143. package/tl/inner-tl.cjs +3 -1
  144. package/tl/inner-tl.js +3 -1
  145. package/types/utils.d.cts +4 -0
  146. package/types/utils.d.ts +4 -0
  147. package/utils.cjs +4 -0
  148. package/utils.js +5 -1
package/tl/index.d.ts CHANGED
@@ -10029,6 +10029,31 @@ export class RpcError extends Error {
10029
10029
  interface RawUpdateAiComposeTones {
10030
10030
  _: 'updateAiComposeTones';
10031
10031
  }
10032
+ interface RawUpdateJoinChatWebViewDecision {
10033
+ _: 'updateJoinChatWebViewDecision';
10034
+ peer: tl.TypePeer;
10035
+ queryId: Long;
10036
+ result: tl.TypeJoinChatBotResult;
10037
+ }
10038
+ interface RawUpdateNewBotConnection {
10039
+ _: 'updateNewBotConnection';
10040
+ confirmed?: boolean;
10041
+ botId: number;
10042
+ date?: number;
10043
+ device?: string;
10044
+ location?: string;
10045
+ }
10046
+ interface RawUpdateWebBrowserSettings {
10047
+ _: 'updateWebBrowserSettings';
10048
+ openExternalBrowser?: boolean;
10049
+ displayCloseButton?: boolean;
10050
+ }
10051
+ interface RawUpdateWebBrowserException {
10052
+ _: 'updateWebBrowserException';
10053
+ delete?: boolean;
10054
+ openExternalBrowser?: boolean;
10055
+ exception: tl.TypeWebDomainException;
10056
+ }
10032
10057
  /**
10033
10058
  * Too many updates, it is necessary to execute
10034
10059
  * {@link updates.RawGetDifferenceRequest}.
@@ -11217,6 +11242,16 @@ export class RpcError extends Error {
11217
11242
  */
11218
11243
  text: tl.TypeTextWithEntities;
11219
11244
  }
11245
+ interface RawInputSendMessageRichMessageDraftAction {
11246
+ _: 'inputSendMessageRichMessageDraftAction';
11247
+ randomId: Long;
11248
+ richMessage: tl.TypeInputRichMessage;
11249
+ }
11250
+ interface RawSendMessageRichMessageDraftAction {
11251
+ _: 'sendMessageRichMessageDraftAction';
11252
+ randomId: Long;
11253
+ richMessage: tl.TypeRichMessage;
11254
+ }
11220
11255
  /**
11221
11256
  * Whether people will be able to see our exact last online
11222
11257
  * timestamp.
@@ -14346,6 +14381,11 @@ export class RpcError extends Error {
14346
14381
  */
14347
14382
  replyMarkup?: tl.TypeReplyMarkup;
14348
14383
  }
14384
+ interface RawInputBotInlineMessageRichMessage {
14385
+ _: 'inputBotInlineMessageRichMessage';
14386
+ replyMarkup?: tl.TypeReplyMarkup;
14387
+ richMessage: tl.TypeInputRichMessage;
14388
+ }
14349
14389
  /**
14350
14390
  * An inline bot result
14351
14391
  */
@@ -14705,6 +14745,11 @@ export class RpcError extends Error {
14705
14745
  */
14706
14746
  replyMarkup?: tl.TypeReplyMarkup;
14707
14747
  }
14748
+ interface RawBotInlineMessageRichMessage {
14749
+ _: 'botInlineMessageRichMessage';
14750
+ replyMarkup?: tl.TypeReplyMarkup;
14751
+ richMessage: tl.TypeRichMessage;
14752
+ }
14708
14753
  /**
14709
14754
  * Generic result
14710
14755
  */
@@ -15498,6 +15543,67 @@ export class RpcError extends Error {
15498
15543
  */
15499
15544
  name: string;
15500
15545
  }
15546
+ interface RawTextMath {
15547
+ _: 'textMath';
15548
+ source: string;
15549
+ }
15550
+ interface RawTextCustomEmoji {
15551
+ _: 'textCustomEmoji';
15552
+ documentId: Long;
15553
+ alt: string;
15554
+ }
15555
+ interface RawTextSpoiler {
15556
+ _: 'textSpoiler';
15557
+ text: tl.TypeRichText;
15558
+ }
15559
+ interface RawTextMention {
15560
+ _: 'textMention';
15561
+ text: tl.TypeRichText;
15562
+ }
15563
+ interface RawTextHashtag {
15564
+ _: 'textHashtag';
15565
+ text: tl.TypeRichText;
15566
+ }
15567
+ interface RawTextBotCommand {
15568
+ _: 'textBotCommand';
15569
+ text: tl.TypeRichText;
15570
+ }
15571
+ interface RawTextCashtag {
15572
+ _: 'textCashtag';
15573
+ text: tl.TypeRichText;
15574
+ }
15575
+ interface RawTextAutoUrl {
15576
+ _: 'textAutoUrl';
15577
+ text: tl.TypeRichText;
15578
+ }
15579
+ interface RawTextAutoEmail {
15580
+ _: 'textAutoEmail';
15581
+ text: tl.TypeRichText;
15582
+ }
15583
+ interface RawTextAutoPhone {
15584
+ _: 'textAutoPhone';
15585
+ text: tl.TypeRichText;
15586
+ }
15587
+ interface RawTextBankCard {
15588
+ _: 'textBankCard';
15589
+ text: tl.TypeRichText;
15590
+ }
15591
+ interface RawTextMentionName {
15592
+ _: 'textMentionName';
15593
+ text: tl.TypeRichText;
15594
+ userId: number;
15595
+ }
15596
+ interface RawTextDate {
15597
+ _: 'textDate';
15598
+ relative?: boolean;
15599
+ shortTime?: boolean;
15600
+ longTime?: boolean;
15601
+ shortDate?: boolean;
15602
+ longDate?: boolean;
15603
+ dayOfWeek?: boolean;
15604
+ text: tl.TypeRichText;
15605
+ date: number;
15606
+ }
15501
15607
  /**
15502
15608
  * Unsupported IV element
15503
15609
  */
@@ -15652,6 +15758,7 @@ export class RpcError extends Error {
15652
15758
  */
15653
15759
  interface RawPageBlockPhoto {
15654
15760
  _: 'pageBlockPhoto';
15761
+ spoiler?: boolean;
15655
15762
  /**
15656
15763
  * Photo ID
15657
15764
  */
@@ -15668,7 +15775,6 @@ export class RpcError extends Error {
15668
15775
  * ID of preview of the page the photo leads to when clicked
15669
15776
  */
15670
15777
  webpageId?: Long;
15671
- spoiler?: boolean;
15672
15778
  }
15673
15779
  /**
15674
15780
  * Video
@@ -15931,6 +16037,51 @@ export class RpcError extends Error {
15931
16037
  */
15932
16038
  caption: tl.TypePageCaption;
15933
16039
  }
16040
+ interface RawPageBlockHeading1 {
16041
+ _: 'pageBlockHeading1';
16042
+ text: tl.TypeRichText;
16043
+ }
16044
+ interface RawPageBlockHeading2 {
16045
+ _: 'pageBlockHeading2';
16046
+ text: tl.TypeRichText;
16047
+ }
16048
+ interface RawPageBlockHeading3 {
16049
+ _: 'pageBlockHeading3';
16050
+ text: tl.TypeRichText;
16051
+ }
16052
+ interface RawPageBlockHeading4 {
16053
+ _: 'pageBlockHeading4';
16054
+ text: tl.TypeRichText;
16055
+ }
16056
+ interface RawPageBlockHeading5 {
16057
+ _: 'pageBlockHeading5';
16058
+ text: tl.TypeRichText;
16059
+ }
16060
+ interface RawPageBlockHeading6 {
16061
+ _: 'pageBlockHeading6';
16062
+ text: tl.TypeRichText;
16063
+ }
16064
+ interface RawPageBlockMath {
16065
+ _: 'pageBlockMath';
16066
+ source: string;
16067
+ }
16068
+ interface RawPageBlockThinking {
16069
+ _: 'pageBlockThinking';
16070
+ text: tl.TypeRichText;
16071
+ }
16072
+ interface RawInputPageBlockMap {
16073
+ _: 'inputPageBlockMap';
16074
+ geo: tl.TypeInputGeoPoint;
16075
+ zoom: number;
16076
+ w: number;
16077
+ h: number;
16078
+ caption: tl.TypePageCaption;
16079
+ }
16080
+ interface RawPageBlockBlockquoteBlocks {
16081
+ _: 'pageBlockBlockquoteBlocks';
16082
+ blocks: tl.TypePageBlock[];
16083
+ caption: tl.TypeRichText;
16084
+ }
15934
16085
  /**
15935
16086
  * The phone call was missed
15936
16087
  */
@@ -20804,7 +20955,6 @@ export class RpcError extends Error {
20804
20955
  * Whether this message is quoting a part of another message.
20805
20956
  */
20806
20957
  quote?: boolean;
20807
- replyToEphemeral?: boolean;
20808
20958
  /**
20809
20959
  * ID of message to which this message is replying
20810
20960
  */
@@ -20858,6 +21008,7 @@ export class RpcError extends Error {
20858
21008
  */
20859
21009
  todoItemId?: number;
20860
21010
  pollOption?: Uint8Array;
21011
+ replyToEphemeral?: boolean;
20861
21012
  }
20862
21013
  /**
20863
21014
  * Represents a reply to a
@@ -21957,6 +22108,7 @@ export class RpcError extends Error {
21957
22108
  * If set, the app must be opened in fullscreen
21958
22109
  */
21959
22110
  fullscreen?: boolean;
22111
+ sameOrigin?: boolean;
21960
22112
  /**
21961
22113
  * Webview session ID (only returned by
21962
22114
  * <a href="https://corefork.telegram.org/api/bots/webapps#inline-button-mini-apps">inline
@@ -21967,7 +22119,6 @@ export class RpcError extends Error {
21967
22119
  * menu mini apps</a>).
21968
22120
  */
21969
22121
  queryId?: Long;
21970
- sameOrigin?: boolean;
21971
22122
  /**
21972
22123
  * Webview URL to open
21973
22124
  */
@@ -28628,157 +28779,6 @@ export class RpcError extends Error {
28628
28779
  from: tl.TypeTextWithEntities;
28629
28780
  to: tl.TypeTextWithEntities;
28630
28781
  }
28631
- interface RawUpdateJoinChatWebViewDecision {
28632
- _: 'updateJoinChatWebViewDecision';
28633
- peer: tl.TypePeer;
28634
- queryId: Long;
28635
- result: tl.TypeJoinChatBotResult;
28636
- }
28637
- interface RawUpdateNewBotConnection {
28638
- _: 'updateNewBotConnection';
28639
- confirmed?: boolean;
28640
- botId: number;
28641
- date?: number;
28642
- device?: string;
28643
- location?: string;
28644
- }
28645
- interface RawUpdateWebBrowserSettings {
28646
- _: 'updateWebBrowserSettings';
28647
- openExternalBrowser?: boolean;
28648
- displayCloseButton?: boolean;
28649
- }
28650
- interface RawUpdateWebBrowserException {
28651
- _: 'updateWebBrowserException';
28652
- delete?: boolean;
28653
- openExternalBrowser?: boolean;
28654
- exception: tl.TypeWebDomainException;
28655
- }
28656
- interface RawInputSendMessageRichMessageDraftAction {
28657
- _: 'inputSendMessageRichMessageDraftAction';
28658
- randomId: Long;
28659
- richMessage: tl.TypeInputRichMessage;
28660
- }
28661
- interface RawSendMessageRichMessageDraftAction {
28662
- _: 'sendMessageRichMessageDraftAction';
28663
- randomId: Long;
28664
- richMessage: tl.TypeRichMessage;
28665
- }
28666
- interface RawInputBotInlineMessageRichMessage {
28667
- _: 'inputBotInlineMessageRichMessage';
28668
- replyMarkup?: tl.TypeReplyMarkup;
28669
- richMessage: tl.TypeInputRichMessage;
28670
- }
28671
- interface RawBotInlineMessageRichMessage {
28672
- _: 'botInlineMessageRichMessage';
28673
- replyMarkup?: tl.TypeReplyMarkup;
28674
- richMessage: tl.TypeRichMessage;
28675
- }
28676
- interface RawTextMath {
28677
- _: 'textMath';
28678
- source: string;
28679
- }
28680
- interface RawTextCustomEmoji {
28681
- _: 'textCustomEmoji';
28682
- documentId: Long;
28683
- alt: string;
28684
- }
28685
- interface RawTextSpoiler {
28686
- _: 'textSpoiler';
28687
- text: tl.TypeRichText;
28688
- }
28689
- interface RawTextMention {
28690
- _: 'textMention';
28691
- text: tl.TypeRichText;
28692
- }
28693
- interface RawTextHashtag {
28694
- _: 'textHashtag';
28695
- text: tl.TypeRichText;
28696
- }
28697
- interface RawTextBotCommand {
28698
- _: 'textBotCommand';
28699
- text: tl.TypeRichText;
28700
- }
28701
- interface RawTextCashtag {
28702
- _: 'textCashtag';
28703
- text: tl.TypeRichText;
28704
- }
28705
- interface RawTextAutoUrl {
28706
- _: 'textAutoUrl';
28707
- text: tl.TypeRichText;
28708
- }
28709
- interface RawTextAutoEmail {
28710
- _: 'textAutoEmail';
28711
- text: tl.TypeRichText;
28712
- }
28713
- interface RawTextAutoPhone {
28714
- _: 'textAutoPhone';
28715
- text: tl.TypeRichText;
28716
- }
28717
- interface RawTextBankCard {
28718
- _: 'textBankCard';
28719
- text: tl.TypeRichText;
28720
- }
28721
- interface RawTextMentionName {
28722
- _: 'textMentionName';
28723
- text: tl.TypeRichText;
28724
- userId: number;
28725
- }
28726
- interface RawTextDate {
28727
- _: 'textDate';
28728
- relative?: boolean;
28729
- shortTime?: boolean;
28730
- longTime?: boolean;
28731
- shortDate?: boolean;
28732
- longDate?: boolean;
28733
- dayOfWeek?: boolean;
28734
- text: tl.TypeRichText;
28735
- date: number;
28736
- }
28737
- interface RawPageBlockHeading1 {
28738
- _: 'pageBlockHeading1';
28739
- text: tl.TypeRichText;
28740
- }
28741
- interface RawPageBlockHeading2 {
28742
- _: 'pageBlockHeading2';
28743
- text: tl.TypeRichText;
28744
- }
28745
- interface RawPageBlockHeading3 {
28746
- _: 'pageBlockHeading3';
28747
- text: tl.TypeRichText;
28748
- }
28749
- interface RawPageBlockHeading4 {
28750
- _: 'pageBlockHeading4';
28751
- text: tl.TypeRichText;
28752
- }
28753
- interface RawPageBlockHeading5 {
28754
- _: 'pageBlockHeading5';
28755
- text: tl.TypeRichText;
28756
- }
28757
- interface RawPageBlockHeading6 {
28758
- _: 'pageBlockHeading6';
28759
- text: tl.TypeRichText;
28760
- }
28761
- interface RawPageBlockMath {
28762
- _: 'pageBlockMath';
28763
- source: string;
28764
- }
28765
- interface RawPageBlockThinking {
28766
- _: 'pageBlockThinking';
28767
- text: tl.TypeRichText;
28768
- }
28769
- interface RawInputPageBlockMap {
28770
- _: 'inputPageBlockMap';
28771
- geo: tl.TypeInputGeoPoint;
28772
- zoom: number;
28773
- w: number;
28774
- h: number;
28775
- caption: tl.TypePageCaption;
28776
- }
28777
- interface RawPageBlockBlockquoteBlocks {
28778
- _: 'pageBlockBlockquoteBlocks';
28779
- blocks: tl.TypePageBlock[];
28780
- caption: tl.TypeRichText;
28781
- }
28782
28782
  interface RawJoinChatBotResultApproved {
28783
28783
  _: 'joinChatBotResultApproved';
28784
28784
  }
@@ -28799,13 +28799,15 @@ export class RpcError extends Error {
28799
28799
  title: string;
28800
28800
  favicon?: Long;
28801
28801
  }
28802
- interface RawRichMessage {
28803
- _: 'richMessage';
28804
- rtl?: boolean;
28805
- part?: boolean;
28806
- blocks: tl.TypePageBlock[];
28807
- photos: tl.TypePhoto[];
28808
- documents: tl.TypeDocument[];
28802
+ interface RawInputRichFilePhoto {
28803
+ _: 'inputRichFilePhoto';
28804
+ id: string;
28805
+ photo: tl.TypeInputPhoto;
28806
+ }
28807
+ interface RawInputRichFileDocument {
28808
+ _: 'inputRichFileDocument';
28809
+ id: string;
28810
+ document: tl.TypeInputDocument;
28809
28811
  }
28810
28812
  interface RawInputRichMessage {
28811
28813
  _: 'inputRichMessage';
@@ -28821,18 +28823,22 @@ export class RpcError extends Error {
28821
28823
  rtl?: boolean;
28822
28824
  noautolink?: boolean;
28823
28825
  html: string;
28824
- photos?: tl.TypeInputPhoto[];
28825
- documents?: tl.TypeInputDocument[];
28826
- users?: tl.TypeInputUser[];
28826
+ files?: tl.TypeInputRichFile[];
28827
28827
  }
28828
28828
  interface RawInputRichMessageMarkdown {
28829
28829
  _: 'inputRichMessageMarkdown';
28830
28830
  rtl?: boolean;
28831
28831
  noautolink?: boolean;
28832
28832
  markdown: string;
28833
- photos?: tl.TypeInputPhoto[];
28834
- documents?: tl.TypeInputDocument[];
28835
- users?: tl.TypeInputUser[];
28833
+ files?: tl.TypeInputRichFile[];
28834
+ }
28835
+ interface RawRichMessage {
28836
+ _: 'richMessage';
28837
+ rtl?: boolean;
28838
+ part?: boolean;
28839
+ blocks: tl.TypePageBlock[];
28840
+ photos: tl.TypePhoto[];
28841
+ documents: tl.TypeDocument[];
28836
28842
  }
28837
28843
  /**
28838
28844
  * A
@@ -31322,10 +31328,12 @@ export class RpcError extends Error {
31322
31328
  function isAnyJoinChatBotResult(o: object): o is TypeJoinChatBotResult
31323
31329
  type TypeWebDomainException = tl.RawWebDomainException
31324
31330
  function isAnyWebDomainException(o: object): o is TypeWebDomainException
31325
- type TypeRichMessage = tl.RawRichMessage
31326
- function isAnyRichMessage(o: object): o is TypeRichMessage
31331
+ type TypeInputRichFile = tl.RawInputRichFilePhoto | tl.RawInputRichFileDocument
31332
+ function isAnyInputRichFile(o: object): o is TypeInputRichFile
31327
31333
  type TypeInputRichMessage = tl.RawInputRichMessage | tl.RawInputRichMessageHTML | tl.RawInputRichMessageMarkdown
31328
31334
  function isAnyInputRichMessage(o: object): o is TypeInputRichMessage
31335
+ type TypeRichMessage = tl.RawRichMessage
31336
+ function isAnyRichMessage(o: object): o is TypeRichMessage
31329
31337
 
31330
31338
  namespace storage {
31331
31339
  /**
@@ -57151,6 +57159,11 @@ export class RpcError extends Error {
57151
57159
  | tl.account.RawRegisterPasskeyRequest
57152
57160
  | tl.account.RawGetPasskeysRequest
57153
57161
  | tl.account.RawDeletePasskeyRequest
57162
+ | tl.account.RawConfirmBotConnectionRequest
57163
+ | tl.account.RawGetWebBrowserSettingsRequest
57164
+ | tl.account.RawUpdateWebBrowserSettingsRequest
57165
+ | tl.account.RawToggleWebBrowserSettingsExceptionRequest
57166
+ | tl.account.RawDeleteWebBrowserSettingsExceptionsRequest
57154
57167
  | tl.users.RawGetUsersRequest
57155
57168
  | tl.users.RawGetFullUserRequest
57156
57169
  | tl.users.RawSetSecureValueErrorsRequest
@@ -57441,6 +57454,7 @@ export class RpcError extends Error {
57441
57454
  | tl.messages.RawDeleteParticipantReactionsRequest
57442
57455
  | tl.messages.RawDeleteParticipantReactionRequest
57443
57456
  | tl.messages.RawGetPersonalChannelHistoryRequest
57457
+ | tl.messages.RawGetRichMessageRequest
57444
57458
  | tl.updates.RawGetStateRequest
57445
57459
  | tl.updates.RawGetDifferenceRequest
57446
57460
  | tl.updates.RawGetChannelDifferenceRequest
@@ -57577,6 +57591,7 @@ export class RpcError extends Error {
57577
57591
  | tl.bots.RawGetRequestedWebViewButtonRequest
57578
57592
  | tl.bots.RawGetAccessSettingsRequest
57579
57593
  | tl.bots.RawEditAccessSettingsRequest
57594
+ | tl.bots.RawSetJoinChatResultsRequest
57580
57595
  | tl.payments.RawGetPaymentFormRequest
57581
57596
  | tl.payments.RawGetPaymentReceiptRequest
57582
57597
  | tl.payments.RawValidateRequestedInfoRequest
@@ -57774,13 +57789,6 @@ export class RpcError extends Error {
57774
57789
  | tl.aicompose.RawGetToneRequest
57775
57790
  | tl.aicompose.RawGetTonesRequest
57776
57791
  | tl.aicompose.RawGetToneExampleRequest
57777
- | tl.account.RawConfirmBotConnectionRequest
57778
- | tl.account.RawGetWebBrowserSettingsRequest
57779
- | tl.account.RawUpdateWebBrowserSettingsRequest
57780
- | tl.account.RawToggleWebBrowserSettingsExceptionRequest
57781
- | tl.account.RawDeleteWebBrowserSettingsExceptionsRequest
57782
- | tl.messages.RawGetRichMessageRequest
57783
- | tl.bots.RawSetJoinChatResultsRequest
57784
57792
  | tl.channels.RawEditCreatorRequest
57785
57793
  | tl.channels.RawCreateForumTopicRequest
57786
57794
  | tl.channels.RawGetForumTopicsRequest
@@ -58205,6 +58213,10 @@ export class RpcError extends Error {
58205
58213
  | tl.RawUpdateManagedBot
58206
58214
  | tl.RawUpdateBotGuestChatQuery
58207
58215
  | tl.RawUpdateAiComposeTones
58216
+ | tl.RawUpdateJoinChatWebViewDecision
58217
+ | tl.RawUpdateNewBotConnection
58218
+ | tl.RawUpdateWebBrowserSettings
58219
+ | tl.RawUpdateWebBrowserException
58208
58220
  | tl.updates.RawState
58209
58221
  | tl.updates.RawDifferenceEmpty
58210
58222
  | tl.updates.RawDifference
@@ -58275,6 +58287,8 @@ export class RpcError extends Error {
58275
58287
  | tl.RawSendMessageEmojiInteraction
58276
58288
  | tl.RawSendMessageEmojiInteractionSeen
58277
58289
  | tl.RawSendMessageTextDraftAction
58290
+ | tl.RawInputSendMessageRichMessageDraftAction
58291
+ | tl.RawSendMessageRichMessageDraftAction
58278
58292
  | tl.contacts.RawFound
58279
58293
  | tl.RawInputPrivacyKeyStatusTimestamp
58280
58294
  | tl.RawInputPrivacyKeyChatInvite
@@ -58463,6 +58477,7 @@ export class RpcError extends Error {
58463
58477
  | tl.RawInputBotInlineMessageGame
58464
58478
  | tl.RawInputBotInlineMessageMediaInvoice
58465
58479
  | tl.RawInputBotInlineMessageMediaWebPage
58480
+ | tl.RawInputBotInlineMessageRichMessage
58466
58481
  | tl.RawInputBotInlineResult
58467
58482
  | tl.RawInputBotInlineResultPhoto
58468
58483
  | tl.RawInputBotInlineResultDocument
@@ -58474,6 +58489,7 @@ export class RpcError extends Error {
58474
58489
  | tl.RawBotInlineMessageMediaContact
58475
58490
  | tl.RawBotInlineMessageMediaInvoice
58476
58491
  | tl.RawBotInlineMessageMediaWebPage
58492
+ | tl.RawBotInlineMessageRichMessage
58477
58493
  | tl.RawBotInlineResult
58478
58494
  | tl.RawBotInlineMediaResult
58479
58495
  | tl.messages.RawBotResults
@@ -58553,6 +58569,19 @@ export class RpcError extends Error {
58553
58569
  | tl.RawTextPhone
58554
58570
  | tl.RawTextImage
58555
58571
  | tl.RawTextAnchor
58572
+ | tl.RawTextMath
58573
+ | tl.RawTextCustomEmoji
58574
+ | tl.RawTextSpoiler
58575
+ | tl.RawTextMention
58576
+ | tl.RawTextHashtag
58577
+ | tl.RawTextBotCommand
58578
+ | tl.RawTextCashtag
58579
+ | tl.RawTextAutoUrl
58580
+ | tl.RawTextAutoEmail
58581
+ | tl.RawTextAutoPhone
58582
+ | tl.RawTextBankCard
58583
+ | tl.RawTextMentionName
58584
+ | tl.RawTextDate
58556
58585
  | tl.RawPageBlockUnsupported
58557
58586
  | tl.RawPageBlockTitle
58558
58587
  | tl.RawPageBlockSubtitle
@@ -58582,6 +58611,16 @@ export class RpcError extends Error {
58582
58611
  | tl.RawPageBlockDetails
58583
58612
  | tl.RawPageBlockRelatedArticles
58584
58613
  | tl.RawPageBlockMap
58614
+ | tl.RawPageBlockHeading1
58615
+ | tl.RawPageBlockHeading2
58616
+ | tl.RawPageBlockHeading3
58617
+ | tl.RawPageBlockHeading4
58618
+ | tl.RawPageBlockHeading5
58619
+ | tl.RawPageBlockHeading6
58620
+ | tl.RawPageBlockMath
58621
+ | tl.RawPageBlockThinking
58622
+ | tl.RawInputPageBlockMap
58623
+ | tl.RawPageBlockBlockquoteBlocks
58585
58624
  | tl.RawPhoneCallDiscardReasonMissed
58586
58625
  | tl.RawPhoneCallDiscardReasonDisconnect
58587
58626
  | tl.RawPhoneCallDiscardReasonHangup
@@ -59363,37 +59402,6 @@ export class RpcError extends Error {
59363
59402
  | tl.aicompose.RawTones
59364
59403
  | tl.RawAiComposeToneExample
59365
59404
  | tl.bots.RawAccessSettings
59366
- | tl.RawUpdateJoinChatWebViewDecision
59367
- | tl.RawUpdateNewBotConnection
59368
- | tl.RawUpdateWebBrowserSettings
59369
- | tl.RawUpdateWebBrowserException
59370
- | tl.RawInputSendMessageRichMessageDraftAction
59371
- | tl.RawSendMessageRichMessageDraftAction
59372
- | tl.RawInputBotInlineMessageRichMessage
59373
- | tl.RawBotInlineMessageRichMessage
59374
- | tl.RawTextMath
59375
- | tl.RawTextCustomEmoji
59376
- | tl.RawTextSpoiler
59377
- | tl.RawTextMention
59378
- | tl.RawTextHashtag
59379
- | tl.RawTextBotCommand
59380
- | tl.RawTextCashtag
59381
- | tl.RawTextAutoUrl
59382
- | tl.RawTextAutoEmail
59383
- | tl.RawTextAutoPhone
59384
- | tl.RawTextBankCard
59385
- | tl.RawTextMentionName
59386
- | tl.RawTextDate
59387
- | tl.RawPageBlockHeading1
59388
- | tl.RawPageBlockHeading2
59389
- | tl.RawPageBlockHeading3
59390
- | tl.RawPageBlockHeading4
59391
- | tl.RawPageBlockHeading5
59392
- | tl.RawPageBlockHeading6
59393
- | tl.RawPageBlockMath
59394
- | tl.RawPageBlockThinking
59395
- | tl.RawInputPageBlockMap
59396
- | tl.RawPageBlockBlockquoteBlocks
59397
59405
  | tl.messages.RawChatInviteJoinResultOk
59398
59406
  | tl.messages.RawChatInviteJoinResultWebView
59399
59407
  | tl.RawJoinChatBotResultApproved
@@ -59403,10 +59411,12 @@ export class RpcError extends Error {
59403
59411
  | tl.RawWebDomainException
59404
59412
  | tl.account.RawWebBrowserSettingsNotModified
59405
59413
  | tl.account.RawWebBrowserSettings
59406
- | tl.RawRichMessage
59414
+ | tl.RawInputRichFilePhoto
59415
+ | tl.RawInputRichFileDocument
59407
59416
  | tl.RawInputRichMessage
59408
59417
  | tl.RawInputRichMessageHTML
59409
59418
  | tl.RawInputRichMessageMarkdown
59419
+ | tl.RawRichMessage
59410
59420
  | tl.RawUpdateChannelPinnedTopic
59411
59421
  | tl.RawUpdateChannelPinnedTopics
59412
59422
  | tl.mtcute.RawDummyUpdate
@@ -59572,6 +59582,11 @@ export class RpcError extends Error {
59572
59582
  | tl.account.RawRegisterPasskeyRequest
59573
59583
  | tl.account.RawGetPasskeysRequest
59574
59584
  | tl.account.RawDeletePasskeyRequest
59585
+ | tl.account.RawConfirmBotConnectionRequest
59586
+ | tl.account.RawGetWebBrowserSettingsRequest
59587
+ | tl.account.RawUpdateWebBrowserSettingsRequest
59588
+ | tl.account.RawToggleWebBrowserSettingsExceptionRequest
59589
+ | tl.account.RawDeleteWebBrowserSettingsExceptionsRequest
59575
59590
  | tl.users.RawGetUsersRequest
59576
59591
  | tl.users.RawGetFullUserRequest
59577
59592
  | tl.users.RawSetSecureValueErrorsRequest
@@ -59862,6 +59877,7 @@ export class RpcError extends Error {
59862
59877
  | tl.messages.RawDeleteParticipantReactionsRequest
59863
59878
  | tl.messages.RawDeleteParticipantReactionRequest
59864
59879
  | tl.messages.RawGetPersonalChannelHistoryRequest
59880
+ | tl.messages.RawGetRichMessageRequest
59865
59881
  | tl.updates.RawGetStateRequest
59866
59882
  | tl.updates.RawGetDifferenceRequest
59867
59883
  | tl.updates.RawGetChannelDifferenceRequest
@@ -59998,6 +60014,7 @@ export class RpcError extends Error {
59998
60014
  | tl.bots.RawGetRequestedWebViewButtonRequest
59999
60015
  | tl.bots.RawGetAccessSettingsRequest
60000
60016
  | tl.bots.RawEditAccessSettingsRequest
60017
+ | tl.bots.RawSetJoinChatResultsRequest
60001
60018
  | tl.payments.RawGetPaymentFormRequest
60002
60019
  | tl.payments.RawGetPaymentReceiptRequest
60003
60020
  | tl.payments.RawValidateRequestedInfoRequest
@@ -60195,13 +60212,6 @@ export class RpcError extends Error {
60195
60212
  | tl.aicompose.RawGetToneRequest
60196
60213
  | tl.aicompose.RawGetTonesRequest
60197
60214
  | tl.aicompose.RawGetToneExampleRequest
60198
- | tl.account.RawConfirmBotConnectionRequest
60199
- | tl.account.RawGetWebBrowserSettingsRequest
60200
- | tl.account.RawUpdateWebBrowserSettingsRequest
60201
- | tl.account.RawToggleWebBrowserSettingsExceptionRequest
60202
- | tl.account.RawDeleteWebBrowserSettingsExceptionsRequest
60203
- | tl.messages.RawGetRichMessageRequest
60204
- | tl.bots.RawSetJoinChatResultsRequest
60205
60215
  | tl.channels.RawEditCreatorRequest
60206
60216
  | tl.channels.RawCreateForumTopicRequest
60207
60217
  | tl.channels.RawGetForumTopicsRequest
@@ -60591,8 +60601,9 @@ export declare function isAnyAiComposeTone(o: object): o is tl.TypeAiComposeTone
60591
60601
  export declare function isAnyAiComposeToneExample(o: object): o is tl.TypeAiComposeToneExample
60592
60602
  export declare function isAnyJoinChatBotResult(o: object): o is tl.TypeJoinChatBotResult
60593
60603
  export declare function isAnyWebDomainException(o: object): o is tl.TypeWebDomainException
60594
- export declare function isAnyRichMessage(o: object): o is tl.TypeRichMessage
60604
+ export declare function isAnyInputRichFile(o: object): o is tl.TypeInputRichFile
60595
60605
  export declare function isAnyInputRichMessage(o: object): o is tl.TypeInputRichMessage
60606
+ export declare function isAnyRichMessage(o: object): o is tl.TypeRichMessage
60596
60607
  export declare function isAnyStorage_FileType(o: object): o is tl.storage.TypeFileType
60597
60608
  export declare function isAnyAuth_SentCode(o: object): o is tl.auth.TypeSentCode
60598
60609
  export declare function isAnyAuth_Authorization(o: object): o is tl.auth.TypeAuthorization
package/tl/inner-tl.cjs CHANGED
@@ -471,8 +471,9 @@ const isAnyAiComposeTone = /* @__PURE__ */ _isAny("aiComposeTone", "aiComposeTon
471
471
  const isAnyAiComposeToneExample = /* @__PURE__ */ _isAny("aiComposeToneExample");
472
472
  const isAnyJoinChatBotResult = /* @__PURE__ */ _isAny("joinChatBotResultApproved", "joinChatBotResultDeclined", "joinChatBotResultQueued", "joinChatBotResultWebView");
473
473
  const isAnyWebDomainException = /* @__PURE__ */ _isAny("webDomainException");
474
- const isAnyRichMessage = /* @__PURE__ */ _isAny("richMessage");
474
+ const isAnyInputRichFile = /* @__PURE__ */ _isAny("inputRichFilePhoto", "inputRichFileDocument");
475
475
  const isAnyInputRichMessage = /* @__PURE__ */ _isAny("inputRichMessage", "inputRichMessageHTML", "inputRichMessageMarkdown");
476
+ const isAnyRichMessage = /* @__PURE__ */ _isAny("richMessage");
476
477
  const isAnyStorage_FileType = /* @__PURE__ */ _isAny("storage.fileUnknown", "storage.filePartial", "storage.fileJpeg", "storage.fileGif", "storage.filePng", "storage.filePdf", "storage.fileMp3", "storage.fileMov", "storage.fileMp4", "storage.fileWebp");
477
478
  const isAnyAuth_SentCode = /* @__PURE__ */ _isAny("auth.sentCode", "auth.sentCodeSuccess", "auth.sentCodePaymentRequired");
478
479
  const isAnyAuth_Authorization = /* @__PURE__ */ _isAny("auth.authorization", "auth.authorizationSignUpRequired");
@@ -945,6 +946,7 @@ exports.isAnyInputPrivacyKey = isAnyInputPrivacyKey;
945
946
  exports.isAnyInputPrivacyRule = isAnyInputPrivacyRule;
946
947
  exports.isAnyInputQuickReplyShortcut = isAnyInputQuickReplyShortcut;
947
948
  exports.isAnyInputReplyTo = isAnyInputReplyTo;
949
+ exports.isAnyInputRichFile = isAnyInputRichFile;
948
950
  exports.isAnyInputRichMessage = isAnyInputRichMessage;
949
951
  exports.isAnyInputSavedStarGift = isAnyInputSavedStarGift;
950
952
  exports.isAnyInputSecureFile = isAnyInputSecureFile;