Skip to content

Commit fb77144

Browse files
committed
Merge branch 'layer-104' into develop
2 parents 0011d12 + 4b91466 commit fb77144

13 files changed

Lines changed: 822 additions & 149 deletions

File tree

compiler/api/source/main_api.tl

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// https://raw.githubusercontent.com/telegramdesktop/tdesktop/dev/Telegram/Resources/scheme.tl
1+
// https://github.com/telegramdesktop/tdesktop/blob/dev/Telegram/Resources/tl/api.tl
22

33
///////////////////////////////
44
///////// Main application API
@@ -101,11 +101,11 @@ userStatusLastMonth#77ebc742 = UserStatus;
101101
chatEmpty#9ba2d800 id:int = Chat;
102102
chat#3bda1bde flags:# creator:flags.0?true kicked:flags.1?true left:flags.2?true deactivated:flags.5?true id:int title:string photo:ChatPhoto participants_count:int date:int version:int migrated_to:flags.6?InputChannel admin_rights:flags.14?ChatAdminRights default_banned_rights:flags.18?ChatBannedRights = Chat;
103103
chatForbidden#7328bdb id:int title:string = Chat;
104-
channel#4df30834 flags:# creator:flags.0?true left:flags.2?true broadcast:flags.5?true verified:flags.7?true megagroup:flags.8?true restricted:flags.9?true signatures:flags.11?true min:flags.12?true scam:flags.19?true has_link:flags.20?true has_geo:flags.21?true id:int access_hash:flags.13?long title:string username:flags.6?string photo:ChatPhoto date:int version:int restriction_reason:flags.9?string admin_rights:flags.14?ChatAdminRights banned_rights:flags.15?ChatBannedRights default_banned_rights:flags.18?ChatBannedRights participants_count:flags.17?int = Chat;
104+
channel#4df30834 flags:# creator:flags.0?true left:flags.2?true broadcast:flags.5?true verified:flags.7?true megagroup:flags.8?true restricted:flags.9?true signatures:flags.11?true min:flags.12?true scam:flags.19?true has_link:flags.20?true has_geo:flags.21?true slowmode_enabled:flags.22?true id:int access_hash:flags.13?long title:string username:flags.6?string photo:ChatPhoto date:int version:int restriction_reason:flags.9?string admin_rights:flags.14?ChatAdminRights banned_rights:flags.15?ChatBannedRights default_banned_rights:flags.18?ChatBannedRights participants_count:flags.17?int = Chat;
105105
channelForbidden#289da732 flags:# broadcast:flags.5?true megagroup:flags.8?true id:int access_hash:long title:string until_date:flags.16?int = Chat;
106106

107107
chatFull#1b7c9db3 flags:# can_set_username:flags.7?true id:int about:string participants:ChatParticipants chat_photo:flags.2?Photo notify_settings:PeerNotifySettings exported_invite:ExportedChatInvite bot_info:flags.3?Vector<BotInfo> pinned_msg_id:flags.6?int folder_id:flags.11?int = ChatFull;
108-
channelFull#10916653 flags:# can_view_participants:flags.3?true can_set_username:flags.6?true can_set_stickers:flags.7?true hidden_prehistory:flags.10?true can_view_stats:flags.12?true can_set_location:flags.16?true id:int about:string participants_count:flags.0?int admins_count:flags.1?int kicked_count:flags.2?int banned_count:flags.2?int online_count:flags.13?int read_inbox_max_id:int read_outbox_max_id:int unread_count:int chat_photo:Photo notify_settings:PeerNotifySettings exported_invite:ExportedChatInvite bot_info:Vector<BotInfo> migrated_from_chat_id:flags.4?int migrated_from_max_id:flags.4?int pinned_msg_id:flags.5?int stickerset:flags.8?StickerSet available_min_id:flags.9?int folder_id:flags.11?int linked_chat_id:flags.14?int location:flags.15?ChannelLocation pts:int = ChatFull;
108+
channelFull#2d895c74 flags:# can_view_participants:flags.3?true can_set_username:flags.6?true can_set_stickers:flags.7?true hidden_prehistory:flags.10?true can_view_stats:flags.12?true can_set_location:flags.16?true id:int about:string participants_count:flags.0?int admins_count:flags.1?int kicked_count:flags.2?int banned_count:flags.2?int online_count:flags.13?int read_inbox_max_id:int read_outbox_max_id:int unread_count:int chat_photo:Photo notify_settings:PeerNotifySettings exported_invite:ExportedChatInvite bot_info:Vector<BotInfo> migrated_from_chat_id:flags.4?int migrated_from_max_id:flags.4?int pinned_msg_id:flags.5?int stickerset:flags.8?StickerSet available_min_id:flags.9?int folder_id:flags.11?int linked_chat_id:flags.14?int location:flags.15?ChannelLocation slowmode_seconds:flags.17?int slowmode_next_send_date:flags.18?int pts:int = ChatFull;
109109

