Update API

This commit is contained in:
Ali
2021-10-06 01:53:40 +04:00
parent bd8537160a
commit bdc16164cb
2 changed files with 92 additions and 23 deletions

View File

@@ -291,7 +291,7 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = {
dict[-592373577] = { return Api.GroupCallParticipantVideoSourceGroup.parse_groupCallParticipantVideoSourceGroup($0) }
dict[-373643672] = { return Api.FolderPeer.parse_folderPeer($0) }
dict[-1072953408] = { return Api.ChannelParticipant.parse_channelParticipant($0) }
dict[682146919] = { return Api.ChannelParticipant.parse_channelParticipantSelf($0) }
dict[900251559] = { return Api.ChannelParticipant.parse_channelParticipantSelf($0) }
dict[803602899] = { return Api.ChannelParticipant.parse_channelParticipantCreator($0) }
dict[885242707] = { return Api.ChannelParticipant.parse_channelParticipantAdmin($0) }
dict[1844969806] = { return Api.ChannelParticipant.parse_channelParticipantBanned($0) }
@@ -472,6 +472,7 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = {
dict[-1271602504] = { return Api.auth.ExportedAuthorization.parse_exportedAuthorization($0) }
dict[2103482845] = { return Api.SecurePlainData.parse_securePlainPhone($0) }
dict[569137759] = { return Api.SecurePlainData.parse_securePlainEmail($0) }
dict[2137295719] = { return Api.SearchResultsPosition.parse_searchResultPosition($0) }
dict[-1269012015] = { return Api.messages.AffectedHistory.parse_affectedHistory($0) }
dict[1244130093] = { return Api.StatsGraph.parse_statsGraphAsync($0) }
dict[-1092839390] = { return Api.StatsGraph.parse_statsGraphError($0) }
@@ -562,6 +563,7 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = {
dict[-1078612597] = { return Api.ChannelLocation.parse_channelLocationEmpty($0) }
dict[547062491] = { return Api.ChannelLocation.parse_channelLocation($0) }
dict[182649427] = { return Api.MessageRange.parse_messageRange($0) }
dict[1404185519] = { return Api.messages.SearchResultsPositions.parse_searchResultsPositions($0) }
dict[946083368] = { return Api.messages.StickerSetInstallResult.parse_stickerSetInstallResultSuccess($0) }
dict[904138920] = { return Api.messages.StickerSetInstallResult.parse_stickerSetInstallResultArchive($0) }
dict[-478701471] = { return Api.account.ResetPasswordResult.parse_resetPasswordFailedWait($0) }
@@ -578,7 +580,7 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = {
dict[-1032140601] = { return Api.BotCommand.parse_botCommand($0) }
dict[1474462241] = { return Api.account.ContentSettings.parse_contentSettings($0) }
dict[-193506890] = { return Api.phone.GroupParticipants.parse_groupParticipants($0) }
dict[-1574303204] = { return Api.ChatInviteImporter.parse_chatInviteImporter($0) }
dict[-1940201511] = { return Api.ChatInviteImporter.parse_chatInviteImporter($0) }
dict[-2066640507] = { return Api.messages.AffectedMessages.parse_affectedMessages($0) }
dict[-402498398] = { return Api.messages.SavedGifs.parse_savedGifsNotModified($0) }
dict[-2069878259] = { return Api.messages.SavedGifs.parse_savedGifs($0) }
@@ -854,6 +856,7 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = {
dict[-1441072131] = { return Api.MessageAction.parse_messageActionSetMessagesTTL($0) }
dict[-1281329567] = { return Api.MessageAction.parse_messageActionGroupCallScheduled($0) }
dict[-1434950843] = { return Api.MessageAction.parse_messageActionSetChatTheme($0) }
dict[-339958837] = { return Api.MessageAction.parse_messageActionChatJoinedByRequest($0) }
dict[1399245077] = { return Api.PhoneCall.parse_phoneCallEmpty($0) }
dict[-987599081] = { return Api.PhoneCall.parse_phoneCallWaiting($0) }
dict[347139340] = { return Api.PhoneCall.parse_phoneCallRequested($0) }
@@ -1235,6 +1238,8 @@ public struct Api {
_1.serialize(buffer, boxed)
case let _1 as Api.SecurePlainData:
_1.serialize(buffer, boxed)
case let _1 as Api.SearchResultsPosition:
_1.serialize(buffer, boxed)
case let _1 as Api.messages.AffectedHistory:
_1.serialize(buffer, boxed)
case let _1 as Api.StatsGraph:
@@ -1335,6 +1340,8 @@ public struct Api {
_1.serialize(buffer, boxed)
case let _1 as Api.MessageRange:
_1.serialize(buffer, boxed)
case let _1 as Api.messages.SearchResultsPositions:
_1.serialize(buffer, boxed)
case let _1 as Api.messages.StickerSetInstallResult:
_1.serialize(buffer, boxed)
case let _1 as Api.account.ResetPasswordResult:

View File

@@ -7617,7 +7617,7 @@ public extension Api {
}
public enum ChannelParticipant: TypeConstructorDescription {
case channelParticipant(userId: Int64, date: Int32)
case channelParticipantSelf(userId: Int64, inviterId: Int64, date: Int32)
case channelParticipantSelf(flags: Int32, userId: Int64, inviterId: Int64, date: Int32)
case channelParticipantCreator(flags: Int32, userId: Int64, adminRights: Api.ChatAdminRights, rank: String?)
case channelParticipantAdmin(flags: Int32, userId: Int64, inviterId: Int64?, promotedBy: Int64, date: Int32, adminRights: Api.ChatAdminRights, rank: String?)
case channelParticipantBanned(flags: Int32, peer: Api.Peer, kickedBy: Int64, date: Int32, bannedRights: Api.ChatBannedRights)
@@ -7632,10 +7632,11 @@ public extension Api {
serializeInt64(userId, buffer: buffer, boxed: false)
serializeInt32(date, buffer: buffer, boxed: false)
break
case .channelParticipantSelf(let userId, let inviterId, let date):
case .channelParticipantSelf(let flags, let userId, let inviterId, let date):
if boxed {
buffer.appendInt32(682146919)
buffer.appendInt32(900251559)
}
serializeInt32(flags, buffer: buffer, boxed: false)
serializeInt64(userId, buffer: buffer, boxed: false)
serializeInt64(inviterId, buffer: buffer, boxed: false)
serializeInt32(date, buffer: buffer, boxed: false)
@@ -7684,8 +7685,8 @@ public extension Api {
switch self {
case .channelParticipant(let userId, let date):
return ("channelParticipant", [("userId", userId), ("date", date)])
case .channelParticipantSelf(let userId, let inviterId, let date):
return ("channelParticipantSelf", [("userId", userId), ("inviterId", inviterId), ("date", date)])
case .channelParticipantSelf(let flags, let userId, let inviterId, let date):
return ("channelParticipantSelf", [("flags", flags), ("userId", userId), ("inviterId", inviterId), ("date", date)])
case .channelParticipantCreator(let flags, let userId, let adminRights, let rank):
return ("channelParticipantCreator", [("flags", flags), ("userId", userId), ("adminRights", adminRights), ("rank", rank)])
case .channelParticipantAdmin(let flags, let userId, let inviterId, let promotedBy, let date, let adminRights, let rank):
@@ -7712,17 +7713,20 @@ public extension Api {
}
}
public static func parse_channelParticipantSelf(_ reader: BufferReader) -> ChannelParticipant? {
var _1: Int64?
_1 = reader.readInt64()
var _1: Int32?
_1 = reader.readInt32()
var _2: Int64?
_2 = reader.readInt64()
var _3: Int32?
_3 = reader.readInt32()
var _3: Int64?
_3 = reader.readInt64()
var _4: Int32?
_4 = reader.readInt32()
let _c1 = _1 != nil
let _c2 = _2 != nil
let _c3 = _3 != nil
if _c1 && _c2 && _c3 {
return Api.ChannelParticipant.channelParticipantSelf(userId: _1!, inviterId: _2!, date: _3!)
let _c4 = _4 != nil
if _c1 && _c2 && _c3 && _c4 {
return Api.ChannelParticipant.channelParticipantSelf(flags: _1!, userId: _2!, inviterId: _3!, date: _4!)
}
else {
return nil
@@ -12202,6 +12206,48 @@ public extension Api {
}
}
}
public enum SearchResultsPosition: TypeConstructorDescription {
case searchResultPosition(msgId: Int32, date: Int32, offset: Int32)
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .searchResultPosition(let msgId, let date, let offset):
if boxed {
buffer.appendInt32(2137295719)
}
serializeInt32(msgId, buffer: buffer, boxed: false)
serializeInt32(date, buffer: buffer, boxed: false)
serializeInt32(offset, buffer: buffer, boxed: false)
break
}
}
public func descriptionFields() -> (String, [(String, Any)]) {
switch self {
case .searchResultPosition(let msgId, let date, let offset):
return ("searchResultPosition", [("msgId", msgId), ("date", date), ("offset", offset)])
}
}
public static func parse_searchResultPosition(_ reader: BufferReader) -> SearchResultsPosition? {
var _1: Int32?
_1 = reader.readInt32()
var _2: Int32?
_2 = reader.readInt32()
var _3: Int32?
_3 = reader.readInt32()
let _c1 = _1 != nil
let _c2 = _2 != nil
let _c3 = _3 != nil
if _c1 && _c2 && _c3 {
return Api.SearchResultsPosition.searchResultPosition(msgId: _1!, date: _2!, offset: _3!)
}
else {
return nil
}
}
}
public enum StatsGraph: TypeConstructorDescription {
case statsGraphAsync(token: String)
@@ -14820,17 +14866,18 @@ public extension Api {
}
public enum ChatInviteImporter: TypeConstructorDescription {
case chatInviteImporter(flags: Int32, userId: Int64, date: Int32, approvedBy: Int64?)
case chatInviteImporter(flags: Int32, userId: Int64, date: Int32, about: String?, approvedBy: Int64?)
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .chatInviteImporter(let flags, let userId, let date, let approvedBy):
case .chatInviteImporter(let flags, let userId, let date, let about, let approvedBy):
if boxed {
buffer.appendInt32(-1574303204)
buffer.appendInt32(-1940201511)
}
serializeInt32(flags, buffer: buffer, boxed: false)
serializeInt64(userId, buffer: buffer, boxed: false)
serializeInt32(date, buffer: buffer, boxed: false)
if Int(flags) & Int(1 << 2) != 0 {serializeString(about!, buffer: buffer, boxed: false)}
if Int(flags) & Int(1 << 1) != 0 {serializeInt64(approvedBy!, buffer: buffer, boxed: false)}
break
}
@@ -14838,8 +14885,8 @@ public extension Api {
public func descriptionFields() -> (String, [(String, Any)]) {
switch self {
case .chatInviteImporter(let flags, let userId, let date, let approvedBy):
return ("chatInviteImporter", [("flags", flags), ("userId", userId), ("date", date), ("approvedBy", approvedBy)])
case .chatInviteImporter(let flags, let userId, let date, let about, let approvedBy):
return ("chatInviteImporter", [("flags", flags), ("userId", userId), ("date", date), ("about", about), ("approvedBy", approvedBy)])
}
}
@@ -14850,14 +14897,17 @@ public extension Api {
_2 = reader.readInt64()
var _3: Int32?
_3 = reader.readInt32()
var _4: Int64?
if Int(_1!) & Int(1 << 1) != 0 {_4 = reader.readInt64() }
var _4: String?
if Int(_1!) & Int(1 << 2) != 0 {_4 = parseString(reader) }
var _5: Int64?
if Int(_1!) & Int(1 << 1) != 0 {_5 = reader.readInt64() }
let _c1 = _1 != nil
let _c2 = _2 != nil
let _c3 = _3 != nil
let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil
if _c1 && _c2 && _c3 && _c4 {
return Api.ChatInviteImporter.chatInviteImporter(flags: _1!, userId: _2!, date: _3!, approvedBy: _4)
let _c4 = (Int(_1!) & Int(1 << 2) == 0) || _4 != nil
let _c5 = (Int(_1!) & Int(1 << 1) == 0) || _5 != nil
if _c1 && _c2 && _c3 && _c4 && _c5 {
return Api.ChatInviteImporter.chatInviteImporter(flags: _1!, userId: _2!, date: _3!, about: _4, approvedBy: _5)
}
else {
return nil
@@ -21047,6 +21097,7 @@ public extension Api {
case messageActionSetMessagesTTL(period: Int32)
case messageActionGroupCallScheduled(call: Api.InputGroupCall, scheduleDate: Int32)
case messageActionSetChatTheme(emoticon: String)
case messageActionChatJoinedByRequest
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
@@ -21263,6 +21314,12 @@ public extension Api {
buffer.appendInt32(-1434950843)
}
serializeString(emoticon, buffer: buffer, boxed: false)
break
case .messageActionChatJoinedByRequest:
if boxed {
buffer.appendInt32(-339958837)
}
break
}
}
@@ -21327,6 +21384,8 @@ public extension Api {
return ("messageActionGroupCallScheduled", [("call", call), ("scheduleDate", scheduleDate)])
case .messageActionSetChatTheme(let emoticon):
return ("messageActionSetChatTheme", [("emoticon", emoticon)])
case .messageActionChatJoinedByRequest:
return ("messageActionChatJoinedByRequest", [])
}
}
@@ -21691,6 +21750,9 @@ public extension Api {
return nil
}
}
public static func parse_messageActionChatJoinedByRequest(_ reader: BufferReader) -> MessageAction? {
return Api.MessageAction.messageActionChatJoinedByRequest
}
}
public enum PhoneCall: TypeConstructorDescription {