From 064ea94ca452109d837115dbe0dfae7ce28f31c4 Mon Sep 17 00:00:00 2001 From: Viktor Oreshkin Date: Sun, 2 Jul 2017 21:09:11 +0300 Subject: [PATCH] Add layer 020 --- l020/README.md | 5 ++++ l020/schema.json | 77 ++++++++++++++++++++++++++++++++++++++++++++++++ l020/schema.tl | 7 +++++ schema.json | 71 ++++++++++++++++++++++++++++++++++++++++++++ schema.tl | 5 ++++ 5 files changed, 165 insertions(+) create mode 100644 l020/README.md create mode 100644 l020/schema.json create mode 100644 l020/schema.tl diff --git a/l020/README.md b/l020/README.md new file mode 100644 index 0000000..8afa2f2 --- /dev/null +++ b/l020/README.md @@ -0,0 +1,5 @@ +### Version info +App|Version/Hash|Date +---|---|--- +TDesktop|27de201bda4457860fd922f4213c7b340bad05c4|03.12.14 +Webogram|7bc6e36ec6e955930cd0d1a7f2ebfe86b69b44c8|10.12.14 diff --git a/l020/schema.json b/l020/schema.json new file mode 100644 index 0000000..8e146b4 --- /dev/null +++ b/l020/schema.json @@ -0,0 +1,77 @@ +{ + "constructors": [ + { + "id": "-1527411636", + "predicate": "account.sentChangePhoneCode", + "params": [ + { + "name": "phone_code_hash", + "type": "string" + }, + { + "name": "send_call_timeout", + "type": "int" + } + ], + "type": "account.SentChangePhoneCode" + }, + { + "id": "314130811", + "predicate": "updateUserPhone", + "params": [ + { + "name": "user_id", + "type": "int" + }, + { + "name": "phone", + "type": "string" + } + ], + "type": "Update" + } + ], + "methods": [ + { + "id": "200282908", + "method": "contacts.resolveUsername", + "params": [ + { + "name": "username", + "type": "string" + } + ], + "type": "User" + }, + { + "id": "-1543001868", + "method": "account.sendChangePhoneCode", + "params": [ + { + "name": "phone_number", + "type": "string" + } + ], + "type": "account.SentChangePhoneCode" + }, + { + "id": "1891839707", + "method": "account.changePhone", + "params": [ + { + "name": "phone_number", + "type": "string" + }, + { + "name": "phone_code_hash", + "type": "string" + }, + { + "name": "phone_code", + "type": "string" + } + ], + "type": "User" + } + ] +} \ No newline at end of file diff --git a/l020/schema.tl b/l020/schema.tl new file mode 100644 index 0000000..0450b62 --- /dev/null +++ b/l020/schema.tl @@ -0,0 +1,7 @@ +---types--- +account.sentChangePhoneCode#a4f58c4c phone_code_hash:string send_call_timeout:int = account.SentChangePhoneCode; +updateUserPhone#12b9417b user_id:int phone:string = Update; +---functions--- +contacts.resolveUsername#bf0131c username:string = User; +account.sendChangePhoneCode#a407a8f4 phone_number:string = account.SentChangePhoneCode; +account.changePhone#70c32edb phone_number:string phone_code_hash:string phone_code:string = User; diff --git a/schema.json b/schema.json index ff27254..415dc13 100644 --- a/schema.json +++ b/schema.json @@ -4456,6 +4456,36 @@ } ], "type": "AccountDaysTTL" + }, + { + "id": "-1527411636", + "predicate": "account.sentChangePhoneCode", + "params": [ + { + "name": "phone_code_hash", + "type": "string" + }, + { + "name": "send_call_timeout", + "type": "int" + } + ], + "type": "account.SentChangePhoneCode" + }, + { + "id": "314130811", + "predicate": "updateUserPhone", + "params": [ + { + "name": "user_id", + "type": "int" + }, + { + "name": "phone", + "type": "string" + } + ], + "type": "Update" } ], "methods": [ @@ -6066,6 +6096,47 @@ } ], "type": "X" + }, + { + "id": "200282908", + "method": "contacts.resolveUsername", + "params": [ + { + "name": "username", + "type": "string" + } + ], + "type": "User" + }, + { + "id": "-1543001868", + "method": "account.sendChangePhoneCode", + "params": [ + { + "name": "phone_number", + "type": "string" + } + ], + "type": "account.SentChangePhoneCode" + }, + { + "id": "1891839707", + "method": "account.changePhone", + "params": [ + { + "name": "phone_number", + "type": "string" + }, + { + "name": "phone_code_hash", + "type": "string" + }, + { + "name": "phone_code", + "type": "string" + } + ], + "type": "User" } ] } \ No newline at end of file diff --git a/schema.tl b/schema.tl index 04da211..9406a86 100644 --- a/schema.tl +++ b/schema.tl @@ -290,6 +290,8 @@ privacyValueDisallowAll#8b73e763 = PrivacyRule; privacyValueDisallowUsers#c7f49b7 users:Vector = PrivacyRule; account.privacyRules#554abb6f rules:Vector users:Vector = account.PrivacyRules; accountDaysTTL#b8d0afdf days:int = AccountDaysTTL; +account.sentChangePhoneCode#a4f58c4c phone_code_hash:string send_call_timeout:int = account.SentChangePhoneCode; +updateUserPhone#12b9417b user_id:int phone:string = Update; ---functions--- invokeAfterMsg#cb9f372d msg_id:long query:!X = X; invokeAfterMsgs#3dc4b4f0 msg_ids:Vector query:!X = X; @@ -396,3 +398,6 @@ account.deleteAccount#418d4e0b reason:string = Bool; account.getAccountTTL#8fc711d = AccountDaysTTL; account.setAccountTTL#2442485e ttl:AccountDaysTTL = Bool; invokeWithLayer#da9b0d0d layer:int query:!X = X; +contacts.resolveUsername#bf0131c username:string = User; +account.sendChangePhoneCode#a407a8f4 phone_number:string = account.SentChangePhoneCode; +account.changePhone#70c32edb phone_number:string phone_code_hash:string phone_code:string = User;