├── .gitattributes ├── .gitignore ├── LICENSE ├── README.md ├── TdLib.xcframework ├── Info.plist ├── ios-arm64 │ └── TdLib.framework │ │ ├── Headers │ │ ├── td.h │ │ ├── td_json_client.h │ │ ├── td_log.h │ │ └── tdjson_export.h │ │ ├── Info.plist │ │ ├── Modules │ │ └── module.modulemap │ │ ├── TdLib │ │ └── _CodeSignature │ │ ├── CodeDirectory │ │ ├── CodeRequirements │ │ ├── CodeRequirements-1 │ │ ├── CodeResources │ │ └── CodeSignature ├── ios-arm64_x86_64-simulator │ └── TdLib.framework │ │ ├── Headers │ │ ├── td.h │ │ ├── td_json_client.h │ │ ├── td_log.h │ │ └── tdjson_export.h │ │ ├── Info.plist │ │ ├── Modules │ │ └── module.modulemap │ │ ├── TdLib │ │ └── _CodeSignature │ │ ├── CodeDirectory │ │ ├── CodeRequirements │ │ ├── CodeRequirements-1 │ │ ├── CodeResources │ │ └── CodeSignature └── macos-arm64_x86_64 │ └── TdLib.framework │ ├── Headers │ ├── Modules │ ├── Resources │ ├── TdLib │ └── Versions │ ├── A │ ├── Headers │ │ ├── td.h │ │ ├── td_json_client.h │ │ ├── td_log.h │ │ └── tdjson_export.h │ ├── Modules │ │ └── module.modulemap │ ├── Resources │ │ └── Info.plist │ ├── TdLib │ └── _CodeSignature │ │ ├── CodeDirectory │ │ ├── CodeRequirements │ │ ├── CodeRequirements-1 │ │ ├── CodeResources │ │ └── CodeSignature │ └── Current ├── TdlibKit ├── API │ ├── TdApi.swift │ └── TdClient.swift ├── Client │ └── TdClientImpl.swift ├── Info.plist ├── Models │ ├── AcceptCall.swift │ ├── AcceptTermsOfService.swift │ ├── AccountTtl.swift │ ├── AddChatMember.swift │ ├── AddChatMembers.swift │ ├── AddChatToList.swift │ ├── AddContact.swift │ ├── AddCustomServerLanguagePack.swift │ ├── AddFavoriteSticker.swift │ ├── AddLocalMessage.swift │ ├── AddLogMessage.swift │ ├── AddNetworkStatistics.swift │ ├── AddProxy.swift │ ├── AddRecentSticker.swift │ ├── AddRecentlyFoundChat.swift │ ├── AddSavedAnimation.swift │ ├── AddStickerToSet.swift │ ├── Address.swift │ ├── AnimatedChatPhoto.swift │ ├── AnimatedEmoji.swift │ ├── Animation.swift │ ├── Animations.swift │ ├── AnswerCallbackQuery.swift │ ├── AnswerCustomQuery.swift │ ├── AnswerInlineQuery.swift │ ├── AnswerPreCheckoutQuery.swift │ ├── AnswerShippingQuery.swift │ ├── Audio.swift │ ├── AuthenticationCodeInfo.swift │ ├── AuthenticationCodeType.swift │ ├── AuthorizationState.swift │ ├── AutoDownloadSettings.swift │ ├── AutoDownloadSettingsPresets.swift │ ├── Background.swift │ ├── BackgroundFill.swift │ ├── BackgroundType.swift │ ├── Backgrounds.swift │ ├── BanChatMember.swift │ ├── BankCardActionOpenUrl.swift │ ├── BankCardInfo.swift │ ├── BasicGroup.swift │ ├── BasicGroupFullInfo.swift │ ├── BlockMessageSenderFromReplies.swift │ ├── BotCommand.swift │ ├── BotCommandScope.swift │ ├── BotCommands.swift │ ├── Call.swift │ ├── CallDiscardReason.swift │ ├── CallId.swift │ ├── CallProblem.swift │ ├── CallProtocol.swift │ ├── CallServer.swift │ ├── CallServerType.swift │ ├── CallState.swift │ ├── CallbackQueryAnswer.swift │ ├── CallbackQueryPayload.swift │ ├── CanTransferOwnership.swift │ ├── CanTransferOwnershipResult.swift │ ├── CancelDownloadFile.swift │ ├── CancelPasswordReset.swift │ ├── CancelUploadFile.swift │ ├── ChangeImportedContacts.swift │ ├── ChangePhoneNumber.swift │ ├── ChangeStickerSet.swift │ ├── Chat.swift │ ├── ChatAction.swift │ ├── ChatActionBar.swift │ ├── ChatAdministrator.swift │ ├── ChatAdministrators.swift │ ├── ChatEvent.swift │ ├── ChatEventAction.swift │ ├── ChatEventLogFilters.swift │ ├── ChatEvents.swift │ ├── ChatFilter.swift │ ├── ChatFilterInfo.swift │ ├── ChatInviteLink.swift │ ├── ChatInviteLinkCount.swift │ ├── ChatInviteLinkCounts.swift │ ├── ChatInviteLinkInfo.swift │ ├── ChatInviteLinkMember.swift │ ├── ChatInviteLinkMembers.swift │ ├── ChatInviteLinks.swift │ ├── ChatJoinRequest.swift │ ├── ChatJoinRequests.swift │ ├── ChatJoinRequestsInfo.swift │ ├── ChatList.swift │ ├── ChatLists.swift │ ├── ChatLocation.swift │ ├── ChatMember.swift │ ├── ChatMemberStatus.swift │ ├── ChatMembers.swift │ ├── ChatMembersFilter.swift │ ├── ChatNearby.swift │ ├── ChatNotificationSettings.swift │ ├── ChatPermissions.swift │ ├── ChatPhoto.swift │ ├── ChatPhotoInfo.swift │ ├── ChatPhotos.swift │ ├── ChatPosition.swift │ ├── ChatReportReason.swift │ ├── ChatSource.swift │ ├── ChatStatistics.swift │ ├── ChatStatisticsAdministratorActionsInfo.swift │ ├── ChatStatisticsInviterInfo.swift │ ├── ChatStatisticsMessageInteractionInfo.swift │ ├── ChatStatisticsMessageSenderInfo.swift │ ├── ChatTheme.swift │ ├── ChatType.swift │ ├── Chats.swift │ ├── ChatsNearby.swift │ ├── CheckAuthenticationBotToken.swift │ ├── CheckAuthenticationCode.swift │ ├── CheckAuthenticationPassword.swift │ ├── CheckAuthenticationPasswordRecoveryCode.swift │ ├── CheckChangePhoneNumberCode.swift │ ├── CheckChatInviteLink.swift │ ├── CheckChatUsername.swift │ ├── CheckChatUsernameResult.swift │ ├── CheckCreatedPublicChatsLimit.swift │ ├── CheckDatabaseEncryptionKey.swift │ ├── CheckEmailAddressVerificationCode.swift │ ├── CheckPasswordRecoveryCode.swift │ ├── CheckPhoneNumberConfirmationCode.swift │ ├── CheckPhoneNumberVerificationCode.swift │ ├── CheckRecoveryEmailAddressCode.swift │ ├── CheckStickerSetName.swift │ ├── CheckStickerSetNameResult.swift │ ├── CleanFileName.swift │ ├── ClearAllDraftMessages.swift │ ├── ClearImportedContacts.swift │ ├── ClearRecentStickers.swift │ ├── ClearRecentlyFoundChats.swift │ ├── ClickAnimatedEmojiMessage.swift │ ├── Close.swift │ ├── CloseChat.swift │ ├── CloseSecretChat.swift │ ├── ClosedVectorPath.swift │ ├── ConfirmQrCodeAuthentication.swift │ ├── ConnectedWebsite.swift │ ├── ConnectedWebsites.swift │ ├── ConnectionState.swift │ ├── Contact.swift │ ├── Count.swift │ ├── Countries.swift │ ├── CountryInfo.swift │ ├── CreateBasicGroupChat.swift │ ├── CreateCall.swift │ ├── CreateChatFilter.swift │ ├── CreateChatInviteLink.swift │ ├── CreateNewBasicGroupChat.swift │ ├── CreateNewSecretChat.swift │ ├── CreateNewStickerSet.swift │ ├── CreateNewSupergroupChat.swift │ ├── CreatePrivateChat.swift │ ├── CreateSecretChat.swift │ ├── CreateSupergroupChat.swift │ ├── CreateTemporaryPassword.swift │ ├── CreateVideoChat.swift │ ├── CustomRequestResult.swift │ ├── DatabaseStatistics.swift │ ├── Date.swift │ ├── DateRange.swift │ ├── DatedFile.swift │ ├── DeepLinkInfo.swift │ ├── DeleteAccount.swift │ ├── DeleteAllCallMessages.swift │ ├── DeleteAllRevokedChatInviteLinks.swift │ ├── DeleteChat.swift │ ├── DeleteChatFilter.swift │ ├── DeleteChatHistory.swift │ ├── DeleteChatMessagesByDate.swift │ ├── DeleteChatMessagesBySender.swift │ ├── DeleteChatReplyMarkup.swift │ ├── DeleteCommands.swift │ ├── DeleteFile.swift │ ├── DeleteLanguagePack.swift │ ├── DeleteMessages.swift │ ├── DeletePassportElement.swift │ ├── DeleteProfilePhoto.swift │ ├── DeleteRevokedChatInviteLink.swift │ ├── DeleteSavedCredentials.swift │ ├── DeleteSavedOrderInfo.swift │ ├── Destroy.swift │ ├── DeviceToken.swift │ ├── DiceStickers.swift │ ├── DisableProxy.swift │ ├── DiscardCall.swift │ ├── DiscardGroupCall.swift │ ├── DisconnectAllWebsites.swift │ ├── DisconnectWebsite.swift │ ├── Document.swift │ ├── DownloadFile.swift │ ├── DraftMessage.swift │ ├── EditChatFilter.swift │ ├── EditChatInviteLink.swift │ ├── EditCustomLanguagePackInfo.swift │ ├── EditInlineMessageCaption.swift │ ├── EditInlineMessageLiveLocation.swift │ ├── EditInlineMessageMedia.swift │ ├── EditInlineMessageReplyMarkup.swift │ ├── EditInlineMessageText.swift │ ├── EditMessageCaption.swift │ ├── EditMessageLiveLocation.swift │ ├── EditMessageMedia.swift │ ├── EditMessageReplyMarkup.swift │ ├── EditMessageSchedulingState.swift │ ├── EditMessageText.swift │ ├── EditProxy.swift │ ├── EmailAddressAuthenticationCodeInfo.swift │ ├── Emojis.swift │ ├── EnableProxy.swift │ ├── EncryptedCredentials.swift │ ├── EncryptedPassportElement.swift │ ├── EndGroupCallRecording.swift │ ├── EndGroupCallScreenSharing.swift │ ├── Error.swift │ ├── File.swift │ ├── FilePart.swift │ ├── FileType.swift │ ├── FinishFileGeneration.swift │ ├── FormattedText.swift │ ├── ForwardMessages.swift │ ├── FoundMessages.swift │ ├── Game.swift │ ├── GameHighScore.swift │ ├── GameHighScores.swift │ ├── GetAccountTtl.swift │ ├── GetActiveLiveLocationMessages.swift │ ├── GetActiveSessions.swift │ ├── GetAllPassportElements.swift │ ├── GetAnimatedEmoji.swift │ ├── GetApplicationConfig.swift │ ├── GetApplicationDownloadLink.swift │ ├── GetArchivedStickerSets.swift │ ├── GetAttachedStickerSets.swift │ ├── GetAuthorizationState.swift │ ├── GetAutoDownloadSettingsPresets.swift │ ├── GetBackgroundUrl.swift │ ├── GetBackgrounds.swift │ ├── GetBankCardInfo.swift │ ├── GetBasicGroup.swift │ ├── GetBasicGroupFullInfo.swift │ ├── GetBlockedMessageSenders.swift │ ├── GetCallbackQueryAnswer.swift │ ├── GetCallbackQueryMessage.swift │ ├── GetChat.swift │ ├── GetChatAdministrators.swift │ ├── GetChatAvailableMessageSenders.swift │ ├── GetChatEventLog.swift │ ├── GetChatFilter.swift │ ├── GetChatFilterDefaultIconName.swift │ ├── GetChatHistory.swift │ ├── GetChatInviteLink.swift │ ├── GetChatInviteLinkCounts.swift │ ├── GetChatInviteLinkMembers.swift │ ├── GetChatInviteLinks.swift │ ├── GetChatJoinRequests.swift │ ├── GetChatListsToAddChat.swift │ ├── GetChatMember.swift │ ├── GetChatMessageByDate.swift │ ├── GetChatMessageCalendar.swift │ ├── GetChatMessageCount.swift │ ├── GetChatNotificationSettingsExceptions.swift │ ├── GetChatPinnedMessage.swift │ ├── GetChatScheduledMessages.swift │ ├── GetChatSparseMessagePositions.swift │ ├── GetChatSponsoredMessages.swift │ ├── GetChatStatistics.swift │ ├── GetChats.swift │ ├── GetCommands.swift │ ├── GetConnectedWebsites.swift │ ├── GetContacts.swift │ ├── GetCountries.swift │ ├── GetCountryCode.swift │ ├── GetCreatedPublicChats.swift │ ├── GetCurrentState.swift │ ├── GetDatabaseStatistics.swift │ ├── GetDeepLinkInfo.swift │ ├── GetEmojiSuggestionsUrl.swift │ ├── GetExternalLink.swift │ ├── GetExternalLinkInfo.swift │ ├── GetFavoriteStickers.swift │ ├── GetFile.swift │ ├── GetFileDownloadedPrefixSize.swift │ ├── GetFileExtension.swift │ ├── GetFileMimeType.swift │ ├── GetGameHighScores.swift │ ├── GetGroupCall.swift │ ├── GetGroupCallInviteLink.swift │ ├── GetGroupCallStreamSegment.swift │ ├── GetGroupsInCommon.swift │ ├── GetImportedContactCount.swift │ ├── GetInactiveSupergroupChats.swift │ ├── GetInlineGameHighScores.swift │ ├── GetInlineQueryResults.swift │ ├── GetInstalledStickerSets.swift │ ├── GetInternalLinkType.swift │ ├── GetJsonString.swift │ ├── GetJsonValue.swift │ ├── GetLanguagePackInfo.swift │ ├── GetLanguagePackString.swift │ ├── GetLanguagePackStrings.swift │ ├── GetLocalizationTargetInfo.swift │ ├── GetLogStream.swift │ ├── GetLogTagVerbosityLevel.swift │ ├── GetLogTags.swift │ ├── GetLogVerbosityLevel.swift │ ├── GetLoginUrl.swift │ ├── GetLoginUrlInfo.swift │ ├── GetMapThumbnailFile.swift │ ├── GetMarkdownText.swift │ ├── GetMe.swift │ ├── GetMessage.swift │ ├── GetMessageEmbeddingCode.swift │ ├── GetMessageFileType.swift │ ├── GetMessageImportConfirmationText.swift │ ├── GetMessageLink.swift │ ├── GetMessageLinkInfo.swift │ ├── GetMessageLocally.swift │ ├── GetMessagePublicForwards.swift │ ├── GetMessageStatistics.swift │ ├── GetMessageThread.swift │ ├── GetMessageThreadHistory.swift │ ├── GetMessageViewers.swift │ ├── GetMessages.swift │ ├── GetNetworkStatistics.swift │ ├── GetOption.swift │ ├── GetPassportAuthorizationForm.swift │ ├── GetPassportAuthorizationFormAvailableElements.swift │ ├── GetPassportElement.swift │ ├── GetPasswordState.swift │ ├── GetPaymentForm.swift │ ├── GetPaymentReceipt.swift │ ├── GetPhoneNumberInfo.swift │ ├── GetPhoneNumberInfoSync.swift │ ├── GetPollVoters.swift │ ├── GetPreferredCountryLanguage.swift │ ├── GetProxies.swift │ ├── GetProxyLink.swift │ ├── GetPushReceiverId.swift │ ├── GetRecentInlineBots.swift │ ├── GetRecentStickers.swift │ ├── GetRecentlyOpenedChats.swift │ ├── GetRecentlyVisitedTMeUrls.swift │ ├── GetRecommendedChatFilters.swift │ ├── GetRecoveryEmailAddress.swift │ ├── GetRemoteFile.swift │ ├── GetRepliedMessage.swift │ ├── GetSavedAnimations.swift │ ├── GetSavedOrderInfo.swift │ ├── GetScopeNotificationSettings.swift │ ├── GetSecretChat.swift │ ├── GetStatisticalGraph.swift │ ├── GetStickerEmojis.swift │ ├── GetStickerSet.swift │ ├── GetStickers.swift │ ├── GetStorageStatistics.swift │ ├── GetStorageStatisticsFast.swift │ ├── GetSuggestedFileName.swift │ ├── GetSuggestedStickerSetName.swift │ ├── GetSuitableDiscussionChats.swift │ ├── GetSupergroup.swift │ ├── GetSupergroupFullInfo.swift │ ├── GetSupergroupMembers.swift │ ├── GetSupportUser.swift │ ├── GetTemporaryPasswordState.swift │ ├── GetTextEntities.swift │ ├── GetTopChats.swift │ ├── GetTrendingStickerSets.swift │ ├── GetUser.swift │ ├── GetUserFullInfo.swift │ ├── GetUserPrivacySettingRules.swift │ ├── GetUserProfilePhotos.swift │ ├── GetVideoChatAvailableParticipants.swift │ ├── GetWebPageInstantView.swift │ ├── GetWebPagePreview.swift │ ├── GroupCall.swift │ ├── GroupCallId.swift │ ├── GroupCallParticipant.swift │ ├── GroupCallParticipantVideoInfo.swift │ ├── GroupCallRecentSpeaker.swift │ ├── GroupCallVideoQuality.swift │ ├── GroupCallVideoSourceGroup.swift │ ├── Hashtags.swift │ ├── HideSuggestedAction.swift │ ├── HttpUrl.swift │ ├── IdentityDocument.swift │ ├── ImportContacts.swift │ ├── ImportMessages.swift │ ├── ImportedContacts.swift │ ├── InlineKeyboardButton.swift │ ├── InlineKeyboardButtonType.swift │ ├── InlineQueryResult.swift │ ├── InlineQueryResults.swift │ ├── InputBackground.swift │ ├── InputChatPhoto.swift │ ├── InputCredentials.swift │ ├── InputFile.swift │ ├── InputIdentityDocument.swift │ ├── InputInlineQueryResult.swift │ ├── InputMessageContent.swift │ ├── InputPassportElement.swift │ ├── InputPassportElementError.swift │ ├── InputPassportElementErrorSource.swift │ ├── InputPersonalDocument.swift │ ├── InputSticker.swift │ ├── InputThumbnail.swift │ ├── InternalLinkType.swift │ ├── InviteGroupCallParticipants.swift │ ├── Invoice.swift │ ├── JoinChat.swift │ ├── JoinChatByInviteLink.swift │ ├── JoinGroupCall.swift │ ├── JsonObjectMember.swift │ ├── JsonValue.swift │ ├── KeyboardButton.swift │ ├── KeyboardButtonType.swift │ ├── LabeledPricePart.swift │ ├── LanguagePackInfo.swift │ ├── LanguagePackString.swift │ ├── LanguagePackStringValue.swift │ ├── LanguagePackStrings.swift │ ├── LeaveChat.swift │ ├── LeaveGroupCall.swift │ ├── LoadChats.swift │ ├── LoadGroupCallParticipants.swift │ ├── LocalFile.swift │ ├── LocalizationTargetInfo.swift │ ├── Location.swift │ ├── LogOut.swift │ ├── LogStream.swift │ ├── LogTags.swift │ ├── LogVerbosityLevel.swift │ ├── LoginUrlInfo.swift │ ├── MaskPoint.swift │ ├── MaskPosition.swift │ ├── Message.swift │ ├── MessageCalendar.swift │ ├── MessageCalendarDay.swift │ ├── MessageContent.swift │ ├── MessageCopyOptions.swift │ ├── MessageFileType.swift │ ├── MessageForwardInfo.swift │ ├── MessageForwardOrigin.swift │ ├── MessageInteractionInfo.swift │ ├── MessageLink.swift │ ├── MessageLinkInfo.swift │ ├── MessagePosition.swift │ ├── MessagePositions.swift │ ├── MessageReplyInfo.swift │ ├── MessageSchedulingState.swift │ ├── MessageSendOptions.swift │ ├── MessageSender.swift │ ├── MessageSenders.swift │ ├── MessageSendingState.swift │ ├── MessageStatistics.swift │ ├── MessageThreadInfo.swift │ ├── Messages.swift │ ├── Minithumbnail.swift │ ├── NetworkStatistics.swift │ ├── NetworkStatisticsEntry.swift │ ├── NetworkType.swift │ ├── Notification.swift │ ├── NotificationGroup.swift │ ├── NotificationGroupType.swift │ ├── NotificationSettingsScope.swift │ ├── NotificationType.swift │ ├── Ok.swift │ ├── OpenChat.swift │ ├── OpenMessageContent.swift │ ├── OptimizeStorage.swift │ ├── OptionValue.swift │ ├── OrderInfo.swift │ ├── PageBlock.swift │ ├── PageBlockCaption.swift │ ├── PageBlockHorizontalAlignment.swift │ ├── PageBlockListItem.swift │ ├── PageBlockRelatedArticle.swift │ ├── PageBlockTableCell.swift │ ├── PageBlockVerticalAlignment.swift │ ├── ParseMarkdown.swift │ ├── ParseTextEntities.swift │ ├── PassportAuthorizationForm.swift │ ├── PassportElement.swift │ ├── PassportElementError.swift │ ├── PassportElementErrorSource.swift │ ├── PassportElementType.swift │ ├── PassportElements.swift │ ├── PassportElementsWithErrors.swift │ ├── PassportRequiredElement.swift │ ├── PassportSuitableElement.swift │ ├── PasswordState.swift │ ├── PaymentForm.swift │ ├── PaymentFormTheme.swift │ ├── PaymentReceipt.swift │ ├── PaymentResult.swift │ ├── PaymentsProviderStripe.swift │ ├── PersonalDetails.swift │ ├── PersonalDocument.swift │ ├── PhoneNumberAuthenticationSettings.swift │ ├── PhoneNumberInfo.swift │ ├── Photo.swift │ ├── PhotoSize.swift │ ├── PinChatMessage.swift │ ├── PingProxy.swift │ ├── Point.swift │ ├── Poll.swift │ ├── PollOption.swift │ ├── PollType.swift │ ├── ProcessChatJoinRequest.swift │ ├── ProcessChatJoinRequests.swift │ ├── ProcessPushNotification.swift │ ├── ProfilePhoto.swift │ ├── Proxies.swift │ ├── Proxy.swift │ ├── ProxyType.swift │ ├── PublicChatType.swift │ ├── PushMessageContent.swift │ ├── PushReceiverId.swift │ ├── ReadAllChatMentions.swift │ ├── ReadFilePart.swift │ ├── RecommendedChatFilter.swift │ ├── RecommendedChatFilters.swift │ ├── RecoverAuthenticationPassword.swift │ ├── RecoverPassword.swift │ ├── RecoveryEmailAddress.swift │ ├── RegisterDevice.swift │ ├── RegisterUser.swift │ ├── RemoteFile.swift │ ├── RemoveBackground.swift │ ├── RemoveChatActionBar.swift │ ├── RemoveContacts.swift │ ├── RemoveFavoriteSticker.swift │ ├── RemoveNotification.swift │ ├── RemoveNotificationGroup.swift │ ├── RemoveProxy.swift │ ├── RemoveRecentHashtag.swift │ ├── RemoveRecentSticker.swift │ ├── RemoveRecentlyFoundChat.swift │ ├── RemoveSavedAnimation.swift │ ├── RemoveStickerFromSet.swift │ ├── RemoveTopChat.swift │ ├── ReorderChatFilters.swift │ ├── ReorderInstalledStickerSets.swift │ ├── ReplacePrimaryChatInviteLink.swift │ ├── ReplyMarkup.swift │ ├── ReportChat.swift │ ├── ReportChatPhoto.swift │ ├── ReportSupergroupSpam.swift │ ├── RequestAuthenticationPasswordRecovery.swift │ ├── RequestPasswordRecovery.swift │ ├── RequestQrCodeAuthentication.swift │ ├── ResendAuthenticationCode.swift │ ├── ResendChangePhoneNumberCode.swift │ ├── ResendEmailAddressVerificationCode.swift │ ├── ResendMessages.swift │ ├── ResendPhoneNumberConfirmationCode.swift │ ├── ResendPhoneNumberVerificationCode.swift │ ├── ResendRecoveryEmailAddressCode.swift │ ├── ResetAllNotificationSettings.swift │ ├── ResetBackgrounds.swift │ ├── ResetNetworkStatistics.swift │ ├── ResetPassword.swift │ ├── ResetPasswordResult.swift │ ├── RevokeChatInviteLink.swift │ ├── RevokeGroupCallInviteLink.swift │ ├── RichText.swift │ ├── SaveApplicationLogEvent.swift │ ├── SavedCredentials.swift │ ├── ScopeNotificationSettings.swift │ ├── SearchBackground.swift │ ├── SearchCallMessages.swift │ ├── SearchChatMembers.swift │ ├── SearchChatMessages.swift │ ├── SearchChatRecentLocationMessages.swift │ ├── SearchChats.swift │ ├── SearchChatsNearby.swift │ ├── SearchChatsOnServer.swift │ ├── SearchContacts.swift │ ├── SearchEmojis.swift │ ├── SearchHashtags.swift │ ├── SearchInstalledStickerSets.swift │ ├── SearchMessages.swift │ ├── SearchMessagesFilter.swift │ ├── SearchPublicChat.swift │ ├── SearchPublicChats.swift │ ├── SearchSecretMessages.swift │ ├── SearchStickerSet.swift │ ├── SearchStickerSets.swift │ ├── SearchStickers.swift │ ├── Seconds.swift │ ├── SecretChat.swift │ ├── SecretChatState.swift │ ├── SendBotStartMessage.swift │ ├── SendCallDebugInformation.swift │ ├── SendCallRating.swift │ ├── SendCallSignalingData.swift │ ├── SendChatAction.swift │ ├── SendChatScreenshotTakenNotification.swift │ ├── SendCustomRequest.swift │ ├── SendEmailAddressVerificationCode.swift │ ├── SendInlineQueryResultMessage.swift │ ├── SendMessage.swift │ ├── SendMessageAlbum.swift │ ├── SendPassportAuthorizationForm.swift │ ├── SendPaymentForm.swift │ ├── SendPhoneNumberConfirmationCode.swift │ ├── SendPhoneNumberVerificationCode.swift │ ├── Session.swift │ ├── Sessions.swift │ ├── SetAccountTtl.swift │ ├── SetAlarm.swift │ ├── SetAuthenticationPhoneNumber.swift │ ├── SetAutoDownloadSettings.swift │ ├── SetBackground.swift │ ├── SetBio.swift │ ├── SetBotUpdatesStatus.swift │ ├── SetChatClientData.swift │ ├── SetChatDefaultMessageSender.swift │ ├── SetChatDescription.swift │ ├── SetChatDiscussionGroup.swift │ ├── SetChatDraftMessage.swift │ ├── SetChatLocation.swift │ ├── SetChatMemberStatus.swift │ ├── SetChatMessageTtlSetting.swift │ ├── SetChatNotificationSettings.swift │ ├── SetChatPermissions.swift │ ├── SetChatPhoto.swift │ ├── SetChatSlowModeDelay.swift │ ├── SetChatTheme.swift │ ├── SetChatTitle.swift │ ├── SetCommands.swift │ ├── SetCustomLanguagePack.swift │ ├── SetCustomLanguagePackString.swift │ ├── SetDatabaseEncryptionKey.swift │ ├── SetFileGenerationProgress.swift │ ├── SetGameScore.swift │ ├── SetGroupCallParticipantIsSpeaking.swift │ ├── SetGroupCallParticipantVolumeLevel.swift │ ├── SetGroupCallTitle.swift │ ├── SetInactiveSessionTtl.swift │ ├── SetInlineGameScore.swift │ ├── SetLocation.swift │ ├── SetLogStream.swift │ ├── SetLogTagVerbosityLevel.swift │ ├── SetLogVerbosityLevel.swift │ ├── SetName.swift │ ├── SetNetworkType.swift │ ├── SetOption.swift │ ├── SetPassportElement.swift │ ├── SetPassportElementErrors.swift │ ├── SetPassword.swift │ ├── SetPinnedChats.swift │ ├── SetPollAnswer.swift │ ├── SetProfilePhoto.swift │ ├── SetRecoveryEmailAddress.swift │ ├── SetScopeNotificationSettings.swift │ ├── SetStickerPositionInSet.swift │ ├── SetStickerSetThumbnail.swift │ ├── SetSupergroupStickerSet.swift │ ├── SetSupergroupUsername.swift │ ├── SetTdlibParameters.swift │ ├── SetUserPrivacySettingRules.swift │ ├── SetUsername.swift │ ├── SetVideoChatDefaultParticipant.swift │ ├── SharePhoneNumber.swift │ ├── ShippingOption.swift │ ├── SponsoredMessage.swift │ ├── SponsoredMessages.swift │ ├── StartGroupCallRecording.swift │ ├── StartGroupCallScreenSharing.swift │ ├── StartScheduledGroupCall.swift │ ├── StatisticalGraph.swift │ ├── StatisticalValue.swift │ ├── Sticker.swift │ ├── StickerSet.swift │ ├── StickerSetInfo.swift │ ├── StickerSets.swift │ ├── Stickers.swift │ ├── StopPoll.swift │ ├── StorageStatistics.swift │ ├── StorageStatisticsByChat.swift │ ├── StorageStatisticsByFileType.swift │ ├── StorageStatisticsFast.swift │ ├── SuggestedAction.swift │ ├── Supergroup.swift │ ├── SupergroupFullInfo.swift │ ├── SupergroupMembersFilter.swift │ ├── SynchronizeLanguagePack.swift │ ├── TMeUrl.swift │ ├── TMeUrlType.swift │ ├── TMeUrls.swift │ ├── TdlibParameters.swift │ ├── TemporaryPasswordState.swift │ ├── TerminateAllOtherSessions.swift │ ├── TerminateSession.swift │ ├── TermsOfService.swift │ ├── TestBytes.swift │ ├── TestCallBytes.swift │ ├── TestCallEmpty.swift │ ├── TestCallString.swift │ ├── TestCallVectorInt.swift │ ├── TestCallVectorIntObject.swift │ ├── TestCallVectorString.swift │ ├── TestCallVectorStringObject.swift │ ├── TestGetDifference.swift │ ├── TestInt.swift │ ├── TestNetwork.swift │ ├── TestProxy.swift │ ├── TestReturnError.swift │ ├── TestSquareInt.swift │ ├── TestString.swift │ ├── TestUseUpdate.swift │ ├── TestVectorInt.swift │ ├── TestVectorIntObject.swift │ ├── TestVectorString.swift │ ├── TestVectorStringObject.swift │ ├── Text.swift │ ├── TextEntities.swift │ ├── TextEntity.swift │ ├── TextEntityType.swift │ ├── TextParseMode.swift │ ├── ThemeSettings.swift │ ├── Thumbnail.swift │ ├── ThumbnailFormat.swift │ ├── ToggleChatDefaultDisableNotification.swift │ ├── ToggleChatHasProtectedContent.swift │ ├── ToggleChatIsMarkedAsUnread.swift │ ├── ToggleChatIsPinned.swift │ ├── ToggleGroupCallEnabledStartNotification.swift │ ├── ToggleGroupCallIsMyVideoEnabled.swift │ ├── ToggleGroupCallIsMyVideoPaused.swift │ ├── ToggleGroupCallMuteNewParticipants.swift │ ├── ToggleGroupCallParticipantIsHandRaised.swift │ ├── ToggleGroupCallParticipantIsMuted.swift │ ├── ToggleGroupCallScreenSharingIsPaused.swift │ ├── ToggleMessageSenderIsBlocked.swift │ ├── ToggleSessionCanAcceptCalls.swift │ ├── ToggleSessionCanAcceptSecretChats.swift │ ├── ToggleSupergroupIsAllHistoryAvailable.swift │ ├── ToggleSupergroupIsBroadcastGroup.swift │ ├── ToggleSupergroupSignMessages.swift │ ├── TopChatCategory.swift │ ├── TransferChatOwnership.swift │ ├── UnpinAllChatMessages.swift │ ├── UnpinChatMessage.swift │ ├── Update.swift │ ├── Updates.swift │ ├── UpgradeBasicGroupChatToSupergroupChat.swift │ ├── UploadFile.swift │ ├── UploadStickerFile.swift │ ├── User.swift │ ├── UserFullInfo.swift │ ├── UserPrivacySetting.swift │ ├── UserPrivacySettingRule.swift │ ├── UserPrivacySettingRules.swift │ ├── UserStatus.swift │ ├── UserType.swift │ ├── Users.swift │ ├── ValidateOrderInfo.swift │ ├── ValidatedOrderInfo.swift │ ├── VectorPathCommand.swift │ ├── Venue.swift │ ├── Video.swift │ ├── VideoChat.swift │ ├── VideoNote.swift │ ├── ViewMessages.swift │ ├── ViewSponsoredMessage.swift │ ├── ViewTrendingStickerSets.swift │ ├── VoiceNote.swift │ ├── WebPage.swift │ ├── WebPageInstantView.swift │ └── WriteGeneratedFilePart.swift └── Supporting │ ├── DTO.swift │ ├── DtoCodingKeys.swift │ ├── JSONDecoder+Result.swift │ ├── Logger.swift │ └── TdInt64.swift ├── td-xcframework ├── README.md ├── Test-ios │ ├── AppDelegate.swift │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── Contents.json │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ ├── Info.plist │ ├── SceneDelegate.swift │ └── ViewController.swift ├── build.sh ├── copy_files_from_tdlib.sh ├── iOS-simulator │ ├── Info.plist │ └── include │ │ └── td │ │ └── telegram │ │ ├── td_json_client.h │ │ ├── td_log.h │ │ └── tdjson_export.h ├── iOS │ ├── Info.plist │ └── include │ │ └── td │ │ └── telegram │ │ ├── td_json_client.h │ │ ├── td_log.h │ │ └── tdjson_export.h ├── macOS │ ├── Info.plist │ └── include │ │ └── td │ │ └── telegram │ │ ├── td_json_client.h │ │ ├── td_log.h │ │ └── tdjson_export.h ├── module.modulemap ├── td.h └── td.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ └── xcschemes │ ├── iOS-simulator.xcscheme │ ├── iOS.xcscheme │ └── macOS.xcscheme ├── tdlib-ios ├── Model │ ├── ChatInfo.swift │ ├── TextMessage.swift │ └── UserInfo.swift ├── Presentation │ ├── Application │ │ ├── AppDelegate.swift │ │ ├── ApplicationController.swift │ │ └── SceneDelegate.swift │ ├── Auth │ │ ├── Auth.storyboard │ │ └── AuthViewController.swift │ ├── ChatList │ │ ├── ChatList.storyboard │ │ └── ChatListViewController.swift │ ├── Conversation │ │ ├── Conversation.storyboard │ │ ├── ConversationViewController.swift │ │ └── Views │ │ │ └── TextMessageCell.swift │ └── Mian │ │ ├── Main.storyboard │ │ └── MainViewController.swift ├── Resources │ └── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ └── Contents.json │ │ └── Contents.json ├── Service │ ├── Helper │ │ ├── StdOutLogger.swift │ │ └── Types.swift │ ├── Service │ │ ├── AuthService.swift │ │ ├── ChatListService.swift │ │ ├── ConversationService.swift │ │ └── TelegramService.swift │ └── ServiceLayer.swift └── Supporting Files │ ├── Base.lproj │ └── LaunchScreen.storyboard │ └── Info.plist ├── tdlib-macos ├── AppDelegate.swift ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── Contents.json ├── Base.lproj │ └── Main.storyboard ├── Info.plist ├── ViewController.swift └── tdlib_macos.entitlements └── tdlib-swift.xcodeproj ├── project.pbxproj └── project.xcworkspace ├── contents.xcworkspacedata └── xcshareddata └── IDEWorkspaceChecks.plist /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | TdLib.xcframework/ios-arm64/TdLib.framework/TdLib filter=lfs diff=lfs merge=lfs -text 4 | TdLib.xcframework/ios-arm64_x86_64-simulator/TdLib.framework/TdLib filter=lfs diff=lfs merge=lfs -text 5 | TdLib.xcframework/macos-arm64_x86_64/TdLib.framework/Versions/A/TdLib filter=lfs diff=lfs merge=lfs -text 6 | -------------------------------------------------------------------------------- /TdLib.xcframework/ios-arm64/TdLib.framework/Headers/td.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "td_json_client.h" 3 | #import "td_log.h" 4 | 5 | //! Project version number for td_ios. 6 | FOUNDATION_EXPORT double td_iosVersionNumber; 7 | 8 | //! Project version string for td_ios. 9 | FOUNDATION_EXPORT const unsigned char td_iosVersionString[]; 10 | -------------------------------------------------------------------------------- /TdLib.xcframework/ios-arm64/TdLib.framework/Info.plist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modestman/tdlib-swift/91836619c8379da968800604cd4b296f76b508f1/TdLib.xcframework/ios-arm64/TdLib.framework/Info.plist -------------------------------------------------------------------------------- /TdLib.xcframework/ios-arm64/TdLib.framework/Modules/module.modulemap: -------------------------------------------------------------------------------- 1 | framework module TdLib { 2 | umbrella header "td.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /TdLib.xcframework/ios-arm64/TdLib.framework/TdLib: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:8c9f61052572181f1d151df9d1b2077effccd16cfe6a79634bf22575843816e0 3 | size 144653272 4 | -------------------------------------------------------------------------------- /TdLib.xcframework/ios-arm64/TdLib.framework/_CodeSignature/CodeDirectory: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modestman/tdlib-swift/91836619c8379da968800604cd4b296f76b508f1/TdLib.xcframework/ios-arm64/TdLib.framework/_CodeSignature/CodeDirectory -------------------------------------------------------------------------------- /TdLib.xcframework/ios-arm64/TdLib.framework/_CodeSignature/CodeRequirements: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modestman/tdlib-swift/91836619c8379da968800604cd4b296f76b508f1/TdLib.xcframework/ios-arm64/TdLib.framework/_CodeSignature/CodeRequirements -------------------------------------------------------------------------------- /TdLib.xcframework/ios-arm64/TdLib.framework/_CodeSignature/CodeRequirements-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modestman/tdlib-swift/91836619c8379da968800604cd4b296f76b508f1/TdLib.xcframework/ios-arm64/TdLib.framework/_CodeSignature/CodeRequirements-1 -------------------------------------------------------------------------------- /TdLib.xcframework/ios-arm64/TdLib.framework/_CodeSignature/CodeSignature: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modestman/tdlib-swift/91836619c8379da968800604cd4b296f76b508f1/TdLib.xcframework/ios-arm64/TdLib.framework/_CodeSignature/CodeSignature -------------------------------------------------------------------------------- /TdLib.xcframework/ios-arm64_x86_64-simulator/TdLib.framework/Headers/td.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "td_json_client.h" 3 | #import "td_log.h" 4 | 5 | //! Project version number for td_ios. 6 | FOUNDATION_EXPORT double td_iosVersionNumber; 7 | 8 | //! Project version string for td_ios. 9 | FOUNDATION_EXPORT const unsigned char td_iosVersionString[]; 10 | -------------------------------------------------------------------------------- /TdLib.xcframework/ios-arm64_x86_64-simulator/TdLib.framework/Info.plist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modestman/tdlib-swift/91836619c8379da968800604cd4b296f76b508f1/TdLib.xcframework/ios-arm64_x86_64-simulator/TdLib.framework/Info.plist -------------------------------------------------------------------------------- /TdLib.xcframework/ios-arm64_x86_64-simulator/TdLib.framework/Modules/module.modulemap: -------------------------------------------------------------------------------- 1 | framework module TdLib { 2 | umbrella header "td.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /TdLib.xcframework/ios-arm64_x86_64-simulator/TdLib.framework/TdLib: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:d0c7460935a508e88e6720ef806b254b2b3dbea3845e961491c0fb6450fd8a24 3 | size 103783376 4 | -------------------------------------------------------------------------------- /TdLib.xcframework/ios-arm64_x86_64-simulator/TdLib.framework/_CodeSignature/CodeDirectory: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modestman/tdlib-swift/91836619c8379da968800604cd4b296f76b508f1/TdLib.xcframework/ios-arm64_x86_64-simulator/TdLib.framework/_CodeSignature/CodeDirectory -------------------------------------------------------------------------------- /TdLib.xcframework/ios-arm64_x86_64-simulator/TdLib.framework/_CodeSignature/CodeRequirements: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modestman/tdlib-swift/91836619c8379da968800604cd4b296f76b508f1/TdLib.xcframework/ios-arm64_x86_64-simulator/TdLib.framework/_CodeSignature/CodeRequirements -------------------------------------------------------------------------------- /TdLib.xcframework/ios-arm64_x86_64-simulator/TdLib.framework/_CodeSignature/CodeRequirements-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modestman/tdlib-swift/91836619c8379da968800604cd4b296f76b508f1/TdLib.xcframework/ios-arm64_x86_64-simulator/TdLib.framework/_CodeSignature/CodeRequirements-1 -------------------------------------------------------------------------------- /TdLib.xcframework/ios-arm64_x86_64-simulator/TdLib.framework/_CodeSignature/CodeSignature: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modestman/tdlib-swift/91836619c8379da968800604cd4b296f76b508f1/TdLib.xcframework/ios-arm64_x86_64-simulator/TdLib.framework/_CodeSignature/CodeSignature -------------------------------------------------------------------------------- /TdLib.xcframework/macos-arm64_x86_64/TdLib.framework/Headers: -------------------------------------------------------------------------------- 1 | Versions/Current/Headers -------------------------------------------------------------------------------- /TdLib.xcframework/macos-arm64_x86_64/TdLib.framework/Modules: -------------------------------------------------------------------------------- 1 | Versions/Current/Modules -------------------------------------------------------------------------------- /TdLib.xcframework/macos-arm64_x86_64/TdLib.framework/Resources: -------------------------------------------------------------------------------- 1 | Versions/Current/Resources -------------------------------------------------------------------------------- /TdLib.xcframework/macos-arm64_x86_64/TdLib.framework/TdLib: -------------------------------------------------------------------------------- 1 | Versions/Current/TdLib -------------------------------------------------------------------------------- /TdLib.xcframework/macos-arm64_x86_64/TdLib.framework/Versions/A/Headers/td.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "td_json_client.h" 3 | #import "td_log.h" 4 | 5 | //! Project version number for td_ios. 6 | FOUNDATION_EXPORT double td_iosVersionNumber; 7 | 8 | //! Project version string for td_ios. 9 | FOUNDATION_EXPORT const unsigned char td_iosVersionString[]; 10 | -------------------------------------------------------------------------------- /TdLib.xcframework/macos-arm64_x86_64/TdLib.framework/Versions/A/Modules/module.modulemap: -------------------------------------------------------------------------------- 1 | framework module TdLib { 2 | umbrella header "td.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /TdLib.xcframework/macos-arm64_x86_64/TdLib.framework/Versions/A/TdLib: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:1d853e58aca05867fac09e592102630f6079d4ec98cf324359bf227c4259e0ff 3 | size 103706152 4 | -------------------------------------------------------------------------------- /TdLib.xcframework/macos-arm64_x86_64/TdLib.framework/Versions/A/_CodeSignature/CodeDirectory: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modestman/tdlib-swift/91836619c8379da968800604cd4b296f76b508f1/TdLib.xcframework/macos-arm64_x86_64/TdLib.framework/Versions/A/_CodeSignature/CodeDirectory -------------------------------------------------------------------------------- /TdLib.xcframework/macos-arm64_x86_64/TdLib.framework/Versions/A/_CodeSignature/CodeRequirements: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modestman/tdlib-swift/91836619c8379da968800604cd4b296f76b508f1/TdLib.xcframework/macos-arm64_x86_64/TdLib.framework/Versions/A/_CodeSignature/CodeRequirements -------------------------------------------------------------------------------- /TdLib.xcframework/macos-arm64_x86_64/TdLib.framework/Versions/A/_CodeSignature/CodeRequirements-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modestman/tdlib-swift/91836619c8379da968800604cd4b296f76b508f1/TdLib.xcframework/macos-arm64_x86_64/TdLib.framework/Versions/A/_CodeSignature/CodeRequirements-1 -------------------------------------------------------------------------------- /TdLib.xcframework/macos-arm64_x86_64/TdLib.framework/Versions/A/_CodeSignature/CodeSignature: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modestman/tdlib-swift/91836619c8379da968800604cd4b296f76b508f1/TdLib.xcframework/macos-arm64_x86_64/TdLib.framework/Versions/A/_CodeSignature/CodeSignature -------------------------------------------------------------------------------- /TdLib.xcframework/macos-arm64_x86_64/TdLib.framework/Versions/Current: -------------------------------------------------------------------------------- 1 | A -------------------------------------------------------------------------------- /TdlibKit/Models/AcceptCall.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AcceptCall.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Accepts an incoming call 12 | public struct AcceptCall: Codable { 13 | 14 | /// Call identifier 15 | public let callId: Int? 16 | 17 | /// The call protocols supported by the application 18 | public let `protocol`: CallProtocol? 19 | 20 | 21 | public init( 22 | callId: Int?, 23 | `protocol`: CallProtocol? 24 | ) { 25 | self.callId = callId 26 | self.`protocol` = `protocol` 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /TdlibKit/Models/AcceptTermsOfService.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AcceptTermsOfService.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Accepts Telegram terms of services 12 | public struct AcceptTermsOfService: Codable { 13 | 14 | /// Terms of service identifier 15 | public let termsOfServiceId: String? 16 | 17 | 18 | public init(termsOfServiceId: String?) { 19 | self.termsOfServiceId = termsOfServiceId 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/AccountTtl.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AccountTtl.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Contains information about the period of inactivity after which the current user's account will automatically be deleted 12 | public struct AccountTtl: Codable { 13 | 14 | /// Number of days of inactivity before the account will be flagged for deletion; 30-366 days 15 | public let days: Int 16 | 17 | 18 | public init(days: Int) { 19 | self.days = days 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/AddFavoriteSticker.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AddFavoriteSticker.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Adds a new sticker to the list of favorite stickers. The new sticker is added to the top of the list. If the sticker was already in the list, it is removed from the list first. Only stickers belonging to a sticker set can be added to this list 12 | public struct AddFavoriteSticker: Codable { 13 | 14 | /// Sticker file to add 15 | public let sticker: InputFile? 16 | 17 | 18 | public init(sticker: InputFile?) { 19 | self.sticker = sticker 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/AddLogMessage.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AddLogMessage.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Adds a message to TDLib internal log. Can be called synchronously 12 | public struct AddLogMessage: Codable { 13 | 14 | /// Text of a message to log 15 | public let text: String? 16 | 17 | /// The minimum verbosity level needed for the message to be logged; 0-1023 18 | public let verbosityLevel: Int? 19 | 20 | 21 | public init( 22 | text: String?, 23 | verbosityLevel: Int? 24 | ) { 25 | self.text = text 26 | self.verbosityLevel = verbosityLevel 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /TdlibKit/Models/AddNetworkStatistics.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AddNetworkStatistics.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Adds the specified data to data usage statistics. Can be called before authorization 12 | public struct AddNetworkStatistics: Codable { 13 | 14 | /// The network statistics entry with the data to be added to statistics 15 | public let entry: NetworkStatisticsEntry? 16 | 17 | 18 | public init(entry: NetworkStatisticsEntry?) { 19 | self.entry = entry 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/AddRecentlyFoundChat.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AddRecentlyFoundChat.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Adds a chat to the list of recently found chats. The chat is added to the beginning of the list. If the chat is already in the list, it will be removed from the list first 12 | public struct AddRecentlyFoundChat: Codable { 13 | 14 | /// Identifier of the chat to add 15 | public let chatId: Int64? 16 | 17 | 18 | public init(chatId: Int64?) { 19 | self.chatId = chatId 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/Animations.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Animations.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Represents a list of animations 12 | public struct Animations: Codable { 13 | 14 | /// List of animations 15 | public let animations: [Animation] 16 | 17 | 18 | public init(animations: [Animation]) { 19 | self.animations = animations 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/AnswerCustomQuery.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AnswerCustomQuery.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Answers a custom query; for bots only 12 | public struct AnswerCustomQuery: Codable { 13 | 14 | /// Identifier of a custom query 15 | public let customQueryId: TdInt64? 16 | 17 | /// JSON-serialized answer to the query 18 | public let data: String? 19 | 20 | 21 | public init( 22 | customQueryId: TdInt64?, 23 | data: String? 24 | ) { 25 | self.customQueryId = customQueryId 26 | self.data = data 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /TdlibKit/Models/Backgrounds.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Backgrounds.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Contains a list of backgrounds 12 | public struct Backgrounds: Codable { 13 | 14 | /// A list of backgrounds 15 | public let backgrounds: [Background] 16 | 17 | 18 | public init(backgrounds: [Background]) { 19 | self.backgrounds = backgrounds 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/BankCardActionOpenUrl.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BankCardActionOpenUrl.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Describes an action associated with a bank card number 12 | public struct BankCardActionOpenUrl: Codable { 13 | 14 | /// Action text 15 | public let text: String 16 | 17 | /// The URL to be opened 18 | public let url: String 19 | 20 | 21 | public init( 22 | text: String, 23 | url: String 24 | ) { 25 | self.text = text 26 | self.url = url 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /TdlibKit/Models/BankCardInfo.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BankCardInfo.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Information about a bank card 12 | public struct BankCardInfo: Codable { 13 | 14 | /// Actions that can be done with the bank card number 15 | public let actions: [BankCardActionOpenUrl] 16 | 17 | /// Title of the bank card description 18 | public let title: String 19 | 20 | 21 | public init( 22 | actions: [BankCardActionOpenUrl], 23 | title: String 24 | ) { 25 | self.actions = actions 26 | self.title = title 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /TdlibKit/Models/BotCommand.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BotCommand.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Represents a command supported by a bot 12 | public struct BotCommand: Codable { 13 | 14 | /// Text of the bot command 15 | public let command: String 16 | 17 | public let description: String 18 | 19 | 20 | public init( 21 | command: String, 22 | description: String 23 | ) { 24 | self.command = command 25 | self.description = description 26 | } 27 | } 28 | 29 | -------------------------------------------------------------------------------- /TdlibKit/Models/BotCommands.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BotCommands.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Contains a list of bot commands 12 | public struct BotCommands: Codable { 13 | 14 | /// Bot's user identifier 15 | public let botUserId: Int64 16 | 17 | /// List of bot commands 18 | public let commands: [BotCommand] 19 | 20 | 21 | public init( 22 | botUserId: Int64, 23 | commands: [BotCommand] 24 | ) { 25 | self.botUserId = botUserId 26 | self.commands = commands 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /TdlibKit/Models/CallId.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CallId.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Contains the call identifier 12 | public struct CallId: Codable { 13 | 14 | /// Call identifier 15 | public let id: Int 16 | 17 | 18 | public init(id: Int) { 19 | self.id = id 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/CanTransferOwnership.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CanTransferOwnership.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Checks whether the current session can be used to transfer a chat ownership to another user 12 | public struct CanTransferOwnership: Codable { 13 | 14 | 15 | public init() {} 16 | } 17 | 18 | -------------------------------------------------------------------------------- /TdlibKit/Models/CancelPasswordReset.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CancelPasswordReset.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Cancels reset of 2-step verification password. The method can be called if passwordState.pending_reset_date > 0 12 | public struct CancelPasswordReset: Codable { 13 | 14 | 15 | public init() {} 16 | } 17 | 18 | -------------------------------------------------------------------------------- /TdlibKit/Models/CancelUploadFile.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CancelUploadFile.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Stops the uploading of a file. Supported only for files uploaded by using uploadFile. For other files the behavior is undefined 12 | public struct CancelUploadFile: Codable { 13 | 14 | /// Identifier of the file to stop uploading 15 | public let fileId: Int? 16 | 17 | 18 | public init(fileId: Int?) { 19 | self.fileId = fileId 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/ChatAdministrators.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ChatAdministrators.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Represents a list of chat administrators 12 | public struct ChatAdministrators: Codable { 13 | 14 | /// A list of chat administrators 15 | public let administrators: [ChatAdministrator] 16 | 17 | 18 | public init(administrators: [ChatAdministrator]) { 19 | self.administrators = administrators 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/ChatEvents.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ChatEvents.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Contains a list of chat events 12 | public struct ChatEvents: Codable { 13 | 14 | /// List of events 15 | public let events: [ChatEvent] 16 | 17 | 18 | public init(events: [ChatEvent]) { 19 | self.events = events 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/ChatInviteLinkCounts.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ChatInviteLinkCounts.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Contains a list of chat invite link counts 12 | public struct ChatInviteLinkCounts: Codable { 13 | 14 | /// List of invite link counts 15 | public let inviteLinkCounts: [ChatInviteLinkCount] 16 | 17 | 18 | public init(inviteLinkCounts: [ChatInviteLinkCount]) { 19 | self.inviteLinkCounts = inviteLinkCounts 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/ChatInviteLinks.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ChatInviteLinks.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Contains a list of chat invite links 12 | public struct ChatInviteLinks: Codable { 13 | 14 | /// List of invite links 15 | public let inviteLinks: [ChatInviteLink] 16 | 17 | /// Approximate total count of chat invite links found 18 | public let totalCount: Int 19 | 20 | 21 | public init( 22 | inviteLinks: [ChatInviteLink], 23 | totalCount: Int 24 | ) { 25 | self.inviteLinks = inviteLinks 26 | self.totalCount = totalCount 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /TdlibKit/Models/ChatJoinRequests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ChatJoinRequests.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Contains a list of chat join requests 12 | public struct ChatJoinRequests: Codable { 13 | 14 | /// List of the requests 15 | public let requests: [ChatJoinRequest] 16 | 17 | /// Approximate total count of requests found 18 | public let totalCount: Int 19 | 20 | 21 | public init( 22 | requests: [ChatJoinRequest], 23 | totalCount: Int 24 | ) { 25 | self.requests = requests 26 | self.totalCount = totalCount 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /TdlibKit/Models/ChatJoinRequestsInfo.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ChatJoinRequestsInfo.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Contains information about pending chat join requests 12 | public struct ChatJoinRequestsInfo: Codable { 13 | 14 | /// Total number of pending join requests 15 | public let totalCount: Int 16 | 17 | /// Identifiers of users sent the newest pending join requests 18 | public let userIds: [Int64] 19 | 20 | 21 | public init( 22 | totalCount: Int, 23 | userIds: [Int64] 24 | ) { 25 | self.totalCount = totalCount 26 | self.userIds = userIds 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /TdlibKit/Models/ChatLists.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ChatLists.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Contains a list of chat lists 12 | public struct ChatLists: Codable { 13 | 14 | /// List of chat lists 15 | public let chatLists: [ChatList] 16 | 17 | 18 | public init(chatLists: [ChatList]) { 19 | self.chatLists = chatLists 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/ChatLocation.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ChatLocation.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Represents a location to which a chat is connected 12 | public struct ChatLocation: Codable { 13 | 14 | /// Location address; 1-64 characters, as defined by the chat owner 15 | public let address: String 16 | 17 | /// The location 18 | public let location: Location 19 | 20 | 21 | public init( 22 | address: String, 23 | location: Location 24 | ) { 25 | self.address = address 26 | self.location = location 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /TdlibKit/Models/ChatMembers.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ChatMembers.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Contains a list of chat members 12 | public struct ChatMembers: Codable { 13 | 14 | /// A list of chat members 15 | public let members: [ChatMember] 16 | 17 | /// Approximate total count of chat members found 18 | public let totalCount: Int 19 | 20 | 21 | public init( 22 | members: [ChatMember], 23 | totalCount: Int 24 | ) { 25 | self.members = members 26 | self.totalCount = totalCount 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /TdlibKit/Models/ChatNearby.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ChatNearby.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Describes a chat located nearby 12 | public struct ChatNearby: Codable { 13 | 14 | /// Chat identifier 15 | public let chatId: Int64 16 | 17 | /// Distance to the chat location, in meters 18 | public let distance: Int 19 | 20 | 21 | public init( 22 | chatId: Int64, 23 | distance: Int 24 | ) { 25 | self.chatId = chatId 26 | self.distance = distance 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /TdlibKit/Models/ChatPhotos.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ChatPhotos.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Contains a list of chat or user profile photos 12 | public struct ChatPhotos: Codable { 13 | 14 | /// List of photos 15 | public let photos: [ChatPhoto] 16 | 17 | /// Total number of photos 18 | public let totalCount: Int 19 | 20 | 21 | public init( 22 | photos: [ChatPhoto], 23 | totalCount: Int 24 | ) { 25 | self.photos = photos 26 | self.totalCount = totalCount 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /TdlibKit/Models/Chats.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Chats.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Represents a list of chats 12 | public struct Chats: Codable { 13 | 14 | /// List of chat identifiers 15 | public let chatIds: [Int64] 16 | 17 | /// Approximate total count of chats found 18 | public let totalCount: Int 19 | 20 | 21 | public init( 22 | chatIds: [Int64], 23 | totalCount: Int 24 | ) { 25 | self.chatIds = chatIds 26 | self.totalCount = totalCount 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /TdlibKit/Models/ChatsNearby.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ChatsNearby.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Represents a list of chats located nearby 12 | public struct ChatsNearby: Codable { 13 | 14 | /// List of location-based supergroups nearby 15 | public let supergroupsNearby: [ChatNearby] 16 | 17 | /// List of users nearby 18 | public let usersNearby: [ChatNearby] 19 | 20 | 21 | public init( 22 | supergroupsNearby: [ChatNearby], 23 | usersNearby: [ChatNearby] 24 | ) { 25 | self.supergroupsNearby = supergroupsNearby 26 | self.usersNearby = usersNearby 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /TdlibKit/Models/CheckAuthenticationBotToken.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CheckAuthenticationBotToken.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Checks the authentication token of a bot; to log in as a bot. Works only when the current authorization state is authorizationStateWaitPhoneNumber. Can be used instead of setAuthenticationPhoneNumber and checkAuthenticationCode to log in 12 | public struct CheckAuthenticationBotToken: Codable { 13 | 14 | /// The bot token 15 | public let token: String? 16 | 17 | 18 | public init(token: String?) { 19 | self.token = token 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/CheckAuthenticationCode.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CheckAuthenticationCode.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Checks the authentication code. Works only when the current authorization state is authorizationStateWaitCode 12 | public struct CheckAuthenticationCode: Codable { 13 | 14 | /// Authentication code to check 15 | public let code: String? 16 | 17 | 18 | public init(code: String?) { 19 | self.code = code 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/CheckAuthenticationPassword.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CheckAuthenticationPassword.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Checks the authentication password for correctness. Works only when the current authorization state is authorizationStateWaitPassword 12 | public struct CheckAuthenticationPassword: Codable { 13 | 14 | /// The password to check 15 | public let password: String? 16 | 17 | 18 | public init(password: String?) { 19 | self.password = password 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/CheckAuthenticationPasswordRecoveryCode.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CheckAuthenticationPasswordRecoveryCode.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Checks whether a password recovery code sent to an email address is valid. Works only when the current authorization state is authorizationStateWaitPassword 12 | public struct CheckAuthenticationPasswordRecoveryCode: Codable { 13 | 14 | /// Recovery code to check 15 | public let recoveryCode: String? 16 | 17 | 18 | public init(recoveryCode: String?) { 19 | self.recoveryCode = recoveryCode 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/CheckChangePhoneNumberCode.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CheckChangePhoneNumberCode.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Checks the authentication code sent to confirm a new phone number of the user 12 | public struct CheckChangePhoneNumberCode: Codable { 13 | 14 | /// Authentication code to check 15 | public let code: String? 16 | 17 | 18 | public init(code: String?) { 19 | self.code = code 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/CheckChatInviteLink.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CheckChatInviteLink.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Checks the validity of an invite link for a chat and returns information about the corresponding chat 12 | public struct CheckChatInviteLink: Codable { 13 | 14 | /// Invite link to be checked 15 | public let inviteLink: String? 16 | 17 | 18 | public init(inviteLink: String?) { 19 | self.inviteLink = inviteLink 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/CheckCreatedPublicChatsLimit.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CheckCreatedPublicChatsLimit.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Checks whether the maximum number of owned public chats has been reached. Returns corresponding error if the limit was reached 12 | public struct CheckCreatedPublicChatsLimit: Codable { 13 | 14 | /// Type of the public chats, for which to check the limit 15 | public let type: PublicChatType? 16 | 17 | 18 | public init(type: PublicChatType?) { 19 | self.type = type 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/CheckDatabaseEncryptionKey.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CheckDatabaseEncryptionKey.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Checks the database encryption key for correctness. Works only when the current authorization state is authorizationStateWaitEncryptionKey 12 | public struct CheckDatabaseEncryptionKey: Codable { 13 | 14 | /// Encryption key to check or set up 15 | public let encryptionKey: Data? 16 | 17 | 18 | public init(encryptionKey: Data?) { 19 | self.encryptionKey = encryptionKey 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/CheckEmailAddressVerificationCode.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CheckEmailAddressVerificationCode.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Checks the email address verification code for Telegram Passport 12 | public struct CheckEmailAddressVerificationCode: Codable { 13 | 14 | /// Verification code to check 15 | public let code: String? 16 | 17 | 18 | public init(code: String?) { 19 | self.code = code 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/CheckPasswordRecoveryCode.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CheckPasswordRecoveryCode.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Checks whether a 2-step verification password recovery code sent to an email address is valid 12 | public struct CheckPasswordRecoveryCode: Codable { 13 | 14 | /// Recovery code to check 15 | public let recoveryCode: String? 16 | 17 | 18 | public init(recoveryCode: String?) { 19 | self.recoveryCode = recoveryCode 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/CheckPhoneNumberConfirmationCode.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CheckPhoneNumberConfirmationCode.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Checks phone number confirmation code 12 | public struct CheckPhoneNumberConfirmationCode: Codable { 13 | 14 | /// Confirmation code to check 15 | public let code: String? 16 | 17 | 18 | public init(code: String?) { 19 | self.code = code 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/CheckPhoneNumberVerificationCode.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CheckPhoneNumberVerificationCode.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Checks the phone number verification code for Telegram Passport 12 | public struct CheckPhoneNumberVerificationCode: Codable { 13 | 14 | /// Verification code to check 15 | public let code: String? 16 | 17 | 18 | public init(code: String?) { 19 | self.code = code 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/CheckRecoveryEmailAddressCode.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CheckRecoveryEmailAddressCode.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Checks the 2-step verification recovery email address verification code 12 | public struct CheckRecoveryEmailAddressCode: Codable { 13 | 14 | /// Verification code to check 15 | public let code: String? 16 | 17 | 18 | public init(code: String?) { 19 | self.code = code 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/CheckStickerSetName.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CheckStickerSetName.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Checks whether a name can be used for a new sticker set 12 | public struct CheckStickerSetName: Codable { 13 | 14 | /// Name to be checked 15 | public let name: String? 16 | 17 | 18 | public init(name: String?) { 19 | self.name = name 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/CleanFileName.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CleanFileName.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Removes potentially dangerous characters from the name of a file. The encoding of the file name is supposed to be UTF-8. Returns an empty string on failure. Can be called synchronously 12 | public struct CleanFileName: Codable { 13 | 14 | /// File name or path to the file 15 | public let fileName: String? 16 | 17 | 18 | public init(fileName: String?) { 19 | self.fileName = fileName 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/ClearAllDraftMessages.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ClearAllDraftMessages.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Clears draft messages in all chats 12 | public struct ClearAllDraftMessages: Codable { 13 | 14 | /// If true, local draft messages in secret chats will not be cleared 15 | public let excludeSecretChats: Bool? 16 | 17 | 18 | public init(excludeSecretChats: Bool?) { 19 | self.excludeSecretChats = excludeSecretChats 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/ClearImportedContacts.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ClearImportedContacts.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Clears all imported contacts, contact list remains unchanged 12 | public struct ClearImportedContacts: Codable { 13 | 14 | 15 | public init() {} 16 | } 17 | 18 | -------------------------------------------------------------------------------- /TdlibKit/Models/ClearRecentStickers.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ClearRecentStickers.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Clears the list of recently used stickers 12 | public struct ClearRecentStickers: Codable { 13 | 14 | /// Pass true to clear the list of stickers recently attached to photo or video files; pass false to clear the list of recently sent stickers 15 | public let isAttached: Bool? 16 | 17 | 18 | public init(isAttached: Bool?) { 19 | self.isAttached = isAttached 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/ClearRecentlyFoundChats.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ClearRecentlyFoundChats.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Clears the list of recently found chats 12 | public struct ClearRecentlyFoundChats: Codable { 13 | 14 | 15 | public init() {} 16 | } 17 | 18 | -------------------------------------------------------------------------------- /TdlibKit/Models/Close.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Close.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Closes the TDLib instance. All databases will be flushed to disk and properly closed. After the close completes, updateAuthorizationState with authorizationStateClosed will be sent. Can be called before initialization 12 | public struct Close: Codable { 13 | 14 | 15 | public init() {} 16 | } 17 | 18 | -------------------------------------------------------------------------------- /TdlibKit/Models/CloseChat.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CloseChat.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Informs TDLib that the chat is closed by the user. Many useful activities depend on the chat being opened or closed 12 | public struct CloseChat: Codable { 13 | 14 | /// Chat identifier 15 | public let chatId: Int64? 16 | 17 | 18 | public init(chatId: Int64?) { 19 | self.chatId = chatId 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/CloseSecretChat.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CloseSecretChat.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Closes a secret chat, effectively transferring its state to secretChatStateClosed 12 | public struct CloseSecretChat: Codable { 13 | 14 | /// Secret chat identifier 15 | public let secretChatId: Int? 16 | 17 | 18 | public init(secretChatId: Int?) { 19 | self.secretChatId = secretChatId 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/ClosedVectorPath.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ClosedVectorPath.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Represents a closed vector path. The path begins at the end point of the last command 12 | public struct ClosedVectorPath: Codable { 13 | 14 | /// List of vector path commands 15 | public let commands: [VectorPathCommand] 16 | 17 | 18 | public init(commands: [VectorPathCommand]) { 19 | self.commands = commands 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/ConfirmQrCodeAuthentication.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ConfirmQrCodeAuthentication.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Confirms QR code authentication on another device. Returns created session on success 12 | public struct ConfirmQrCodeAuthentication: Codable { 13 | 14 | /// A link from a QR code. The link must be scanned by the in-app camera 15 | public let link: String? 16 | 17 | 18 | public init(link: String?) { 19 | self.link = link 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/ConnectedWebsites.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ConnectedWebsites.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Contains a list of websites the current user is logged in with Telegram 12 | public struct ConnectedWebsites: Codable { 13 | 14 | /// List of connected websites 15 | public let websites: [ConnectedWebsite] 16 | 17 | 18 | public init(websites: [ConnectedWebsite]) { 19 | self.websites = websites 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/Count.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Count.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Contains a counter 12 | public struct Count: Codable { 13 | 14 | /// Count 15 | public let count: Int 16 | 17 | 18 | public init(count: Int) { 19 | self.count = count 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/Countries.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Countries.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Contains information about countries 12 | public struct Countries: Codable { 13 | 14 | /// The list of countries 15 | public let countries: [CountryInfo] 16 | 17 | 18 | public init(countries: [CountryInfo]) { 19 | self.countries = countries 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/CreateChatFilter.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CreateChatFilter.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Creates new chat filter. Returns information about the created chat filter 12 | public struct CreateChatFilter: Codable { 13 | 14 | /// Chat filter 15 | public let filter: ChatFilter? 16 | 17 | 18 | public init(filter: ChatFilter?) { 19 | self.filter = filter 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/CreateNewSecretChat.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CreateNewSecretChat.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Creates a new secret chat. Returns the newly created chat 12 | public struct CreateNewSecretChat: Codable { 13 | 14 | /// Identifier of the target user 15 | public let userId: Int64? 16 | 17 | 18 | public init(userId: Int64?) { 19 | self.userId = userId 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/CreateSecretChat.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CreateSecretChat.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns an existing chat corresponding to a known secret chat 12 | public struct CreateSecretChat: Codable { 13 | 14 | /// Secret chat identifier 15 | public let secretChatId: Int? 16 | 17 | 18 | public init(secretChatId: Int?) { 19 | self.secretChatId = secretChatId 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/CustomRequestResult.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CustomRequestResult.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Contains the result of a custom request 12 | public struct CustomRequestResult: Codable { 13 | 14 | /// A JSON-serialized result 15 | public let result: String 16 | 17 | 18 | public init(result: String) { 19 | self.result = result 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/DatabaseStatistics.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DatabaseStatistics.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Contains database statistics 12 | public struct DatabaseStatistics: Codable { 13 | 14 | /// Database statistics in an unspecified human-readable format 15 | public let statistics: String 16 | 17 | 18 | public init(statistics: String) { 19 | self.statistics = statistics 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/Date.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Date.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Represents a date according to the Gregorian calendar 12 | public struct Date: Codable { 13 | 14 | /// Day of the month; 1-31 15 | public let day: Int 16 | 17 | /// Month; 1-12 18 | public let month: Int 19 | 20 | /// Year; 1-9999 21 | public let year: Int 22 | 23 | 24 | public init( 25 | day: Int, 26 | month: Int, 27 | year: Int 28 | ) { 29 | self.day = day 30 | self.month = month 31 | self.year = year 32 | } 33 | } 34 | 35 | -------------------------------------------------------------------------------- /TdlibKit/Models/DateRange.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DateRange.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Represents a date range 12 | public struct DateRange: Codable { 13 | 14 | /// Point in time (Unix timestamp) at which the date range ends 15 | public let endDate: Int 16 | 17 | /// Point in time (Unix timestamp) at which the date range begins 18 | public let startDate: Int 19 | 20 | 21 | public init( 22 | endDate: Int, 23 | startDate: Int 24 | ) { 25 | self.endDate = endDate 26 | self.startDate = startDate 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /TdlibKit/Models/DatedFile.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DatedFile.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// File with the date it was uploaded 12 | public struct DatedFile: Codable { 13 | 14 | /// Point in time (Unix timestamp) when the file was uploaded 15 | public let date: Int 16 | 17 | /// The file 18 | public let file: File 19 | 20 | 21 | public init( 22 | date: Int, 23 | file: File 24 | ) { 25 | self.date = date 26 | self.file = file 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /TdlibKit/Models/DeleteAllCallMessages.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DeleteAllCallMessages.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Deletes all call messages 12 | public struct DeleteAllCallMessages: Codable { 13 | 14 | /// Pass true to delete the messages for all users 15 | public let revoke: Bool? 16 | 17 | 18 | public init(revoke: Bool?) { 19 | self.revoke = revoke 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/DeleteChat.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DeleteChat.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Deletes a chat along with all messages in the corresponding chat for all chat members; requires owner privileges. For group chats this will release the username and remove all members. Chats with more than 1000 members can't be deleted using this method 12 | public struct DeleteChat: Codable { 13 | 14 | /// Chat identifier 15 | public let chatId: Int64? 16 | 17 | 18 | public init(chatId: Int64?) { 19 | self.chatId = chatId 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/DeleteChatFilter.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DeleteChatFilter.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Deletes existing chat filter 12 | public struct DeleteChatFilter: Codable { 13 | 14 | /// Chat filter identifier 15 | public let chatFilterId: Int? 16 | 17 | 18 | public init(chatFilterId: Int?) { 19 | self.chatFilterId = chatFilterId 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/DeleteFile.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DeleteFile.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Deletes a file from the TDLib file cache 12 | public struct DeleteFile: Codable { 13 | 14 | /// Identifier of the file to delete 15 | public let fileId: Int? 16 | 17 | 18 | public init(fileId: Int?) { 19 | self.fileId = fileId 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/DeleteLanguagePack.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DeleteLanguagePack.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Deletes all information about a language pack in the current localization target. The language pack which is currently in use (including base language pack) or is being synchronized can't be deleted. Can be called before authorization 12 | public struct DeleteLanguagePack: Codable { 13 | 14 | /// Identifier of the language pack to delete 15 | public let languagePackId: String? 16 | 17 | 18 | public init(languagePackId: String?) { 19 | self.languagePackId = languagePackId 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/DeletePassportElement.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DeletePassportElement.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Deletes a Telegram Passport element 12 | public struct DeletePassportElement: Codable { 13 | 14 | /// Element type 15 | public let type: PassportElementType? 16 | 17 | 18 | public init(type: PassportElementType?) { 19 | self.type = type 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/DeleteProfilePhoto.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DeleteProfilePhoto.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Deletes a profile photo 12 | public struct DeleteProfilePhoto: Codable { 13 | 14 | /// Identifier of the profile photo to delete 15 | public let profilePhotoId: TdInt64? 16 | 17 | 18 | public init(profilePhotoId: TdInt64?) { 19 | self.profilePhotoId = profilePhotoId 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/DeleteSavedCredentials.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DeleteSavedCredentials.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Deletes saved credentials for all payment provider bots 12 | public struct DeleteSavedCredentials: Codable { 13 | 14 | 15 | public init() {} 16 | } 17 | 18 | -------------------------------------------------------------------------------- /TdlibKit/Models/DeleteSavedOrderInfo.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DeleteSavedOrderInfo.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Deletes saved order info 12 | public struct DeleteSavedOrderInfo: Codable { 13 | 14 | 15 | public init() {} 16 | } 17 | 18 | -------------------------------------------------------------------------------- /TdlibKit/Models/Destroy.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Destroy.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Closes the TDLib instance, destroying all local data without a proper logout. The current user session will remain in the list of all active sessions. All local data will be destroyed. After the destruction completes updateAuthorizationState with authorizationStateClosed will be sent. Can be called before authorization 12 | public struct Destroy: Codable { 13 | 14 | 15 | public init() {} 16 | } 17 | 18 | -------------------------------------------------------------------------------- /TdlibKit/Models/DisableProxy.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DisableProxy.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Disables the currently enabled proxy. Can be called before authorization 12 | public struct DisableProxy: Codable { 13 | 14 | 15 | public init() {} 16 | } 17 | 18 | -------------------------------------------------------------------------------- /TdlibKit/Models/DiscardGroupCall.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DiscardGroupCall.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Discards a group call. Requires groupCall.can_be_managed 12 | public struct DiscardGroupCall: Codable { 13 | 14 | /// Group call identifier 15 | public let groupCallId: Int? 16 | 17 | 18 | public init(groupCallId: Int?) { 19 | self.groupCallId = groupCallId 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/DisconnectAllWebsites.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DisconnectAllWebsites.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Disconnects all websites from the current user's Telegram account 12 | public struct DisconnectAllWebsites: Codable { 13 | 14 | 15 | public init() {} 16 | } 17 | 18 | -------------------------------------------------------------------------------- /TdlibKit/Models/DisconnectWebsite.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DisconnectWebsite.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Disconnects website from the current user's Telegram account 12 | public struct DisconnectWebsite: Codable { 13 | 14 | /// Website identifier 15 | public let websiteId: TdInt64? 16 | 17 | 18 | public init(websiteId: TdInt64?) { 19 | self.websiteId = websiteId 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/EditChatFilter.swift: -------------------------------------------------------------------------------- 1 | // 2 | // EditChatFilter.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Edits existing chat filter. Returns information about the edited chat filter 12 | public struct EditChatFilter: Codable { 13 | 14 | /// Chat filter identifier 15 | public let chatFilterId: Int? 16 | 17 | /// The edited chat filter 18 | public let filter: ChatFilter? 19 | 20 | 21 | public init( 22 | chatFilterId: Int?, 23 | filter: ChatFilter? 24 | ) { 25 | self.chatFilterId = chatFilterId 26 | self.filter = filter 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /TdlibKit/Models/EditCustomLanguagePackInfo.swift: -------------------------------------------------------------------------------- 1 | // 2 | // EditCustomLanguagePackInfo.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Edits information about a custom local language pack in the current localization target. Can be called before authorization 12 | public struct EditCustomLanguagePackInfo: Codable { 13 | 14 | /// New information about the custom local language pack 15 | public let info: LanguagePackInfo? 16 | 17 | 18 | public init(info: LanguagePackInfo?) { 19 | self.info = info 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/Emojis.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Emojis.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Represents a list of emoji 12 | public struct Emojis: Codable { 13 | 14 | /// List of emojis 15 | public let emojis: [String] 16 | 17 | 18 | public init(emojis: [String]) { 19 | self.emojis = emojis 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/EnableProxy.swift: -------------------------------------------------------------------------------- 1 | // 2 | // EnableProxy.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Enables a proxy. Only one proxy can be enabled at a time. Can be called before authorization 12 | public struct EnableProxy: Codable { 13 | 14 | /// Proxy identifier 15 | public let proxyId: Int? 16 | 17 | 18 | public init(proxyId: Int?) { 19 | self.proxyId = proxyId 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/EndGroupCallRecording.swift: -------------------------------------------------------------------------------- 1 | // 2 | // EndGroupCallRecording.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Ends recording of an active group call. Requires groupCall.can_be_managed group call flag 12 | public struct EndGroupCallRecording: Codable { 13 | 14 | /// Group call identifier 15 | public let groupCallId: Int? 16 | 17 | 18 | public init(groupCallId: Int?) { 19 | self.groupCallId = groupCallId 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/EndGroupCallScreenSharing.swift: -------------------------------------------------------------------------------- 1 | // 2 | // EndGroupCallScreenSharing.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Ends screen sharing in a joined group call 12 | public struct EndGroupCallScreenSharing: Codable { 13 | 14 | /// Group call identifier 15 | public let groupCallId: Int? 16 | 17 | 18 | public init(groupCallId: Int?) { 19 | self.groupCallId = groupCallId 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/FilePart.swift: -------------------------------------------------------------------------------- 1 | // 2 | // FilePart.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Contains a part of a file 12 | public struct FilePart: Codable { 13 | 14 | /// File bytes 15 | public let data: Data 16 | 17 | 18 | public init(data: Data) { 19 | self.data = data 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/GameHighScores.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GameHighScores.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Contains a list of game high scores 12 | public struct GameHighScores: Codable { 13 | 14 | /// A list of game high scores 15 | public let scores: [GameHighScore] 16 | 17 | 18 | public init(scores: [GameHighScore]) { 19 | self.scores = scores 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetAccountTtl.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetAccountTtl.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns the period of inactivity after which the account of the current user will automatically be deleted 12 | public struct GetAccountTtl: Codable { 13 | 14 | 15 | public init() {} 16 | } 17 | 18 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetActiveLiveLocationMessages.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetActiveLiveLocationMessages.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns all active live locations that need to be updated by the application. The list is persistent across application restarts only if the message database is used 12 | public struct GetActiveLiveLocationMessages: Codable { 13 | 14 | 15 | public init() {} 16 | } 17 | 18 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetActiveSessions.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetActiveSessions.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns all active sessions of the current user 12 | public struct GetActiveSessions: Codable { 13 | 14 | 15 | public init() {} 16 | } 17 | 18 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetAllPassportElements.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetAllPassportElements.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns all available Telegram Passport elements 12 | public struct GetAllPassportElements: Codable { 13 | 14 | /// Password of the current user 15 | public let password: String? 16 | 17 | 18 | public init(password: String?) { 19 | self.password = password 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetAnimatedEmoji.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetAnimatedEmoji.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns an animated emoji corresponding to a given emoji. Returns a 404 error if the emoji has no animated emoji 12 | public struct GetAnimatedEmoji: Codable { 13 | 14 | /// The emoji 15 | public let emoji: String? 16 | 17 | 18 | public init(emoji: String?) { 19 | self.emoji = emoji 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetApplicationConfig.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetApplicationConfig.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns application config, provided by the server. Can be called before authorization 12 | public struct GetApplicationConfig: Codable { 13 | 14 | 15 | public init() {} 16 | } 17 | 18 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetApplicationDownloadLink.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetApplicationDownloadLink.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns the link for downloading official Telegram application to be used when the current user invites friends to Telegram 12 | public struct GetApplicationDownloadLink: Codable { 13 | 14 | 15 | public init() {} 16 | } 17 | 18 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetAttachedStickerSets.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetAttachedStickerSets.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns a list of sticker sets attached to a file. Currently only photos and videos can have attached sticker sets 12 | public struct GetAttachedStickerSets: Codable { 13 | 14 | /// File identifier 15 | public let fileId: Int? 16 | 17 | 18 | public init(fileId: Int?) { 19 | self.fileId = fileId 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetAuthorizationState.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetAuthorizationState.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns the current authorization state; this is an offline request. For informational purposes only. Use updateAuthorizationState instead to maintain the current authorization state. Can be called before initialization 12 | public struct GetAuthorizationState: Codable { 13 | 14 | 15 | public init() {} 16 | } 17 | 18 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetAutoDownloadSettingsPresets.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetAutoDownloadSettingsPresets.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns auto-download settings presets for the current user 12 | public struct GetAutoDownloadSettingsPresets: Codable { 13 | 14 | 15 | public init() {} 16 | } 17 | 18 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetBackgroundUrl.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetBackgroundUrl.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Constructs a persistent HTTP URL for a background 12 | public struct GetBackgroundUrl: Codable { 13 | 14 | /// Background name 15 | public let name: String? 16 | 17 | /// Background type 18 | public let type: BackgroundType? 19 | 20 | 21 | public init( 22 | name: String?, 23 | type: BackgroundType? 24 | ) { 25 | self.name = name 26 | self.type = type 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetBackgrounds.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetBackgrounds.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns backgrounds installed by the user 12 | public struct GetBackgrounds: Codable { 13 | 14 | /// True, if the backgrounds must be ordered for dark theme 15 | public let forDarkTheme: Bool? 16 | 17 | 18 | public init(forDarkTheme: Bool?) { 19 | self.forDarkTheme = forDarkTheme 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetBankCardInfo.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetBankCardInfo.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns information about a bank card 12 | public struct GetBankCardInfo: Codable { 13 | 14 | /// The bank card number 15 | public let bankCardNumber: String? 16 | 17 | 18 | public init(bankCardNumber: String?) { 19 | self.bankCardNumber = bankCardNumber 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetBasicGroup.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetBasicGroup.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns information about a basic group by its identifier. This is an offline request if the current user is not a bot 12 | public struct GetBasicGroup: Codable { 13 | 14 | /// Basic group identifier 15 | public let basicGroupId: Int64? 16 | 17 | 18 | public init(basicGroupId: Int64?) { 19 | self.basicGroupId = basicGroupId 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetBasicGroupFullInfo.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetBasicGroupFullInfo.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns full information about a basic group by its identifier 12 | public struct GetBasicGroupFullInfo: Codable { 13 | 14 | /// Basic group identifier 15 | public let basicGroupId: Int64? 16 | 17 | 18 | public init(basicGroupId: Int64?) { 19 | self.basicGroupId = basicGroupId 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetChat.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetChat.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns information about a chat by its identifier, this is an offline request if the current user is not a bot 12 | public struct GetChat: Codable { 13 | 14 | /// Chat identifier 15 | public let chatId: Int64? 16 | 17 | 18 | public init(chatId: Int64?) { 19 | self.chatId = chatId 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetChatAdministrators.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetChatAdministrators.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns a list of administrators of the chat with their custom titles 12 | public struct GetChatAdministrators: Codable { 13 | 14 | /// Chat identifier 15 | public let chatId: Int64? 16 | 17 | 18 | public init(chatId: Int64?) { 19 | self.chatId = chatId 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetChatAvailableMessageSenders.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetChatAvailableMessageSenders.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns list of message sender identifiers, which can be used to send messages in a chat 12 | public struct GetChatAvailableMessageSenders: Codable { 13 | 14 | /// Chat identifier 15 | public let chatId: Int64? 16 | 17 | 18 | public init(chatId: Int64?) { 19 | self.chatId = chatId 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetChatFilter.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetChatFilter.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns information about a chat filter by its identifier 12 | public struct GetChatFilter: Codable { 13 | 14 | /// Chat filter identifier 15 | public let chatFilterId: Int? 16 | 17 | 18 | public init(chatFilterId: Int?) { 19 | self.chatFilterId = chatFilterId 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetChatFilterDefaultIconName.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetChatFilterDefaultIconName.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns default icon name for a filter. Can be called synchronously 12 | public struct GetChatFilterDefaultIconName: Codable { 13 | 14 | /// Chat filter 15 | public let filter: ChatFilter? 16 | 17 | 18 | public init(filter: ChatFilter?) { 19 | self.filter = filter 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetChatInviteLinkCounts.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetChatInviteLinkCounts.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns list of chat administrators with number of their invite links. Requires owner privileges in the chat 12 | public struct GetChatInviteLinkCounts: Codable { 13 | 14 | /// Chat identifier 15 | public let chatId: Int64? 16 | 17 | 18 | public init(chatId: Int64?) { 19 | self.chatId = chatId 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetChatListsToAddChat.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetChatListsToAddChat.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns chat lists to which the chat can be added. This is an offline request 12 | public struct GetChatListsToAddChat: Codable { 13 | 14 | /// Chat identifier 15 | public let chatId: Int64? 16 | 17 | 18 | public init(chatId: Int64?) { 19 | self.chatId = chatId 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetChatMember.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetChatMember.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns information about a single member of a chat 12 | public struct GetChatMember: Codable { 13 | 14 | /// Chat identifier 15 | public let chatId: Int64? 16 | 17 | /// Member identifier 18 | public let memberId: MessageSender? 19 | 20 | 21 | public init( 22 | chatId: Int64?, 23 | memberId: MessageSender? 24 | ) { 25 | self.chatId = chatId 26 | self.memberId = memberId 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetChatMessageByDate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetChatMessageByDate.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns the last message sent in a chat no later than the specified date 12 | public struct GetChatMessageByDate: Codable { 13 | 14 | /// Chat identifier 15 | public let chatId: Int64? 16 | 17 | /// Point in time (Unix timestamp) relative to which to search for messages 18 | public let date: Int? 19 | 20 | 21 | public init( 22 | chatId: Int64?, 23 | date: Int? 24 | ) { 25 | self.chatId = chatId 26 | self.date = date 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetChatPinnedMessage.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetChatPinnedMessage.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns information about a newest pinned message in the chat 12 | public struct GetChatPinnedMessage: Codable { 13 | 14 | /// Identifier of the chat the message belongs to 15 | public let chatId: Int64? 16 | 17 | 18 | public init(chatId: Int64?) { 19 | self.chatId = chatId 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetChatScheduledMessages.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetChatScheduledMessages.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns all scheduled messages in a chat. The messages are returned in a reverse chronological order (i.e., in order of decreasing message_id) 12 | public struct GetChatScheduledMessages: Codable { 13 | 14 | /// Chat identifier 15 | public let chatId: Int64? 16 | 17 | 18 | public init(chatId: Int64?) { 19 | self.chatId = chatId 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetChatSponsoredMessages.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetChatSponsoredMessages.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns sponsored messages to be shown in a chat; for channel chats only 12 | public struct GetChatSponsoredMessages: Codable { 13 | 14 | /// Identifier of the chat 15 | public let chatId: Int64? 16 | 17 | 18 | public init(chatId: Int64?) { 19 | self.chatId = chatId 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetConnectedWebsites.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetConnectedWebsites.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns all website where the current user used Telegram to log in 12 | public struct GetConnectedWebsites: Codable { 13 | 14 | 15 | public init() {} 16 | } 17 | 18 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetContacts.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetContacts.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns all user contacts 12 | public struct GetContacts: Codable { 13 | 14 | 15 | public init() {} 16 | } 17 | 18 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetCountries.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetCountries.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns information about existing countries. Can be called before authorization 12 | public struct GetCountries: Codable { 13 | 14 | 15 | public init() {} 16 | } 17 | 18 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetCountryCode.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetCountryCode.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Uses the current IP address to find the current country. Returns two-letter ISO 3166-1 alpha-2 country code. Can be called before authorization 12 | public struct GetCountryCode: Codable { 13 | 14 | 15 | public init() {} 16 | } 17 | 18 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetCreatedPublicChats.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetCreatedPublicChats.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns a list of public chats of the specified type, owned by the user 12 | public struct GetCreatedPublicChats: Codable { 13 | 14 | /// Type of the public chats to return 15 | public let type: PublicChatType? 16 | 17 | 18 | public init(type: PublicChatType?) { 19 | self.type = type 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetCurrentState.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetCurrentState.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns all updates needed to restore current TDLib state, i.e. all actual UpdateAuthorizationState/UpdateUser/UpdateNewChat and others. This is especially useful if TDLib is run in a separate process. Can be called before initialization 12 | public struct GetCurrentState: Codable { 13 | 14 | 15 | public init() {} 16 | } 17 | 18 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetDatabaseStatistics.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetDatabaseStatistics.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns database statistics 12 | public struct GetDatabaseStatistics: Codable { 13 | 14 | 15 | public init() {} 16 | } 17 | 18 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetDeepLinkInfo.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetDeepLinkInfo.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns information about a tg:// deep link. Use "tg://need_update_for_some_feature" or "tg:some_unsupported_feature" for testing. Returns a 404 error for unknown links. Can be called before authorization 12 | public struct GetDeepLinkInfo: Codable { 13 | 14 | /// The link 15 | public let link: String? 16 | 17 | 18 | public init(link: String?) { 19 | self.link = link 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetEmojiSuggestionsUrl.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetEmojiSuggestionsUrl.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns an HTTP URL which can be used to automatically log in to the translation platform and suggest new emoji replacements. The URL will be valid for 30 seconds after generation 12 | public struct GetEmojiSuggestionsUrl: Codable { 13 | 14 | /// Language code for which the emoji replacements will be suggested 15 | public let languageCode: String? 16 | 17 | 18 | public init(languageCode: String?) { 19 | self.languageCode = languageCode 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetExternalLinkInfo.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetExternalLinkInfo.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns information about an action to be done when the current user clicks an external link. Don't use this method for links from secret chats if web page preview is disabled in secret chats 12 | public struct GetExternalLinkInfo: Codable { 13 | 14 | /// The link 15 | public let link: String? 16 | 17 | 18 | public init(link: String?) { 19 | self.link = link 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetFavoriteStickers.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetFavoriteStickers.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns favorite stickers 12 | public struct GetFavoriteStickers: Codable { 13 | 14 | 15 | public init() {} 16 | } 17 | 18 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetFile.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetFile.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns information about a file; this is an offline request 12 | public struct GetFile: Codable { 13 | 14 | /// Identifier of the file to get 15 | public let fileId: Int? 16 | 17 | 18 | public init(fileId: Int?) { 19 | self.fileId = fileId 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetFileExtension.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetFileExtension.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns the extension of a file, guessed by its MIME type. Returns an empty string on failure. Can be called synchronously 12 | public struct GetFileExtension: Codable { 13 | 14 | /// The MIME type of the file 15 | public let mimeType: String? 16 | 17 | 18 | public init(mimeType: String?) { 19 | self.mimeType = mimeType 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetFileMimeType.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetFileMimeType.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns the MIME type of a file, guessed by its extension. Returns an empty string on failure. Can be called synchronously 12 | public struct GetFileMimeType: Codable { 13 | 14 | /// The name of the file or path to the file 15 | public let fileName: String? 16 | 17 | 18 | public init(fileName: String?) { 19 | self.fileName = fileName 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetGroupCall.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetGroupCall.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns information about a group call 12 | public struct GetGroupCall: Codable { 13 | 14 | /// Group call identifier 15 | public let groupCallId: Int? 16 | 17 | 18 | public init(groupCallId: Int?) { 19 | self.groupCallId = groupCallId 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetImportedContactCount.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetImportedContactCount.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns the total number of imported contacts 12 | public struct GetImportedContactCount: Codable { 13 | 14 | 15 | public init() {} 16 | } 17 | 18 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetInactiveSupergroupChats.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetInactiveSupergroupChats.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns a list of recently inactive supergroups and channels. Can be used when user reaches limit on the number of joined supergroups and channels and receives CHANNELS_TOO_MUCH error 12 | public struct GetInactiveSupergroupChats: Codable { 13 | 14 | 15 | public init() {} 16 | } 17 | 18 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetInstalledStickerSets.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetInstalledStickerSets.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns a list of installed sticker sets 12 | public struct GetInstalledStickerSets: Codable { 13 | 14 | /// Pass true to return mask sticker sets; pass false to return ordinary sticker sets 15 | public let isMasks: Bool? 16 | 17 | 18 | public init(isMasks: Bool?) { 19 | self.isMasks = isMasks 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetInternalLinkType.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetInternalLinkType.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns information about the type of an internal link. Returns a 404 error if the link is not internal. Can be called before authorization 12 | public struct GetInternalLinkType: Codable { 13 | 14 | /// The link 15 | public let link: String? 16 | 17 | 18 | public init(link: String?) { 19 | self.link = link 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetJsonString.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetJsonString.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Converts a JsonValue object to corresponding JSON-serialized string. Can be called synchronously 12 | public struct GetJsonString: Codable { 13 | 14 | /// The JsonValue object 15 | public let jsonValue: JsonValue? 16 | 17 | 18 | public init(jsonValue: JsonValue?) { 19 | self.jsonValue = jsonValue 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetJsonValue.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetJsonValue.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Converts a JSON-serialized string to corresponding JsonValue object. Can be called synchronously 12 | public struct GetJsonValue: Codable { 13 | 14 | /// The JSON-serialized string 15 | public let json: String? 16 | 17 | 18 | public init(json: String?) { 19 | self.json = json 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetLanguagePackInfo.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetLanguagePackInfo.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns information about a language pack. Returned language pack identifier may be different from a provided one. Can be called before authorization 12 | public struct GetLanguagePackInfo: Codable { 13 | 14 | /// Language pack identifier 15 | public let languagePackId: String? 16 | 17 | 18 | public init(languagePackId: String?) { 19 | self.languagePackId = languagePackId 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetLocalizationTargetInfo.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetLocalizationTargetInfo.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns information about the current localization target. This is an offline request if only_local is true. Can be called before authorization 12 | public struct GetLocalizationTargetInfo: Codable { 13 | 14 | /// If true, returns only locally available information without sending network requests 15 | public let onlyLocal: Bool? 16 | 17 | 18 | public init(onlyLocal: Bool?) { 19 | self.onlyLocal = onlyLocal 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetLogStream.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetLogStream.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns information about currently used log stream for internal logging of TDLib. Can be called synchronously 12 | public struct GetLogStream: Codable { 13 | 14 | 15 | public init() {} 16 | } 17 | 18 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetLogTagVerbosityLevel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetLogTagVerbosityLevel.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns current verbosity level for a specified TDLib internal log tag. Can be called synchronously 12 | public struct GetLogTagVerbosityLevel: Codable { 13 | 14 | /// Logging tag to change verbosity level 15 | public let tag: String? 16 | 17 | 18 | public init(tag: String?) { 19 | self.tag = tag 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetLogTags.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetLogTags.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns list of available TDLib internal log tags, for example, ["actor", "binlog", "connections", "notifications", "proxy"]. Can be called synchronously 12 | public struct GetLogTags: Codable { 13 | 14 | 15 | public init() {} 16 | } 17 | 18 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetLogVerbosityLevel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetLogVerbosityLevel.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns current verbosity level of the internal logging of TDLib. Can be called synchronously 12 | public struct GetLogVerbosityLevel: Codable { 13 | 14 | 15 | public init() {} 16 | } 17 | 18 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetMarkdownText.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetMarkdownText.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Replaces text entities with Markdown formatting in a human-friendly format. Entities that can't be represented in Markdown unambiguously are kept as is. Can be called synchronously 12 | public struct GetMarkdownText: Codable { 13 | 14 | /// The text 15 | public let text: FormattedText? 16 | 17 | 18 | public init(text: FormattedText?) { 19 | self.text = text 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetMe.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetMe.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns the current user 12 | public struct GetMe: Codable { 13 | 14 | 15 | public init() {} 16 | } 17 | 18 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetMessage.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetMessage.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns information about a message 12 | public struct GetMessage: Codable { 13 | 14 | /// Identifier of the chat the message belongs to 15 | public let chatId: Int64? 16 | 17 | /// Identifier of the message to get 18 | public let messageId: Int64? 19 | 20 | 21 | public init( 22 | chatId: Int64?, 23 | messageId: Int64? 24 | ) { 25 | self.chatId = chatId 26 | self.messageId = messageId 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetMessageFileType.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetMessageFileType.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns information about a file with messages exported from another app 12 | public struct GetMessageFileType: Codable { 13 | 14 | /// Beginning of the message file; up to 100 first lines 15 | public let messageFileHead: String? 16 | 17 | 18 | public init(messageFileHead: String?) { 19 | self.messageFileHead = messageFileHead 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetMessageLinkInfo.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetMessageLinkInfo.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns information about a public or private message link. Can be called for any internal link of the type internalLinkTypeMessage 12 | public struct GetMessageLinkInfo: Codable { 13 | 14 | /// The message link 15 | public let url: String? 16 | 17 | 18 | public init(url: String?) { 19 | self.url = url 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetMessageThread.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetMessageThread.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns information about a message thread. Can be used only if message.can_get_message_thread == true 12 | public struct GetMessageThread: Codable { 13 | 14 | /// Chat identifier 15 | public let chatId: Int64? 16 | 17 | /// Identifier of the message 18 | public let messageId: Int64? 19 | 20 | 21 | public init( 22 | chatId: Int64?, 23 | messageId: Int64? 24 | ) { 25 | self.chatId = chatId 26 | self.messageId = messageId 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetNetworkStatistics.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetNetworkStatistics.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns network data usage statistics. Can be called before authorization 12 | public struct GetNetworkStatistics: Codable { 13 | 14 | /// If true, returns only data for the current library launch 15 | public let onlyCurrent: Bool? 16 | 17 | 18 | public init(onlyCurrent: Bool?) { 19 | self.onlyCurrent = onlyCurrent 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetOption.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetOption.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns the value of an option by its name. (Check the list of available options on https://core.telegram.org/tdlib/options.) Can be called before authorization 12 | public struct GetOption: Codable { 13 | 14 | /// The name of the option 15 | public let name: String? 16 | 17 | 18 | public init(name: String?) { 19 | self.name = name 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetPassportElement.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetPassportElement.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns one of the available Telegram Passport elements 12 | public struct GetPassportElement: Codable { 13 | 14 | /// Password of the current user 15 | public let password: String? 16 | 17 | /// Telegram Passport element type 18 | public let type: PassportElementType? 19 | 20 | 21 | public init( 22 | password: String?, 23 | type: PassportElementType? 24 | ) { 25 | self.password = password 26 | self.type = type 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetPasswordState.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetPasswordState.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns the current state of 2-step verification 12 | public struct GetPasswordState: Codable { 13 | 14 | 15 | public init() {} 16 | } 17 | 18 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetPaymentReceipt.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetPaymentReceipt.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns information about a successful payment 12 | public struct GetPaymentReceipt: Codable { 13 | 14 | /// Chat identifier of the PaymentSuccessful message 15 | public let chatId: Int64? 16 | 17 | /// Message identifier 18 | public let messageId: Int64? 19 | 20 | 21 | public init( 22 | chatId: Int64?, 23 | messageId: Int64? 24 | ) { 25 | self.chatId = chatId 26 | self.messageId = messageId 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetPhoneNumberInfo.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetPhoneNumberInfo.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns information about a phone number by its prefix. Can be called before authorization 12 | public struct GetPhoneNumberInfo: Codable { 13 | 14 | /// The phone number prefix 15 | public let phoneNumberPrefix: String? 16 | 17 | 18 | public init(phoneNumberPrefix: String?) { 19 | self.phoneNumberPrefix = phoneNumberPrefix 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetPreferredCountryLanguage.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetPreferredCountryLanguage.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns an IETF language tag of the language preferred in the country, which must be used to fill native fields in Telegram Passport personal details. Returns a 404 error if unknown 12 | public struct GetPreferredCountryLanguage: Codable { 13 | 14 | /// A two-letter ISO 3166-1 alpha-2 country code 15 | public let countryCode: String? 16 | 17 | 18 | public init(countryCode: String?) { 19 | self.countryCode = countryCode 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetProxies.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetProxies.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns list of proxies that are currently set up. Can be called before authorization 12 | public struct GetProxies: Codable { 13 | 14 | 15 | public init() {} 16 | } 17 | 18 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetProxyLink.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetProxyLink.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns an HTTPS link, which can be used to add a proxy. Available only for SOCKS5 and MTProto proxies. Can be called before authorization 12 | public struct GetProxyLink: Codable { 13 | 14 | /// Proxy identifier 15 | public let proxyId: Int? 16 | 17 | 18 | public init(proxyId: Int?) { 19 | self.proxyId = proxyId 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetPushReceiverId.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetPushReceiverId.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns a globally unique push notification subscription identifier for identification of an account, which has received a push notification. Can be called synchronously 12 | public struct GetPushReceiverId: Codable { 13 | 14 | /// JSON-encoded push notification payload 15 | public let payload: String? 16 | 17 | 18 | public init(payload: String?) { 19 | self.payload = payload 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetRecentInlineBots.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetRecentInlineBots.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns up to 20 recently used inline bots in the order of their last usage 12 | public struct GetRecentInlineBots: Codable { 13 | 14 | 15 | public init() {} 16 | } 17 | 18 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetRecentStickers.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetRecentStickers.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns a list of recently used stickers 12 | public struct GetRecentStickers: Codable { 13 | 14 | /// Pass true to return stickers and masks that were recently attached to photos or video files; pass false to return recently sent stickers 15 | public let isAttached: Bool? 16 | 17 | 18 | public init(isAttached: Bool?) { 19 | self.isAttached = isAttached 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetRecentlyOpenedChats.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetRecentlyOpenedChats.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns recently opened chats, this is an offline request. Returns chats in the order of last opening 12 | public struct GetRecentlyOpenedChats: Codable { 13 | 14 | /// The maximum number of chats to be returned 15 | public let limit: Int? 16 | 17 | 18 | public init(limit: Int?) { 19 | self.limit = limit 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetRecentlyVisitedTMeUrls.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetRecentlyVisitedTMeUrls.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns t.me URLs recently visited by a newly registered user 12 | public struct GetRecentlyVisitedTMeUrls: Codable { 13 | 14 | /// Google Play referrer to identify the user 15 | public let referrer: String? 16 | 17 | 18 | public init(referrer: String?) { 19 | self.referrer = referrer 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetRecommendedChatFilters.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetRecommendedChatFilters.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns recommended chat filters for the current user 12 | public struct GetRecommendedChatFilters: Codable { 13 | 14 | 15 | public init() {} 16 | } 17 | 18 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetRecoveryEmailAddress.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetRecoveryEmailAddress.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns a 2-step verification recovery email address that was previously set up. This method can be used to verify a password provided by the user 12 | public struct GetRecoveryEmailAddress: Codable { 13 | 14 | /// The password for the current user 15 | public let password: String? 16 | 17 | 18 | public init(password: String?) { 19 | self.password = password 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetSavedAnimations.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetSavedAnimations.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns saved animations 12 | public struct GetSavedAnimations: Codable { 13 | 14 | 15 | public init() {} 16 | } 17 | 18 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetSavedOrderInfo.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetSavedOrderInfo.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns saved order info, if any 12 | public struct GetSavedOrderInfo: Codable { 13 | 14 | 15 | public init() {} 16 | } 17 | 18 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetScopeNotificationSettings.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetScopeNotificationSettings.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns the notification settings for chats of a given type 12 | public struct GetScopeNotificationSettings: Codable { 13 | 14 | /// Types of chats for which to return the notification settings information 15 | public let scope: NotificationSettingsScope? 16 | 17 | 18 | public init(scope: NotificationSettingsScope?) { 19 | self.scope = scope 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetSecretChat.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetSecretChat.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns information about a secret chat by its identifier. This is an offline request 12 | public struct GetSecretChat: Codable { 13 | 14 | /// Secret chat identifier 15 | public let secretChatId: Int? 16 | 17 | 18 | public init(secretChatId: Int?) { 19 | self.secretChatId = secretChatId 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetStickerEmojis.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetStickerEmojis.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns emoji corresponding to a sticker. The list is only for informational purposes, because a sticker is always sent with a fixed emoji from the corresponding Sticker object 12 | public struct GetStickerEmojis: Codable { 13 | 14 | /// Sticker file identifier 15 | public let sticker: InputFile? 16 | 17 | 18 | public init(sticker: InputFile?) { 19 | self.sticker = sticker 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetStickerSet.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetStickerSet.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns information about a sticker set by its identifier 12 | public struct GetStickerSet: Codable { 13 | 14 | /// Identifier of the sticker set 15 | public let setId: TdInt64? 16 | 17 | 18 | public init(setId: TdInt64?) { 19 | self.setId = setId 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetStorageStatisticsFast.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetStorageStatisticsFast.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Quickly returns approximate storage usage statistics. Can be called before authorization 12 | public struct GetStorageStatisticsFast: Codable { 13 | 14 | 15 | public init() {} 16 | } 17 | 18 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetSuggestedFileName.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetSuggestedFileName.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns suggested name for saving a file in a given directory 12 | public struct GetSuggestedFileName: Codable { 13 | 14 | /// Directory in which the file is supposed to be saved 15 | public let directory: String? 16 | 17 | /// Identifier of the file 18 | public let fileId: Int? 19 | 20 | 21 | public init( 22 | directory: String?, 23 | fileId: Int? 24 | ) { 25 | self.directory = directory 26 | self.fileId = fileId 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetSuggestedStickerSetName.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetSuggestedStickerSetName.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns a suggested name for a new sticker set with a given title 12 | public struct GetSuggestedStickerSetName: Codable { 13 | 14 | /// Sticker set title; 1-64 characters 15 | public let title: String? 16 | 17 | 18 | public init(title: String?) { 19 | self.title = title 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetSuitableDiscussionChats.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetSuitableDiscussionChats.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns a list of basic group and supergroup chats, which can be used as a discussion group for a channel. Returned basic group chats must be first upgraded to supergroups before they can be set as a discussion group. To set a returned supergroup as a discussion group, access to its old messages must be enabled using toggleSupergroupIsAllHistoryAvailable first 12 | public struct GetSuitableDiscussionChats: Codable { 13 | 14 | 15 | public init() {} 16 | } 17 | 18 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetSupergroup.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetSupergroup.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns information about a supergroup or a channel by its identifier. This is an offline request if the current user is not a bot 12 | public struct GetSupergroup: Codable { 13 | 14 | /// Supergroup or channel identifier 15 | public let supergroupId: Int64? 16 | 17 | 18 | public init(supergroupId: Int64?) { 19 | self.supergroupId = supergroupId 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetSupergroupFullInfo.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetSupergroupFullInfo.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns full information about a supergroup or a channel by its identifier, cached for up to 1 minute 12 | public struct GetSupergroupFullInfo: Codable { 13 | 14 | /// Supergroup or channel identifier 15 | public let supergroupId: Int64? 16 | 17 | 18 | public init(supergroupId: Int64?) { 19 | self.supergroupId = supergroupId 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetSupportUser.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetSupportUser.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns a user that can be contacted to get support 12 | public struct GetSupportUser: Codable { 13 | 14 | 15 | public init() {} 16 | } 17 | 18 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetTemporaryPasswordState.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetTemporaryPasswordState.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns information about the current temporary password 12 | public struct GetTemporaryPasswordState: Codable { 13 | 14 | 15 | public init() {} 16 | } 17 | 18 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetTextEntities.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetTextEntities.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns all entities (mentions, hashtags, cashtags, bot commands, bank card numbers, URLs, and email addresses) contained in the text. Can be called synchronously 12 | public struct GetTextEntities: Codable { 13 | 14 | /// The text in which to look for entites 15 | public let text: String? 16 | 17 | 18 | public init(text: String?) { 19 | self.text = text 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetUser.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetUser.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns information about a user by their identifier. This is an offline request if the current user is not a bot 12 | public struct GetUser: Codable { 13 | 14 | /// User identifier 15 | public let userId: Int64? 16 | 17 | 18 | public init(userId: Int64?) { 19 | self.userId = userId 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetUserFullInfo.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetUserFullInfo.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns full information about a user by their identifier 12 | public struct GetUserFullInfo: Codable { 13 | 14 | /// User identifier 15 | public let userId: Int64? 16 | 17 | 18 | public init(userId: Int64?) { 19 | self.userId = userId 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetUserPrivacySettingRules.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetUserPrivacySettingRules.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns the current privacy settings 12 | public struct GetUserPrivacySettingRules: Codable { 13 | 14 | /// The privacy setting 15 | public let setting: UserPrivacySetting? 16 | 17 | 18 | public init(setting: UserPrivacySetting?) { 19 | self.setting = setting 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetVideoChatAvailableParticipants.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetVideoChatAvailableParticipants.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns list of participant identifiers, which can be used to join video chats in a chat 12 | public struct GetVideoChatAvailableParticipants: Codable { 13 | 14 | /// Chat identifier 15 | public let chatId: Int64? 16 | 17 | 18 | public init(chatId: Int64?) { 19 | self.chatId = chatId 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/GetWebPagePreview.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetWebPagePreview.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns a web page preview by the text of the message. Do not call this function too often. Returns a 404 error if the web page has no preview 12 | public struct GetWebPagePreview: Codable { 13 | 14 | /// Message text with formatting 15 | public let text: FormattedText? 16 | 17 | 18 | public init(text: FormattedText?) { 19 | self.text = text 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/GroupCallId.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GroupCallId.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Contains the group call identifier 12 | public struct GroupCallId: Codable { 13 | 14 | /// Group call identifier 15 | public let id: Int 16 | 17 | 18 | public init(id: Int) { 19 | self.id = id 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/Hashtags.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Hashtags.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Contains a list of hashtags 12 | public struct Hashtags: Codable { 13 | 14 | /// A list of hashtags 15 | public let hashtags: [String] 16 | 17 | 18 | public init(hashtags: [String]) { 19 | self.hashtags = hashtags 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/HideSuggestedAction.swift: -------------------------------------------------------------------------------- 1 | // 2 | // HideSuggestedAction.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Hides a suggested action 12 | public struct HideSuggestedAction: Codable { 13 | 14 | /// Suggested action to hide 15 | public let action: SuggestedAction? 16 | 17 | 18 | public init(action: SuggestedAction?) { 19 | self.action = action 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/HttpUrl.swift: -------------------------------------------------------------------------------- 1 | // 2 | // HttpUrl.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Contains an HTTP URL 12 | public struct HttpUrl: Codable { 13 | 14 | /// The URL 15 | public let url: String 16 | 17 | 18 | public init(url: String) { 19 | self.url = url 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/ImportContacts.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ImportContacts.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Adds new contacts or edits existing contacts by their phone numbers; contacts' user identifiers are ignored 12 | public struct ImportContacts: Codable { 13 | 14 | /// The list of contacts to import or edit; contacts' vCard are ignored and are not imported 15 | public let contacts: [Contact]? 16 | 17 | 18 | public init(contacts: [Contact]?) { 19 | self.contacts = contacts 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/InlineKeyboardButton.swift: -------------------------------------------------------------------------------- 1 | // 2 | // InlineKeyboardButton.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Represents a single button in an inline keyboard 12 | public struct InlineKeyboardButton: Codable { 13 | 14 | /// Text of the button 15 | public let text: String 16 | 17 | /// Type of the button 18 | public let type: InlineKeyboardButtonType 19 | 20 | 21 | public init( 22 | text: String, 23 | type: InlineKeyboardButtonType 24 | ) { 25 | self.text = text 26 | self.type = type 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /TdlibKit/Models/JoinChat.swift: -------------------------------------------------------------------------------- 1 | // 2 | // JoinChat.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Adds the current user as a new member to a chat. Private and secret chats can't be joined using this method 12 | public struct JoinChat: Codable { 13 | 14 | /// Chat identifier 15 | public let chatId: Int64? 16 | 17 | 18 | public init(chatId: Int64?) { 19 | self.chatId = chatId 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/JoinChatByInviteLink.swift: -------------------------------------------------------------------------------- 1 | // 2 | // JoinChatByInviteLink.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Uses an invite link to add the current user to the chat if possible 12 | public struct JoinChatByInviteLink: Codable { 13 | 14 | /// Invite link to use 15 | public let inviteLink: String? 16 | 17 | 18 | public init(inviteLink: String?) { 19 | self.inviteLink = inviteLink 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/JsonObjectMember.swift: -------------------------------------------------------------------------------- 1 | // 2 | // JsonObjectMember.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Represents one member of a JSON object 12 | public struct JsonObjectMember: Codable { 13 | 14 | /// Member's key 15 | public let key: String 16 | 17 | /// Member's value 18 | public let value: JsonValue 19 | 20 | 21 | public init( 22 | key: String, 23 | value: JsonValue 24 | ) { 25 | self.key = key 26 | self.value = value 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /TdlibKit/Models/KeyboardButton.swift: -------------------------------------------------------------------------------- 1 | // 2 | // KeyboardButton.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Represents a single button in a bot keyboard 12 | public struct KeyboardButton: Codable { 13 | 14 | /// Text of the button 15 | public let text: String 16 | 17 | /// Type of the button 18 | public let type: KeyboardButtonType 19 | 20 | 21 | public init( 22 | text: String, 23 | type: KeyboardButtonType 24 | ) { 25 | self.text = text 26 | self.type = type 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /TdlibKit/Models/LabeledPricePart.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LabeledPricePart.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Portion of the price of a product (e.g., "delivery cost", "tax amount") 12 | public struct LabeledPricePart: Codable { 13 | 14 | /// Currency amount in the smallest units of the currency 15 | public let amount: Int64 16 | 17 | /// Label for this portion of the product price 18 | public let label: String 19 | 20 | 21 | public init( 22 | amount: Int64, 23 | label: String 24 | ) { 25 | self.amount = amount 26 | self.label = label 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /TdlibKit/Models/LanguagePackString.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LanguagePackString.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Represents one language pack string 12 | public struct LanguagePackString: Codable { 13 | 14 | /// String key 15 | public let key: String 16 | 17 | /// String value; pass null if the string needs to be taken from the built-in English language pack 18 | public let value: LanguagePackStringValue 19 | 20 | 21 | public init( 22 | key: String, 23 | value: LanguagePackStringValue 24 | ) { 25 | self.key = key 26 | self.value = value 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /TdlibKit/Models/LanguagePackStrings.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LanguagePackStrings.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Contains a list of language pack strings 12 | public struct LanguagePackStrings: Codable { 13 | 14 | /// A list of language pack strings 15 | public let strings: [LanguagePackString] 16 | 17 | 18 | public init(strings: [LanguagePackString]) { 19 | self.strings = strings 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/LeaveChat.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LeaveChat.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Removes the current user from chat members. Private and secret chats can't be left using this method 12 | public struct LeaveChat: Codable { 13 | 14 | /// Chat identifier 15 | public let chatId: Int64? 16 | 17 | 18 | public init(chatId: Int64?) { 19 | self.chatId = chatId 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/LeaveGroupCall.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LeaveGroupCall.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Leaves a group call 12 | public struct LeaveGroupCall: Codable { 13 | 14 | /// Group call identifier 15 | public let groupCallId: Int? 16 | 17 | 18 | public init(groupCallId: Int?) { 19 | self.groupCallId = groupCallId 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/LocalizationTargetInfo.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LocalizationTargetInfo.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Contains information about the current localization target 12 | public struct LocalizationTargetInfo: Codable { 13 | 14 | /// List of available language packs for this application 15 | public let languagePacks: [LanguagePackInfo] 16 | 17 | 18 | public init(languagePacks: [LanguagePackInfo]) { 19 | self.languagePacks = languagePacks 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/LogOut.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LogOut.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Closes the TDLib instance after a proper logout. Requires an available network connection. All local data will be destroyed. After the logout completes, updateAuthorizationState with authorizationStateClosed will be sent 12 | public struct LogOut: Codable { 13 | 14 | 15 | public init() {} 16 | } 17 | 18 | -------------------------------------------------------------------------------- /TdlibKit/Models/LogTags.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LogTags.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Contains a list of available TDLib internal log tags 12 | public struct LogTags: Codable { 13 | 14 | /// List of log tags 15 | public let tags: [String] 16 | 17 | 18 | public init(tags: [String]) { 19 | self.tags = tags 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/LogVerbosityLevel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LogVerbosityLevel.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Contains a TDLib internal log verbosity level 12 | public struct LogVerbosityLevel: Codable { 13 | 14 | /// Log verbosity level 15 | public let verbosityLevel: Int 16 | 17 | 18 | public init(verbosityLevel: Int) { 19 | self.verbosityLevel = verbosityLevel 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/MessageCalendarDay.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MessageCalendarDay.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Contains information about found messages sent in a specific day 12 | public struct MessageCalendarDay: Codable { 13 | 14 | /// First message sent in the day 15 | public let message: Message 16 | 17 | /// Total number of found messages sent in the day 18 | public let totalCount: Int 19 | 20 | 21 | public init( 22 | message: Message, 23 | totalCount: Int 24 | ) { 25 | self.message = message 26 | self.totalCount = totalCount 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /TdlibKit/Models/MessageLink.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MessageLink.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Contains an HTTPS link to a message in a supergroup or channel 12 | public struct MessageLink: Codable { 13 | 14 | /// True, if the link will work for non-members of the chat 15 | public let isPublic: Bool 16 | 17 | /// Message link 18 | public let link: String 19 | 20 | 21 | public init( 22 | isPublic: Bool, 23 | link: String 24 | ) { 25 | self.isPublic = isPublic 26 | self.link = link 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /TdlibKit/Models/MessagePositions.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MessagePositions.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Contains a list of message positions 12 | public struct MessagePositions: Codable { 13 | 14 | /// List of message positions 15 | public let positions: [MessagePosition] 16 | 17 | /// Total count of messages found 18 | public let totalCount: Int 19 | 20 | 21 | public init( 22 | positions: [MessagePosition], 23 | totalCount: Int 24 | ) { 25 | self.positions = positions 26 | self.totalCount = totalCount 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /TdlibKit/Models/MessageSenders.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MessageSenders.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Represents a list of message senders 12 | public struct MessageSenders: Codable { 13 | 14 | /// List of message senders 15 | public let senders: [MessageSender] 16 | 17 | /// Approximate total count of messages senders found 18 | public let totalCount: Int 19 | 20 | 21 | public init( 22 | senders: [MessageSender], 23 | totalCount: Int 24 | ) { 25 | self.senders = senders 26 | self.totalCount = totalCount 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /TdlibKit/Models/MessageStatistics.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MessageStatistics.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// A detailed statistics about a message 12 | public struct MessageStatistics: Codable { 13 | 14 | /// A graph containing number of message views and shares 15 | public let messageInteractionGraph: StatisticalGraph 16 | 17 | 18 | public init(messageInteractionGraph: StatisticalGraph) { 19 | self.messageInteractionGraph = messageInteractionGraph 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/Messages.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Messages.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Contains a list of messages 12 | public struct Messages: Codable { 13 | 14 | /// List of messages; messages may be null 15 | public let messages: [Message]? 16 | 17 | /// Approximate total count of messages found 18 | public let totalCount: Int 19 | 20 | 21 | public init( 22 | messages: [Message]?, 23 | totalCount: Int 24 | ) { 25 | self.messages = messages 26 | self.totalCount = totalCount 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /TdlibKit/Models/Ok.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Ok.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// An object of this type is returned on a successful function call for certain functions 12 | public struct Ok: Codable { 13 | 14 | 15 | public init() {} 16 | } 17 | 18 | -------------------------------------------------------------------------------- /TdlibKit/Models/OpenChat.swift: -------------------------------------------------------------------------------- 1 | // 2 | // OpenChat.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Informs TDLib that the chat is opened by the user. Many useful activities depend on the chat being opened or closed (e.g., in supergroups and channels all updates are received only for opened chats) 12 | public struct OpenChat: Codable { 13 | 14 | /// Chat identifier 15 | public let chatId: Int64? 16 | 17 | 18 | public init(chatId: Int64?) { 19 | self.chatId = chatId 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/PageBlockCaption.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PageBlockCaption.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Contains a caption of an instant view web page block, consisting of a text and a trailing credit 12 | public struct PageBlockCaption: Codable { 13 | 14 | /// Block credit (like HTML tag ) 15 | public let credit: RichText 16 | 17 | /// Content of the caption 18 | public let text: RichText 19 | 20 | 21 | public init( 22 | credit: RichText, 23 | text: RichText 24 | ) { 25 | self.credit = credit 26 | self.text = text 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /TdlibKit/Models/PageBlockListItem.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PageBlockListItem.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Describes an item of a list page block 12 | public struct PageBlockListItem: Codable { 13 | 14 | /// Item label 15 | public let label: String 16 | 17 | /// Item blocks 18 | public let pageBlocks: [PageBlock] 19 | 20 | 21 | public init( 22 | label: String, 23 | pageBlocks: [PageBlock] 24 | ) { 25 | self.label = label 26 | self.pageBlocks = pageBlocks 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /TdlibKit/Models/ParseMarkdown.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ParseMarkdown.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Parses Markdown entities in a human-friendly format, ignoring markup errors. Can be called synchronously 12 | public struct ParseMarkdown: Codable { 13 | 14 | /// The text to parse. For example, "__italic__ ~~strikethrough~~ **bold** `code` ```pre``` __[italic__ text_url](telegram.org) __italic**bold italic__bold**" 15 | public let text: FormattedText? 16 | 17 | 18 | public init(text: FormattedText?) { 19 | self.text = text 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/PassportElements.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PassportElements.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Contains information about saved Telegram Passport elements 12 | public struct PassportElements: Codable { 13 | 14 | /// Telegram Passport elements 15 | public let elements: [PassportElement] 16 | 17 | 18 | public init(elements: [PassportElement]) { 19 | self.elements = elements 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/PassportRequiredElement.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PassportRequiredElement.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Contains a description of the required Telegram Passport element that was requested by a service 12 | public struct PassportRequiredElement: Codable { 13 | 14 | /// List of Telegram Passport elements any of which is enough to provide 15 | public let suitableElements: [PassportSuitableElement] 16 | 17 | 18 | public init(suitableElements: [PassportSuitableElement]) { 19 | self.suitableElements = suitableElements 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/PingProxy.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PingProxy.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Computes time needed to receive a response from a Telegram server through a proxy. Can be called before authorization 12 | public struct PingProxy: Codable { 13 | 14 | /// Proxy identifier. Use 0 to ping a Telegram server without a proxy 15 | public let proxyId: Int? 16 | 17 | 18 | public init(proxyId: Int?) { 19 | self.proxyId = proxyId 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/Point.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Point.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// A point on a Cartesian plane 12 | public struct Point: Codable { 13 | 14 | /// The point's first coordinate 15 | public let x: Double 16 | 17 | /// The point's second coordinate 18 | public let y: Double 19 | 20 | 21 | public init( 22 | x: Double, 23 | y: Double 24 | ) { 25 | self.x = x 26 | self.y = y 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /TdlibKit/Models/Proxies.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Proxies.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Represents a list of proxy servers 12 | public struct Proxies: Codable { 13 | 14 | /// List of proxy servers 15 | public let proxies: [Proxy] 16 | 17 | 18 | public init(proxies: [Proxy]) { 19 | self.proxies = proxies 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/PushReceiverId.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PushReceiverId.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Contains a globally unique push receiver identifier, which can be used to identify which account has received a push notification 12 | public struct PushReceiverId: Codable { 13 | 14 | /// The globally unique identifier of push notification subscription 15 | public let id: TdInt64 16 | 17 | 18 | public init(id: TdInt64) { 19 | self.id = id 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/ReadAllChatMentions.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ReadAllChatMentions.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Marks all mentions in a chat as read 12 | public struct ReadAllChatMentions: Codable { 13 | 14 | /// Chat identifier 15 | public let chatId: Int64? 16 | 17 | 18 | public init(chatId: Int64?) { 19 | self.chatId = chatId 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/RecommendedChatFilter.swift: -------------------------------------------------------------------------------- 1 | // 2 | // RecommendedChatFilter.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Describes a recommended chat filter 12 | public struct RecommendedChatFilter: Codable { 13 | 14 | public let description: String 15 | 16 | /// The chat filter 17 | public let filter: ChatFilter 18 | 19 | 20 | public init( 21 | description: String, 22 | filter: ChatFilter 23 | ) { 24 | self.description = description 25 | self.filter = filter 26 | } 27 | } 28 | 29 | -------------------------------------------------------------------------------- /TdlibKit/Models/RecommendedChatFilters.swift: -------------------------------------------------------------------------------- 1 | // 2 | // RecommendedChatFilters.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Contains a list of recommended chat filters 12 | public struct RecommendedChatFilters: Codable { 13 | 14 | /// List of recommended chat filters 15 | public let chatFilters: [RecommendedChatFilter] 16 | 17 | 18 | public init(chatFilters: [RecommendedChatFilter]) { 19 | self.chatFilters = chatFilters 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/RecoveryEmailAddress.swift: -------------------------------------------------------------------------------- 1 | // 2 | // RecoveryEmailAddress.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Contains information about the current recovery email address 12 | public struct RecoveryEmailAddress: Codable { 13 | 14 | /// Recovery email address 15 | public let recoveryEmailAddress: String 16 | 17 | 18 | public init(recoveryEmailAddress: String) { 19 | self.recoveryEmailAddress = recoveryEmailAddress 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/RemoveBackground.swift: -------------------------------------------------------------------------------- 1 | // 2 | // RemoveBackground.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Removes background from the list of installed backgrounds 12 | public struct RemoveBackground: Codable { 13 | 14 | /// The background identifier 15 | public let backgroundId: TdInt64? 16 | 17 | 18 | public init(backgroundId: TdInt64?) { 19 | self.backgroundId = backgroundId 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/RemoveChatActionBar.swift: -------------------------------------------------------------------------------- 1 | // 2 | // RemoveChatActionBar.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Removes a chat action bar without any other action 12 | public struct RemoveChatActionBar: Codable { 13 | 14 | /// Chat identifier 15 | public let chatId: Int64? 16 | 17 | 18 | public init(chatId: Int64?) { 19 | self.chatId = chatId 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/RemoveContacts.swift: -------------------------------------------------------------------------------- 1 | // 2 | // RemoveContacts.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Removes users from the contact list 12 | public struct RemoveContacts: Codable { 13 | 14 | /// Identifiers of users to be deleted 15 | public let userIds: [Int64]? 16 | 17 | 18 | public init(userIds: [Int64]?) { 19 | self.userIds = userIds 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/RemoveFavoriteSticker.swift: -------------------------------------------------------------------------------- 1 | // 2 | // RemoveFavoriteSticker.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Removes a sticker from the list of favorite stickers 12 | public struct RemoveFavoriteSticker: Codable { 13 | 14 | /// Sticker file to delete from the list 15 | public let sticker: InputFile? 16 | 17 | 18 | public init(sticker: InputFile?) { 19 | self.sticker = sticker 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/RemoveProxy.swift: -------------------------------------------------------------------------------- 1 | // 2 | // RemoveProxy.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Removes a proxy server. Can be called before authorization 12 | public struct RemoveProxy: Codable { 13 | 14 | /// Proxy identifier 15 | public let proxyId: Int? 16 | 17 | 18 | public init(proxyId: Int?) { 19 | self.proxyId = proxyId 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/RemoveRecentHashtag.swift: -------------------------------------------------------------------------------- 1 | // 2 | // RemoveRecentHashtag.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Removes a hashtag from the list of recently used hashtags 12 | public struct RemoveRecentHashtag: Codable { 13 | 14 | /// Hashtag to delete 15 | public let hashtag: String? 16 | 17 | 18 | public init(hashtag: String?) { 19 | self.hashtag = hashtag 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/RemoveRecentlyFoundChat.swift: -------------------------------------------------------------------------------- 1 | // 2 | // RemoveRecentlyFoundChat.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Removes a chat from the list of recently found chats 12 | public struct RemoveRecentlyFoundChat: Codable { 13 | 14 | /// Identifier of the chat to be removed 15 | public let chatId: Int64? 16 | 17 | 18 | public init(chatId: Int64?) { 19 | self.chatId = chatId 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/RemoveSavedAnimation.swift: -------------------------------------------------------------------------------- 1 | // 2 | // RemoveSavedAnimation.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Removes an animation from the list of saved animations 12 | public struct RemoveSavedAnimation: Codable { 13 | 14 | /// Animation file to be removed 15 | public let animation: InputFile? 16 | 17 | 18 | public init(animation: InputFile?) { 19 | self.animation = animation 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/RemoveStickerFromSet.swift: -------------------------------------------------------------------------------- 1 | // 2 | // RemoveStickerFromSet.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Removes a sticker from the set to which it belongs; for bots only. The sticker set must have been created by the bot 12 | public struct RemoveStickerFromSet: Codable { 13 | 14 | /// Sticker 15 | public let sticker: InputFile? 16 | 17 | 18 | public init(sticker: InputFile?) { 19 | self.sticker = sticker 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/ReorderChatFilters.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ReorderChatFilters.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Changes the order of chat filters 12 | public struct ReorderChatFilters: Codable { 13 | 14 | /// Identifiers of chat filters in the new correct order 15 | public let chatFilterIds: [Int]? 16 | 17 | 18 | public init(chatFilterIds: [Int]?) { 19 | self.chatFilterIds = chatFilterIds 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/ReplacePrimaryChatInviteLink.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ReplacePrimaryChatInviteLink.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Replaces current primary invite link for a chat with a new primary invite link. Available for basic groups, supergroups, and channels. Requires administrator privileges and can_invite_users right 12 | public struct ReplacePrimaryChatInviteLink: Codable { 13 | 14 | /// Chat identifier 15 | public let chatId: Int64? 16 | 17 | 18 | public init(chatId: Int64?) { 19 | self.chatId = chatId 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/RequestAuthenticationPasswordRecovery.swift: -------------------------------------------------------------------------------- 1 | // 2 | // RequestAuthenticationPasswordRecovery.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Requests to send a password recovery code to an email address that was previously set up. Works only when the current authorization state is authorizationStateWaitPassword 12 | public struct RequestAuthenticationPasswordRecovery: Codable { 13 | 14 | 15 | public init() {} 16 | } 17 | 18 | -------------------------------------------------------------------------------- /TdlibKit/Models/RequestPasswordRecovery.swift: -------------------------------------------------------------------------------- 1 | // 2 | // RequestPasswordRecovery.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Requests to send a 2-step verification password recovery code to an email address that was previously set up 12 | public struct RequestPasswordRecovery: Codable { 13 | 14 | 15 | public init() {} 16 | } 17 | 18 | -------------------------------------------------------------------------------- /TdlibKit/Models/ResendAuthenticationCode.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ResendAuthenticationCode.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Re-sends an authentication code to the user. Works only when the current authorization state is authorizationStateWaitCode, the next_code_type of the result is not null and the server-specified timeout has passed 12 | public struct ResendAuthenticationCode: Codable { 13 | 14 | 15 | public init() {} 16 | } 17 | 18 | -------------------------------------------------------------------------------- /TdlibKit/Models/ResendChangePhoneNumberCode.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ResendChangePhoneNumberCode.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Re-sends the authentication code sent to confirm a new phone number for the current user. Works only if the previously received authenticationCodeInfo next_code_type was not null and the server-specified timeout has passed 12 | public struct ResendChangePhoneNumberCode: Codable { 13 | 14 | 15 | public init() {} 16 | } 17 | 18 | -------------------------------------------------------------------------------- /TdlibKit/Models/ResendEmailAddressVerificationCode.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ResendEmailAddressVerificationCode.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Re-sends the code to verify an email address to be added to a user's Telegram Passport 12 | public struct ResendEmailAddressVerificationCode: Codable { 13 | 14 | 15 | public init() {} 16 | } 17 | 18 | -------------------------------------------------------------------------------- /TdlibKit/Models/ResendPhoneNumberConfirmationCode.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ResendPhoneNumberConfirmationCode.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Resends phone number confirmation code 12 | public struct ResendPhoneNumberConfirmationCode: Codable { 13 | 14 | 15 | public init() {} 16 | } 17 | 18 | -------------------------------------------------------------------------------- /TdlibKit/Models/ResendPhoneNumberVerificationCode.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ResendPhoneNumberVerificationCode.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Re-sends the code to verify a phone number to be added to a user's Telegram Passport 12 | public struct ResendPhoneNumberVerificationCode: Codable { 13 | 14 | 15 | public init() {} 16 | } 17 | 18 | -------------------------------------------------------------------------------- /TdlibKit/Models/ResendRecoveryEmailAddressCode.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ResendRecoveryEmailAddressCode.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Resends the 2-step verification recovery email address verification code 12 | public struct ResendRecoveryEmailAddressCode: Codable { 13 | 14 | 15 | public init() {} 16 | } 17 | 18 | -------------------------------------------------------------------------------- /TdlibKit/Models/ResetAllNotificationSettings.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ResetAllNotificationSettings.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Resets all notification settings to their default values. By default, all chats are unmuted, the sound is set to "default" and message previews are shown 12 | public struct ResetAllNotificationSettings: Codable { 13 | 14 | 15 | public init() {} 16 | } 17 | 18 | -------------------------------------------------------------------------------- /TdlibKit/Models/ResetBackgrounds.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ResetBackgrounds.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Resets list of installed backgrounds to its default value 12 | public struct ResetBackgrounds: Codable { 13 | 14 | 15 | public init() {} 16 | } 17 | 18 | -------------------------------------------------------------------------------- /TdlibKit/Models/ResetNetworkStatistics.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ResetNetworkStatistics.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Resets all network data usage statistics to zero. Can be called before authorization 12 | public struct ResetNetworkStatistics: Codable { 13 | 14 | 15 | public init() {} 16 | } 17 | 18 | -------------------------------------------------------------------------------- /TdlibKit/Models/ResetPassword.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ResetPassword.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Removes 2-step verification password without previous password and access to recovery email address. The password can't be reset immediately and the request needs to be repeated after the specified time 12 | public struct ResetPassword: Codable { 13 | 14 | 15 | public init() {} 16 | } 17 | 18 | -------------------------------------------------------------------------------- /TdlibKit/Models/RevokeGroupCallInviteLink.swift: -------------------------------------------------------------------------------- 1 | // 2 | // RevokeGroupCallInviteLink.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Revokes invite link for a group call. Requires groupCall.can_be_managed group call flag 12 | public struct RevokeGroupCallInviteLink: Codable { 13 | 14 | /// Group call identifier 15 | public let groupCallId: Int? 16 | 17 | 18 | public init(groupCallId: Int?) { 19 | self.groupCallId = groupCallId 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/SavedCredentials.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SavedCredentials.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Contains information about saved card credentials 12 | public struct SavedCredentials: Codable { 13 | 14 | /// Unique identifier of the saved credentials 15 | public let id: String 16 | 17 | /// Title of the saved credentials 18 | public let title: String 19 | 20 | 21 | public init( 22 | id: String, 23 | title: String 24 | ) { 25 | self.id = id 26 | self.title = title 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /TdlibKit/Models/SearchBackground.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SearchBackground.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Searches for a background by its name 12 | public struct SearchBackground: Codable { 13 | 14 | /// The name of the background 15 | public let name: String? 16 | 17 | 18 | public init(name: String?) { 19 | self.name = name 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/SearchChatsNearby.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SearchChatsNearby.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns a list of users and location-based supergroups nearby. The list of users nearby will be updated for 60 seconds after the request by the updates updateUsersNearby. The request must be sent again every 25 seconds with adjusted location to not miss new chats 12 | public struct SearchChatsNearby: Codable { 13 | 14 | /// Current user location 15 | public let location: Location? 16 | 17 | 18 | public init(location: Location?) { 19 | self.location = location 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/SearchHashtags.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SearchHashtags.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Searches for recently used hashtags by their prefix 12 | public struct SearchHashtags: Codable { 13 | 14 | /// The maximum number of hashtags to be returned 15 | public let limit: Int? 16 | 17 | /// Hashtag prefix to search for 18 | public let prefix: String? 19 | 20 | 21 | public init( 22 | limit: Int?, 23 | prefix: String? 24 | ) { 25 | self.limit = limit 26 | self.prefix = prefix 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /TdlibKit/Models/SearchPublicChat.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SearchPublicChat.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Searches a public chat by its username. Currently only private chats, supergroups and channels can be public. Returns the chat if found; otherwise an error is returned 12 | public struct SearchPublicChat: Codable { 13 | 14 | /// Username to be resolved 15 | public let username: String? 16 | 17 | 18 | public init(username: String?) { 19 | self.username = username 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/SearchPublicChats.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SearchPublicChats.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Searches public chats by looking for specified query in their username and title. Currently only private chats, supergroups and channels can be public. Returns a meaningful number of results. Excludes private chats with contacts and chats from the chat list from the results 12 | public struct SearchPublicChats: Codable { 13 | 14 | /// Query to search for 15 | public let query: String? 16 | 17 | 18 | public init(query: String?) { 19 | self.query = query 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/SearchStickerSet.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SearchStickerSet.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Searches for a sticker set by its name 12 | public struct SearchStickerSet: Codable { 13 | 14 | /// Name of the sticker set 15 | public let name: String? 16 | 17 | 18 | public init(name: String?) { 19 | self.name = name 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/SearchStickerSets.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SearchStickerSets.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Searches for ordinary sticker sets by looking for specified query in their title and name. Excludes installed sticker sets from the results 12 | public struct SearchStickerSets: Codable { 13 | 14 | /// Query to search for 15 | public let query: String? 16 | 17 | 18 | public init(query: String?) { 19 | self.query = query 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/SearchStickers.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SearchStickers.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Searches for stickers from public sticker sets that correspond to a given emoji 12 | public struct SearchStickers: Codable { 13 | 14 | /// String representation of emoji; must be non-empty 15 | public let emoji: String? 16 | 17 | /// The maximum number of stickers to be returned 18 | public let limit: Int? 19 | 20 | 21 | public init( 22 | emoji: String?, 23 | limit: Int? 24 | ) { 25 | self.emoji = emoji 26 | self.limit = limit 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /TdlibKit/Models/Seconds.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Seconds.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Contains a value representing a number of seconds 12 | public struct Seconds: Codable { 13 | 14 | /// Number of seconds 15 | public let seconds: Double 16 | 17 | 18 | public init(seconds: Double) { 19 | self.seconds = seconds 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/SendCallDebugInformation.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SendCallDebugInformation.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Sends debug information for a call 12 | public struct SendCallDebugInformation: Codable { 13 | 14 | /// Call identifier 15 | public let callId: Int? 16 | 17 | /// Debug information in application-specific format 18 | public let debugInformation: String? 19 | 20 | 21 | public init( 22 | callId: Int?, 23 | debugInformation: String? 24 | ) { 25 | self.callId = callId 26 | self.debugInformation = debugInformation 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /TdlibKit/Models/SendCallSignalingData.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SendCallSignalingData.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Sends call signaling data 12 | public struct SendCallSignalingData: Codable { 13 | 14 | /// Call identifier 15 | public let callId: Int? 16 | 17 | /// The data 18 | public let data: Data? 19 | 20 | 21 | public init( 22 | callId: Int?, 23 | data: Data? 24 | ) { 25 | self.callId = callId 26 | self.data = data 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /TdlibKit/Models/SendChatScreenshotTakenNotification.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SendChatScreenshotTakenNotification.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Sends a notification about a screenshot taken in a chat. Supported only in private and secret chats 12 | public struct SendChatScreenshotTakenNotification: Codable { 13 | 14 | /// Chat identifier 15 | public let chatId: Int64? 16 | 17 | 18 | public init(chatId: Int64?) { 19 | self.chatId = chatId 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/SendCustomRequest.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SendCustomRequest.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Sends a custom request; for bots only 12 | public struct SendCustomRequest: Codable { 13 | 14 | /// The method name 15 | public let method: String? 16 | 17 | /// JSON-serialized method parameters 18 | public let parameters: String? 19 | 20 | 21 | public init( 22 | method: String?, 23 | parameters: String? 24 | ) { 25 | self.method = method 26 | self.parameters = parameters 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /TdlibKit/Models/SendEmailAddressVerificationCode.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SendEmailAddressVerificationCode.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Sends a code to verify an email address to be added to a user's Telegram Passport 12 | public struct SendEmailAddressVerificationCode: Codable { 13 | 14 | /// Email address 15 | public let emailAddress: String? 16 | 17 | 18 | public init(emailAddress: String?) { 19 | self.emailAddress = emailAddress 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/SetAccountTtl.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SetAccountTtl.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Changes the period of inactivity after which the account of the current user will automatically be deleted 12 | public struct SetAccountTtl: Codable { 13 | 14 | /// New account TTL 15 | public let ttl: AccountTtl? 16 | 17 | 18 | public init(ttl: AccountTtl?) { 19 | self.ttl = ttl 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/SetAlarm.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SetAlarm.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Succeeds after a specified amount of time has passed. Can be called before initialization 12 | public struct SetAlarm: Codable { 13 | 14 | /// Number of seconds before the function returns 15 | public let seconds: Double? 16 | 17 | 18 | public init(seconds: Double?) { 19 | self.seconds = seconds 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/SetBio.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SetBio.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Changes the bio of the current user 12 | public struct SetBio: Codable { 13 | 14 | /// The new value of the user bio; 0-70 characters without line feeds 15 | public let bio: String? 16 | 17 | 18 | public init(bio: String?) { 19 | self.bio = bio 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/SetChatClientData.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SetChatClientData.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Changes application-specific data associated with a chat 12 | public struct SetChatClientData: Codable { 13 | 14 | /// Chat identifier 15 | public let chatId: Int64? 16 | 17 | /// New value of client_data 18 | public let clientData: String? 19 | 20 | 21 | public init( 22 | chatId: Int64?, 23 | clientData: String? 24 | ) { 25 | self.chatId = chatId 26 | self.clientData = clientData 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /TdlibKit/Models/SetChatDescription.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SetChatDescription.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Changes information about a chat. Available for basic groups, supergroups, and channels. Requires can_change_info administrator right 12 | public struct SetChatDescription: Codable { 13 | 14 | /// Identifier of the chat 15 | public let chatId: Int64? 16 | 17 | public let description: String? 18 | 19 | 20 | public init( 21 | chatId: Int64?, 22 | description: String? 23 | ) { 24 | self.chatId = chatId 25 | self.description = description 26 | } 27 | } 28 | 29 | -------------------------------------------------------------------------------- /TdlibKit/Models/SetChatTheme.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SetChatTheme.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Changes the chat theme. Supported only in private and secret chats 12 | public struct SetChatTheme: Codable { 13 | 14 | /// Chat identifier 15 | public let chatId: Int64? 16 | 17 | /// Name of the new chat theme; pass an empty string to return the default theme 18 | public let themeName: String? 19 | 20 | 21 | public init( 22 | chatId: Int64?, 23 | themeName: String? 24 | ) { 25 | self.chatId = chatId 26 | self.themeName = themeName 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /TdlibKit/Models/SetChatTitle.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SetChatTitle.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Changes the chat title. Supported only for basic groups, supergroups and channels. Requires can_change_info administrator right 12 | public struct SetChatTitle: Codable { 13 | 14 | /// Chat identifier 15 | public let chatId: Int64? 16 | 17 | /// New title of the chat; 1-128 characters 18 | public let title: String? 19 | 20 | 21 | public init( 22 | chatId: Int64?, 23 | title: String? 24 | ) { 25 | self.chatId = chatId 26 | self.title = title 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /TdlibKit/Models/SetDatabaseEncryptionKey.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SetDatabaseEncryptionKey.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Changes the database encryption key. Usually the encryption key is never changed and is stored in some OS keychain 12 | public struct SetDatabaseEncryptionKey: Codable { 13 | 14 | /// New encryption key 15 | public let newEncryptionKey: Data? 16 | 17 | 18 | public init(newEncryptionKey: Data?) { 19 | self.newEncryptionKey = newEncryptionKey 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/SetGroupCallTitle.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SetGroupCallTitle.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Sets group call title. Requires groupCall.can_be_managed group call flag 12 | public struct SetGroupCallTitle: Codable { 13 | 14 | /// Group call identifier 15 | public let groupCallId: Int? 16 | 17 | /// New group call title; 1-64 characters 18 | public let title: String? 19 | 20 | 21 | public init( 22 | groupCallId: Int?, 23 | title: String? 24 | ) { 25 | self.groupCallId = groupCallId 26 | self.title = title 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /TdlibKit/Models/SetInactiveSessionTtl.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SetInactiveSessionTtl.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Changes the period of inactivity after which sessions will automatically be terminated 12 | public struct SetInactiveSessionTtl: Codable { 13 | 14 | /// New number of days of inactivity before sessions will be automatically terminated; 1-366 days 15 | public let inactiveSessionTtlDays: Int? 16 | 17 | 18 | public init(inactiveSessionTtlDays: Int?) { 19 | self.inactiveSessionTtlDays = inactiveSessionTtlDays 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/SetLocation.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SetLocation.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Changes the location of the current user. Needs to be called if GetOption("is_location_visible") is true and location changes for more than 1 kilometer 12 | public struct SetLocation: Codable { 13 | 14 | /// The new location of the user 15 | public let location: Location? 16 | 17 | 18 | public init(location: Location?) { 19 | self.location = location 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/SetLogStream.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SetLogStream.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Sets new log stream for internal logging of TDLib. Can be called synchronously 12 | public struct SetLogStream: Codable { 13 | 14 | /// New log stream 15 | public let logStream: LogStream? 16 | 17 | 18 | public init(logStream: LogStream?) { 19 | self.logStream = logStream 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/SetPinnedChats.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SetPinnedChats.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Changes the order of pinned chats 12 | public struct SetPinnedChats: Codable { 13 | 14 | /// The new list of pinned chats 15 | public let chatIds: [Int64]? 16 | 17 | /// Chat list in which to change the order of pinned chats 18 | public let chatList: ChatList? 19 | 20 | 21 | public init( 22 | chatIds: [Int64]?, 23 | chatList: ChatList? 24 | ) { 25 | self.chatIds = chatIds 26 | self.chatList = chatList 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /TdlibKit/Models/SetProfilePhoto.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SetProfilePhoto.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Changes a profile photo for the current user 12 | public struct SetProfilePhoto: Codable { 13 | 14 | /// Profile photo to set 15 | public let photo: InputChatPhoto? 16 | 17 | 18 | public init(photo: InputChatPhoto?) { 19 | self.photo = photo 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/SetTdlibParameters.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SetTdlibParameters.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Sets the parameters for TDLib initialization. Works only when the current authorization state is authorizationStateWaitTdlibParameters 12 | public struct SetTdlibParameters: Codable { 13 | 14 | /// Parameters for TDLib initialization 15 | public let parameters: TdlibParameters? 16 | 17 | 18 | public init(parameters: TdlibParameters?) { 19 | self.parameters = parameters 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/SetUserPrivacySettingRules.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SetUserPrivacySettingRules.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Changes user privacy settings 12 | public struct SetUserPrivacySettingRules: Codable { 13 | 14 | /// The new privacy rules 15 | public let rules: UserPrivacySettingRules? 16 | 17 | /// The privacy setting 18 | public let setting: UserPrivacySetting? 19 | 20 | 21 | public init( 22 | rules: UserPrivacySettingRules?, 23 | setting: UserPrivacySetting? 24 | ) { 25 | self.rules = rules 26 | self.setting = setting 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /TdlibKit/Models/SetUsername.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SetUsername.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Changes the username of the current user 12 | public struct SetUsername: Codable { 13 | 14 | /// The new value of the username. Use an empty string to remove the username 15 | public let username: String? 16 | 17 | 18 | public init(username: String?) { 19 | self.username = username 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/SharePhoneNumber.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SharePhoneNumber.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Shares the phone number of the current user with a mutual contact. Supposed to be called when the user clicks on chatActionBarSharePhoneNumber 12 | public struct SharePhoneNumber: Codable { 13 | 14 | /// Identifier of the user with whom to share the phone number. The user must be a mutual contact 15 | public let userId: Int64? 16 | 17 | 18 | public init(userId: Int64?) { 19 | self.userId = userId 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/SponsoredMessages.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SponsoredMessages.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Contains a list of sponsored messages 12 | public struct SponsoredMessages: Codable { 13 | 14 | /// List of sponsored messages 15 | public let messages: [SponsoredMessage] 16 | 17 | 18 | public init(messages: [SponsoredMessage]) { 19 | self.messages = messages 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/StartScheduledGroupCall.swift: -------------------------------------------------------------------------------- 1 | // 2 | // StartScheduledGroupCall.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Starts a scheduled group call 12 | public struct StartScheduledGroupCall: Codable { 13 | 14 | /// Group call identifier 15 | public let groupCallId: Int? 16 | 17 | 18 | public init(groupCallId: Int?) { 19 | self.groupCallId = groupCallId 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/StickerSets.swift: -------------------------------------------------------------------------------- 1 | // 2 | // StickerSets.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Represents a list of sticker sets 12 | public struct StickerSets: Codable { 13 | 14 | /// List of sticker sets 15 | public let sets: [StickerSetInfo] 16 | 17 | /// Approximate total number of sticker sets found 18 | public let totalCount: Int 19 | 20 | 21 | public init( 22 | sets: [StickerSetInfo], 23 | totalCount: Int 24 | ) { 25 | self.sets = sets 26 | self.totalCount = totalCount 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /TdlibKit/Models/Stickers.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Stickers.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Represents a list of stickers 12 | public struct Stickers: Codable { 13 | 14 | /// List of stickers 15 | public let stickers: [Sticker] 16 | 17 | 18 | public init(stickers: [Sticker]) { 19 | self.stickers = stickers 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/TMeUrl.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TMeUrl.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Represents a URL linking to an internal Telegram entity 12 | public struct TMeUrl: Codable { 13 | 14 | /// Type of the URL 15 | public let type: TMeUrlType 16 | 17 | /// URL 18 | public let url: String 19 | 20 | 21 | public init( 22 | type: TMeUrlType, 23 | url: String 24 | ) { 25 | self.type = type 26 | self.url = url 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /TdlibKit/Models/TMeUrls.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TMeUrls.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Contains a list of t.me URLs 12 | public struct TMeUrls: Codable { 13 | 14 | /// List of URLs 15 | public let urls: [TMeUrl] 16 | 17 | 18 | public init(urls: [TMeUrl]) { 19 | self.urls = urls 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/TerminateAllOtherSessions.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TerminateAllOtherSessions.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Terminates all other sessions of the current user 12 | public struct TerminateAllOtherSessions: Codable { 13 | 14 | 15 | public init() {} 16 | } 17 | 18 | -------------------------------------------------------------------------------- /TdlibKit/Models/TerminateSession.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TerminateSession.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Terminates a session of the current user 12 | public struct TerminateSession: Codable { 13 | 14 | /// Session identifier 15 | public let sessionId: TdInt64? 16 | 17 | 18 | public init(sessionId: TdInt64?) { 19 | self.sessionId = sessionId 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/TestBytes.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TestBytes.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// A simple object containing a sequence of bytes; for testing only 12 | public struct TestBytes: Codable { 13 | 14 | /// Bytes 15 | public let value: Data 16 | 17 | 18 | public init(value: Data) { 19 | self.value = value 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/TestCallBytes.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TestCallBytes.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns the received bytes; for testing only. This is an offline method. Can be called before authorization 12 | public struct TestCallBytes: Codable { 13 | 14 | /// Bytes to return 15 | public let x: Data? 16 | 17 | 18 | public init(x: Data?) { 19 | self.x = x 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/TestCallEmpty.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TestCallEmpty.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Does nothing; for testing only. This is an offline method. Can be called before authorization 12 | public struct TestCallEmpty: Codable { 13 | 14 | 15 | public init() {} 16 | } 17 | 18 | -------------------------------------------------------------------------------- /TdlibKit/Models/TestCallString.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TestCallString.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns the received string; for testing only. This is an offline method. Can be called before authorization 12 | public struct TestCallString: Codable { 13 | 14 | /// String to return 15 | public let x: String? 16 | 17 | 18 | public init(x: String?) { 19 | self.x = x 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/TestCallVectorInt.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TestCallVectorInt.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns the received vector of numbers; for testing only. This is an offline method. Can be called before authorization 12 | public struct TestCallVectorInt: Codable { 13 | 14 | /// Vector of numbers to return 15 | public let x: [Int]? 16 | 17 | 18 | public init(x: [Int]?) { 19 | self.x = x 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/TestCallVectorIntObject.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TestCallVectorIntObject.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns the received vector of objects containing a number; for testing only. This is an offline method. Can be called before authorization 12 | public struct TestCallVectorIntObject: Codable { 13 | 14 | /// Vector of objects to return 15 | public let x: [TestInt]? 16 | 17 | 18 | public init(x: [TestInt]?) { 19 | self.x = x 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/TestCallVectorString.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TestCallVectorString.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns the received vector of strings; for testing only. This is an offline method. Can be called before authorization 12 | public struct TestCallVectorString: Codable { 13 | 14 | /// Vector of strings to return 15 | public let x: [String]? 16 | 17 | 18 | public init(x: [String]?) { 19 | self.x = x 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/TestCallVectorStringObject.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TestCallVectorStringObject.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns the received vector of objects containing a string; for testing only. This is an offline method. Can be called before authorization 12 | public struct TestCallVectorStringObject: Codable { 13 | 14 | /// Vector of objects to return 15 | public let x: [TestString]? 16 | 17 | 18 | public init(x: [TestString]?) { 19 | self.x = x 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/TestGetDifference.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TestGetDifference.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Forces an updates.getDifference call to the Telegram servers; for testing only 12 | public struct TestGetDifference: Codable { 13 | 14 | 15 | public init() {} 16 | } 17 | 18 | -------------------------------------------------------------------------------- /TdlibKit/Models/TestInt.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TestInt.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// A simple object containing a number; for testing only 12 | public struct TestInt: Codable { 13 | 14 | /// Number 15 | public let value: Int 16 | 17 | 18 | public init(value: Int) { 19 | self.value = value 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/TestNetwork.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TestNetwork.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Sends a simple network request to the Telegram servers; for testing only. Can be called before authorization 12 | public struct TestNetwork: Codable { 13 | 14 | 15 | public init() {} 16 | } 17 | 18 | -------------------------------------------------------------------------------- /TdlibKit/Models/TestReturnError.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TestReturnError.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns the specified error and ensures that the Error object is used; for testing only. Can be called synchronously 12 | public struct TestReturnError: Codable { 13 | 14 | /// The error to be returned 15 | public let error: Error? 16 | 17 | 18 | public init(error: Error?) { 19 | self.error = error 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/TestSquareInt.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TestSquareInt.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Returns the squared received number; for testing only. This is an offline method. Can be called before authorization 12 | public struct TestSquareInt: Codable { 13 | 14 | /// Number to square 15 | public let x: Int? 16 | 17 | 18 | public init(x: Int?) { 19 | self.x = x 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/TestString.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TestString.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// A simple object containing a string; for testing only 12 | public struct TestString: Codable { 13 | 14 | /// String 15 | public let value: String 16 | 17 | 18 | public init(value: String) { 19 | self.value = value 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/TestUseUpdate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TestUseUpdate.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Does nothing and ensures that the Update object is used; for testing only. This is an offline method. Can be called before authorization 12 | public struct TestUseUpdate: Codable { 13 | 14 | 15 | public init() {} 16 | } 17 | 18 | -------------------------------------------------------------------------------- /TdlibKit/Models/TestVectorInt.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TestVectorInt.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// A simple object containing a vector of numbers; for testing only 12 | public struct TestVectorInt: Codable { 13 | 14 | /// Vector of numbers 15 | public let value: [Int] 16 | 17 | 18 | public init(value: [Int]) { 19 | self.value = value 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/TestVectorIntObject.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TestVectorIntObject.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// A simple object containing a vector of objects that hold a number; for testing only 12 | public struct TestVectorIntObject: Codable { 13 | 14 | /// Vector of objects 15 | public let value: [TestInt] 16 | 17 | 18 | public init(value: [TestInt]) { 19 | self.value = value 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/TestVectorString.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TestVectorString.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// A simple object containing a vector of strings; for testing only 12 | public struct TestVectorString: Codable { 13 | 14 | /// Vector of strings 15 | public let value: [String] 16 | 17 | 18 | public init(value: [String]) { 19 | self.value = value 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/TestVectorStringObject.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TestVectorStringObject.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// A simple object containing a vector of objects that hold a string; for testing only 12 | public struct TestVectorStringObject: Codable { 13 | 14 | /// Vector of objects 15 | public let value: [TestString] 16 | 17 | 18 | public init(value: [TestString]) { 19 | self.value = value 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/Text.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Text.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Contains some text 12 | public struct Text: Codable { 13 | 14 | /// Text 15 | public let text: String 16 | 17 | 18 | public init(text: String) { 19 | self.text = text 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/TextEntities.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TextEntities.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Contains a list of text entities 12 | public struct TextEntities: Codable { 13 | 14 | /// List of text entities 15 | public let entities: [TextEntity] 16 | 17 | 18 | public init(entities: [TextEntity]) { 19 | self.entities = entities 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/ToggleChatIsMarkedAsUnread.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ToggleChatIsMarkedAsUnread.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Changes the marked as unread state of a chat 12 | public struct ToggleChatIsMarkedAsUnread: Codable { 13 | 14 | /// Chat identifier 15 | public let chatId: Int64? 16 | 17 | /// New value of is_marked_as_unread 18 | public let isMarkedAsUnread: Bool? 19 | 20 | 21 | public init( 22 | chatId: Int64?, 23 | isMarkedAsUnread: Bool? 24 | ) { 25 | self.chatId = chatId 26 | self.isMarkedAsUnread = isMarkedAsUnread 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /TdlibKit/Models/ToggleSupergroupIsBroadcastGroup.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ToggleSupergroupIsBroadcastGroup.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Upgrades supergroup to a broadcast group; requires owner privileges in the supergroup 12 | public struct ToggleSupergroupIsBroadcastGroup: Codable { 13 | 14 | /// Identifier of the supergroup 15 | public let supergroupId: Int64? 16 | 17 | 18 | public init(supergroupId: Int64?) { 19 | self.supergroupId = supergroupId 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/UnpinAllChatMessages.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UnpinAllChatMessages.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Removes all pinned messages from a chat; requires can_pin_messages rights in the group or can_edit_messages rights in the channel 12 | public struct UnpinAllChatMessages: Codable { 13 | 14 | /// Identifier of the chat 15 | public let chatId: Int64? 16 | 17 | 18 | public init(chatId: Int64?) { 19 | self.chatId = chatId 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/Updates.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Updates.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Contains a list of updates 12 | public struct Updates: Codable { 13 | 14 | /// List of updates 15 | public let updates: [Update] 16 | 17 | 18 | public init(updates: [Update]) { 19 | self.updates = updates 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/UpgradeBasicGroupChatToSupergroupChat.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UpgradeBasicGroupChatToSupergroupChat.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Creates a new supergroup from an existing basic group and sends a corresponding messageChatUpgradeTo and messageChatUpgradeFrom; requires creator privileges. Deactivates the original basic group 12 | public struct UpgradeBasicGroupChatToSupergroupChat: Codable { 13 | 14 | /// Identifier of the chat to upgrade 15 | public let chatId: Int64? 16 | 17 | 18 | public init(chatId: Int64?) { 19 | self.chatId = chatId 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/UploadStickerFile.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UploadStickerFile.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Uploads a PNG image with a sticker; returns the uploaded file 12 | public struct UploadStickerFile: Codable { 13 | 14 | /// Sticker file to upload 15 | public let sticker: InputSticker? 16 | 17 | /// Sticker file owner; ignored for regular users 18 | public let userId: Int64? 19 | 20 | 21 | public init( 22 | sticker: InputSticker?, 23 | userId: Int64? 24 | ) { 25 | self.sticker = sticker 26 | self.userId = userId 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /TdlibKit/Models/UserPrivacySettingRules.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UserPrivacySettingRules.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// A list of privacy rules. Rules are matched in the specified order. The first matched rule defines the privacy setting for a given user. If no rule matches, the action is not allowed 12 | public struct UserPrivacySettingRules: Codable { 13 | 14 | /// A list of rules 15 | public let rules: [UserPrivacySettingRule] 16 | 17 | 18 | public init(rules: [UserPrivacySettingRule]) { 19 | self.rules = rules 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Models/Users.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Users.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Represents a list of users 12 | public struct Users: Codable { 13 | 14 | /// Approximate total count of users found 15 | public let totalCount: Int 16 | 17 | /// A list of user identifiers 18 | public let userIds: [Int64] 19 | 20 | 21 | public init( 22 | totalCount: Int, 23 | userIds: [Int64] 24 | ) { 25 | self.totalCount = totalCount 26 | self.userIds = userIds 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /TdlibKit/Models/ViewTrendingStickerSets.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewTrendingStickerSets.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | /// Informs the server that some trending sticker sets have been viewed by the user 12 | public struct ViewTrendingStickerSets: Codable { 13 | 14 | /// Identifiers of viewed trending sticker sets 15 | public let stickerSetIds: [TdInt64]? 16 | 17 | 18 | public init(stickerSetIds: [TdInt64]?) { 19 | self.stickerSetIds = stickerSetIds 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /TdlibKit/Supporting/DtoCodingKeys.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DtoCodingKeys.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | public enum DtoCodingKeys: String, CodingKey { 12 | case type = "@type" 13 | case extra = "@extra" 14 | } 15 | -------------------------------------------------------------------------------- /TdlibKit/Supporting/JSONDecoder+Result.swift: -------------------------------------------------------------------------------- 1 | // 2 | // JSONDecoder+Result.swift 3 | // tl2swift 4 | // 5 | // Created by Code Generator 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | extension JSONDecoder { 12 | 13 | func tryDecode(_ type: T.Type, from data: Data) -> Result where T : Decodable { 14 | do { 15 | let result = try self.decode(type, from: data) 16 | return .success(result) 17 | } catch { 18 | return .failure(error) 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /td-xcframework/Test-ios/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /td-xcframework/Test-ios/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // Test-ios 4 | // 5 | // Created by Anton Glezman on 25.06.2020. 6 | // Copyright © 2020 Anton Glezman. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ViewController: UIViewController { 12 | 13 | override func viewDidLoad() { 14 | super.viewDidLoad() 15 | // Do any additional setup after loading the view. 16 | } 17 | 18 | 19 | } 20 | 21 | -------------------------------------------------------------------------------- /td-xcframework/module.modulemap: -------------------------------------------------------------------------------- 1 | framework module TdLib { 2 | umbrella header "td.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /td-xcframework/td.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "td_json_client.h" 3 | #import "td_log.h" 4 | 5 | //! Project version number for td_ios. 6 | FOUNDATION_EXPORT double td_iosVersionNumber; 7 | 8 | //! Project version string for td_ios. 9 | FOUNDATION_EXPORT const unsigned char td_iosVersionString[]; 10 | -------------------------------------------------------------------------------- /td-xcframework/td.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /td-xcframework/td.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /tdlib-ios/Model/UserInfo.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UserInfo.swift 3 | // tdlib-ios 4 | // 5 | // Created by Anton Glezman on 05/10/2019. 6 | // Copyright © 2019 Anton Glezman. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import TdlibKit 11 | 12 | struct UserInfo { 13 | 14 | let id: Int64 15 | let name: String 16 | let username: String 17 | } 18 | 19 | 20 | extension UserInfo { 21 | 22 | init(_ user: User) { 23 | id = user.id 24 | name = "\(user.firstName) \(user.lastName)" 25 | username = user.username 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /tdlib-ios/Presentation/Mian/MainViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MainViewController.swift 3 | // tdlib-ios 4 | // 5 | // Created by Anton Glezman on 29/09/2019. 6 | // Copyright © 2019 Anton Glezman. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | final class MainViewController: UITabBarController { 12 | 13 | } 14 | -------------------------------------------------------------------------------- /tdlib-ios/Resources/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /tdlib-ios/Service/Helper/Types.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Types.swift 3 | // tdlib-ios 4 | // 5 | // Created by Anton Glezman on 28/09/2019. 6 | // Copyright © 2019 Anton Glezman. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | typealias VoidClosure = () -> Void 12 | typealias StringClosure = (String) -> Void 13 | typealias IntClosure = (Int) -> Void 14 | -------------------------------------------------------------------------------- /tdlib-macos/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /tdlib-macos/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // tdlib-macos 4 | // 5 | // Created by Anton Glezman on 25/09/2019. 6 | // Copyright © 2019 Anton Glezman. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | class ViewController: NSViewController { 12 | 13 | override func viewDidLoad() { 14 | super.viewDidLoad() 15 | 16 | // Do any additional setup after loading the view. 17 | } 18 | 19 | override var representedObject: Any? { 20 | didSet { 21 | // Update the view, if already loaded. 22 | } 23 | } 24 | 25 | 26 | } 27 | 28 | -------------------------------------------------------------------------------- /tdlib-macos/tdlib_macos.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.files.user-selected.read-only 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /tdlib-swift.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /tdlib-swift.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | --------------------------------------------------------------------------------