Skip to content

Commit 5e4961a

Browse files
authored
Update API Scheme to Layer 202, from TDLib
1 parent af9de6e commit 5e4961a

File tree

4 files changed

+39
-29
lines changed

4 files changed

+39
-29
lines changed

.github/workflows/build-docs.yml

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ on:
44
tags:
55
- '*'
66
workflow_dispatch: {}
7+
permissions:
8+
contents: write
79
jobs:
810
build:
911
name: build-doc
@@ -24,17 +26,11 @@ jobs:
2426
python -m pip install --upgrade pip
2527
curl -sL ${TG_KAPG_DOCS_PBURL} | bash
2628
make
27-
rm -rf \
28-
.github Pyrogram* pyrogram* tests \
29-
.gitignore COPYING* MANIFEST* Makefile NOTICE \
30-
README.md pyproject.toml hatch_build.py setup.py \
31-
venv __pycache__ compiler
32-
mv docs/build/html/* .
33-
rm -rf docs
34-
touch .nojekyll
35-
git checkout --orphan gh-pages
36-
git config user.email "[email protected]"
37-
git config user.name "GitHub Action <Dan>"
38-
git add . -A
39-
git commit -m "DocGen: Update documentation"
40-
git push origin gh-pages --force
29+
30+
- uses: peaceiris/actions-gh-pages@v4
31+
with:
32+
github_token: ${{ secrets.GITHUB_TOKEN }}
33+
publish_dir: ./docs/build/html
34+
publish_branch: gh-pages
35+
user_name: 'github-actions[bot]'
36+
user_email: 'github-actions[bot]@users.noreply.github.com'

compiler/api/source/main_api.tl

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
// https://github.com/telegramdesktop/tdesktop/blob/dev/Telegram/SourceFiles/mtproto/scheme/api.tl
2-
// https://github.com/tdlib/td/blob/master/td/generate/scheme/telegram_api.tl
3-
// https://github.com/Ajaxy/telegram-tt/blob/master/src/lib/gramjs/tl/static/api.tl
4-
51
///////////////////////////////
62
/////////////////// Layer cons
73
///////////////////////////////
@@ -40,6 +36,7 @@ double ? = Double;
4036
string ? = String;
4137

4238
bytes = Bytes;
39+
int256 = Int256;
4340

4441
// boolFalse#bc799737 = Bool; // Parsed manually
4542
// boolTrue#997275b5 = Bool; // Parsed manually
@@ -238,6 +235,7 @@ messageActionStarGift#4717e8a4 flags:# name_hidden:flags.0?true saved:flags.2?tr
238235
messageActionStarGiftUnique#acdfcb81 flags:# upgrade:flags.0?true transferred:flags.1?true saved:flags.2?true refunded:flags.5?true gift:StarGift can_export_at:flags.3?int transfer_stars:flags.4?long from_id:flags.6?Peer peer:flags.7?Peer saved_id:flags.7?long = MessageAction;
239236
messageActionPaidMessagesRefunded#ac1f1fcd count:int stars:long = MessageAction;
240237
messageActionPaidMessagesPrice#bcd71419 stars:long = MessageAction;
238+
messageActionConferenceCall#2ffe2f7a flags:# missed:flags.0?true active:flags.1?true video:flags.4?true call_id:long duration:flags.2?int other_participants:flags.3?Vector<Peer> = MessageAction;
241239

242240
dialog#d58a08c6 flags:# pinned:flags.2?true unread_mark:flags.3?true view_forum_as_messages:flags.6?true peer:Peer top_message:int read_inbox_max_id:int read_outbox_max_id:int unread_count:int unread_mentions_count:int unread_reactions_count:int notify_settings:PeerNotifySettings pts:flags.0?int draft:flags.1?DraftMessage folder_id:flags.4?int ttl_period:flags.5?int = Dialog;
243241
dialogFolder#71bd134c flags:# pinned:flags.2?true folder:Folder peer:Peer top_message:int unread_muted_peers_count:int unread_unmuted_peers_count:int unread_muted_messages_count:int unread_unmuted_messages_count:int = Dialog;
@@ -482,6 +480,7 @@ updateStarsRevenueStatus#a584b019 peer:Peer status:StarsRevenueStatus = Update;
482480
updateBotPurchasedPaidMedia#283bd312 user_id:long payload:string qts:int = Update;
483481
updatePaidReactionPrivacy#8b725fce private:PaidReactionPrivacy = Update;
484482
updateSentPhoneCode#504aa18f sent_code:auth.SentCode = Update;
483+
updateGroupCallChainBlocks#a477288f call:InputGroupCall sub_chain_id:int blocks:Vector<bytes> next_offset:int = Update;
485484

486485
updates.state#a56c2a3e pts:int qts:int date:int seq:int unread_count:int = updates.State;
487486

@@ -952,6 +951,7 @@ phoneCallDiscardReasonMissed#85e42301 = PhoneCallDiscardReason;
952951
phoneCallDiscardReasonDisconnect#e095c1a0 = PhoneCallDiscardReason;
953952
phoneCallDiscardReasonHangup#57adc690 = PhoneCallDiscardReason;
954953
phoneCallDiscardReasonBusy#faf7e8c9 = PhoneCallDiscardReason;
954+
phoneCallDiscardReasonMigrateConferenceCall#9fbbf1f7 slug:string = PhoneCallDiscardReason;
955955

956956
dataJSON#7d748d04 data:string = DataJSON;
957957

@@ -1006,11 +1006,11 @@ inputStickerSetItem#32da9e9c flags:# document:InputDocument emoji:string mask_co
10061006
inputPhoneCall#1e36fded id:long access_hash:long = InputPhoneCall;
10071007

10081008
phoneCallEmpty#5366c915 id:long = PhoneCall;
1009-
phoneCallWaiting#eed42858 flags:# video:flags.6?true id:long access_hash:long date:int admin_id:long participant_id:long protocol:PhoneCallProtocol receive_date:flags.0?int conference_call:flags.8?InputGroupCall = PhoneCall;
1010-
phoneCallRequested#45361c63 flags:# video:flags.6?true id:long access_hash:long date:int admin_id:long participant_id:long g_a_hash:bytes protocol:PhoneCallProtocol conference_call:flags.8?InputGroupCall = PhoneCall;
1011-
phoneCallAccepted#22fd7181 flags:# video:flags.6?true id:long access_hash:long date:int admin_id:long participant_id:long g_b:bytes protocol:PhoneCallProtocol conference_call:flags.8?InputGroupCall = PhoneCall;
1012-
phoneCall#3ba5940c flags:# p2p_allowed:flags.5?true video:flags.6?true id:long access_hash:long date:int admin_id:long participant_id:long g_a_or_b:bytes key_fingerprint:long protocol:PhoneCallProtocol connections:Vector<PhoneConnection> start_date:int custom_parameters:flags.7?DataJSON conference_call:flags.8?InputGroupCall = PhoneCall;
1013-
phoneCallDiscarded#f9d25503 flags:# need_rating:flags.2?true need_debug:flags.3?true video:flags.6?true id:long reason:flags.0?PhoneCallDiscardReason duration:flags.1?int conference_call:flags.8?InputGroupCall = PhoneCall;
1009+
phoneCallWaiting#c5226f17 flags:# video:flags.6?true id:long access_hash:long date:int admin_id:long participant_id:long protocol:PhoneCallProtocol receive_date:flags.0?int = PhoneCall;
1010+
phoneCallRequested#14b0ed0c flags:# video:flags.6?true id:long access_hash:long date:int admin_id:long participant_id:long g_a_hash:bytes protocol:PhoneCallProtocol = PhoneCall;
1011+
phoneCallAccepted#3660c311 flags:# video:flags.6?true id:long access_hash:long date:int admin_id:long participant_id:long g_b:bytes protocol:PhoneCallProtocol = PhoneCall;
1012+
phoneCall#30535af5 flags:# p2p_allowed:flags.5?true video:flags.6?true conference_supported:flags.8?true id:long access_hash:long date:int admin_id:long participant_id:long g_a_or_b:bytes key_fingerprint:long protocol:PhoneCallProtocol connections:Vector<PhoneConnection> start_date:int custom_parameters:flags.7?DataJSON = PhoneCall;
1013+
phoneCallDiscarded#50ca4de1 flags:# need_rating:flags.2?true need_debug:flags.3?true video:flags.6?true id:long reason:flags.0?PhoneCallDiscardReason duration:flags.1?int = PhoneCall;
10141014

10151015
phoneConnection#9cc123c7 flags:# tcp:flags.0?true id:long ip:string ipv6:string port:int peer_tag:bytes = PhoneConnection;
10161016
phoneConnectionWebrtc#635fe375 flags:# turn:flags.0?true stun:flags.1?true id:long ip:string ipv6:string port:int username:string password:string = PhoneConnection;
@@ -1390,9 +1390,11 @@ peerBlocked#e8fd8014 peer_id:Peer date:int = PeerBlocked;
13901390
stats.messageStats#7fe91c14 views_graph:StatsGraph reactions_by_emotion_graph:StatsGraph = stats.MessageStats;
13911391

13921392
groupCallDiscarded#7780bcb4 id:long access_hash:long duration:int = GroupCall;
1393-
groupCall#cdf8d3e3 flags:# join_muted:flags.1?true can_change_join_muted:flags.2?true join_date_asc:flags.6?true schedule_start_subscribed:flags.8?true can_start_video:flags.9?true record_video_active:flags.11?true rtmp_stream:flags.12?true listeners_hidden:flags.13?true id:long access_hash:long participants_count:int title:flags.3?string stream_dc_id:flags.4?int record_start_date:flags.5?int schedule_date:flags.7?int unmuted_video_count:flags.10?int unmuted_video_limit:int version:int conference_from_call:flags.14?long = GroupCall;
1393+
groupCall#553b0ba1 flags:# join_muted:flags.1?true can_change_join_muted:flags.2?true join_date_asc:flags.6?true schedule_start_subscribed:flags.8?true can_start_video:flags.9?true record_video_active:flags.11?true rtmp_stream:flags.12?true listeners_hidden:flags.13?true conference:flags.14?true creator:flags.15?true id:long access_hash:long participants_count:int title:flags.3?string stream_dc_id:flags.4?int record_start_date:flags.5?int schedule_date:flags.7?int unmuted_video_count:flags.10?int unmuted_video_limit:int version:int invite_link:flags.16?string = GroupCall;
13941394

13951395
inputGroupCall#d8aa840f id:long access_hash:long = InputGroupCall;
1396+
inputGroupCallSlug#fe06823f slug:string = InputGroupCall;
1397+
inputGroupCallInviteMessage#8c10603f msg_id:int = InputGroupCall;
13961398

13971399
groupCallParticipant#eba636fe flags:# muted:flags.0?true left:flags.1?true can_self_unmute:flags.2?true just_joined:flags.4?true versioned:flags.5?true min:flags.8?true muted_by_you:flags.9?true volume_by_admin:flags.10?true self:flags.12?true video_joined:flags.15?true peer:Peer date:int active_date:flags.3?int source:int volume:flags.7?int about:flags.11?string raise_hand_rating:flags.13?long video:flags.6?GroupCallParticipantVideo presentation:flags.14?GroupCallParticipantVideo = GroupCallParticipant;
13981400

@@ -2624,7 +2626,7 @@ stickers.deleteStickerSet#87704394 stickerset:InputStickerSet = Bool;
26242626
stickers.replaceSticker#4696459a sticker:InputDocument new_sticker:InputStickerSetItem = messages.StickerSet;
26252627

26262628
phone.getCallConfig#55451fa9 = DataJSON;
2627-
phone.requestCall#a6c4600c flags:# video:flags.0?true user_id:InputUser conference_call:flags.1?InputGroupCall random_id:int g_a_hash:bytes protocol:PhoneCallProtocol = phone.PhoneCall;
2629+
phone.requestCall#42ff96ed flags:# video:flags.0?true user_id:InputUser random_id:int g_a_hash:bytes protocol:PhoneCallProtocol = phone.PhoneCall;
26282630
phone.acceptCall#3bd2b4a0 peer:InputPhoneCall g_b:bytes protocol:PhoneCallProtocol = phone.PhoneCall;
26292631
phone.confirmCall#2efe1722 peer:InputPhoneCall g_a:bytes key_fingerprint:long protocol:PhoneCallProtocol = phone.PhoneCall;
26302632
phone.receivedCall#17d54f61 peer:InputPhoneCall = Bool;
@@ -2633,7 +2635,7 @@ phone.setCallRating#59ead627 flags:# user_initiative:flags.0?true peer:InputPhon
26332635
phone.saveCallDebug#277add7e peer:InputPhoneCall debug:DataJSON = Bool;
26342636
phone.sendSignalingData#ff7a9383 peer:InputPhoneCall data:bytes = Bool;
26352637
phone.createGroupCall#48cdc6d8 flags:# rtmp_stream:flags.2?true peer:InputPeer random_id:int title:flags.0?string schedule_date:flags.1?int = Updates;
2636-
phone.joinGroupCall#d61e1df3 flags:# muted:flags.0?true video_stopped:flags.2?true call:InputGroupCall join_as:InputPeer invite_hash:flags.1?string key_fingerprint:flags.3?long params:DataJSON = Updates;
2638+
phone.joinGroupCall#8fb53057 flags:# muted:flags.0?true video_stopped:flags.2?true call:InputGroupCall join_as:InputPeer invite_hash:flags.1?string public_key:flags.3?int256 block:flags.3?bytes params:DataJSON = Updates;
26372639
phone.leaveGroupCall#500377f9 call:InputGroupCall source:int = Updates;
26382640
phone.inviteToGroupCall#7b393160 call:InputGroupCall users:Vector<InputUser> = Updates;
26392641
phone.discardGroupCall#7a777135 call:InputGroupCall = Updates;
@@ -2654,7 +2656,12 @@ phone.leaveGroupCallPresentation#1c50d144 call:InputGroupCall = Updates;
26542656
phone.getGroupCallStreamChannels#1ab21940 call:InputGroupCall = phone.GroupCallStreamChannels;
26552657
phone.getGroupCallStreamRtmpUrl#deb3abbf peer:InputPeer revoke:Bool = phone.GroupCallStreamRtmpUrl;
26562658
phone.saveCallLog#41248786 peer:InputPhoneCall file:InputFile = Bool;
2657-
phone.createConferenceCall#dfc909ab peer:InputPhoneCall key_fingerprint:long = phone.PhoneCall;
2659+
phone.createConferenceCall#7d0444bb flags:# muted:flags.0?true video_stopped:flags.2?true join:flags.3?true random_id:int public_key:flags.3?int256 block:flags.3?bytes params:flags.3?DataJSON = Updates;
2660+
phone.deleteConferenceCallParticipants#8ca60525 flags:# only_left:flags.0?true kick:flags.1?true call:InputGroupCall ids:Vector<long> block:bytes = Updates;
2661+
phone.sendConferenceCallBroadcast#c6701900 call:InputGroupCall block:bytes = Updates;
2662+
phone.inviteConferenceCallParticipant#bcf22685 flags:# video:flags.0?true call:InputGroupCall user_id:InputUser = Updates;
2663+
phone.declineConferenceCallInvite#3c479971 msg_id:int = Updates;
2664+
phone.getGroupCallChainBlocks#ee9f88a6 call:InputGroupCall sub_chain_id:int offset:int limit:int = Updates;
26582665

26592666
langpack.getLangPack#f2f2330a lang_pack:string lang_code:string = LangPackDifference;
26602667
langpack.getStrings#efea3803 lang_pack:string lang_code:string keys:Vector<string> = Vector<LangPackString>;
@@ -2739,4 +2746,4 @@ fragment.getCollectibleInfo#be1e85ba collectible:InputCollectible = fragment.Col
27392746
// invokeWithApnsSecretPrefix#0dae54f8 nonce:string secret:string = Error;
27402747
// invokeWithReCaptchaPrefix#adbb0f94 token:string = Error;
27412748

2742-
// LAYER 201
2749+
// LAYER 202

docs/source/releases/changes-in-this-fork.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,18 @@ Breaking Changes in this Fork
2525
- PR `#115 <https://github.com/TelegramPlayGround/pyrogram/pull/115>`_ This `change <https://github.com/pyrogram/pyrogram/pull/966#issuecomment-1108858881>`_ breaks some usages with offset-naive and offset-aware datetimes.
2626
- PR from upstream: `#1411 <https://github.com/pyrogram/pyrogram/pull/1411>`_ without attribution.
2727
- If you relied on internal types like ``import pyrogram.file_id`` OR ``import pyrogram.utils``, Then read this full document to know where `else <https://t.me/PyrogramChat/42497>`_ your code will break.
28+
- :obj:`~pyrogram.types.InlineKeyboardButton` only accepts keyword arguments instead of positional arguments.
2829

2930

3031
Changes in this Fork
3132
=====================
3233

34+
+------------------------+
35+
| Scheme layer used: 202 |
36+
+------------------------+
37+
38+
- View `new and changed <https://telegramplayground.github.io/TG-APIs/TL/diff/tdlib.html?from=201&to=202>`__ `raw API methods <https://telegramplayground.github.io/TG-APIs/TL/diff/tdesktop.html?from=200&to=202>`__.
39+
3340
+------------------------+
3441
| Scheme layer used: 201 |
3542
+------------------------+

pyrogram/types/bots_and_keyboards/inline_keyboard_button.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ class InlineKeyboardButton(Object):
9292

9393
def __init__(
9494
self,
95-
text: str,
95+
text: str, *,
9696
url: Optional[str] = None,
9797
user_id: Optional[int] = None,
9898
callback_data: Optional[Union[str, bytes]] = None,

0 commit comments

Comments
 (0)