110110
chatParticipant#c8d7493e user_id:int inviter_id:int date:int = ChatParticipant;
111111
chatParticipantCreator#da13538a user_id:int = ChatParticipant;
@@ -172,11 +172,10 @@ photoStrippedSize#e0b0bc2e type:string bytes:bytes = PhotoSize;
172172
geoPointEmpty#1117dd5f = GeoPoint;
173173
geoPoint#296f104 long:double lat:double access_hash:long = GeoPoint;
174174

175-
auth.checkedPhone#811ea28e phone_registered:Bool = auth.CheckedPhone;
176-
177-
auth.sentCode#38faab5f flags:# phone_registered:flags.0?true type:auth.SentCodeType phone_code_hash:string next_type:flags.1?auth.CodeType timeout:flags.2?int terms_of_service:flags.3?help.TermsOfService = auth.SentCode;
175+
auth.sentCode#5e002502 flags:# type:auth.SentCodeType phone_code_hash:string next_type:flags.1?auth.CodeType timeout:flags.2?int = auth.SentCode;
178176

179177
auth.authorization#cd050916 flags:# tmp_sessions:flags.0?int user:User = auth.Authorization;
178+
auth.authorizationSignUpRequired#44747e9a flags:# terms_of_service:flags.0?help.TermsOfService = auth.Authorization;
180179

181180
auth.exportedAuthorization#df969c2d id:int bytes:bytes = auth.ExportedAuthorization;
182181

@@ -353,7 +352,7 @@ config#330b4067 flags:# phonecalls_enabled:flags.1?true default_p2p_contacts:fla
353352

354353
nearestDc#8e1a1775 country:string this_dc:int nearest_dc:int = NearestDc;
355354

356-
help.appUpdate#1da7158f flags:# popup:flags.0?true id:int version:string text:string entities:Vector<MessageEntity> document:flags.1?Document url:flags.2?string = help.AppUpdate;
355+
help.appUpdate#1da7158f flags:# can_not_skip:flags.0?true id:int version:string text:string entities:Vector<MessageEntity> document:flags.1?Document url:flags.2?string = help.AppUpdate;
357356
help.noAppUpdate#c45a6536 = help.AppUpdate;
358357

359358
help.inviteText#18cb9f78 message:string = help.InviteText;
@@ -496,6 +495,7 @@ chatInvite#dfc2f58e flags:# channel:flags.0?true broadcast:flags.1?true public:f
496495
inputStickerSetEmpty#ffb62b95 = InputStickerSet;
497496
inputStickerSetID#9de7a269 id:long access_hash:long = InputStickerSet;
498497
inputStickerSetShortName#861cc8a0 short_name:string = InputStickerSet;
498+
inputStickerSetAnimatedEmoji#28703c8 = InputStickerSet;
499499

