@mtcute/tl 209.0.0 → 211.0.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.
package/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import _Long from 'long';
2
2
  export declare namespace tl {
3
- const LAYER = 209;
3
+ const LAYER = 211;
4
4
 
5
5
  function $extendTypes(types: Record<string, string>): void
6
6
 
@@ -5038,7 +5038,7 @@ export class RpcError extends Error {
5038
5038
  fromId?: tl.TypePeer;
5039
5039
  peer?: tl.TypePeer;
5040
5040
  savedId?: Long;
5041
- resaleStars?: Long;
5041
+ resaleAmount?: tl.TypeStarsAmount;
5042
5042
  canTransferAt?: number;
5043
5043
  canResellAt?: number;
5044
5044
  }
@@ -6042,6 +6042,9 @@ export class RpcError extends Error {
6042
6042
  botVerification?: tl.TypeBotVerification;
6043
6043
  sendPaidMessagesStars?: Long;
6044
6044
  disallowedGifts?: tl.TypeDisallowedGiftsSettings;
6045
+ starsRating?: tl.TypeStarsRating;
6046
+ starsMyPendingRating?: tl.TypeStarsRating;
6047
+ starsMyPendingRatingDate?: number;
6045
6048
  }
6046
6049
  /**
6047
6050
  * A contact of the current user that is registered in the
@@ -20650,6 +20653,7 @@ export class RpcError extends Error {
20650
20653
  }
20651
20654
  interface RawInputInvoiceStarGiftResale {
20652
20655
  _: 'inputInvoiceStarGiftResale';
20656
+ ton?: boolean;
20653
20657
  slug: string;
20654
20658
  toId: tl.TypeInputPeer;
20655
20659
  }
@@ -22042,6 +22046,7 @@ export class RpcError extends Error {
22042
22046
  * The reaction we sent.
22043
22047
  */
22044
22048
  sentReaction?: tl.TypeReaction;
22049
+ albums?: number[];
22045
22050
  }
22046
22051
  /**
22047
22052
  * <a href="https://corefork.telegram.org/api/stories">Story</a>
@@ -24590,6 +24595,8 @@ export class RpcError extends Error {
24590
24595
  * Whether this is a birthday-themed gift
24591
24596
  */
24592
24597
  birthday?: boolean;
24598
+ requirePremium?: boolean;
24599
+ limitedPerUser?: boolean;
24593
24600
  /**
24594
24601
  * Identifier of the gift
24595
24602
  */
@@ -24639,9 +24646,13 @@ export class RpcError extends Error {
24639
24646
  resellMinStars?: Long;
24640
24647
  title?: string;
24641
24648
  releasedBy?: tl.TypePeer;
24649
+ perUserTotal?: number;
24650
+ perUserRemains?: number;
24642
24651
  }