500500
stickerSet#eeb46f27 flags:# archived:flags.1?true official:flags.2?true masks:flags.3?true animated:flags.5?true installed_date:flags.0?int id:long access_hash:long title:string short_name:string thumb:flags.4?PhotoSize thumb_dc_id:flags.4?int count:int hash:int = StickerSet;
501501

@@ -559,8 +559,8 @@ channelMessagesFilter#cd77d957 flags:# exclude_new_messages:flags.1?true ranges:
559559

560560
channelParticipant#15ebac1d user_id:int date:int = ChannelParticipant;
561561
channelParticipantSelf#a3289a6d user_id:int inviter_id:int date:int = ChannelParticipant;
562-
channelParticipantCreator#e3e2e1f9 user_id:int = ChannelParticipant;
563-
channelParticipantAdmin#5daa6e23 flags:# can_edit:flags.0?true self:flags.1?true user_id:int inviter_id:flags.1?int promoted_by:int date:int admin_rights:ChatAdminRights = ChannelParticipant;
562+
channelParticipantCreator#808d15a4 flags:# user_id:int rank:flags.0?string = ChannelParticipant;
563+
channelParticipantAdmin#ccbebbaf flags:# can_edit:flags.0?true self:flags.1?true user_id:int inviter_id:flags.1?int promoted_by:int date:int admin_rights:ChatAdminRights rank:flags.2?string = ChannelParticipant;
564564
channelParticipantBanned#1c0facaf flags:# left:flags.0?true user_id:int kicked_by:int date:int banned_rights:ChatBannedRights = ChannelParticipant;
565565

566566
channelParticipantsRecent#de3f3c79 = ChannelParticipantsFilter;
@@ -761,7 +761,7 @@ payments.paymentForm#3f56aea3 flags:# can_save_credentials:flags.2?true password
761761
payments.validatedRequestedInfo#d1451883 flags:# id:flags.0?string shipping_options:flags.1?Vector<ShippingOption> = payments.ValidatedRequestedInfo;
762762

763763
payments.paymentResult#4e5f810d updates:Updates = payments.PaymentResult;
764-
payments.paymentVerficationNeeded#6b56b921 url:string = payments.PaymentResult;
764+
payments.paymentVerificationNeeded#d8411139 url:string = payments.PaymentResult;
765765

766766
payments.paymentReceipt#500911e1 flags:# date:int bot_id:int invoice:Invoice provider_id:int info:flags.0?PaymentRequestedInfo shipping:flags.1?ShippingOption currency:string total_amount:long credentials_title:string users:Vector<User> = payments.PaymentReceipt;
767767

@@ -828,6 +828,7 @@ channelAdminLogEventActionDefaultBannedRights#2df5fc0a prev_banned_rights:ChatBa
828828
channelAdminLogEventActionStopPoll#8f079643 message:Message = ChannelAdminLogEventAction;
829829
channelAdminLogEventActionChangeLinkedChat#a26f881b prev_value:int new_value:int = ChannelAdminLogEventAction;
830830
channelAdminLogEventActionChangeLocation#e6b76ae prev_value:ChannelLocation new_value:ChannelLocation = ChannelAdminLogEventAction;
831+
channelAdminLogEventActionToggleSlowMode#53909779 prev_value:int new_value:int = ChannelAdminLogEventAction;
831832

832833
channelAdminLogEvent#3b5a3e40 id:long date:int user_id:int action:ChannelAdminLogEventAction = ChannelAdminLogEvent;
833834

@@ -1003,7 +1004,7 @@ inputWallPaperSlug#72091c80 slug:string = InputWallPaper;
10031004
account.wallPapersNotModified#1c199183 = account.WallPapers;
10041005
account.wallPapers#702b65a9 hash:int wallpapers:Vector<WallPaper> = account.WallPapers;
10051006

1006-
codeSettings#302f59f3 flags:# allow_flashcall:flags.0?true current_number:flags.1?true app_hash_persistent:flags.2?true app_hash:flags.3?string = CodeSettings;
1007+
codeSettings#debebe83 flags:# allow_flashcall:flags.0?true current_number:flags.1?true allow_app_hash:flags.4?true = CodeSettings;
10071008

10081009
wallPaperSettings#a12f40b8 flags:# blur:flags.1?true motion:flags.2?true background_color:flags.0?int intensity:flags.3?int = WallPaperSettings;
10091010

@@ -1050,7 +1051,7 @@ invokeWithMessagesRange#365275f2 {X:Type} range:MessageRange query:!X = X;
10501051
invokeWithTakeout#aca9fd2e {X:Type} takeout_id:long query:!X = X;
10511052

10521053
auth.sendCode#a677244f phone_number:string api_id:int api_hash:string settings:CodeSettings = auth.SentCode;
1053-
auth.signUp#1b067634 phone_number:string phone_code_hash:string phone_code:string first_name:string last_name:string = auth.Authorization;
1054+
auth.signUp#80eee427 phone_number:string phone_code_hash:string first_name:string last_name:string = auth.Authorization;
10541055
auth.signIn#bcd51581 phone_number:string phone_code_hash:string phone_code:string = auth.Authorization;
10551056
auth.logOut#5717da40 = Bool;
10561057
auth.resetAuthorizations#9fab0d1a = Bool;
@@ -1269,7 +1270,7 @@ photos.deletePhotos#87cf7f2f id:Vector<InputPhoto> = Vector<long>;
12691270
photos.getUserPhotos#91cd32a8 user_id:InputUser offset:int max_id:long limit:int = photos.Photos;
12701271

12711272
upload.saveFilePart#b304a621 file_id:long file_part:int bytes:bytes = Bool;
1272-
upload.getFile#e3a6cfb5 location:InputFileLocation offset:int limit:int = upload.File;
1273+
upload.getFile#b15a9afc flags:# precise:flags.0?true location:InputFileLocation offset:int limit:int = upload.File;
12731274
upload.saveBigFilePart#de7b673d file_id:long file_part:int file_total_parts:int bytes:bytes = Bool;
12741275
upload.getWebFile#24e6818d location:InputWebFileLocation offset:int limit:int = upload.WebFile;
12751276
upload.getCdnFile#2000bcc3 file_token:bytes offset:int limit:int = upload.CdnFile;
@@ -1307,7 +1308,7 @@ channels.getParticipant#546dd7a6 channel:InputChannel user_id:InputUser = channe
13071308
channels.getChannels#a7f6bbb id:Vector<InputChannel> = messages.Chats;
13081309
channels.getFullChannel#8736a09 channel:InputChannel = messages.ChatFull;
13091310
channels.createChannel#3d5fb10f flags:# broadcast:flags.0?true megagroup:flags.1?true title:string about:string geo_point:flags.2?InputGeoPoint address:flags.2?string = Updates;
1310-
channels.editAdmin#70f893ba channel:InputChannel user_id:InputUser admin_rights:ChatAdminRights = Updates;
1311+
channels.editAdmin#d33c8902 channel:InputChannel user_id:InputUser admin_rights:ChatAdminRights rank:string = Updates;
13111312
channels.editTitle#566decd0 channel:InputChannel title:string = Updates;
13121313
channels.editPhoto#f12e57c9 channel:InputChannel photo:InputChatPhoto = Updates;
13131314
channels.checkUsername#10e6bd2c channel:InputChannel username:string = Bool;
@@ -1330,6 +1331,7 @@ channels.getGroupsForDiscussion#f5dad378 = messages.Chats;
13301331
channels.setDiscussionGroup#40582bb2 broadcast:InputChannel group:InputChannel = Bool;
13311332
channels.editCreator#8f38cd1f channel:InputChannel user_id:InputUser password:InputCheckPasswordSRP = Updates;
13321333
channels.editLocation#58e63f6d channel:InputChannel geo_point:InputGeoPoint address:string = Bool;
1334+
channels.toggleSlowMode#edd49ef0 channel:InputChannel seconds:int = Updates;
13331335