24643
24652
  interface RawStarGiftUnique {
24644
24653
  _: 'starGiftUnique';
24654
+ requirePremium?: boolean;
24655
+ resaleTonOnly?: boolean;
24645
24656
  id: Long;
24646
24657
  title: string;
24647
24658
  slug: string;
@@ -24653,7 +24664,7 @@ export class RpcError extends Error {
24653
24664
  availabilityIssued: number;
24654
24665
  availabilityTotal: number;
24655
24666
  giftAddress?: string;
24656
- resellStars?: Long;
24667
+ resellAmount?: tl.TypeStarsAmount[];
24657
24668
  releasedBy?: tl.TypePeer;
24658
24669
  }
24659
24670
  /**
@@ -24918,6 +24929,7 @@ export class RpcError extends Error {
24918
24929
  transferStars?: Long;
24919
24930
  canTransferAt?: number;
24920
24931
  canResellAt?: number;
24932
+ collectionId?: number[];
24921
24933
  }
24922
24934
  interface RawInputSavedStarGiftUser {
24923
24935
  _: 'inputSavedStarGiftUser';
@@ -25052,6 +25064,10 @@ export class RpcError extends Error {
25052
25064
  interface RawInputStickerSetTonGifts {
25053
25065
  _: 'inputStickerSetTonGifts';
25054
25066
  }
25067
+ interface RawWebPageAttributeStarGiftCollection {
25068
+ _: 'webPageAttributeStarGiftCollection';
25069
+ icons: tl.TypeDocument[];
25070
+ }
25055
25071
  interface RawStarsTonAmount {
25056
25072
  _: 'starsTonAmount';
25057
25073
  amount: Long;
@@ -25063,6 +25079,36 @@ export class RpcError extends Error {
25063
25079
  price?: tl.TypeStarsAmount;
25064
25080
  scheduleDate?: number;
25065
25081
  }
25082
+ interface RawStarsRating {
25083
+ _: 'starsRating';
25084
+ level: number;
25085
+ currentLevelStars: Long;
25086
+ stars: Long;
25087
+ nextLevelStars?: Long;
25088
+ }
25089
+ interface RawStarGiftCollection {
25090
+ _: 'starGiftCollection';
25091
+ collectionId: number;
25092
+ title: string;
25093
+ icon?: tl.TypeDocument;
25094
+ giftsCount: number;
25095
+ hash: Long;
25096
+ }
25097
+ interface RawStoryAlbum {
25098
+ _: 'storyAlbum';
25099
+ albumId: number;
25100
+ title: string;
25101
+ iconPhoto?: tl.TypePhoto;
25102
+ iconVideo?: tl.TypeDocument;
25103
+ }
25104
+ interface RawSearchPostsFlood {
25105
+ _: 'searchPostsFlood';
25106
+ queryIsFree?: boolean;
25107
+ totalDaily: number;
25108
+ remains: number;
25109
+ waitTill?: number;
25110
+ starsAmount: Long;
25111
+ }
25066
25112
  /**
25067
25113
  * Telegram Premium gift option
25068
25114
  */
@@ -26400,7 +26446,7 @@ export class RpcError extends Error {
26400
26446
  /**
26401
26447
  * Webpage attributes
26402
26448
  */
26403
- type TypeWebPageAttribute = tl.RawWebPageAttributeTheme | tl.RawWebPageAttributeStory | tl.RawWebPageAttributeStickerSet | tl.RawWebPageAttributeUniqueStarGift
26449
+ type TypeWebPageAttribute = tl.RawWebPageAttributeTheme | tl.RawWebPageAttributeStory | tl.RawWebPageAttributeStickerSet | tl.RawWebPageAttributeUniqueStarGift | tl.RawWebPageAttributeStarGiftCollection
26404
26450
  function isAnyWebPageAttribute(o: object): o is TypeWebPageAttribute
26405
26451
  /**
26406
26452
  * Credit card info URL provided by the bank
@@ -27374,6 +27420,14 @@ export class RpcError extends Error {
27374
27420
  function isAnyTodoCompletion(o: object): o is TypeTodoCompletion
27375
27421
  type TypeSuggestedPost = tl.RawSuggestedPost
27376
27422
  function isAnySuggestedPost(o: object): o is TypeSuggestedPost
27423
+ type TypeStarsRating = tl.RawStarsRating
27424
+ function isAnyStarsRating(o: object): o is TypeStarsRating
27425
+ type TypeStarGiftCollection = tl.RawStarGiftCollection
27426
+ function isAnyStarGiftCollection(o: object): o is TypeStarGiftCollection
27427
+ type TypeStoryAlbum = tl.RawStoryAlbum
27428
+ function isAnyStoryAlbum(o: object): o is TypeStoryAlbum
27429
+ type TypeSearchPostsFlood = tl.RawSearchPostsFlood
27430
+ function isAnySearchPostsFlood(o: object): o is TypeSearchPostsFlood
27377
27431
  /**
27378
27432
  * Telegram Premium gift option
27379
27433
  */
@@ -30359,6 +30413,7 @@ export class RpcError extends Error {
30359
30413
  * <code>photo ${offset_id_offset} of ${count}</code>.
30360
30414
  */
30361
30415
  offsetIdOffset?: number;
30416
+ searchFlood?: tl.TypeSearchPostsFlood;
30362
30417
  /**
30363
30418
  * List of messages
30364
30419
  */
@@ -38692,7 +38747,7 @@ export class RpcError extends Error {
38692
38747
  /**
38693
38748
  * If set, removes a previously set personal profile picture
38694
38749
  * (does not affect suggested profile pictures, to remove them
38695
- * simply delete the
38750
+ * simply deleted the
38696
38751
  * {@link RawMessageActionSuggestProfilePhoto} service message
38697
38752
  * with {@link messages.RawDeleteMessagesRequest}).
38698
38753
  */
@@ -43305,7 +43360,8 @@ export class RpcError extends Error {
43305
43360
  /**
43306
43361
  * The hashtag to search, without the <code>#</code> character.
43307
43362
  */
43308
- hashtag: string;
43363
+ hashtag?: string;
43364
+ query?: string;
43309
43365
  /**
43310
43366
  * Initially 0, then set to the
43311
43367
  * {@link messages.RawMessagesSlice}
@@ -43327,6 +43383,7 @@ export class RpcError extends Error {
43327
43383
  * pagination</a>
43328
43384
  */
43329
43385
  limit: number;
43386
+ allowPaidStars?: Long;
43330
43387
  }
43331
43388
  /**
43332
43389
  * RPC method returns {@link tl.TypeUpdates}
@@ -43353,6 +43410,13 @@ export class RpcError extends Error {
43353
43410
  channel: tl.TypeInputChannel;
43354
43411
  id: number;
43355
43412
  }
43413
+ /**
43414
+ * RPC method returns {@link tl.TypeSearchPostsFlood}
43415
+ */
43416
+ interface RawCheckSearchPostsFloodRequest {
43417
+ _: 'channels.checkSearchPostsFlood';
43418
+ query?: string;
43419
+ }
43356
43420
  interface RpcCallReturn {
43357
43421
  'channels.readHistory': boolean
43358
43422
  'channels.deleteMessages': tl.messages.TypeAffectedMessages
@@ -43418,6 +43482,7 @@ export class RpcError extends Error {
43418
43482
  'channels.updatePaidMessagesPrice': tl.TypeUpdates
43419
43483
  'channels.toggleAutotranslation': tl.TypeUpdates
43420
43484
  'channels.getMessageAuthor': tl.TypeUser
43485
+ 'channels.checkSearchPostsFlood': tl.TypeSearchPostsFlood
43421
43486
  }
43422
43487
  /**
43423
43488
  * Channel/supergroup participants
@@ -44154,6 +44219,13 @@ export class RpcError extends Error {
44154
44219
  counters?: tl.TypeStarGiftAttributeCounter[];
44155
44220
  users: tl.TypeUser[];
44156
44221
  }
44222
+ interface RawStarGiftCollectionsNotModified {
44223
+ _: 'payments.starGiftCollectionsNotModified';
44224
+ }
44225
+ interface RawStarGiftCollections {
44226
+ _: 'payments.starGiftCollections';
44227
+ collections: tl.TypeStarGiftCollection[];
44228
+ }
44157
44229
  /**
44158
44230
  * <a href="https://corefork.telegram.org/api/gifts">Gifts</a>
44159
44231
  * displayed on a user's profile.
@@ -44981,6 +45053,7 @@ export class RpcError extends Error {
44981
45053
  excludeUnique?: boolean;
44982
45054
  sortByValue?: boolean;
44983
45055
  peer: tl.TypeInputPeer;
45056
+ collectionId?: number;
44984
45057
  offset: string;
44985
45058
  /**
44986
45059
  * Maximum number of results to return,
@@ -45052,7 +45125,53 @@ export class RpcError extends Error {
45052
45125
  interface RawUpdateStarGiftPriceRequest {
45053
45126
  _: 'payments.updateStarGiftPrice';
45054
45127
  stargift: tl.TypeInputSavedStarGift;
45055
- resellStars: Long;
45128
+ resellAmount: tl.TypeStarsAmount;
45129
+ }
45130
+ /**
45131
+ * RPC method returns {@link tl.TypeStarGiftCollection}
45132
+ */
45133
+ interface RawCreateStarGiftCollectionRequest {
45134
+ _: 'payments.createStarGiftCollection';
45135
+ peer: tl.TypeInputPeer;
45136
+ title: string;
45137
+ stargift: tl.TypeInputSavedStarGift[];
45138
+ }
45139
+ /**
45140
+ * RPC method returns {@link tl.TypeStarGiftCollection}
45141
+ */
45142
+ interface RawUpdateStarGiftCollectionRequest {
45143
+ _: 'payments.updateStarGiftCollection';
45144
+ peer: tl.TypeInputPeer;
45145
+ collectionId: number;
45146
+ title?: string;
45147
+ deleteStargift?: tl.TypeInputSavedStarGift[];
45148
+ addStargift?: tl.TypeInputSavedStarGift[];
45149
+ order?: tl.TypeInputSavedStarGift[];
45150
+ }
45151
+ /**
45152
+ * RPC method returns boolean
45153
+ */
45154
+ interface RawReorderStarGiftCollectionsRequest {
45155
+ _: 'payments.reorderStarGiftCollections';
45156
+ peer: tl.TypeInputPeer;
45157
+ order: number[];
45158
+ }
45159
+ /**
45160
+ * RPC method returns boolean
45161
+ */
45162
+ interface RawDeleteStarGiftCollectionRequest {
45163
+ _: 'payments.deleteStarGiftCollection';
45164
+ peer: tl.TypeInputPeer;
45165
+ collectionId: number;
45166
+ }
45167
+ /**
45168
+ * RPC method returns
45169
+ * {@link tl.payments.TypeStarGiftCollections}
45170
+ */
45171
+ interface RawGetStarGiftCollectionsRequest {
45172
+ _: 'payments.getStarGiftCollections';
45173
+ peer: tl.TypeInputPeer;
45174
+ hash: Long;
45056
45175
  }
45057
45176
  /**
45058
45177
  * Checks whether Telegram Premium purchase is possible. Must
@@ -45132,6 +45251,11 @@ export class RpcError extends Error {
45132
45251
  'payments.canPurchaseStore': boolean
45133
45252
  'payments.getResaleStarGifts': tl.payments.TypeResaleStarGifts
45134
45253
  'payments.updateStarGiftPrice': tl.TypeUpdates
45254
+ 'payments.createStarGiftCollection': tl.TypeStarGiftCollection
45255
+ 'payments.updateStarGiftCollection': tl.TypeStarGiftCollection
45256
+ 'payments.reorderStarGiftCollections': boolean
45257
+ 'payments.deleteStarGiftCollection': boolean
45258
+ 'payments.getStarGiftCollections': tl.payments.TypeStarGiftCollections
45135
45259
  'payments.canPurchasePremium': boolean
45136
45260
  'payments.getUserStarGifts': tl.payments.TypeUserStarGifts
45137
45261
  }
@@ -45247,6 +45371,8 @@ export class RpcError extends Error {
45247
45371
  function isAnyStarGiftWithdrawalUrl(o: object): o is TypeStarGiftWithdrawalUrl
45248
45372
  type TypeResaleStarGifts = tl.payments.RawResaleStarGifts
45249
45373
  function isAnyResaleStarGifts(o: object): o is TypeResaleStarGifts
45374
+ type TypeStarGiftCollections = tl.payments.RawStarGiftCollectionsNotModified | tl.payments.RawStarGiftCollections
45375
+ function isAnyStarGiftCollections(o: object): o is TypeStarGiftCollections
45250
45376
  /**
45251
45377
  * <a href="https://corefork.telegram.org/api/gifts">Gifts</a>
45252
45378
  * displayed on a user's profile.
@@ -48494,6 +48620,14 @@ export class RpcError extends Error {
48494
48620
  _: 'stories.canSendStoryCount';
48495
48621
  countRemains: number;
48496
48622
  }
48623
+ interface RawAlbumsNotModified {
48624
+ _: 'stories.albumsNotModified';
48625
+ }
48626
+ interface RawAlbums {
48627
+ _: 'stories.albums';
48628
+ hash: Long;
48629
+ albums: tl.TypeStoryAlbum[];
48630
+ }
48497
48631
  /**
48498
48632
  * Check whether we can post stories as the specified peer.
48499
48633
  *
@@ -48590,6 +48724,7 @@ export class RpcError extends Error {
48590
48724
  * <code>fwd_from_id</code>.
48591
48725
  */
48592
48726
  fwdFromStory?: number;
48727
+ albums?: number[];
48593
48728
  }
48594
48729
  /**
48595
48730
  * Edit an uploaded
@@ -49177,6 +49312,61 @@ export class RpcError extends Error {
49177
49312
  */
49178
49313
  limit: number;
49179
49314
  }
49315
+ /**
49316
+ * RPC method returns {@link tl.TypeStoryAlbum}
49317
+ */
49318
+ interface RawCreateAlbumRequest {
49319
+ _: 'stories.createAlbum';
49320
+ peer: tl.TypeInputPeer;
49321
+ title: string;
49322
+ stories: number[];
49323
+ }
49324
+ /**
49325
+ * RPC method returns {@link tl.TypeStoryAlbum}
49326
+ */
49327
+ interface RawUpdateAlbumRequest {
49328
+ _: 'stories.updateAlbum';
49329
+ peer: tl.TypeInputPeer;
49330
+ albumId: number;
49331
+ title?: string;
49332
+ deleteStories?: number[];
49333
+ addStories?: number[];
49334
+ order?: number[];
49335
+ }
49336
+ /**
49337
+ * RPC method returns boolean
49338
+ */
49339
+ interface RawReorderAlbumsRequest {
49340
+ _: 'stories.reorderAlbums';
49341
+ peer: tl.TypeInputPeer;
49342
+ order: number[];
49343
+ }
49344
+ /**
49345
+ * RPC method returns boolean
49346
+ */
49347
+ interface RawDeleteAlbumRequest {
49348
+ _: 'stories.deleteAlbum';
49349
+ peer: tl.TypeInputPeer;
49350
+ albumId: number;
49351
+ }
49352
+ /**
49353
+ * RPC method returns {@link tl.stories.TypeAlbums}
49354
+ */
49355
+ interface RawGetAlbumsRequest {
49356
+ _: 'stories.getAlbums';
49357
+ peer: tl.TypeInputPeer;
49358
+ hash: Long;
49359
+ }
49360
+ /**
49361
+ * RPC method returns {@link tl.stories.TypeStories}
49362
+ */
49363
+ interface RawGetAlbumStoriesRequest {
49364
+ _: 'stories.getAlbumStories';
49365
+ peer: tl.TypeInputPeer;
49366
+ albumId: number;
49367
+ offset: number;
49368
+ limit: number;
49369
+ }
49180
49370
  interface RpcCallReturn {
49181
49371
  'stories.canSendStory': tl.stories.TypeCanSendStoryCount
49182
49372
  'stories.sendStory': tl.TypeUpdates
@@ -49204,6 +49394,12 @@ export class RpcError extends Error {
49204
49394
  'stories.getStoryReactionsList': tl.stories.TypeStoryReactionsList
49205
49395
  'stories.togglePinnedToTop': boolean
49206
49396
  'stories.searchPosts': tl.stories.TypeFoundStories
49397
+ 'stories.createAlbum': tl.TypeStoryAlbum
49398
+ 'stories.updateAlbum': tl.TypeStoryAlbum
49399
+ 'stories.reorderAlbums': boolean
49400
+ 'stories.deleteAlbum': boolean
49401
+ 'stories.getAlbums': tl.stories.TypeAlbums
49402
+ 'stories.getAlbumStories': tl.stories.TypeStories
49207
49403
  }
49208
49404
  /**
49209
49405
  * Full list of active (or active and hidden)
@@ -49250,6 +49446,8 @@ export class RpcError extends Error {
49250
49446
  function isAnyFoundStories(o: object): o is TypeFoundStories
49251
49447
  type TypeCanSendStoryCount = tl.stories.RawCanSendStoryCount
49252
49448
  function isAnyCanSendStoryCount(o: object): o is TypeCanSendStoryCount
49449
+ type TypeAlbums = tl.stories.RawAlbumsNotModified | tl.stories.RawAlbums
49450
+ function isAnyAlbums(o: object): o is TypeAlbums
49253
49451
  }
49254
49452
 
49255
49453
  namespace premium {
@@ -50610,6 +50808,18 @@ export class RpcError extends Error {
50610
50808
  | tl.smsjobs.RawFinishJobRequest
50611
50809
  | tl.fragment.RawGetCollectibleInfoRequest
50612
50810
  | tl.messages.RawToggleSuggestedPostApprovalRequest
50811
+ | tl.channels.RawCheckSearchPostsFloodRequest
50812
+ | tl.payments.RawCreateStarGiftCollectionRequest
50813
+ | tl.payments.RawUpdateStarGiftCollectionRequest
50814
+ | tl.payments.RawReorderStarGiftCollectionsRequest
50815
+ | tl.payments.RawDeleteStarGiftCollectionRequest
50816
+ | tl.payments.RawGetStarGiftCollectionsRequest
50817
+ | tl.stories.RawCreateAlbumRequest
50818
+ | tl.stories.RawUpdateAlbumRequest
50819
+ | tl.stories.RawReorderAlbumsRequest
50820
+ | tl.stories.RawDeleteAlbumRequest
50821
+ | tl.stories.RawGetAlbumsRequest
50822
+ | tl.stories.RawGetAlbumStoriesRequest
50613
50823
  | tl.users.RawGetIsPremiumRequiredToContactRequest
50614
50824
  | tl.payments.RawCanPurchasePremiumRequest
50615
50825
  | tl.payments.RawGetUserStarGiftsRequest
@@ -52071,8 +52281,17 @@ export class RpcError extends Error {
52071
52281
  | tl.RawMessageActionSuggestedPostRefund
52072
52282
  | tl.RawMessageActionGiftTon
52073
52283
  | tl.RawInputStickerSetTonGifts
52284
+ | tl.RawWebPageAttributeStarGiftCollection
52074
52285
  | tl.RawStarsTonAmount
52075
52286
  | tl.RawSuggestedPost
52287
+ | tl.RawStarsRating
52288
+ | tl.RawStarGiftCollection
52289
+ | tl.payments.RawStarGiftCollectionsNotModified
52290
+ | tl.payments.RawStarGiftCollections
52291
+ | tl.RawStoryAlbum
52292
+ | tl.stories.RawAlbumsNotModified
52293
+ | tl.stories.RawAlbums
52294
+ | tl.RawSearchPostsFlood
52076
52295
  | tl.RawPremiumGiftOption
52077
52296
  | tl.RawEmojiStatusUntil
52078
52297
  | tl.RawUserStarGift
@@ -52795,6 +53014,18 @@ export class RpcError extends Error {
52795
53014
  | tl.smsjobs.RawFinishJobRequest
52796
53015
  | tl.fragment.RawGetCollectibleInfoRequest
52797
53016
  | tl.messages.RawToggleSuggestedPostApprovalRequest
53017
+ | tl.channels.RawCheckSearchPostsFloodRequest
53018
+ | tl.payments.RawCreateStarGiftCollectionRequest
53019
+ | tl.payments.RawUpdateStarGiftCollectionRequest
53020
+ | tl.payments.RawReorderStarGiftCollectionsRequest
53021
+ | tl.payments.RawDeleteStarGiftCollectionRequest
53022
+ | tl.payments.RawGetStarGiftCollectionsRequest
53023
+ | tl.stories.RawCreateAlbumRequest
53024
+ | tl.stories.RawUpdateAlbumRequest
53025
+ | tl.stories.RawReorderAlbumsRequest
53026
+ | tl.stories.RawDeleteAlbumRequest
53027
+ | tl.stories.RawGetAlbumsRequest
53028
+ | tl.stories.RawGetAlbumStoriesRequest
52798
53029
  | tl.users.RawGetIsPremiumRequiredToContactRequest
52799
53030
  | tl.payments.RawCanPurchasePremiumRequest
52800
53031
  | tl.payments.RawGetUserStarGiftsRequest