13341336
bots.sendCustomRequest#aa2769ed custom_method:string params:DataJSON = DataJSON;
13351337
bots.answerWebhookJSONQuery#e6213f4d query_id:long data:DataJSON = Bool;
@@ -1364,4 +1366,4 @@ langpack.getLanguage#6a596502 lang_pack:string lang_code:string = LangPackLangua
13641366
folders.editPeerFolders#6847d0ab folder_peers:Vector<InputFolderPeer> = Updates;
13651367
folders.deleteFolder#1c295881 folder_id:int = Updates;
13661368

1367-
// LAYER 103
1369+
// LAYER 104

compiler/docs/compiler.py

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,10 @@ def get_title_list(s: str) -> list:
128128
utilities="""
129129
Utilities
130130
start
131-
stop
132-
restart
133131
idle
132+
stop
134133
run
134+
restart
135135
add_handler
136136
remove_handler
137137
stop_transmission
@@ -249,6 +249,22 @@ def get_title_list(s: str) -> list:
249249
set_game_score
250250
get_game_high_scores
251251
""",
252+
authorization="""
253+
Authorization
254+
connect
255+
disconnect
256+
initialize
257+
terminate
258+
send_code
259+
resend_code
260+
sign_in
261+
sign_up
262+
get_password_hint
263+
check_password
264+
send_recovery_code
265+
recover_password
266+
accept_terms_of_service
267+
""",
252268
advanced="""
253269
Advanced
254270
send
@@ -349,6 +365,11 @@ def get_title_list(s: str) -> list:
349365
InputMessageContent
350366
InputMessageContent
351367
InputTextMessageContent
368+
""",
369+
authorization="""
370+
Authorization
371+
SentCode
372+
TermsOfService
352373
"""
353374
)
354375

compiler/docs/template/methods.rst

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,24 @@ Bots
106106

107107
{bots}
108108

109+
Authorization
110+
-------------
111+
112+
.. autosummary::
113+
:nosignatures:
114+
115+
{authorization}
116+
117+
.. toctree::
118+
:hidden:
119+
120+
{authorization}
121+
109122
Advanced
110123
--------
111124

112-
Learn more about these methods at :doc:`Advanced Usage <../../topics/advanced-usage>`.
125+
Methods used only when dealing with the raw Telegram API.
126+
Learn more about how to use the raw API at :doc:`Advanced Usage <../../topics/advanced-usage>`.
113127

114128
.. autosummary::
115129
:nosignatures:

compiler/docs/template/types.rst

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,4 +92,17 @@ InputMessageContent
9292
.. toctree::
9393
:hidden:
9494

95-
{input_message_content}
95+
{input_message_content}
96+
97+
Authorization
98+
-------------
99+
100+
.. autosummary::
101+
:nosignatures:
102+
103+
{authorization}
104+
105+
.. toctree::
106+
:hidden:
107+
108+
{authorization}

compiler/error/source/500_INTERNAL_SERVER_ERROR.tsv

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ WORKER_BUSY_TOO_LONG_RETRY Telegram is having internal problems. Please try agai
1010
INTERDC_X_CALL_ERROR Telegram is having internal problems at DC{x}. Please try again later
1111
INTERDC_X_CALL_RICH_ERROR Telegram is having internal problems at DC{x}. Please try again later
1212
FOLDER_DEAC_AUTOFIX_ALL Telegram is having internal problems. Please try again later
13-
MSGID_DECREASE_RETRY Telegram is having internal problems. Please try again later
13+
MSGID_DECREASE_RETRY Telegram is having internal problems. Please try again later
14+
MEMBER_OCCUPY_PRIMARY_LOC_FAILED Telegram is having internal problems. Please try again later

0 commit comments

Comments
 (0)