diff --git a/WAProto/WAProto.proto b/WAProto/WAProto.proto index 32096be07d7..dd5ced14354 100644 --- a/WAProto/WAProto.proto +++ b/WAProto/WAProto.proto @@ -31,11 +31,13 @@ message ADVSignedDeviceIdentity { message ADVSignedDeviceIdentityHMAC { optional bytes details = 1; optional bytes hmac = 2; + optional ADVEncryptionType accountType = 3; } message ADVSignedKeyIndexList { optional bytes details = 1; optional bytes accountSignature = 2; + optional bytes accountSignatureKey = 3; } message ActionLink { @@ -102,10 +104,88 @@ message BizIdentityInfo { message BotAvatarMetadata { optional uint32 sentiment = 1; optional string behaviorGraph = 2; + optional uint32 action = 3; + optional uint32 intensity = 4; + optional uint32 wordCount = 5; } message BotMetadata { optional BotAvatarMetadata avatarMetadata = 1; + optional string personaId = 2; + optional BotPluginMetadata pluginMetadata = 3; + optional BotSuggestedPromptMetadata suggestedPromptMetadata = 4; + optional string invokerJid = 5; +} + +message BotPluginMetadata { + optional SearchProvider provider = 1; + optional PluginType pluginType = 2; + optional string thumbnailCdnUrl = 3; + optional string profilePhotoCdnUrl = 4; + optional string searchProviderUrl = 5; + optional uint32 referenceIndex = 6; + optional uint32 expectedLinksCount = 7; + optional uint32 pluginVersion = 8; + enum PluginType { + REELS = 1; + SEARCH = 2; + } + enum SearchProvider { + BING = 1; + GOOGLE = 2; + } +} + +message BotSuggestedPromptMetadata { + repeated string suggestedPrompts = 1; + optional uint32 selectedPromptIndex = 2; +} + +message CallLogRecord { + optional CallResult callResult = 1; + optional bool isDndMode = 2; + optional SilenceReason silenceReason = 3; + optional int64 duration = 4; + optional int64 startTime = 5; + optional bool isIncoming = 6; + optional bool isVideo = 7; + optional bool isCallLink = 8; + optional string callLinkToken = 9; + optional string scheduledCallId = 10; + optional string callId = 11; + optional string callCreatorJid = 12; + optional string groupJid = 13; + repeated ParticipantInfo participants = 14; + optional CallType callType = 15; + enum CallResult { + CONNECTED = 0; + REJECTED = 1; + CANCELLED = 2; + ACCEPTEDELSEWHERE = 3; + MISSED = 4; + INVALID = 5; + UNAVAILABLE = 6; + UPCOMING = 7; + FAILED = 8; + ABANDONED = 9; + ONGOING = 10; + } + enum CallType { + REGULAR = 0; + SCHEDULED_CALL = 1; + VOICE_CHAT = 2; + } + message ParticipantInfo { + optional string userJid = 1; + optional CallLogRecord.CallResult callResult = 2; + } + + enum SilenceReason { + NONE = 0; + SCHEDULED = 1; + PRIVACY = 2; + LIGHTWEIGHT = 3; + } } message CertChain { @@ -249,14 +329,14 @@ message ClientPayload { } message InteropData { optional uint64 accountId = 1; - optional uint32 integratorId = 2; - optional bytes token = 3; + optional bytes token = 2; } enum Product { WHATSAPP = 0; MESSENGER = 1; INTEROP = 2; + INTEROP_MSGR = 3; } message UserAgent { optional Platform platform = 1; @@ -324,6 +404,8 @@ message ClientPayload { VRDEVICE = 31; BLUE_WEB = 32; IPAD = 33; + TEST = 34; + SMART_GLASSES = 35; } enum ReleaseChannel { RELEASE = 0; @@ -363,6 +445,11 @@ message ClientPayload { } +message CommentMetadata { + optional MessageKey commentParentKey = 1; + optional uint32 replyCount = 2; +} + message ContextInfo { optional string stanzaId = 1; optional string participant = 2; @@ -394,6 +481,9 @@ message ContextInfo { optional UTMInfo utm = 41; optional ForwardedNewsletterMessageInfo forwardedNewsletterMessageInfo = 43; optional BusinessMessageForwardInfo businessMessageForwardInfo = 44; + optional string smbClientCampaignId = 45; + optional string smbServerCampaignId = 46; + optional DataSharingContext dataSharingContext = 47; message AdReplyInfo { optional string advertiserName = 1; optional MediaType mediaType = 2; @@ -410,6 +500,10 @@ message ContextInfo { optional string businessOwnerJid = 1; } + message DataSharingContext { + optional bool showMmDisclosure = 1; + } + message ExternalAdReplyInfo { optional string title = 1; optional string body = 2; @@ -435,6 +529,14 @@ message ContextInfo { message ForwardedNewsletterMessageInfo { optional string newsletterJid = 1; optional int32 serverMessageId = 2; + optional string newsletterName = 3; + optional ContentType contentType = 4; + optional string accessibilityText = 5; + enum ContentType { + UPDATE = 1; + UPDATE_CARD = 2; + LINK_CARD = 3; + } } message UTMInfo { @@ -487,6 +589,9 @@ message Conversation { optional bool shareOwnPn = 40; optional bool pnhDuplicateLidThread = 41; optional string lidJid = 42; + optional string username = 43; + optional string lidOriginType = 44; + optional uint32 commentsCount = 45; enum EndOfHistoryTransferType { COMPLETE_BUT_MORE_MESSAGES_REMAIN_ON_PRIMARY = 0; COMPLETE_AND_NO_MORE_MESSAGE_REMAIN_ON_PRIMARY = 1; @@ -503,6 +608,8 @@ message DeviceListMetadata { optional bytes senderKeyHash = 1; optional uint64 senderTimestamp = 2; repeated uint32 senderKeyIndexes = 3 [packed=true]; + optional ADVEncryptionType senderAccountType = 4; + optional ADVEncryptionType receiverAccountType = 5; optional bytes recipientKeyHash = 8; optional uint64 recipientTimestamp = 9; repeated uint32 recipientKeyIndexes = 10 [packed=true]; @@ -528,6 +635,9 @@ message DeviceProps { optional uint32 storageQuotaMb = 3; optional bool inlineInitialPayloadInE2EeMsg = 4; optional uint32 recentSyncDaysLimit = 5; + optional bool supportCallLogHistory = 6; + optional bool supportBotUserAgentChatHistory = 7; + optional bool supportCagReactionsAndPolls = 8; } enum PlatformType { @@ -561,16 +671,19 @@ message DisappearingMode { optional Initiator initiator = 1; optional Trigger trigger = 2; optional string initiatorDeviceJid = 3; + optional bool initiatedByMe = 4; enum Initiator { CHANGED_IN_CHAT = 0; INITIATED_BY_ME = 1; INITIATED_BY_OTHER = 2; + BIZ_UPGRADE_FB_HOSTING = 3; } enum Trigger { UNKNOWN = 0; CHAT_SETTING = 1; ACCOUNT_SETTING = 2; BULK_CHANGE = 3; + BIZ_SUPPORTS_FB_HOSTING = 4; } } @@ -579,6 +692,13 @@ message EphemeralSetting { optional sfixed64 timestamp = 2; } +message EventResponse { + optional MessageKey eventResponseMessageKey = 1; + optional int64 timestampMs = 2; + optional Message.EventResponseMessage eventResponseMessage = 3; + optional bool unread = 4; +} + message ExitCode { optional uint64 code = 1; optional string text = 2; @@ -664,6 +784,13 @@ message HistorySync { optional uint32 threadDsTimeframeOffset = 10; repeated StickerMetadata recentStickers = 11; repeated PastParticipants pastParticipants = 12; + repeated CallLogRecord callLogRecords = 13; + optional BotAIWaitListState aiWaitListState = 14; + repeated PhoneNumberToLIDMapping phoneNumberToLidMappings = 15; + enum BotAIWaitListState { + IN_WAITLIST = 0; + AI_AVAILABLE = 1; + } enum HistorySyncType { INITIAL_BOOTSTRAP = 0; INITIAL_STATUS_V3 = 1; @@ -700,6 +827,13 @@ message HydratedTemplateButton { message HydratedURLButton { optional string displayText = 1; optional string url = 2; + optional string consentedUsersUrl = 3; + optional WebviewPresentationType webviewPresentation = 4; + enum WebviewPresentationType { + FULL = 1; + TALL = 2; + COMPACT = 3; + } } } @@ -711,8 +845,10 @@ message IdentityKeyPairStructure { message InteractiveAnnotation { repeated Point polygonVertices = 1; + optional bool shouldSkipConfirmation = 4; oneof action { Location location = 2; + ContextInfo.ForwardedNewsletterMessageInfo newsletter = 3; } } @@ -758,6 +894,44 @@ message MediaData { optional string localPath = 1; } +message MediaEntry { + optional bytes fileSha256 = 1; + optional bytes mediaKey = 2; + optional bytes fileEncSha256 = 3; + optional string directPath = 4; + optional int64 mediaKeyTimestamp = 5; + optional string serverMediaType = 6; + optional bytes uploadToken = 7; + optional bytes validatedTimestamp = 8; + optional bytes sidecar = 9; + optional string objectId = 10; + optional string fbid = 11; + optional DownloadableThumbnail downloadableThumbnail = 12; + optional string handle = 13; + optional string filename = 14; + optional ProgressiveJpegDetails progressiveJpegDetails = 15; + message DownloadableThumbnail { + optional bytes fileSha256 = 1; + optional bytes fileEncSha256 = 2; + optional string directPath = 3; + optional bytes mediaKey = 4; + optional int64 mediaKeyTimestamp = 5; + optional string objectId = 6; + } + + message ProgressiveJpegDetails { + repeated int64 scanLengths = 1; + optional bytes sidecar = 2; + } + +} + +message MediaNotifyMessage { + optional string expressPathUrl = 1; + optional bytes fileEncSha256 = 2; + optional uint64 fileLength = 3; +} + message MediaRetryNotification { optional string stanzaId = 1; optional string directPath = 2; @@ -833,6 +1007,17 @@ message Message { optional ScheduledCallEditMessage scheduledCallEditMessage = 65; optional VideoMessage ptvMessage = 66; optional FutureProofMessage botInvokeMessage = 67; + optional CallLogMessage callLogMesssage = 69; + optional MessageHistoryBundle messageHistoryBundle = 70; + optional EncCommentMessage encCommentMessage = 71; + optional BCallMessage bcallMessage = 72; + optional FutureProofMessage lottieStickerMessage = 74; + optional EventMessage eventMessage = 75; + optional CommentMessage commentMessage = 77; + optional NewsletterAdminInviteMessage newsletterAdminInviteMessage = 78; + optional ExtendedTextMessageWithParentKey extendedTextMessageWithParentKey = 79; + optional PlaceholderMessage placeholderMessage = 80; + optional EncEventUpdateMessage encEventUpdateMessage = 81; message AppStateFatalExceptionNotification { repeated string collectionNames = 1; optional int64 timestamp = 2; @@ -885,10 +1070,24 @@ message Message { optional bool viewOnce = 21; } + message BCallMessage { + optional string sessionId = 1; + optional MediaType mediaType = 2; + optional bytes masterKey = 3; + optional string caption = 4; + enum MediaType { + UNKNOWN = 0; + AUDIO = 1; + VIDEO = 2; + } + } + message BotFeedbackMessage { optional MessageKey messageKey = 1; optional BotFeedbackKind kind = 2; optional string text = 3; + optional uint64 kindNegative = 4; + optional uint64 kindPositive = 5; enum BotFeedbackKind { BOT_FEEDBACK_POSITIVE = 0; BOT_FEEDBACK_NEGATIVE_GENERIC = 1; @@ -897,6 +1096,23 @@ message Message { BOT_FEEDBACK_NEGATIVE_ACCURATE = 4; BOT_FEEDBACK_NEGATIVE_SAFE = 5; BOT_FEEDBACK_NEGATIVE_OTHER = 6; + BOT_FEEDBACK_NEGATIVE_REFUSED = 7; + BOT_FEEDBACK_NEGATIVE_NOT_VISUALLY_APPEALING = 8; + BOT_FEEDBACK_NEGATIVE_NOT_RELEVANT_TO_TEXT = 9; + } + enum BotFeedbackKindMultipleNegative { + BOT_FEEDBACK_MULTIPLE_NEGATIVE_GENERIC = 1; + BOT_FEEDBACK_MULTIPLE_NEGATIVE_HELPFUL = 2; + BOT_FEEDBACK_MULTIPLE_NEGATIVE_INTERESTING = 4; + BOT_FEEDBACK_MULTIPLE_NEGATIVE_ACCURATE = 8; + BOT_FEEDBACK_MULTIPLE_NEGATIVE_SAFE = 16; + BOT_FEEDBACK_MULTIPLE_NEGATIVE_OTHER = 32; + BOT_FEEDBACK_MULTIPLE_NEGATIVE_REFUSED = 64; + BOT_FEEDBACK_MULTIPLE_NEGATIVE_NOT_VISUALLY_APPEALING = 128; + BOT_FEEDBACK_MULTIPLE_NEGATIVE_NOT_RELEVANT_TO_TEXT = 256; + } + enum BotFeedbackKindMultiplePositive { + BOT_FEEDBACK_MULTIPLE_POSITIVE_GENERIC = 1; } } @@ -965,6 +1181,34 @@ message Message { optional uint32 conversionDelaySeconds = 4; } + message CallLogMessage { + optional bool isVideo = 1; + optional CallOutcome callOutcome = 2; + optional int64 durationSecs = 3; + optional CallType callType = 4; + repeated CallParticipant participants = 5; + enum CallOutcome { + CONNECTED = 0; + MISSED = 1; + FAILED = 2; + REJECTED = 3; + ACCEPTED_ELSEWHERE = 4; + ONGOING = 5; + SILENCED_BY_DND = 6; + SILENCED_UNKNOWN_CALLER = 7; + } + message CallParticipant { + optional string jid = 1; + optional Message.CallLogMessage.CallOutcome callOutcome = 2; + } + + enum CallType { + REGULAR = 0; + SCHEDULED_CALL = 1; + VOICE_CHAT = 2; + } + } + message CancelPaymentRequestMessage { optional MessageKey key = 1; } @@ -974,6 +1218,11 @@ message Message { optional string id = 2; } + message CommentMessage { + optional Message message = 1; + optional MessageKey targetMessageKey = 2; + } + message ContactMessage { optional string displayName = 1; optional string vcard = 16; @@ -1019,12 +1268,54 @@ message Message { optional string caption = 20; } + message EncCommentMessage { + optional MessageKey targetMessageKey = 1; + optional bytes encPayload = 2; + optional bytes encIv = 3; + } + + message EncEventUpdateMessage { + optional MessageKey eventCreationMessageKey = 1; + optional bytes encPayload = 2; + optional bytes encIv = 3; + } + message EncReactionMessage { optional MessageKey targetMessageKey = 1; optional bytes encPayload = 2; optional bytes encIv = 3; } + message EventEditMessage { + optional Message.EventMessage eventEditMessage = 1; + optional int64 editTimestampMs = 2; + } + + message EventMessage { + optional ContextInfo contextInfo = 1; + optional bool isCanceled = 2; + optional string name = 3; + optional string description = 4; + optional Message.LocationMessage location = 5; + optional string joinLink = 6; + optional int64 startTime = 7; + } + + message EventResponseMessage { + optional EventResponseType response = 1; + optional int64 timestampMs = 2; + enum EventResponseType { + UNKNOWN = 0; + GOING = 1; + NOT_GOING = 2; + } + } + + message EventUpdateMessage { + optional Message.EventResponseMessage response = 1; + optional Message.EventEditMessage edit = 2; + } + message ExtendedTextMessage { optional string text = 1; optional string matchedText = 2; @@ -1051,12 +1342,9 @@ message Message { optional InviteLinkGroupType inviteLinkGroupTypeV2 = 29; optional bool viewOnce = 30; enum FontType { - SANS_SERIF = 0; - SERIF = 1; - NORICAN_REGULAR = 2; - BRYNDAN_WRITE = 3; - BEBASNEUE_REGULAR = 4; - OSWALD_HEAVY = 5; + SYSTEM = 0; + SYSTEM_TEXT = 1; + FB_SCRIPT = 2; SYSTEM_BOLD = 6; MORNINGBREEZE_REGULAR = 7; CALISTOGA_REGULAR = 8; @@ -1072,9 +1360,16 @@ message Message { enum PreviewType { NONE = 0; VIDEO = 1; + PLACEHOLDER = 4; + IMAGE = 5; } } + message ExtendedTextMessageWithParentKey { + optional MessageKey key = 1; + optional Message.ExtendedTextMessage extendedTextMessage = 2; + } + message FutureProofMessage { optional Message message = 1; } @@ -1204,6 +1499,7 @@ message Message { optional bytes thumbnailSha256 = 27; optional bytes thumbnailEncSha256 = 28; optional string staticUrl = 29; + repeated InteractiveAnnotation annotations = 30; } message InitialSecurityNotificationSettingSync { @@ -1415,6 +1711,25 @@ message Message { optional ContextInfo contextInfo = 17; } + message MessageHistoryBundle { + optional string mimetype = 2; + optional bytes fileSha256 = 3; + optional bytes mediaKey = 5; + optional bytes fileEncSha256 = 6; + optional string directPath = 7; + optional int64 mediaKeyTimestamp = 8; + optional ContextInfo contextInfo = 9; + repeated string participants = 10; + } + + message NewsletterAdminInviteMessage { + optional string newsletterJid = 1; + optional string newsletterName = 2; + optional bytes jpegThumbnail = 3; + optional string caption = 4; + optional int64 inviteExpiration = 5; + } + message OrderMessage { optional string orderId = 1; optional bytes thumbnail = 2; @@ -1428,8 +1743,12 @@ message Message { optional int64 totalAmount1000 = 10; optional string totalCurrencyCode = 11; optional ContextInfo contextInfo = 17; + optional int32 messageVersion = 12; + optional MessageKey orderRequestMessageId = 13; enum OrderStatus { INQUIRY = 1; + ACCEPTED = 2; + DECLINED = 3; } enum OrderSurface { CATALOG = 1; @@ -1532,6 +1851,13 @@ message Message { } } + message PlaceholderMessage { + optional PlaceholderType type = 1; + enum PlaceholderType { + MASK_LINKED_DEVICES = 0; + } + } + message PollCreationMessage { optional bytes encKey = 1; optional string name = 2; @@ -1608,6 +1934,9 @@ message Message { optional Message.PeerDataOperationRequestMessage peerDataOperationRequestMessage = 16; optional Message.PeerDataOperationRequestResponseMessage peerDataOperationRequestResponseMessage = 17; optional Message.BotFeedbackMessage botFeedbackMessage = 18; + optional string invokerJid = 19; + optional Message.RequestWelcomeMessageMetadata requestWelcomeMessageMetadata = 20; + optional MediaNotifyMessage mediaNotifyMessage = 21; enum Type { REVOKE = 0; EPHEMERAL_SETTING = 3; @@ -1624,6 +1953,7 @@ message Message { PEER_DATA_OPERATION_REQUEST_RESPONSE_MESSAGE = 17; REQUEST_WELCOME_MESSAGE = 18; BOT_FEEDBACK_MESSAGE = 19; + MEDIA_NOTIFY_MESSAGE = 20; } } @@ -1648,6 +1978,14 @@ message Message { optional ContextInfo contextInfo = 1; } + message RequestWelcomeMessageMetadata { + optional LocalChatState localChatState = 1; + enum LocalChatState { + EMPTY = 0; + NON_EMPTY = 1; + } + } + message ScheduledCallCreationMessage { optional int64 scheduledTimestampMs = 1; optional CallType callType = 2; @@ -1697,6 +2035,8 @@ message Message { optional ContextInfo contextInfo = 17; optional int64 stickerSentTs = 18; optional bool isAvatar = 19; + optional bool isAiSticker = 20; + optional bool isLottie = 21; } message StickerSyncRMRMessage { @@ -1710,6 +2050,7 @@ message Message { optional string selectedDisplayText = 2; optional ContextInfo contextInfo = 3; optional uint32 selectedIndex = 4; + optional uint32 selectedCarouselCardIndex = 5; } message TemplateMessage { @@ -1739,6 +2080,7 @@ message Message { optional string hydratedFooterText = 7; repeated HydratedTemplateButton hydratedButtons = 8; optional string templateId = 9; + optional bool maskLinkedDevices = 10; oneof title { Message.DocumentMessage documentMessage = 1; string hydratedTitleText = 2; @@ -1774,6 +2116,7 @@ message Message { optional bytes thumbnailSha256 = 22; optional bytes thumbnailEncSha256 = 23; optional string staticUrl = 24; + repeated InteractiveAnnotation annotations = 25; enum Attribution { NONE = 0; GIPHY = 1; @@ -1795,6 +2138,7 @@ message MessageContextInfo { optional uint32 messageAddOnDurationInSecs = 5; optional bytes botMessageSecret = 6; optional BotMetadata botMetadata = 7; + optional int32 reportingTokenVersion = 8; } message MessageKey { @@ -1844,6 +2188,9 @@ message MsgOpaqueData { optional bytes encReactionEncPayload = 26; optional bytes encReactionEncIv = 27; optional bytes botMessageSecret = 29; + optional string targetMessageKey = 30; + optional bytes encPayload = 31; + optional bytes encIv = 32; message PollOption { optional string name = 1; } @@ -1899,6 +2246,29 @@ message PastParticipants { repeated PastParticipant pastParticipants = 2; } +message PatchDebugData { + optional bytes currentLthash = 1; + optional bytes newLthash = 2; + optional bytes patchVersion = 3; + optional bytes collectionName = 4; + optional bytes firstFourBytesFromAHashOfSnapshotMacKey = 5; + optional bytes newLthashSubtract = 6; + optional int32 numberAdd = 7; + optional int32 numberRemove = 8; + optional int32 numberOverride = 9; + optional Platform senderPlatform = 10; + optional bool isSenderPrimary = 11; + enum Platform { + ANDROID = 0; + SMBA = 1; + IPHONE = 2; + SMBI = 3; + WEB = 4; + UWP = 5; + DARWIN = 6; + } +} + message PaymentBackground { optional string id = 1; optional uint64 fileLength = 2; @@ -1992,6 +2362,11 @@ message PaymentInfo { } } +message PhoneNumberToLIDMapping { + optional string pnJid = 1; + optional string lidJid = 2; +} + message PhotoChange { optional bytes oldPhoto = 1; optional bytes newPhoto = 2; @@ -2050,6 +2425,10 @@ message PreKeySignalMessage { optional bytes message = 4; } +message PremiumMessageInfo { + optional string serverCampaignId = 1; +} + message Pushname { optional string id = 1; optional string pushname = 2; @@ -2108,6 +2487,10 @@ message RecordStructure { repeated SessionStructure previousSessions = 2; } +message ReportingTokenInfo { + optional bytes reportingTag = 1; +} + message SenderKeyDistributionMessage { optional uint32 id = 1; optional uint32 iteration = 2; @@ -2280,6 +2663,13 @@ message SyncActionValue { optional MarketingMessageBroadcastAction marketingMessageBroadcastAction = 39; optional ExternalWebBetaAction externalWebBetaAction = 40; optional PrivacySettingRelayAllCalls privacySettingRelayAllCalls = 41; + optional CallLogAction callLogAction = 42; + optional StatusPrivacyAction statusPrivacy = 44; + optional BotWelcomeRequestAction botWelcomeRequestAction = 45; + optional DeleteIndividualCallLogAction deleteIndividualCallLog = 46; + optional LabelReorderingAction labelReorderingAction = 47; + optional PaymentInfoAction paymentInfoAction = 48; + optional CustomPaymentMethodsAction customPaymentMethodsAction = 49; message AgentAction { optional string name = 1; optional int32 deviceID = 2; @@ -2295,6 +2685,14 @@ message SyncActionValue { optional SyncActionValue.SyncActionMessageRange messageRange = 2; } + message BotWelcomeRequestAction { + optional bool isSent = 1; + } + + message CallLogAction { + optional CallLogRecord callLogRecord = 1; + } + message ChatAssignmentAction { optional string deviceAgentID = 1; } @@ -2311,12 +2709,34 @@ message SyncActionValue { optional string fullName = 1; optional string firstName = 2; optional string lidJid = 3; + optional bool saveOnPrimaryAddressbook = 4; + } + + message CustomPaymentMethod { + required string credentialId = 1; + required string country = 2; + required string type = 3; + repeated SyncActionValue.CustomPaymentMethodMetadata metadata = 4; + } + + message CustomPaymentMethodMetadata { + required string key = 1; + required string value = 2; + } + + message CustomPaymentMethodsAction { + repeated SyncActionValue.CustomPaymentMethod customPaymentMethods = 1; } message DeleteChatAction { optional SyncActionValue.SyncActionMessageRange messageRange = 1; } + message DeleteIndividualCallLogAction { + optional string peerJid = 1; + optional bool isIncoming = 2; + } + message DeleteMessageForMeAction { optional bool deleteMedia = 1; optional int64 messageTimestamp = 2; @@ -2339,6 +2759,11 @@ message SyncActionValue { optional int32 color = 2; optional int32 predefinedId = 3; optional bool deleted = 4; + optional int32 orderIndex = 5; + } + + message LabelReorderingAction { + repeated int32 sortedLabelIds = 1; } message LocaleSetting { @@ -2377,6 +2802,10 @@ message SyncActionValue { optional bool acknowledged = 1; } + message PaymentInfoAction { + optional string cpi = 1; + } + message PinAction { optional bool pinned = 1; } @@ -2425,6 +2854,16 @@ message SyncActionValue { optional bool starred = 1; } + message StatusPrivacyAction { + optional StatusDistributionMode mode = 1; + repeated string userJid = 2; + enum StatusDistributionMode { + ALLOW_LIST = 0; + DENY_LIST = 1; + CONTACTS = 2; + } + } + message StickerAction { optional string url = 1; optional bytes fileEncSha256 = 2; @@ -2495,6 +2934,7 @@ message SyncdPatch { optional KeyId keyId = 6; optional ExitCode exitCode = 7; optional uint32 deviceIndex = 8; + optional bytes clientDebugData = 9; } message SyncdRecord { @@ -2669,6 +3109,14 @@ message WebMessageInfo { optional string originalSelfAuthorUserJidString = 51; optional uint64 revokeMessageTimestamp = 52; optional PinInChat pinInChat = 54; + optional PremiumMessageInfo premiumMessageInfo = 55; + optional bool is1PBizBotMessage = 56; + optional bool isGroupHistoryMessage = 57; + optional string botMessageInvokerJid = 58; + optional CommentMetadata commentMetadata = 59; + repeated EventResponse eventResponses = 61; + optional ReportingTokenInfo reportingTokenInfo = 62; + optional uint64 newsletterServerId = 63; enum BizPrivacyStatus { E2EE = 0; FB = 2; @@ -2868,6 +3316,23 @@ message WebMessageInfo { LINKED_GROUP_CALL_START = 181; REPORT_TO_ADMIN_ENABLED_STATUS = 182; EMPTY_SUBGROUP_CREATE = 183; + SCHEDULED_CALL_CANCEL = 184; + SUBGROUP_ADMIN_TRIGGERED_AUTO_ADD_RICH = 185; + GROUP_CHANGE_RECENT_HISTORY_SHARING = 186; + PAID_MESSAGE_SERVER_CAMPAIGN_ID = 187; + GENERAL_CHAT_CREATE = 188; + GENERAL_CHAT_ADD = 189; + GENERAL_CHAT_AUTO_ADD_DISABLED = 190; + SUGGESTED_SUBGROUP_ANNOUNCE = 191; + BIZ_BOT_1P_MESSAGING_ENABLED = 192; + CHANGE_USERNAME = 193; + BIZ_COEX_PRIVACY_INIT_SELF = 194; + BIZ_COEX_PRIVACY_TRANSITION_SELF = 195; + SUPPORT_AI_EDUCATION = 196; + BIZ_BOT_3P_MESSAGING_ENABLED = 197; + REMINDER_SETUP_MESSAGE = 198; + REMINDER_SENT_MESSAGE = 199; + REMINDER_CANCEL_MESSAGE = 200; } } diff --git a/WAProto/index.d.ts b/WAProto/index.d.ts index d467fb846d7..89bdac61342 100644 --- a/WAProto/index.d.ts +++ b/WAProto/index.d.ts @@ -352,6 +352,9 @@ export namespace proto { /** ADVSignedDeviceIdentityHMAC hmac */ hmac?: (Uint8Array|null); + + /** ADVSignedDeviceIdentityHMAC accountType */ + accountType?: (proto.ADVEncryptionType|null); } /** Represents a ADVSignedDeviceIdentityHMAC. */ @@ -369,6 +372,9 @@ export namespace proto { /** ADVSignedDeviceIdentityHMAC hmac. */ public hmac: Uint8Array; + /** ADVSignedDeviceIdentityHMAC accountType. */ + public accountType: proto.ADVEncryptionType; + /** * Creates a new ADVSignedDeviceIdentityHMAC instance using the specified properties. * @param [properties] Properties to set @@ -448,6 +454,9 @@ export namespace proto { /** ADVSignedKeyIndexList accountSignature */ accountSignature?: (Uint8Array|null); + + /** ADVSignedKeyIndexList accountSignatureKey */ + accountSignatureKey?: (Uint8Array|null); } /** Represents a ADVSignedKeyIndexList. */ @@ -465,6 +474,9 @@ export namespace proto { /** ADVSignedKeyIndexList accountSignature. */ public accountSignature: Uint8Array; + /** ADVSignedKeyIndexList accountSignatureKey. */ + public accountSignatureKey: Uint8Array; + /** * Creates a new ADVSignedKeyIndexList instance using the specified properties. * @param [properties] Properties to set @@ -1222,6 +1234,15 @@ export namespace proto { /** BotAvatarMetadata behaviorGraph */ behaviorGraph?: (string|null); + + /** BotAvatarMetadata action */ + action?: (number|null); + + /** BotAvatarMetadata intensity */ + intensity?: (number|null); + + /** BotAvatarMetadata wordCount */ + wordCount?: (number|null); } /** Represents a BotAvatarMetadata. */ @@ -1239,6 +1260,15 @@ export namespace proto { /** BotAvatarMetadata behaviorGraph. */ public behaviorGraph: string; + /** BotAvatarMetadata action. */ + public action: number; + + /** BotAvatarMetadata intensity. */ + public intensity: number; + + /** BotAvatarMetadata wordCount. */ + public wordCount: number; + /** * Creates a new BotAvatarMetadata instance using the specified properties. * @param [properties] Properties to set @@ -1315,6 +1345,18 @@ export namespace proto { /** BotMetadata avatarMetadata */ avatarMetadata?: (proto.IBotAvatarMetadata|null); + + /** BotMetadata personaId */ + personaId?: (string|null); + + /** BotMetadata pluginMetadata */ + pluginMetadata?: (proto.IBotPluginMetadata|null); + + /** BotMetadata suggestedPromptMetadata */ + suggestedPromptMetadata?: (proto.IBotSuggestedPromptMetadata|null); + + /** BotMetadata invokerJid */ + invokerJid?: (string|null); } /** Represents a BotMetadata. */ @@ -1329,6 +1371,18 @@ export namespace proto { /** BotMetadata avatarMetadata. */ public avatarMetadata?: (proto.IBotAvatarMetadata|null); + /** BotMetadata personaId. */ + public personaId: string; + + /** BotMetadata pluginMetadata. */ + public pluginMetadata?: (proto.IBotPluginMetadata|null); + + /** BotMetadata suggestedPromptMetadata. */ + public suggestedPromptMetadata?: (proto.IBotSuggestedPromptMetadata|null); + + /** BotMetadata invokerJid. */ + public invokerJid: string; + /** * Creates a new BotMetadata instance using the specified properties. * @param [properties] Properties to set @@ -1400,6 +1454,552 @@ export namespace proto { public toJSON(): { [k: string]: any }; } + /** Properties of a BotPluginMetadata. */ + interface IBotPluginMetadata { + + /** BotPluginMetadata provider */ + provider?: (proto.BotPluginMetadata.SearchProvider|null); + + /** BotPluginMetadata pluginType */ + pluginType?: (proto.BotPluginMetadata.PluginType|null); + + /** BotPluginMetadata thumbnailCdnUrl */ + thumbnailCdnUrl?: (string|null); + + /** BotPluginMetadata profilePhotoCdnUrl */ + profilePhotoCdnUrl?: (string|null); + + /** BotPluginMetadata searchProviderUrl */ + searchProviderUrl?: (string|null); + + /** BotPluginMetadata referenceIndex */ + referenceIndex?: (number|null); + + /** BotPluginMetadata expectedLinksCount */ + expectedLinksCount?: (number|null); + + /** BotPluginMetadata pluginVersion */ + pluginVersion?: (number|null); + } + + /** Represents a BotPluginMetadata. */ + class BotPluginMetadata implements IBotPluginMetadata { + + /** + * Constructs a new BotPluginMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IBotPluginMetadata); + + /** BotPluginMetadata provider. */ + public provider: proto.BotPluginMetadata.SearchProvider; + + /** BotPluginMetadata pluginType. */ + public pluginType: proto.BotPluginMetadata.PluginType; + + /** BotPluginMetadata thumbnailCdnUrl. */ + public thumbnailCdnUrl: string; + + /** BotPluginMetadata profilePhotoCdnUrl. */ + public profilePhotoCdnUrl: string; + + /** BotPluginMetadata searchProviderUrl. */ + public searchProviderUrl: string; + + /** BotPluginMetadata referenceIndex. */ + public referenceIndex: number; + + /** BotPluginMetadata expectedLinksCount. */ + public expectedLinksCount: number; + + /** BotPluginMetadata pluginVersion. */ + public pluginVersion: number; + + /** + * Creates a new BotPluginMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns BotPluginMetadata instance + */ + public static create(properties?: proto.IBotPluginMetadata): proto.BotPluginMetadata; + + /** + * Encodes the specified BotPluginMetadata message. Does not implicitly {@link proto.BotPluginMetadata.verify|verify} messages. + * @param message BotPluginMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IBotPluginMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BotPluginMetadata message, length delimited. Does not implicitly {@link proto.BotPluginMetadata.verify|verify} messages. + * @param message BotPluginMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IBotPluginMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BotPluginMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BotPluginMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.BotPluginMetadata; + + /** + * Decodes a BotPluginMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BotPluginMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.BotPluginMetadata; + + /** + * Verifies a BotPluginMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BotPluginMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BotPluginMetadata + */ + public static fromObject(object: { [k: string]: any }): proto.BotPluginMetadata; + + /** + * Creates a plain object from a BotPluginMetadata message. Also converts values to other types if specified. + * @param message BotPluginMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.BotPluginMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BotPluginMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace BotPluginMetadata { + + /** PluginType enum. */ + enum PluginType { + REELS = 1, + SEARCH = 2 + } + + /** SearchProvider enum. */ + enum SearchProvider { + BING = 1, + GOOGLE = 2 + } + } + + /** Properties of a BotSuggestedPromptMetadata. */ + interface IBotSuggestedPromptMetadata { + + /** BotSuggestedPromptMetadata suggestedPrompts */ + suggestedPrompts?: (string[]|null); + + /** BotSuggestedPromptMetadata selectedPromptIndex */ + selectedPromptIndex?: (number|null); + } + + /** Represents a BotSuggestedPromptMetadata. */ + class BotSuggestedPromptMetadata implements IBotSuggestedPromptMetadata { + + /** + * Constructs a new BotSuggestedPromptMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IBotSuggestedPromptMetadata); + + /** BotSuggestedPromptMetadata suggestedPrompts. */ + public suggestedPrompts: string[]; + + /** BotSuggestedPromptMetadata selectedPromptIndex. */ + public selectedPromptIndex: number; + + /** + * Creates a new BotSuggestedPromptMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns BotSuggestedPromptMetadata instance + */ + public static create(properties?: proto.IBotSuggestedPromptMetadata): proto.BotSuggestedPromptMetadata; + + /** + * Encodes the specified BotSuggestedPromptMetadata message. Does not implicitly {@link proto.BotSuggestedPromptMetadata.verify|verify} messages. + * @param message BotSuggestedPromptMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IBotSuggestedPromptMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BotSuggestedPromptMetadata message, length delimited. Does not implicitly {@link proto.BotSuggestedPromptMetadata.verify|verify} messages. + * @param message BotSuggestedPromptMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IBotSuggestedPromptMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BotSuggestedPromptMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BotSuggestedPromptMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.BotSuggestedPromptMetadata; + + /** + * Decodes a BotSuggestedPromptMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BotSuggestedPromptMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.BotSuggestedPromptMetadata; + + /** + * Verifies a BotSuggestedPromptMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BotSuggestedPromptMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BotSuggestedPromptMetadata + */ + public static fromObject(object: { [k: string]: any }): proto.BotSuggestedPromptMetadata; + + /** + * Creates a plain object from a BotSuggestedPromptMetadata message. Also converts values to other types if specified. + * @param message BotSuggestedPromptMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.BotSuggestedPromptMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BotSuggestedPromptMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CallLogRecord. */ + interface ICallLogRecord { + + /** CallLogRecord callResult */ + callResult?: (proto.CallLogRecord.CallResult|null); + + /** CallLogRecord isDndMode */ + isDndMode?: (boolean|null); + + /** CallLogRecord silenceReason */ + silenceReason?: (proto.CallLogRecord.SilenceReason|null); + + /** CallLogRecord duration */ + duration?: (number|Long|null); + + /** CallLogRecord startTime */ + startTime?: (number|Long|null); + + /** CallLogRecord isIncoming */ + isIncoming?: (boolean|null); + + /** CallLogRecord isVideo */ + isVideo?: (boolean|null); + + /** CallLogRecord isCallLink */ + isCallLink?: (boolean|null); + + /** CallLogRecord callLinkToken */ + callLinkToken?: (string|null); + + /** CallLogRecord scheduledCallId */ + scheduledCallId?: (string|null); + + /** CallLogRecord callId */ + callId?: (string|null); + + /** CallLogRecord callCreatorJid */ + callCreatorJid?: (string|null); + + /** CallLogRecord groupJid */ + groupJid?: (string|null); + + /** CallLogRecord participants */ + participants?: (proto.CallLogRecord.IParticipantInfo[]|null); + + /** CallLogRecord callType */ + callType?: (proto.CallLogRecord.CallType|null); + } + + /** Represents a CallLogRecord. */ + class CallLogRecord implements ICallLogRecord { + + /** + * Constructs a new CallLogRecord. + * @param [properties] Properties to set + */ + constructor(properties?: proto.ICallLogRecord); + + /** CallLogRecord callResult. */ + public callResult: proto.CallLogRecord.CallResult; + + /** CallLogRecord isDndMode. */ + public isDndMode: boolean; + + /** CallLogRecord silenceReason. */ + public silenceReason: proto.CallLogRecord.SilenceReason; + + /** CallLogRecord duration. */ + public duration: (number|Long); + + /** CallLogRecord startTime. */ + public startTime: (number|Long); + + /** CallLogRecord isIncoming. */ + public isIncoming: boolean; + + /** CallLogRecord isVideo. */ + public isVideo: boolean; + + /** CallLogRecord isCallLink. */ + public isCallLink: boolean; + + /** CallLogRecord callLinkToken. */ + public callLinkToken: string; + + /** CallLogRecord scheduledCallId. */ + public scheduledCallId: string; + + /** CallLogRecord callId. */ + public callId: string; + + /** CallLogRecord callCreatorJid. */ + public callCreatorJid: string; + + /** CallLogRecord groupJid. */ + public groupJid: string; + + /** CallLogRecord participants. */ + public participants: proto.CallLogRecord.IParticipantInfo[]; + + /** CallLogRecord callType. */ + public callType: proto.CallLogRecord.CallType; + + /** + * Creates a new CallLogRecord instance using the specified properties. + * @param [properties] Properties to set + * @returns CallLogRecord instance + */ + public static create(properties?: proto.ICallLogRecord): proto.CallLogRecord; + + /** + * Encodes the specified CallLogRecord message. Does not implicitly {@link proto.CallLogRecord.verify|verify} messages. + * @param message CallLogRecord message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.ICallLogRecord, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CallLogRecord message, length delimited. Does not implicitly {@link proto.CallLogRecord.verify|verify} messages. + * @param message CallLogRecord message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.ICallLogRecord, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CallLogRecord message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CallLogRecord + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.CallLogRecord; + + /** + * Decodes a CallLogRecord message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CallLogRecord + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.CallLogRecord; + + /** + * Verifies a CallLogRecord message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CallLogRecord message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CallLogRecord + */ + public static fromObject(object: { [k: string]: any }): proto.CallLogRecord; + + /** + * Creates a plain object from a CallLogRecord message. Also converts values to other types if specified. + * @param message CallLogRecord + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.CallLogRecord, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CallLogRecord to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace CallLogRecord { + + /** CallResult enum. */ + enum CallResult { + CONNECTED = 0, + REJECTED = 1, + CANCELLED = 2, + ACCEPTEDELSEWHERE = 3, + MISSED = 4, + INVALID = 5, + UNAVAILABLE = 6, + UPCOMING = 7, + FAILED = 8, + ABANDONED = 9, + ONGOING = 10 + } + + /** CallType enum. */ + enum CallType { + REGULAR = 0, + SCHEDULED_CALL = 1, + VOICE_CHAT = 2 + } + + /** Properties of a ParticipantInfo. */ + interface IParticipantInfo { + + /** ParticipantInfo userJid */ + userJid?: (string|null); + + /** ParticipantInfo callResult */ + callResult?: (proto.CallLogRecord.CallResult|null); + } + + /** Represents a ParticipantInfo. */ + class ParticipantInfo implements IParticipantInfo { + + /** + * Constructs a new ParticipantInfo. + * @param [properties] Properties to set + */ + constructor(properties?: proto.CallLogRecord.IParticipantInfo); + + /** ParticipantInfo userJid. */ + public userJid: string; + + /** ParticipantInfo callResult. */ + public callResult: proto.CallLogRecord.CallResult; + + /** + * Creates a new ParticipantInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns ParticipantInfo instance + */ + public static create(properties?: proto.CallLogRecord.IParticipantInfo): proto.CallLogRecord.ParticipantInfo; + + /** + * Encodes the specified ParticipantInfo message. Does not implicitly {@link proto.CallLogRecord.ParticipantInfo.verify|verify} messages. + * @param message ParticipantInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.CallLogRecord.IParticipantInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ParticipantInfo message, length delimited. Does not implicitly {@link proto.CallLogRecord.ParticipantInfo.verify|verify} messages. + * @param message ParticipantInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.CallLogRecord.IParticipantInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ParticipantInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ParticipantInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.CallLogRecord.ParticipantInfo; + + /** + * Decodes a ParticipantInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ParticipantInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.CallLogRecord.ParticipantInfo; + + /** + * Verifies a ParticipantInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ParticipantInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ParticipantInfo + */ + public static fromObject(object: { [k: string]: any }): proto.CallLogRecord.ParticipantInfo; + + /** + * Creates a plain object from a ParticipantInfo message. Also converts values to other types if specified. + * @param message ParticipantInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.CallLogRecord.ParticipantInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ParticipantInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** SilenceReason enum. */ + enum SilenceReason { + NONE = 0, + SCHEDULED = 1, + PRIVACY = 2, + LIGHTWEIGHT = 3 + } + } + /** Properties of a CertChain. */ interface ICertChain { @@ -2727,9 +3327,6 @@ export namespace proto { /** InteropData accountId */ accountId?: (number|Long|null); - /** InteropData integratorId */ - integratorId?: (number|null); - /** InteropData token */ token?: (Uint8Array|null); } @@ -2746,9 +3343,6 @@ export namespace proto { /** InteropData accountId. */ public accountId: (number|Long); - /** InteropData integratorId. */ - public integratorId: number; - /** InteropData token. */ public token: Uint8Array; @@ -2827,7 +3421,8 @@ export namespace proto { enum Product { WHATSAPP = 0, MESSENGER = 1, - INTEROP = 2 + INTEROP = 2, + INTEROP_MSGR = 3 } /** Properties of a UserAgent. */ @@ -3164,7 +3759,9 @@ export namespace proto { ARDEVICE = 30, VRDEVICE = 31, BLUE_WEB = 32, - IPAD = 33 + IPAD = 33, + TEST = 34, + SMART_GLASSES = 35 } /** ReleaseChannel enum. */ @@ -3447,6 +4044,102 @@ export namespace proto { } } + /** Properties of a CommentMetadata. */ + interface ICommentMetadata { + + /** CommentMetadata commentParentKey */ + commentParentKey?: (proto.IMessageKey|null); + + /** CommentMetadata replyCount */ + replyCount?: (number|null); + } + + /** Represents a CommentMetadata. */ + class CommentMetadata implements ICommentMetadata { + + /** + * Constructs a new CommentMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: proto.ICommentMetadata); + + /** CommentMetadata commentParentKey. */ + public commentParentKey?: (proto.IMessageKey|null); + + /** CommentMetadata replyCount. */ + public replyCount: number; + + /** + * Creates a new CommentMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns CommentMetadata instance + */ + public static create(properties?: proto.ICommentMetadata): proto.CommentMetadata; + + /** + * Encodes the specified CommentMetadata message. Does not implicitly {@link proto.CommentMetadata.verify|verify} messages. + * @param message CommentMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.ICommentMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CommentMetadata message, length delimited. Does not implicitly {@link proto.CommentMetadata.verify|verify} messages. + * @param message CommentMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.ICommentMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CommentMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CommentMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.CommentMetadata; + + /** + * Decodes a CommentMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CommentMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.CommentMetadata; + + /** + * Verifies a CommentMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CommentMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CommentMetadata + */ + public static fromObject(object: { [k: string]: any }): proto.CommentMetadata; + + /** + * Creates a plain object from a CommentMetadata message. Also converts values to other types if specified. + * @param message CommentMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.CommentMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CommentMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of a ContextInfo. */ interface IContextInfo { @@ -3539,6 +4232,15 @@ export namespace proto { /** ContextInfo businessMessageForwardInfo */ businessMessageForwardInfo?: (proto.ContextInfo.IBusinessMessageForwardInfo|null); + + /** ContextInfo smbClientCampaignId */ + smbClientCampaignId?: (string|null); + + /** ContextInfo smbServerCampaignId */ + smbServerCampaignId?: (string|null); + + /** ContextInfo dataSharingContext */ + dataSharingContext?: (proto.ContextInfo.IDataSharingContext|null); } /** Represents a ContextInfo. */ @@ -3640,6 +4342,15 @@ export namespace proto { /** ContextInfo businessMessageForwardInfo. */ public businessMessageForwardInfo?: (proto.ContextInfo.IBusinessMessageForwardInfo|null); + /** ContextInfo smbClientCampaignId. */ + public smbClientCampaignId: string; + + /** ContextInfo smbServerCampaignId. */ + public smbServerCampaignId: string; + + /** ContextInfo dataSharingContext. */ + public dataSharingContext?: (proto.ContextInfo.IDataSharingContext|null); + /** * Creates a new ContextInfo instance using the specified properties. * @param [properties] Properties to set @@ -3921,6 +4632,96 @@ export namespace proto { public toJSON(): { [k: string]: any }; } + /** Properties of a DataSharingContext. */ + interface IDataSharingContext { + + /** DataSharingContext showMmDisclosure */ + showMmDisclosure?: (boolean|null); + } + + /** Represents a DataSharingContext. */ + class DataSharingContext implements IDataSharingContext { + + /** + * Constructs a new DataSharingContext. + * @param [properties] Properties to set + */ + constructor(properties?: proto.ContextInfo.IDataSharingContext); + + /** DataSharingContext showMmDisclosure. */ + public showMmDisclosure: boolean; + + /** + * Creates a new DataSharingContext instance using the specified properties. + * @param [properties] Properties to set + * @returns DataSharingContext instance + */ + public static create(properties?: proto.ContextInfo.IDataSharingContext): proto.ContextInfo.DataSharingContext; + + /** + * Encodes the specified DataSharingContext message. Does not implicitly {@link proto.ContextInfo.DataSharingContext.verify|verify} messages. + * @param message DataSharingContext message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.ContextInfo.IDataSharingContext, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataSharingContext message, length delimited. Does not implicitly {@link proto.ContextInfo.DataSharingContext.verify|verify} messages. + * @param message DataSharingContext message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.ContextInfo.IDataSharingContext, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataSharingContext message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataSharingContext + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.ContextInfo.DataSharingContext; + + /** + * Decodes a DataSharingContext message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataSharingContext + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.ContextInfo.DataSharingContext; + + /** + * Verifies a DataSharingContext message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataSharingContext message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataSharingContext + */ + public static fromObject(object: { [k: string]: any }): proto.ContextInfo.DataSharingContext; + + /** + * Creates a plain object from a DataSharingContext message. Also converts values to other types if specified. + * @param message DataSharingContext + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.ContextInfo.DataSharingContext, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataSharingContext to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of an ExternalAdReplyInfo. */ interface IExternalAdReplyInfo { @@ -4107,6 +4908,15 @@ export namespace proto { /** ForwardedNewsletterMessageInfo serverMessageId */ serverMessageId?: (number|null); + + /** ForwardedNewsletterMessageInfo newsletterName */ + newsletterName?: (string|null); + + /** ForwardedNewsletterMessageInfo contentType */ + contentType?: (proto.ContextInfo.ForwardedNewsletterMessageInfo.ContentType|null); + + /** ForwardedNewsletterMessageInfo accessibilityText */ + accessibilityText?: (string|null); } /** Represents a ForwardedNewsletterMessageInfo. */ @@ -4124,6 +4934,15 @@ export namespace proto { /** ForwardedNewsletterMessageInfo serverMessageId. */ public serverMessageId: number; + /** ForwardedNewsletterMessageInfo newsletterName. */ + public newsletterName: string; + + /** ForwardedNewsletterMessageInfo contentType. */ + public contentType: proto.ContextInfo.ForwardedNewsletterMessageInfo.ContentType; + + /** ForwardedNewsletterMessageInfo accessibilityText. */ + public accessibilityText: string; + /** * Creates a new ForwardedNewsletterMessageInfo instance using the specified properties. * @param [properties] Properties to set @@ -4195,6 +5014,16 @@ export namespace proto { public toJSON(): { [k: string]: any }; } + namespace ForwardedNewsletterMessageInfo { + + /** ContentType enum. */ + enum ContentType { + UPDATE = 1, + UPDATE_CARD = 2, + LINK_CARD = 3 + } + } + /** Properties of a UTMInfo. */ interface IUTMInfo { @@ -4420,6 +5249,15 @@ export namespace proto { /** Conversation lidJid */ lidJid?: (string|null); + + /** Conversation username */ + username?: (string|null); + + /** Conversation lidOriginType */ + lidOriginType?: (string|null); + + /** Conversation commentsCount */ + commentsCount?: (number|null); } /** Represents a Conversation. */ @@ -4557,6 +5395,15 @@ export namespace proto { /** Conversation lidJid. */ public lidJid: string; + /** Conversation username. */ + public username: string; + + /** Conversation lidOriginType. */ + public lidOriginType: string; + + /** Conversation commentsCount. */ + public commentsCount: number; + /** * Creates a new Conversation instance using the specified properties. * @param [properties] Properties to set @@ -4746,6 +5593,12 @@ export namespace proto { /** DeviceListMetadata senderKeyIndexes */ senderKeyIndexes?: (number[]|null); + /** DeviceListMetadata senderAccountType */ + senderAccountType?: (proto.ADVEncryptionType|null); + + /** DeviceListMetadata receiverAccountType */ + receiverAccountType?: (proto.ADVEncryptionType|null); + /** DeviceListMetadata recipientKeyHash */ recipientKeyHash?: (Uint8Array|null); @@ -4774,6 +5627,12 @@ export namespace proto { /** DeviceListMetadata senderKeyIndexes. */ public senderKeyIndexes: number[]; + /** DeviceListMetadata senderAccountType. */ + public senderAccountType: proto.ADVEncryptionType; + + /** DeviceListMetadata receiverAccountType. */ + public receiverAccountType: proto.ADVEncryptionType; + /** DeviceListMetadata recipientKeyHash. */ public recipientKeyHash: Uint8Array; @@ -5101,6 +5960,15 @@ export namespace proto { /** HistorySyncConfig recentSyncDaysLimit */ recentSyncDaysLimit?: (number|null); + + /** HistorySyncConfig supportCallLogHistory */ + supportCallLogHistory?: (boolean|null); + + /** HistorySyncConfig supportBotUserAgentChatHistory */ + supportBotUserAgentChatHistory?: (boolean|null); + + /** HistorySyncConfig supportCagReactionsAndPolls */ + supportCagReactionsAndPolls?: (boolean|null); } /** Represents a HistorySyncConfig. */ @@ -5127,6 +5995,15 @@ export namespace proto { /** HistorySyncConfig recentSyncDaysLimit. */ public recentSyncDaysLimit: number; + /** HistorySyncConfig supportCallLogHistory. */ + public supportCallLogHistory: boolean; + + /** HistorySyncConfig supportBotUserAgentChatHistory. */ + public supportBotUserAgentChatHistory: boolean; + + /** HistorySyncConfig supportCagReactionsAndPolls. */ + public supportCagReactionsAndPolls: boolean; + /** * Creates a new HistorySyncConfig instance using the specified properties. * @param [properties] Properties to set @@ -5237,6 +6114,9 @@ export namespace proto { /** DisappearingMode initiatorDeviceJid */ initiatorDeviceJid?: (string|null); + + /** DisappearingMode initiatedByMe */ + initiatedByMe?: (boolean|null); } /** Represents a DisappearingMode. */ @@ -5257,6 +6137,9 @@ export namespace proto { /** DisappearingMode initiatorDeviceJid. */ public initiatorDeviceJid: string; + /** DisappearingMode initiatedByMe. */ + public initiatedByMe: boolean; + /** * Creates a new DisappearingMode instance using the specified properties. * @param [properties] Properties to set @@ -5334,7 +6217,8 @@ export namespace proto { enum Initiator { CHANGED_IN_CHAT = 0, INITIATED_BY_ME = 1, - INITIATED_BY_OTHER = 2 + INITIATED_BY_OTHER = 2, + BIZ_UPGRADE_FB_HOSTING = 3 } /** Trigger enum. */ @@ -5342,7 +6226,8 @@ export namespace proto { UNKNOWN = 0, CHAT_SETTING = 1, ACCOUNT_SETTING = 2, - BULK_CHANGE = 3 + BULK_CHANGE = 3, + BIZ_SUPPORTS_FB_HOSTING = 4 } } @@ -5442,6 +6327,114 @@ export namespace proto { public toJSON(): { [k: string]: any }; } + /** Properties of an EventResponse. */ + interface IEventResponse { + + /** EventResponse eventResponseMessageKey */ + eventResponseMessageKey?: (proto.IMessageKey|null); + + /** EventResponse timestampMs */ + timestampMs?: (number|Long|null); + + /** EventResponse eventResponseMessage */ + eventResponseMessage?: (proto.Message.IEventResponseMessage|null); + + /** EventResponse unread */ + unread?: (boolean|null); + } + + /** Represents an EventResponse. */ + class EventResponse implements IEventResponse { + + /** + * Constructs a new EventResponse. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IEventResponse); + + /** EventResponse eventResponseMessageKey. */ + public eventResponseMessageKey?: (proto.IMessageKey|null); + + /** EventResponse timestampMs. */ + public timestampMs: (number|Long); + + /** EventResponse eventResponseMessage. */ + public eventResponseMessage?: (proto.Message.IEventResponseMessage|null); + + /** EventResponse unread. */ + public unread: boolean; + + /** + * Creates a new EventResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns EventResponse instance + */ + public static create(properties?: proto.IEventResponse): proto.EventResponse; + + /** + * Encodes the specified EventResponse message. Does not implicitly {@link proto.EventResponse.verify|verify} messages. + * @param message EventResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IEventResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EventResponse message, length delimited. Does not implicitly {@link proto.EventResponse.verify|verify} messages. + * @param message EventResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IEventResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EventResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EventResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.EventResponse; + + /** + * Decodes an EventResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EventResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.EventResponse; + + /** + * Verifies an EventResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EventResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EventResponse + */ + public static fromObject(object: { [k: string]: any }): proto.EventResponse; + + /** + * Creates a plain object from an EventResponse message. Also converts values to other types if specified. + * @param message EventResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.EventResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EventResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of an ExitCode. */ interface IExitCode { @@ -6492,6 +7485,15 @@ export namespace proto { /** HistorySync pastParticipants */ pastParticipants?: (proto.IPastParticipants[]|null); + + /** HistorySync callLogRecords */ + callLogRecords?: (proto.ICallLogRecord[]|null); + + /** HistorySync aiWaitListState */ + aiWaitListState?: (proto.HistorySync.BotAIWaitListState|null); + + /** HistorySync phoneNumberToLidMappings */ + phoneNumberToLidMappings?: (proto.IPhoneNumberToLIDMapping[]|null); } /** Represents a HistorySync. */ @@ -6536,6 +7538,15 @@ export namespace proto { /** HistorySync pastParticipants. */ public pastParticipants: proto.IPastParticipants[]; + /** HistorySync callLogRecords. */ + public callLogRecords: proto.ICallLogRecord[]; + + /** HistorySync aiWaitListState. */ + public aiWaitListState: proto.HistorySync.BotAIWaitListState; + + /** HistorySync phoneNumberToLidMappings. */ + public phoneNumberToLidMappings: proto.IPhoneNumberToLIDMapping[]; + /** * Creates a new HistorySync instance using the specified properties. * @param [properties] Properties to set @@ -6609,6 +7620,12 @@ export namespace proto { namespace HistorySync { + /** BotAIWaitListState enum. */ + enum BotAIWaitListState { + IN_WAITLIST = 0, + AI_AVAILABLE = 1 + } + /** HistorySyncType enum. */ enum HistorySyncType { INITIAL_BOOTSTRAP = 0, @@ -7030,6 +8047,12 @@ export namespace proto { /** HydratedURLButton url */ url?: (string|null); + + /** HydratedURLButton consentedUsersUrl */ + consentedUsersUrl?: (string|null); + + /** HydratedURLButton webviewPresentation */ + webviewPresentation?: (proto.HydratedTemplateButton.HydratedURLButton.WebviewPresentationType|null); } /** Represents a HydratedURLButton. */ @@ -7047,6 +8070,12 @@ export namespace proto { /** HydratedURLButton url. */ public url: string; + /** HydratedURLButton consentedUsersUrl. */ + public consentedUsersUrl: string; + + /** HydratedURLButton webviewPresentation. */ + public webviewPresentation: proto.HydratedTemplateButton.HydratedURLButton.WebviewPresentationType; + /** * Creates a new HydratedURLButton instance using the specified properties. * @param [properties] Properties to set @@ -7117,6 +8146,16 @@ export namespace proto { */ public toJSON(): { [k: string]: any }; } + + namespace HydratedURLButton { + + /** WebviewPresentationType enum. */ + enum WebviewPresentationType { + FULL = 1, + TALL = 2, + COMPACT = 3 + } + } } /** Properties of an IdentityKeyPairStructure. */ @@ -7221,8 +8260,14 @@ export namespace proto { /** InteractiveAnnotation polygonVertices */ polygonVertices?: (proto.IPoint[]|null); + /** InteractiveAnnotation shouldSkipConfirmation */ + shouldSkipConfirmation?: (boolean|null); + /** InteractiveAnnotation location */ location?: (proto.ILocation|null); + + /** InteractiveAnnotation newsletter */ + newsletter?: (proto.ContextInfo.IForwardedNewsletterMessageInfo|null); } /** Represents an InteractiveAnnotation. */ @@ -7237,11 +8282,17 @@ export namespace proto { /** InteractiveAnnotation polygonVertices. */ public polygonVertices: proto.IPoint[]; + /** InteractiveAnnotation shouldSkipConfirmation. */ + public shouldSkipConfirmation: boolean; + /** InteractiveAnnotation location. */ public location?: (proto.ILocation|null); + /** InteractiveAnnotation newsletter. */ + public newsletter?: (proto.ContextInfo.IForwardedNewsletterMessageInfo|null); + /** InteractiveAnnotation action. */ - public action?: "location"; + public action?: ("location"|"newsletter"); /** * Creates a new InteractiveAnnotation instance using the specified properties. @@ -7939,6 +8990,501 @@ export namespace proto { public toJSON(): { [k: string]: any }; } + /** Properties of a MediaEntry. */ + interface IMediaEntry { + + /** MediaEntry fileSha256 */ + fileSha256?: (Uint8Array|null); + + /** MediaEntry mediaKey */ + mediaKey?: (Uint8Array|null); + + /** MediaEntry fileEncSha256 */ + fileEncSha256?: (Uint8Array|null); + + /** MediaEntry directPath */ + directPath?: (string|null); + + /** MediaEntry mediaKeyTimestamp */ + mediaKeyTimestamp?: (number|Long|null); + + /** MediaEntry serverMediaType */ + serverMediaType?: (string|null); + + /** MediaEntry uploadToken */ + uploadToken?: (Uint8Array|null); + + /** MediaEntry validatedTimestamp */ + validatedTimestamp?: (Uint8Array|null); + + /** MediaEntry sidecar */ + sidecar?: (Uint8Array|null); + + /** MediaEntry objectId */ + objectId?: (string|null); + + /** MediaEntry fbid */ + fbid?: (string|null); + + /** MediaEntry downloadableThumbnail */ + downloadableThumbnail?: (proto.MediaEntry.IDownloadableThumbnail|null); + + /** MediaEntry handle */ + handle?: (string|null); + + /** MediaEntry filename */ + filename?: (string|null); + + /** MediaEntry progressiveJpegDetails */ + progressiveJpegDetails?: (proto.MediaEntry.IProgressiveJpegDetails|null); + } + + /** Represents a MediaEntry. */ + class MediaEntry implements IMediaEntry { + + /** + * Constructs a new MediaEntry. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IMediaEntry); + + /** MediaEntry fileSha256. */ + public fileSha256: Uint8Array; + + /** MediaEntry mediaKey. */ + public mediaKey: Uint8Array; + + /** MediaEntry fileEncSha256. */ + public fileEncSha256: Uint8Array; + + /** MediaEntry directPath. */ + public directPath: string; + + /** MediaEntry mediaKeyTimestamp. */ + public mediaKeyTimestamp: (number|Long); + + /** MediaEntry serverMediaType. */ + public serverMediaType: string; + + /** MediaEntry uploadToken. */ + public uploadToken: Uint8Array; + + /** MediaEntry validatedTimestamp. */ + public validatedTimestamp: Uint8Array; + + /** MediaEntry sidecar. */ + public sidecar: Uint8Array; + + /** MediaEntry objectId. */ + public objectId: string; + + /** MediaEntry fbid. */ + public fbid: string; + + /** MediaEntry downloadableThumbnail. */ + public downloadableThumbnail?: (proto.MediaEntry.IDownloadableThumbnail|null); + + /** MediaEntry handle. */ + public handle: string; + + /** MediaEntry filename. */ + public filename: string; + + /** MediaEntry progressiveJpegDetails. */ + public progressiveJpegDetails?: (proto.MediaEntry.IProgressiveJpegDetails|null); + + /** + * Creates a new MediaEntry instance using the specified properties. + * @param [properties] Properties to set + * @returns MediaEntry instance + */ + public static create(properties?: proto.IMediaEntry): proto.MediaEntry; + + /** + * Encodes the specified MediaEntry message. Does not implicitly {@link proto.MediaEntry.verify|verify} messages. + * @param message MediaEntry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IMediaEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MediaEntry message, length delimited. Does not implicitly {@link proto.MediaEntry.verify|verify} messages. + * @param message MediaEntry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IMediaEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MediaEntry message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MediaEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.MediaEntry; + + /** + * Decodes a MediaEntry message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MediaEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.MediaEntry; + + /** + * Verifies a MediaEntry message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MediaEntry message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MediaEntry + */ + public static fromObject(object: { [k: string]: any }): proto.MediaEntry; + + /** + * Creates a plain object from a MediaEntry message. Also converts values to other types if specified. + * @param message MediaEntry + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.MediaEntry, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MediaEntry to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace MediaEntry { + + /** Properties of a DownloadableThumbnail. */ + interface IDownloadableThumbnail { + + /** DownloadableThumbnail fileSha256 */ + fileSha256?: (Uint8Array|null); + + /** DownloadableThumbnail fileEncSha256 */ + fileEncSha256?: (Uint8Array|null); + + /** DownloadableThumbnail directPath */ + directPath?: (string|null); + + /** DownloadableThumbnail mediaKey */ + mediaKey?: (Uint8Array|null); + + /** DownloadableThumbnail mediaKeyTimestamp */ + mediaKeyTimestamp?: (number|Long|null); + + /** DownloadableThumbnail objectId */ + objectId?: (string|null); + } + + /** Represents a DownloadableThumbnail. */ + class DownloadableThumbnail implements IDownloadableThumbnail { + + /** + * Constructs a new DownloadableThumbnail. + * @param [properties] Properties to set + */ + constructor(properties?: proto.MediaEntry.IDownloadableThumbnail); + + /** DownloadableThumbnail fileSha256. */ + public fileSha256: Uint8Array; + + /** DownloadableThumbnail fileEncSha256. */ + public fileEncSha256: Uint8Array; + + /** DownloadableThumbnail directPath. */ + public directPath: string; + + /** DownloadableThumbnail mediaKey. */ + public mediaKey: Uint8Array; + + /** DownloadableThumbnail mediaKeyTimestamp. */ + public mediaKeyTimestamp: (number|Long); + + /** DownloadableThumbnail objectId. */ + public objectId: string; + + /** + * Creates a new DownloadableThumbnail instance using the specified properties. + * @param [properties] Properties to set + * @returns DownloadableThumbnail instance + */ + public static create(properties?: proto.MediaEntry.IDownloadableThumbnail): proto.MediaEntry.DownloadableThumbnail; + + /** + * Encodes the specified DownloadableThumbnail message. Does not implicitly {@link proto.MediaEntry.DownloadableThumbnail.verify|verify} messages. + * @param message DownloadableThumbnail message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.MediaEntry.IDownloadableThumbnail, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DownloadableThumbnail message, length delimited. Does not implicitly {@link proto.MediaEntry.DownloadableThumbnail.verify|verify} messages. + * @param message DownloadableThumbnail message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.MediaEntry.IDownloadableThumbnail, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DownloadableThumbnail message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DownloadableThumbnail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.MediaEntry.DownloadableThumbnail; + + /** + * Decodes a DownloadableThumbnail message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DownloadableThumbnail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.MediaEntry.DownloadableThumbnail; + + /** + * Verifies a DownloadableThumbnail message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DownloadableThumbnail message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DownloadableThumbnail + */ + public static fromObject(object: { [k: string]: any }): proto.MediaEntry.DownloadableThumbnail; + + /** + * Creates a plain object from a DownloadableThumbnail message. Also converts values to other types if specified. + * @param message DownloadableThumbnail + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.MediaEntry.DownloadableThumbnail, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DownloadableThumbnail to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ProgressiveJpegDetails. */ + interface IProgressiveJpegDetails { + + /** ProgressiveJpegDetails scanLengths */ + scanLengths?: ((number|Long)[]|null); + + /** ProgressiveJpegDetails sidecar */ + sidecar?: (Uint8Array|null); + } + + /** Represents a ProgressiveJpegDetails. */ + class ProgressiveJpegDetails implements IProgressiveJpegDetails { + + /** + * Constructs a new ProgressiveJpegDetails. + * @param [properties] Properties to set + */ + constructor(properties?: proto.MediaEntry.IProgressiveJpegDetails); + + /** ProgressiveJpegDetails scanLengths. */ + public scanLengths: (number|Long)[]; + + /** ProgressiveJpegDetails sidecar. */ + public sidecar: Uint8Array; + + /** + * Creates a new ProgressiveJpegDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns ProgressiveJpegDetails instance + */ + public static create(properties?: proto.MediaEntry.IProgressiveJpegDetails): proto.MediaEntry.ProgressiveJpegDetails; + + /** + * Encodes the specified ProgressiveJpegDetails message. Does not implicitly {@link proto.MediaEntry.ProgressiveJpegDetails.verify|verify} messages. + * @param message ProgressiveJpegDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.MediaEntry.IProgressiveJpegDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ProgressiveJpegDetails message, length delimited. Does not implicitly {@link proto.MediaEntry.ProgressiveJpegDetails.verify|verify} messages. + * @param message ProgressiveJpegDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.MediaEntry.IProgressiveJpegDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ProgressiveJpegDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ProgressiveJpegDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.MediaEntry.ProgressiveJpegDetails; + + /** + * Decodes a ProgressiveJpegDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ProgressiveJpegDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.MediaEntry.ProgressiveJpegDetails; + + /** + * Verifies a ProgressiveJpegDetails message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ProgressiveJpegDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ProgressiveJpegDetails + */ + public static fromObject(object: { [k: string]: any }): proto.MediaEntry.ProgressiveJpegDetails; + + /** + * Creates a plain object from a ProgressiveJpegDetails message. Also converts values to other types if specified. + * @param message ProgressiveJpegDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.MediaEntry.ProgressiveJpegDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ProgressiveJpegDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a MediaNotifyMessage. */ + interface IMediaNotifyMessage { + + /** MediaNotifyMessage expressPathUrl */ + expressPathUrl?: (string|null); + + /** MediaNotifyMessage fileEncSha256 */ + fileEncSha256?: (Uint8Array|null); + + /** MediaNotifyMessage fileLength */ + fileLength?: (number|Long|null); + } + + /** Represents a MediaNotifyMessage. */ + class MediaNotifyMessage implements IMediaNotifyMessage { + + /** + * Constructs a new MediaNotifyMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IMediaNotifyMessage); + + /** MediaNotifyMessage expressPathUrl. */ + public expressPathUrl: string; + + /** MediaNotifyMessage fileEncSha256. */ + public fileEncSha256: Uint8Array; + + /** MediaNotifyMessage fileLength. */ + public fileLength: (number|Long); + + /** + * Creates a new MediaNotifyMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns MediaNotifyMessage instance + */ + public static create(properties?: proto.IMediaNotifyMessage): proto.MediaNotifyMessage; + + /** + * Encodes the specified MediaNotifyMessage message. Does not implicitly {@link proto.MediaNotifyMessage.verify|verify} messages. + * @param message MediaNotifyMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IMediaNotifyMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MediaNotifyMessage message, length delimited. Does not implicitly {@link proto.MediaNotifyMessage.verify|verify} messages. + * @param message MediaNotifyMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IMediaNotifyMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MediaNotifyMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MediaNotifyMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.MediaNotifyMessage; + + /** + * Decodes a MediaNotifyMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MediaNotifyMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.MediaNotifyMessage; + + /** + * Verifies a MediaNotifyMessage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MediaNotifyMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MediaNotifyMessage + */ + public static fromObject(object: { [k: string]: any }): proto.MediaNotifyMessage; + + /** + * Creates a plain object from a MediaNotifyMessage message. Also converts values to other types if specified. + * @param message MediaNotifyMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.MediaNotifyMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MediaNotifyMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of a MediaRetryNotification. */ interface IMediaRetryNotification { @@ -8232,6 +9778,39 @@ export namespace proto { /** Message botInvokeMessage */ botInvokeMessage?: (proto.Message.IFutureProofMessage|null); + + /** Message callLogMesssage */ + callLogMesssage?: (proto.Message.ICallLogMessage|null); + + /** Message messageHistoryBundle */ + messageHistoryBundle?: (proto.Message.IMessageHistoryBundle|null); + + /** Message encCommentMessage */ + encCommentMessage?: (proto.Message.IEncCommentMessage|null); + + /** Message bcallMessage */ + bcallMessage?: (proto.Message.IBCallMessage|null); + + /** Message lottieStickerMessage */ + lottieStickerMessage?: (proto.Message.IFutureProofMessage|null); + + /** Message eventMessage */ + eventMessage?: (proto.Message.IEventMessage|null); + + /** Message commentMessage */ + commentMessage?: (proto.Message.ICommentMessage|null); + + /** Message newsletterAdminInviteMessage */ + newsletterAdminInviteMessage?: (proto.Message.INewsletterAdminInviteMessage|null); + + /** Message extendedTextMessageWithParentKey */ + extendedTextMessageWithParentKey?: (proto.Message.IExtendedTextMessageWithParentKey|null); + + /** Message placeholderMessage */ + placeholderMessage?: (proto.Message.IPlaceholderMessage|null); + + /** Message encEventUpdateMessage */ + encEventUpdateMessage?: (proto.Message.IEncEventUpdateMessage|null); } /** Represents a Message. */ @@ -8414,6 +9993,39 @@ export namespace proto { /** Message botInvokeMessage. */ public botInvokeMessage?: (proto.Message.IFutureProofMessage|null); + /** Message callLogMesssage. */ + public callLogMesssage?: (proto.Message.ICallLogMessage|null); + + /** Message messageHistoryBundle. */ + public messageHistoryBundle?: (proto.Message.IMessageHistoryBundle|null); + + /** Message encCommentMessage. */ + public encCommentMessage?: (proto.Message.IEncCommentMessage|null); + + /** Message bcallMessage. */ + public bcallMessage?: (proto.Message.IBCallMessage|null); + + /** Message lottieStickerMessage. */ + public lottieStickerMessage?: (proto.Message.IFutureProofMessage|null); + + /** Message eventMessage. */ + public eventMessage?: (proto.Message.IEventMessage|null); + + /** Message commentMessage. */ + public commentMessage?: (proto.Message.ICommentMessage|null); + + /** Message newsletterAdminInviteMessage. */ + public newsletterAdminInviteMessage?: (proto.Message.INewsletterAdminInviteMessage|null); + + /** Message extendedTextMessageWithParentKey. */ + public extendedTextMessageWithParentKey?: (proto.Message.IExtendedTextMessageWithParentKey|null); + + /** Message placeholderMessage. */ + public placeholderMessage?: (proto.Message.IPlaceholderMessage|null); + + /** Message encEventUpdateMessage. */ + public encEventUpdateMessage?: (proto.Message.IEncEventUpdateMessage|null); + /** * Creates a new Message instance using the specified properties. * @param [properties] Properties to set @@ -9327,6 +10939,124 @@ export namespace proto { public toJSON(): { [k: string]: any }; } + /** Properties of a BCallMessage. */ + interface IBCallMessage { + + /** BCallMessage sessionId */ + sessionId?: (string|null); + + /** BCallMessage mediaType */ + mediaType?: (proto.Message.BCallMessage.MediaType|null); + + /** BCallMessage masterKey */ + masterKey?: (Uint8Array|null); + + /** BCallMessage caption */ + caption?: (string|null); + } + + /** Represents a BCallMessage. */ + class BCallMessage implements IBCallMessage { + + /** + * Constructs a new BCallMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.IBCallMessage); + + /** BCallMessage sessionId. */ + public sessionId: string; + + /** BCallMessage mediaType. */ + public mediaType: proto.Message.BCallMessage.MediaType; + + /** BCallMessage masterKey. */ + public masterKey: Uint8Array; + + /** BCallMessage caption. */ + public caption: string; + + /** + * Creates a new BCallMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns BCallMessage instance + */ + public static create(properties?: proto.Message.IBCallMessage): proto.Message.BCallMessage; + + /** + * Encodes the specified BCallMessage message. Does not implicitly {@link proto.Message.BCallMessage.verify|verify} messages. + * @param message BCallMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.IBCallMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BCallMessage message, length delimited. Does not implicitly {@link proto.Message.BCallMessage.verify|verify} messages. + * @param message BCallMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.IBCallMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BCallMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BCallMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.Message.BCallMessage; + + /** + * Decodes a BCallMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BCallMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.Message.BCallMessage; + + /** + * Verifies a BCallMessage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BCallMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BCallMessage + */ + public static fromObject(object: { [k: string]: any }): proto.Message.BCallMessage; + + /** + * Creates a plain object from a BCallMessage message. Also converts values to other types if specified. + * @param message BCallMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.BCallMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BCallMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace BCallMessage { + + /** MediaType enum. */ + enum MediaType { + UNKNOWN = 0, + AUDIO = 1, + VIDEO = 2 + } + } + /** Properties of a BotFeedbackMessage. */ interface IBotFeedbackMessage { @@ -9338,6 +11068,12 @@ export namespace proto { /** BotFeedbackMessage text */ text?: (string|null); + + /** BotFeedbackMessage kindNegative */ + kindNegative?: (number|Long|null); + + /** BotFeedbackMessage kindPositive */ + kindPositive?: (number|Long|null); } /** Represents a BotFeedbackMessage. */ @@ -9358,6 +11094,12 @@ export namespace proto { /** BotFeedbackMessage text. */ public text: string; + /** BotFeedbackMessage kindNegative. */ + public kindNegative: (number|Long); + + /** BotFeedbackMessage kindPositive. */ + public kindPositive: (number|Long); + /** * Creates a new BotFeedbackMessage instance using the specified properties. * @param [properties] Properties to set @@ -9439,7 +11181,28 @@ export namespace proto { BOT_FEEDBACK_NEGATIVE_INTERESTING = 3, BOT_FEEDBACK_NEGATIVE_ACCURATE = 4, BOT_FEEDBACK_NEGATIVE_SAFE = 5, - BOT_FEEDBACK_NEGATIVE_OTHER = 6 + BOT_FEEDBACK_NEGATIVE_OTHER = 6, + BOT_FEEDBACK_NEGATIVE_REFUSED = 7, + BOT_FEEDBACK_NEGATIVE_NOT_VISUALLY_APPEALING = 8, + BOT_FEEDBACK_NEGATIVE_NOT_RELEVANT_TO_TEXT = 9 + } + + /** BotFeedbackKindMultipleNegative enum. */ + enum BotFeedbackKindMultipleNegative { + BOT_FEEDBACK_MULTIPLE_NEGATIVE_GENERIC = 1, + BOT_FEEDBACK_MULTIPLE_NEGATIVE_HELPFUL = 2, + BOT_FEEDBACK_MULTIPLE_NEGATIVE_INTERESTING = 4, + BOT_FEEDBACK_MULTIPLE_NEGATIVE_ACCURATE = 8, + BOT_FEEDBACK_MULTIPLE_NEGATIVE_SAFE = 16, + BOT_FEEDBACK_MULTIPLE_NEGATIVE_OTHER = 32, + BOT_FEEDBACK_MULTIPLE_NEGATIVE_REFUSED = 64, + BOT_FEEDBACK_MULTIPLE_NEGATIVE_NOT_VISUALLY_APPEALING = 128, + BOT_FEEDBACK_MULTIPLE_NEGATIVE_NOT_RELEVANT_TO_TEXT = 256 + } + + /** BotFeedbackKindMultiplePositive enum. */ + enum BotFeedbackKindMultiplePositive { + BOT_FEEDBACK_MULTIPLE_POSITIVE_GENERIC = 1 } } @@ -10136,6 +11899,238 @@ export namespace proto { public toJSON(): { [k: string]: any }; } + /** Properties of a CallLogMessage. */ + interface ICallLogMessage { + + /** CallLogMessage isVideo */ + isVideo?: (boolean|null); + + /** CallLogMessage callOutcome */ + callOutcome?: (proto.Message.CallLogMessage.CallOutcome|null); + + /** CallLogMessage durationSecs */ + durationSecs?: (number|Long|null); + + /** CallLogMessage callType */ + callType?: (proto.Message.CallLogMessage.CallType|null); + + /** CallLogMessage participants */ + participants?: (proto.Message.CallLogMessage.ICallParticipant[]|null); + } + + /** Represents a CallLogMessage. */ + class CallLogMessage implements ICallLogMessage { + + /** + * Constructs a new CallLogMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.ICallLogMessage); + + /** CallLogMessage isVideo. */ + public isVideo: boolean; + + /** CallLogMessage callOutcome. */ + public callOutcome: proto.Message.CallLogMessage.CallOutcome; + + /** CallLogMessage durationSecs. */ + public durationSecs: (number|Long); + + /** CallLogMessage callType. */ + public callType: proto.Message.CallLogMessage.CallType; + + /** CallLogMessage participants. */ + public participants: proto.Message.CallLogMessage.ICallParticipant[]; + + /** + * Creates a new CallLogMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns CallLogMessage instance + */ + public static create(properties?: proto.Message.ICallLogMessage): proto.Message.CallLogMessage; + + /** + * Encodes the specified CallLogMessage message. Does not implicitly {@link proto.Message.CallLogMessage.verify|verify} messages. + * @param message CallLogMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.ICallLogMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CallLogMessage message, length delimited. Does not implicitly {@link proto.Message.CallLogMessage.verify|verify} messages. + * @param message CallLogMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.ICallLogMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CallLogMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CallLogMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.Message.CallLogMessage; + + /** + * Decodes a CallLogMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CallLogMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.Message.CallLogMessage; + + /** + * Verifies a CallLogMessage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CallLogMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CallLogMessage + */ + public static fromObject(object: { [k: string]: any }): proto.Message.CallLogMessage; + + /** + * Creates a plain object from a CallLogMessage message. Also converts values to other types if specified. + * @param message CallLogMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.CallLogMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CallLogMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace CallLogMessage { + + /** CallOutcome enum. */ + enum CallOutcome { + CONNECTED = 0, + MISSED = 1, + FAILED = 2, + REJECTED = 3, + ACCEPTED_ELSEWHERE = 4, + ONGOING = 5, + SILENCED_BY_DND = 6, + SILENCED_UNKNOWN_CALLER = 7 + } + + /** Properties of a CallParticipant. */ + interface ICallParticipant { + + /** CallParticipant jid */ + jid?: (string|null); + + /** CallParticipant callOutcome */ + callOutcome?: (proto.Message.CallLogMessage.CallOutcome|null); + } + + /** Represents a CallParticipant. */ + class CallParticipant implements ICallParticipant { + + /** + * Constructs a new CallParticipant. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.CallLogMessage.ICallParticipant); + + /** CallParticipant jid. */ + public jid: string; + + /** CallParticipant callOutcome. */ + public callOutcome: proto.Message.CallLogMessage.CallOutcome; + + /** + * Creates a new CallParticipant instance using the specified properties. + * @param [properties] Properties to set + * @returns CallParticipant instance + */ + public static create(properties?: proto.Message.CallLogMessage.ICallParticipant): proto.Message.CallLogMessage.CallParticipant; + + /** + * Encodes the specified CallParticipant message. Does not implicitly {@link proto.Message.CallLogMessage.CallParticipant.verify|verify} messages. + * @param message CallParticipant message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.CallLogMessage.ICallParticipant, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CallParticipant message, length delimited. Does not implicitly {@link proto.Message.CallLogMessage.CallParticipant.verify|verify} messages. + * @param message CallParticipant message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.CallLogMessage.ICallParticipant, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CallParticipant message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CallParticipant + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.Message.CallLogMessage.CallParticipant; + + /** + * Decodes a CallParticipant message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CallParticipant + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.Message.CallLogMessage.CallParticipant; + + /** + * Verifies a CallParticipant message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CallParticipant message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CallParticipant + */ + public static fromObject(object: { [k: string]: any }): proto.Message.CallLogMessage.CallParticipant; + + /** + * Creates a plain object from a CallParticipant message. Also converts values to other types if specified. + * @param message CallParticipant + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.CallLogMessage.CallParticipant, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CallParticipant to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** CallType enum. */ + enum CallType { + REGULAR = 0, + SCHEDULED_CALL = 1, + VOICE_CHAT = 2 + } + } + /** Properties of a CancelPaymentRequestMessage. */ interface ICancelPaymentRequestMessage { @@ -10322,6 +12317,102 @@ export namespace proto { public toJSON(): { [k: string]: any }; } + /** Properties of a CommentMessage. */ + interface ICommentMessage { + + /** CommentMessage message */ + message?: (proto.IMessage|null); + + /** CommentMessage targetMessageKey */ + targetMessageKey?: (proto.IMessageKey|null); + } + + /** Represents a CommentMessage. */ + class CommentMessage implements ICommentMessage { + + /** + * Constructs a new CommentMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.ICommentMessage); + + /** CommentMessage message. */ + public message?: (proto.IMessage|null); + + /** CommentMessage targetMessageKey. */ + public targetMessageKey?: (proto.IMessageKey|null); + + /** + * Creates a new CommentMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns CommentMessage instance + */ + public static create(properties?: proto.Message.ICommentMessage): proto.Message.CommentMessage; + + /** + * Encodes the specified CommentMessage message. Does not implicitly {@link proto.Message.CommentMessage.verify|verify} messages. + * @param message CommentMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.ICommentMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CommentMessage message, length delimited. Does not implicitly {@link proto.Message.CommentMessage.verify|verify} messages. + * @param message CommentMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.ICommentMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CommentMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CommentMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.Message.CommentMessage; + + /** + * Decodes a CommentMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CommentMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.Message.CommentMessage; + + /** + * Verifies a CommentMessage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CommentMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CommentMessage + */ + public static fromObject(object: { [k: string]: any }): proto.Message.CommentMessage; + + /** + * Creates a plain object from a CommentMessage message. Also converts values to other types if specified. + * @param message CommentMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.CommentMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CommentMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of a ContactMessage. */ interface IContactMessage { @@ -10922,6 +13013,210 @@ export namespace proto { public toJSON(): { [k: string]: any }; } + /** Properties of an EncCommentMessage. */ + interface IEncCommentMessage { + + /** EncCommentMessage targetMessageKey */ + targetMessageKey?: (proto.IMessageKey|null); + + /** EncCommentMessage encPayload */ + encPayload?: (Uint8Array|null); + + /** EncCommentMessage encIv */ + encIv?: (Uint8Array|null); + } + + /** Represents an EncCommentMessage. */ + class EncCommentMessage implements IEncCommentMessage { + + /** + * Constructs a new EncCommentMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.IEncCommentMessage); + + /** EncCommentMessage targetMessageKey. */ + public targetMessageKey?: (proto.IMessageKey|null); + + /** EncCommentMessage encPayload. */ + public encPayload: Uint8Array; + + /** EncCommentMessage encIv. */ + public encIv: Uint8Array; + + /** + * Creates a new EncCommentMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns EncCommentMessage instance + */ + public static create(properties?: proto.Message.IEncCommentMessage): proto.Message.EncCommentMessage; + + /** + * Encodes the specified EncCommentMessage message. Does not implicitly {@link proto.Message.EncCommentMessage.verify|verify} messages. + * @param message EncCommentMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.IEncCommentMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EncCommentMessage message, length delimited. Does not implicitly {@link proto.Message.EncCommentMessage.verify|verify} messages. + * @param message EncCommentMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.IEncCommentMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EncCommentMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EncCommentMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.Message.EncCommentMessage; + + /** + * Decodes an EncCommentMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EncCommentMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.Message.EncCommentMessage; + + /** + * Verifies an EncCommentMessage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EncCommentMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EncCommentMessage + */ + public static fromObject(object: { [k: string]: any }): proto.Message.EncCommentMessage; + + /** + * Creates a plain object from an EncCommentMessage message. Also converts values to other types if specified. + * @param message EncCommentMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.EncCommentMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EncCommentMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EncEventUpdateMessage. */ + interface IEncEventUpdateMessage { + + /** EncEventUpdateMessage eventCreationMessageKey */ + eventCreationMessageKey?: (proto.IMessageKey|null); + + /** EncEventUpdateMessage encPayload */ + encPayload?: (Uint8Array|null); + + /** EncEventUpdateMessage encIv */ + encIv?: (Uint8Array|null); + } + + /** Represents an EncEventUpdateMessage. */ + class EncEventUpdateMessage implements IEncEventUpdateMessage { + + /** + * Constructs a new EncEventUpdateMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.IEncEventUpdateMessage); + + /** EncEventUpdateMessage eventCreationMessageKey. */ + public eventCreationMessageKey?: (proto.IMessageKey|null); + + /** EncEventUpdateMessage encPayload. */ + public encPayload: Uint8Array; + + /** EncEventUpdateMessage encIv. */ + public encIv: Uint8Array; + + /** + * Creates a new EncEventUpdateMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns EncEventUpdateMessage instance + */ + public static create(properties?: proto.Message.IEncEventUpdateMessage): proto.Message.EncEventUpdateMessage; + + /** + * Encodes the specified EncEventUpdateMessage message. Does not implicitly {@link proto.Message.EncEventUpdateMessage.verify|verify} messages. + * @param message EncEventUpdateMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.IEncEventUpdateMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EncEventUpdateMessage message, length delimited. Does not implicitly {@link proto.Message.EncEventUpdateMessage.verify|verify} messages. + * @param message EncEventUpdateMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.IEncEventUpdateMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EncEventUpdateMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EncEventUpdateMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.Message.EncEventUpdateMessage; + + /** + * Decodes an EncEventUpdateMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EncEventUpdateMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.Message.EncEventUpdateMessage; + + /** + * Verifies an EncEventUpdateMessage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EncEventUpdateMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EncEventUpdateMessage + */ + public static fromObject(object: { [k: string]: any }): proto.Message.EncEventUpdateMessage; + + /** + * Creates a plain object from an EncEventUpdateMessage message. Also converts values to other types if specified. + * @param message EncEventUpdateMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.EncEventUpdateMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EncEventUpdateMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of an EncReactionMessage. */ interface IEncReactionMessage { @@ -11024,6 +13319,430 @@ export namespace proto { public toJSON(): { [k: string]: any }; } + /** Properties of an EventEditMessage. */ + interface IEventEditMessage { + + /** EventEditMessage eventEditMessage */ + eventEditMessage?: (proto.Message.IEventMessage|null); + + /** EventEditMessage editTimestampMs */ + editTimestampMs?: (number|Long|null); + } + + /** Represents an EventEditMessage. */ + class EventEditMessage implements IEventEditMessage { + + /** + * Constructs a new EventEditMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.IEventEditMessage); + + /** EventEditMessage eventEditMessage. */ + public eventEditMessage?: (proto.Message.IEventMessage|null); + + /** EventEditMessage editTimestampMs. */ + public editTimestampMs: (number|Long); + + /** + * Creates a new EventEditMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns EventEditMessage instance + */ + public static create(properties?: proto.Message.IEventEditMessage): proto.Message.EventEditMessage; + + /** + * Encodes the specified EventEditMessage message. Does not implicitly {@link proto.Message.EventEditMessage.verify|verify} messages. + * @param message EventEditMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.IEventEditMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EventEditMessage message, length delimited. Does not implicitly {@link proto.Message.EventEditMessage.verify|verify} messages. + * @param message EventEditMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.IEventEditMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EventEditMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EventEditMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.Message.EventEditMessage; + + /** + * Decodes an EventEditMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EventEditMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.Message.EventEditMessage; + + /** + * Verifies an EventEditMessage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EventEditMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EventEditMessage + */ + public static fromObject(object: { [k: string]: any }): proto.Message.EventEditMessage; + + /** + * Creates a plain object from an EventEditMessage message. Also converts values to other types if specified. + * @param message EventEditMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.EventEditMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EventEditMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EventMessage. */ + interface IEventMessage { + + /** EventMessage contextInfo */ + contextInfo?: (proto.IContextInfo|null); + + /** EventMessage isCanceled */ + isCanceled?: (boolean|null); + + /** EventMessage name */ + name?: (string|null); + + /** EventMessage description */ + description?: (string|null); + + /** EventMessage location */ + location?: (proto.Message.ILocationMessage|null); + + /** EventMessage joinLink */ + joinLink?: (string|null); + + /** EventMessage startTime */ + startTime?: (number|Long|null); + } + + /** Represents an EventMessage. */ + class EventMessage implements IEventMessage { + + /** + * Constructs a new EventMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.IEventMessage); + + /** EventMessage contextInfo. */ + public contextInfo?: (proto.IContextInfo|null); + + /** EventMessage isCanceled. */ + public isCanceled: boolean; + + /** EventMessage name. */ + public name: string; + + /** EventMessage description. */ + public description: string; + + /** EventMessage location. */ + public location?: (proto.Message.ILocationMessage|null); + + /** EventMessage joinLink. */ + public joinLink: string; + + /** EventMessage startTime. */ + public startTime: (number|Long); + + /** + * Creates a new EventMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns EventMessage instance + */ + public static create(properties?: proto.Message.IEventMessage): proto.Message.EventMessage; + + /** + * Encodes the specified EventMessage message. Does not implicitly {@link proto.Message.EventMessage.verify|verify} messages. + * @param message EventMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.IEventMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EventMessage message, length delimited. Does not implicitly {@link proto.Message.EventMessage.verify|verify} messages. + * @param message EventMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.IEventMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EventMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EventMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.Message.EventMessage; + + /** + * Decodes an EventMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EventMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.Message.EventMessage; + + /** + * Verifies an EventMessage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EventMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EventMessage + */ + public static fromObject(object: { [k: string]: any }): proto.Message.EventMessage; + + /** + * Creates a plain object from an EventMessage message. Also converts values to other types if specified. + * @param message EventMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.EventMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EventMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EventResponseMessage. */ + interface IEventResponseMessage { + + /** EventResponseMessage response */ + response?: (proto.Message.EventResponseMessage.EventResponseType|null); + + /** EventResponseMessage timestampMs */ + timestampMs?: (number|Long|null); + } + + /** Represents an EventResponseMessage. */ + class EventResponseMessage implements IEventResponseMessage { + + /** + * Constructs a new EventResponseMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.IEventResponseMessage); + + /** EventResponseMessage response. */ + public response: proto.Message.EventResponseMessage.EventResponseType; + + /** EventResponseMessage timestampMs. */ + public timestampMs: (number|Long); + + /** + * Creates a new EventResponseMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns EventResponseMessage instance + */ + public static create(properties?: proto.Message.IEventResponseMessage): proto.Message.EventResponseMessage; + + /** + * Encodes the specified EventResponseMessage message. Does not implicitly {@link proto.Message.EventResponseMessage.verify|verify} messages. + * @param message EventResponseMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.IEventResponseMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EventResponseMessage message, length delimited. Does not implicitly {@link proto.Message.EventResponseMessage.verify|verify} messages. + * @param message EventResponseMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.IEventResponseMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EventResponseMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EventResponseMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.Message.EventResponseMessage; + + /** + * Decodes an EventResponseMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EventResponseMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.Message.EventResponseMessage; + + /** + * Verifies an EventResponseMessage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EventResponseMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EventResponseMessage + */ + public static fromObject(object: { [k: string]: any }): proto.Message.EventResponseMessage; + + /** + * Creates a plain object from an EventResponseMessage message. Also converts values to other types if specified. + * @param message EventResponseMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.EventResponseMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EventResponseMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace EventResponseMessage { + + /** EventResponseType enum. */ + enum EventResponseType { + UNKNOWN = 0, + GOING = 1, + NOT_GOING = 2 + } + } + + /** Properties of an EventUpdateMessage. */ + interface IEventUpdateMessage { + + /** EventUpdateMessage response */ + response?: (proto.Message.IEventResponseMessage|null); + + /** EventUpdateMessage edit */ + edit?: (proto.Message.IEventEditMessage|null); + } + + /** Represents an EventUpdateMessage. */ + class EventUpdateMessage implements IEventUpdateMessage { + + /** + * Constructs a new EventUpdateMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.IEventUpdateMessage); + + /** EventUpdateMessage response. */ + public response?: (proto.Message.IEventResponseMessage|null); + + /** EventUpdateMessage edit. */ + public edit?: (proto.Message.IEventEditMessage|null); + + /** + * Creates a new EventUpdateMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns EventUpdateMessage instance + */ + public static create(properties?: proto.Message.IEventUpdateMessage): proto.Message.EventUpdateMessage; + + /** + * Encodes the specified EventUpdateMessage message. Does not implicitly {@link proto.Message.EventUpdateMessage.verify|verify} messages. + * @param message EventUpdateMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.IEventUpdateMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EventUpdateMessage message, length delimited. Does not implicitly {@link proto.Message.EventUpdateMessage.verify|verify} messages. + * @param message EventUpdateMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.IEventUpdateMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EventUpdateMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EventUpdateMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.Message.EventUpdateMessage; + + /** + * Decodes an EventUpdateMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EventUpdateMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.Message.EventUpdateMessage; + + /** + * Verifies an EventUpdateMessage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EventUpdateMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EventUpdateMessage + */ + public static fromObject(object: { [k: string]: any }): proto.Message.EventUpdateMessage; + + /** + * Creates a plain object from an EventUpdateMessage message. Also converts values to other types if specified. + * @param message EventUpdateMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.EventUpdateMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EventUpdateMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of an ExtendedTextMessage. */ interface IExtendedTextMessage { @@ -11256,12 +13975,9 @@ export namespace proto { /** FontType enum. */ enum FontType { - SANS_SERIF = 0, - SERIF = 1, - NORICAN_REGULAR = 2, - BRYNDAN_WRITE = 3, - BEBASNEUE_REGULAR = 4, - OSWALD_HEAVY = 5, + SYSTEM = 0, + SYSTEM_TEXT = 1, + FB_SCRIPT = 2, SYSTEM_BOLD = 6, MORNINGBREEZE_REGULAR = 7, CALISTOGA_REGULAR = 8, @@ -11280,10 +13996,108 @@ export namespace proto { /** PreviewType enum. */ enum PreviewType { NONE = 0, - VIDEO = 1 + VIDEO = 1, + PLACEHOLDER = 4, + IMAGE = 5 } } + /** Properties of an ExtendedTextMessageWithParentKey. */ + interface IExtendedTextMessageWithParentKey { + + /** ExtendedTextMessageWithParentKey key */ + key?: (proto.IMessageKey|null); + + /** ExtendedTextMessageWithParentKey extendedTextMessage */ + extendedTextMessage?: (proto.Message.IExtendedTextMessage|null); + } + + /** Represents an ExtendedTextMessageWithParentKey. */ + class ExtendedTextMessageWithParentKey implements IExtendedTextMessageWithParentKey { + + /** + * Constructs a new ExtendedTextMessageWithParentKey. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.IExtendedTextMessageWithParentKey); + + /** ExtendedTextMessageWithParentKey key. */ + public key?: (proto.IMessageKey|null); + + /** ExtendedTextMessageWithParentKey extendedTextMessage. */ + public extendedTextMessage?: (proto.Message.IExtendedTextMessage|null); + + /** + * Creates a new ExtendedTextMessageWithParentKey instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtendedTextMessageWithParentKey instance + */ + public static create(properties?: proto.Message.IExtendedTextMessageWithParentKey): proto.Message.ExtendedTextMessageWithParentKey; + + /** + * Encodes the specified ExtendedTextMessageWithParentKey message. Does not implicitly {@link proto.Message.ExtendedTextMessageWithParentKey.verify|verify} messages. + * @param message ExtendedTextMessageWithParentKey message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.IExtendedTextMessageWithParentKey, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtendedTextMessageWithParentKey message, length delimited. Does not implicitly {@link proto.Message.ExtendedTextMessageWithParentKey.verify|verify} messages. + * @param message ExtendedTextMessageWithParentKey message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.IExtendedTextMessageWithParentKey, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtendedTextMessageWithParentKey message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtendedTextMessageWithParentKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.Message.ExtendedTextMessageWithParentKey; + + /** + * Decodes an ExtendedTextMessageWithParentKey message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtendedTextMessageWithParentKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.Message.ExtendedTextMessageWithParentKey; + + /** + * Verifies an ExtendedTextMessageWithParentKey message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtendedTextMessageWithParentKey message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtendedTextMessageWithParentKey + */ + public static fromObject(object: { [k: string]: any }): proto.Message.ExtendedTextMessageWithParentKey; + + /** + * Creates a plain object from an ExtendedTextMessageWithParentKey message. Also converts values to other types if specified. + * @param message ExtendedTextMessageWithParentKey + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.ExtendedTextMessageWithParentKey, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtendedTextMessageWithParentKey to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of a FutureProofMessage. */ interface IFutureProofMessage { @@ -12448,6 +15262,9 @@ export namespace proto { /** ImageMessage staticUrl */ staticUrl?: (string|null); + + /** ImageMessage annotations */ + annotations?: (proto.IInteractiveAnnotation[]|null); } /** Represents an ImageMessage. */ @@ -12537,6 +15354,9 @@ export namespace proto { /** ImageMessage staticUrl. */ public staticUrl: string; + /** ImageMessage annotations. */ + public annotations: proto.IInteractiveAnnotation[]; + /** * Creates a new ImageMessage instance using the specified properties. * @param [properties] Properties to set @@ -15470,6 +18290,252 @@ export namespace proto { public toJSON(): { [k: string]: any }; } + /** Properties of a MessageHistoryBundle. */ + interface IMessageHistoryBundle { + + /** MessageHistoryBundle mimetype */ + mimetype?: (string|null); + + /** MessageHistoryBundle fileSha256 */ + fileSha256?: (Uint8Array|null); + + /** MessageHistoryBundle mediaKey */ + mediaKey?: (Uint8Array|null); + + /** MessageHistoryBundle fileEncSha256 */ + fileEncSha256?: (Uint8Array|null); + + /** MessageHistoryBundle directPath */ + directPath?: (string|null); + + /** MessageHistoryBundle mediaKeyTimestamp */ + mediaKeyTimestamp?: (number|Long|null); + + /** MessageHistoryBundle contextInfo */ + contextInfo?: (proto.IContextInfo|null); + + /** MessageHistoryBundle participants */ + participants?: (string[]|null); + } + + /** Represents a MessageHistoryBundle. */ + class MessageHistoryBundle implements IMessageHistoryBundle { + + /** + * Constructs a new MessageHistoryBundle. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.IMessageHistoryBundle); + + /** MessageHistoryBundle mimetype. */ + public mimetype: string; + + /** MessageHistoryBundle fileSha256. */ + public fileSha256: Uint8Array; + + /** MessageHistoryBundle mediaKey. */ + public mediaKey: Uint8Array; + + /** MessageHistoryBundle fileEncSha256. */ + public fileEncSha256: Uint8Array; + + /** MessageHistoryBundle directPath. */ + public directPath: string; + + /** MessageHistoryBundle mediaKeyTimestamp. */ + public mediaKeyTimestamp: (number|Long); + + /** MessageHistoryBundle contextInfo. */ + public contextInfo?: (proto.IContextInfo|null); + + /** MessageHistoryBundle participants. */ + public participants: string[]; + + /** + * Creates a new MessageHistoryBundle instance using the specified properties. + * @param [properties] Properties to set + * @returns MessageHistoryBundle instance + */ + public static create(properties?: proto.Message.IMessageHistoryBundle): proto.Message.MessageHistoryBundle; + + /** + * Encodes the specified MessageHistoryBundle message. Does not implicitly {@link proto.Message.MessageHistoryBundle.verify|verify} messages. + * @param message MessageHistoryBundle message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.IMessageHistoryBundle, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MessageHistoryBundle message, length delimited. Does not implicitly {@link proto.Message.MessageHistoryBundle.verify|verify} messages. + * @param message MessageHistoryBundle message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.IMessageHistoryBundle, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MessageHistoryBundle message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MessageHistoryBundle + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.Message.MessageHistoryBundle; + + /** + * Decodes a MessageHistoryBundle message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MessageHistoryBundle + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.Message.MessageHistoryBundle; + + /** + * Verifies a MessageHistoryBundle message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MessageHistoryBundle message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MessageHistoryBundle + */ + public static fromObject(object: { [k: string]: any }): proto.Message.MessageHistoryBundle; + + /** + * Creates a plain object from a MessageHistoryBundle message. Also converts values to other types if specified. + * @param message MessageHistoryBundle + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.MessageHistoryBundle, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MessageHistoryBundle to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a NewsletterAdminInviteMessage. */ + interface INewsletterAdminInviteMessage { + + /** NewsletterAdminInviteMessage newsletterJid */ + newsletterJid?: (string|null); + + /** NewsletterAdminInviteMessage newsletterName */ + newsletterName?: (string|null); + + /** NewsletterAdminInviteMessage jpegThumbnail */ + jpegThumbnail?: (Uint8Array|null); + + /** NewsletterAdminInviteMessage caption */ + caption?: (string|null); + + /** NewsletterAdminInviteMessage inviteExpiration */ + inviteExpiration?: (number|Long|null); + } + + /** Represents a NewsletterAdminInviteMessage. */ + class NewsletterAdminInviteMessage implements INewsletterAdminInviteMessage { + + /** + * Constructs a new NewsletterAdminInviteMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.INewsletterAdminInviteMessage); + + /** NewsletterAdminInviteMessage newsletterJid. */ + public newsletterJid: string; + + /** NewsletterAdminInviteMessage newsletterName. */ + public newsletterName: string; + + /** NewsletterAdminInviteMessage jpegThumbnail. */ + public jpegThumbnail: Uint8Array; + + /** NewsletterAdminInviteMessage caption. */ + public caption: string; + + /** NewsletterAdminInviteMessage inviteExpiration. */ + public inviteExpiration: (number|Long); + + /** + * Creates a new NewsletterAdminInviteMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns NewsletterAdminInviteMessage instance + */ + public static create(properties?: proto.Message.INewsletterAdminInviteMessage): proto.Message.NewsletterAdminInviteMessage; + + /** + * Encodes the specified NewsletterAdminInviteMessage message. Does not implicitly {@link proto.Message.NewsletterAdminInviteMessage.verify|verify} messages. + * @param message NewsletterAdminInviteMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.INewsletterAdminInviteMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NewsletterAdminInviteMessage message, length delimited. Does not implicitly {@link proto.Message.NewsletterAdminInviteMessage.verify|verify} messages. + * @param message NewsletterAdminInviteMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.INewsletterAdminInviteMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NewsletterAdminInviteMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NewsletterAdminInviteMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.Message.NewsletterAdminInviteMessage; + + /** + * Decodes a NewsletterAdminInviteMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NewsletterAdminInviteMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.Message.NewsletterAdminInviteMessage; + + /** + * Verifies a NewsletterAdminInviteMessage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NewsletterAdminInviteMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NewsletterAdminInviteMessage + */ + public static fromObject(object: { [k: string]: any }): proto.Message.NewsletterAdminInviteMessage; + + /** + * Creates a plain object from a NewsletterAdminInviteMessage message. Also converts values to other types if specified. + * @param message NewsletterAdminInviteMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.NewsletterAdminInviteMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NewsletterAdminInviteMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of an OrderMessage. */ interface IOrderMessage { @@ -15508,6 +18574,12 @@ export namespace proto { /** OrderMessage contextInfo */ contextInfo?: (proto.IContextInfo|null); + + /** OrderMessage messageVersion */ + messageVersion?: (number|null); + + /** OrderMessage orderRequestMessageId */ + orderRequestMessageId?: (proto.IMessageKey|null); } /** Represents an OrderMessage. */ @@ -15555,6 +18627,12 @@ export namespace proto { /** OrderMessage contextInfo. */ public contextInfo?: (proto.IContextInfo|null); + /** OrderMessage messageVersion. */ + public messageVersion: number; + + /** OrderMessage orderRequestMessageId. */ + public orderRequestMessageId?: (proto.IMessageKey|null); + /** * Creates a new OrderMessage instance using the specified properties. * @param [properties] Properties to set @@ -15630,7 +18708,9 @@ export namespace proto { /** OrderStatus enum. */ enum OrderStatus { - INQUIRY = 1 + INQUIRY = 1, + ACCEPTED = 2, + DECLINED = 3 } /** OrderSurface enum. */ @@ -16941,6 +20021,104 @@ export namespace proto { } } + /** Properties of a PlaceholderMessage. */ + interface IPlaceholderMessage { + + /** PlaceholderMessage type */ + type?: (proto.Message.PlaceholderMessage.PlaceholderType|null); + } + + /** Represents a PlaceholderMessage. */ + class PlaceholderMessage implements IPlaceholderMessage { + + /** + * Constructs a new PlaceholderMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.IPlaceholderMessage); + + /** PlaceholderMessage type. */ + public type: proto.Message.PlaceholderMessage.PlaceholderType; + + /** + * Creates a new PlaceholderMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns PlaceholderMessage instance + */ + public static create(properties?: proto.Message.IPlaceholderMessage): proto.Message.PlaceholderMessage; + + /** + * Encodes the specified PlaceholderMessage message. Does not implicitly {@link proto.Message.PlaceholderMessage.verify|verify} messages. + * @param message PlaceholderMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.IPlaceholderMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PlaceholderMessage message, length delimited. Does not implicitly {@link proto.Message.PlaceholderMessage.verify|verify} messages. + * @param message PlaceholderMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.IPlaceholderMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PlaceholderMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PlaceholderMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.Message.PlaceholderMessage; + + /** + * Decodes a PlaceholderMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PlaceholderMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.Message.PlaceholderMessage; + + /** + * Verifies a PlaceholderMessage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PlaceholderMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PlaceholderMessage + */ + public static fromObject(object: { [k: string]: any }): proto.Message.PlaceholderMessage; + + /** + * Creates a plain object from a PlaceholderMessage message. Also converts values to other types if specified. + * @param message PlaceholderMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.PlaceholderMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PlaceholderMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace PlaceholderMessage { + + /** PlaceholderType enum. */ + enum PlaceholderType { + MASK_LINKED_DEVICES = 0 + } + } + /** Properties of a PollCreationMessage. */ interface IPollCreationMessage { @@ -17948,6 +21126,15 @@ export namespace proto { /** ProtocolMessage botFeedbackMessage */ botFeedbackMessage?: (proto.Message.IBotFeedbackMessage|null); + + /** ProtocolMessage invokerJid */ + invokerJid?: (string|null); + + /** ProtocolMessage requestWelcomeMessageMetadata */ + requestWelcomeMessageMetadata?: (proto.Message.IRequestWelcomeMessageMetadata|null); + + /** ProtocolMessage mediaNotifyMessage */ + mediaNotifyMessage?: (proto.IMediaNotifyMessage|null); } /** Represents a ProtocolMessage. */ @@ -18004,6 +21191,15 @@ export namespace proto { /** ProtocolMessage botFeedbackMessage. */ public botFeedbackMessage?: (proto.Message.IBotFeedbackMessage|null); + /** ProtocolMessage invokerJid. */ + public invokerJid: string; + + /** ProtocolMessage requestWelcomeMessageMetadata. */ + public requestWelcomeMessageMetadata?: (proto.Message.IRequestWelcomeMessageMetadata|null); + + /** ProtocolMessage mediaNotifyMessage. */ + public mediaNotifyMessage?: (proto.IMediaNotifyMessage|null); + /** * Creates a new ProtocolMessage instance using the specified properties. * @param [properties] Properties to set @@ -18093,7 +21289,8 @@ export namespace proto { PEER_DATA_OPERATION_REQUEST_MESSAGE = 16, PEER_DATA_OPERATION_REQUEST_RESPONSE_MESSAGE = 17, REQUEST_WELCOME_MESSAGE = 18, - BOT_FEEDBACK_MESSAGE = 19 + BOT_FEEDBACK_MESSAGE = 19, + MEDIA_NOTIFY_MESSAGE = 20 } } @@ -18421,6 +21618,105 @@ export namespace proto { public toJSON(): { [k: string]: any }; } + /** Properties of a RequestWelcomeMessageMetadata. */ + interface IRequestWelcomeMessageMetadata { + + /** RequestWelcomeMessageMetadata localChatState */ + localChatState?: (proto.Message.RequestWelcomeMessageMetadata.LocalChatState|null); + } + + /** Represents a RequestWelcomeMessageMetadata. */ + class RequestWelcomeMessageMetadata implements IRequestWelcomeMessageMetadata { + + /** + * Constructs a new RequestWelcomeMessageMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.IRequestWelcomeMessageMetadata); + + /** RequestWelcomeMessageMetadata localChatState. */ + public localChatState: proto.Message.RequestWelcomeMessageMetadata.LocalChatState; + + /** + * Creates a new RequestWelcomeMessageMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns RequestWelcomeMessageMetadata instance + */ + public static create(properties?: proto.Message.IRequestWelcomeMessageMetadata): proto.Message.RequestWelcomeMessageMetadata; + + /** + * Encodes the specified RequestWelcomeMessageMetadata message. Does not implicitly {@link proto.Message.RequestWelcomeMessageMetadata.verify|verify} messages. + * @param message RequestWelcomeMessageMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.IRequestWelcomeMessageMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RequestWelcomeMessageMetadata message, length delimited. Does not implicitly {@link proto.Message.RequestWelcomeMessageMetadata.verify|verify} messages. + * @param message RequestWelcomeMessageMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.IRequestWelcomeMessageMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RequestWelcomeMessageMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RequestWelcomeMessageMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.Message.RequestWelcomeMessageMetadata; + + /** + * Decodes a RequestWelcomeMessageMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RequestWelcomeMessageMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.Message.RequestWelcomeMessageMetadata; + + /** + * Verifies a RequestWelcomeMessageMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RequestWelcomeMessageMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RequestWelcomeMessageMetadata + */ + public static fromObject(object: { [k: string]: any }): proto.Message.RequestWelcomeMessageMetadata; + + /** + * Creates a plain object from a RequestWelcomeMessageMetadata message. Also converts values to other types if specified. + * @param message RequestWelcomeMessageMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.RequestWelcomeMessageMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RequestWelcomeMessageMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace RequestWelcomeMessageMetadata { + + /** LocalChatState enum. */ + enum LocalChatState { + EMPTY = 0, + NON_EMPTY = 1 + } + } + /** Properties of a ScheduledCallCreationMessage. */ interface IScheduledCallCreationMessage { @@ -18889,6 +22185,12 @@ export namespace proto { /** StickerMessage isAvatar */ isAvatar?: (boolean|null); + + /** StickerMessage isAiSticker */ + isAiSticker?: (boolean|null); + + /** StickerMessage isLottie */ + isLottie?: (boolean|null); } /** Represents a StickerMessage. */ @@ -18951,6 +22253,12 @@ export namespace proto { /** StickerMessage isAvatar. */ public isAvatar: boolean; + /** StickerMessage isAiSticker. */ + public isAiSticker: boolean; + + /** StickerMessage isLottie. */ + public isLottie: boolean; + /** * Creates a new StickerMessage instance using the specified properties. * @param [properties] Properties to set @@ -19138,6 +22446,9 @@ export namespace proto { /** TemplateButtonReplyMessage selectedIndex */ selectedIndex?: (number|null); + + /** TemplateButtonReplyMessage selectedCarouselCardIndex */ + selectedCarouselCardIndex?: (number|null); } /** Represents a TemplateButtonReplyMessage. */ @@ -19161,6 +22472,9 @@ export namespace proto { /** TemplateButtonReplyMessage selectedIndex. */ public selectedIndex: number; + /** TemplateButtonReplyMessage selectedCarouselCardIndex. */ + public selectedCarouselCardIndex: number; + /** * Creates a new TemplateButtonReplyMessage instance using the specified properties. * @param [properties] Properties to set @@ -19507,6 +22821,9 @@ export namespace proto { /** HydratedFourRowTemplate templateId */ templateId?: (string|null); + /** HydratedFourRowTemplate maskLinkedDevices */ + maskLinkedDevices?: (boolean|null); + /** HydratedFourRowTemplate documentMessage */ documentMessage?: (proto.Message.IDocumentMessage|null); @@ -19544,6 +22861,9 @@ export namespace proto { /** HydratedFourRowTemplate templateId. */ public templateId: string; + /** HydratedFourRowTemplate maskLinkedDevices. */ + public maskLinkedDevices: boolean; + /** HydratedFourRowTemplate documentMessage. */ public documentMessage?: (proto.Message.IDocumentMessage|null); @@ -19705,6 +23025,9 @@ export namespace proto { /** VideoMessage staticUrl */ staticUrl?: (string|null); + + /** VideoMessage annotations */ + annotations?: (proto.IInteractiveAnnotation[]|null); } /** Represents a VideoMessage. */ @@ -19785,6 +23108,9 @@ export namespace proto { /** VideoMessage staticUrl. */ public staticUrl: string; + /** VideoMessage annotations. */ + public annotations: proto.IInteractiveAnnotation[]; + /** * Creates a new VideoMessage instance using the specified properties. * @param [properties] Properties to set @@ -19980,6 +23306,9 @@ export namespace proto { /** MessageContextInfo botMetadata */ botMetadata?: (proto.IBotMetadata|null); + + /** MessageContextInfo reportingTokenVersion */ + reportingTokenVersion?: (number|null); } /** Represents a MessageContextInfo. */ @@ -20012,6 +23341,9 @@ export namespace proto { /** MessageContextInfo botMetadata. */ public botMetadata?: (proto.IBotMetadata|null); + /** MessageContextInfo reportingTokenVersion. */ + public reportingTokenVersion: number; + /** * Creates a new MessageContextInfo instance using the specified properties. * @param [properties] Properties to set @@ -20478,6 +23810,15 @@ export namespace proto { /** MsgOpaqueData botMessageSecret */ botMessageSecret?: (Uint8Array|null); + + /** MsgOpaqueData targetMessageKey */ + targetMessageKey?: (string|null); + + /** MsgOpaqueData encPayload */ + encPayload?: (Uint8Array|null); + + /** MsgOpaqueData encIv */ + encIv?: (Uint8Array|null); } /** Represents a MsgOpaqueData. */ @@ -20570,6 +23911,15 @@ export namespace proto { /** MsgOpaqueData botMessageSecret. */ public botMessageSecret: Uint8Array; + /** MsgOpaqueData targetMessageKey. */ + public targetMessageKey: string; + + /** MsgOpaqueData encPayload. */ + public encPayload: Uint8Array; + + /** MsgOpaqueData encIv. */ + public encIv: Uint8Array; + /** * Creates a new MsgOpaqueData instance using the specified properties. * @param [properties] Properties to set @@ -21478,6 +24828,170 @@ export namespace proto { public toJSON(): { [k: string]: any }; } + /** Properties of a PatchDebugData. */ + interface IPatchDebugData { + + /** PatchDebugData currentLthash */ + currentLthash?: (Uint8Array|null); + + /** PatchDebugData newLthash */ + newLthash?: (Uint8Array|null); + + /** PatchDebugData patchVersion */ + patchVersion?: (Uint8Array|null); + + /** PatchDebugData collectionName */ + collectionName?: (Uint8Array|null); + + /** PatchDebugData firstFourBytesFromAHashOfSnapshotMacKey */ + firstFourBytesFromAHashOfSnapshotMacKey?: (Uint8Array|null); + + /** PatchDebugData newLthashSubtract */ + newLthashSubtract?: (Uint8Array|null); + + /** PatchDebugData numberAdd */ + numberAdd?: (number|null); + + /** PatchDebugData numberRemove */ + numberRemove?: (number|null); + + /** PatchDebugData numberOverride */ + numberOverride?: (number|null); + + /** PatchDebugData senderPlatform */ + senderPlatform?: (proto.PatchDebugData.Platform|null); + + /** PatchDebugData isSenderPrimary */ + isSenderPrimary?: (boolean|null); + } + + /** Represents a PatchDebugData. */ + class PatchDebugData implements IPatchDebugData { + + /** + * Constructs a new PatchDebugData. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IPatchDebugData); + + /** PatchDebugData currentLthash. */ + public currentLthash: Uint8Array; + + /** PatchDebugData newLthash. */ + public newLthash: Uint8Array; + + /** PatchDebugData patchVersion. */ + public patchVersion: Uint8Array; + + /** PatchDebugData collectionName. */ + public collectionName: Uint8Array; + + /** PatchDebugData firstFourBytesFromAHashOfSnapshotMacKey. */ + public firstFourBytesFromAHashOfSnapshotMacKey: Uint8Array; + + /** PatchDebugData newLthashSubtract. */ + public newLthashSubtract: Uint8Array; + + /** PatchDebugData numberAdd. */ + public numberAdd: number; + + /** PatchDebugData numberRemove. */ + public numberRemove: number; + + /** PatchDebugData numberOverride. */ + public numberOverride: number; + + /** PatchDebugData senderPlatform. */ + public senderPlatform: proto.PatchDebugData.Platform; + + /** PatchDebugData isSenderPrimary. */ + public isSenderPrimary: boolean; + + /** + * Creates a new PatchDebugData instance using the specified properties. + * @param [properties] Properties to set + * @returns PatchDebugData instance + */ + public static create(properties?: proto.IPatchDebugData): proto.PatchDebugData; + + /** + * Encodes the specified PatchDebugData message. Does not implicitly {@link proto.PatchDebugData.verify|verify} messages. + * @param message PatchDebugData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IPatchDebugData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PatchDebugData message, length delimited. Does not implicitly {@link proto.PatchDebugData.verify|verify} messages. + * @param message PatchDebugData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IPatchDebugData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PatchDebugData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PatchDebugData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.PatchDebugData; + + /** + * Decodes a PatchDebugData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PatchDebugData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.PatchDebugData; + + /** + * Verifies a PatchDebugData message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PatchDebugData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PatchDebugData + */ + public static fromObject(object: { [k: string]: any }): proto.PatchDebugData; + + /** + * Creates a plain object from a PatchDebugData message. Also converts values to other types if specified. + * @param message PatchDebugData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.PatchDebugData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PatchDebugData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace PatchDebugData { + + /** Platform enum. */ + enum Platform { + ANDROID = 0, + SMBA = 1, + IPHONE = 2, + SMBI = 3, + WEB = 4, + UWP = 5, + DARWIN = 6 + } + } + /** Properties of a PaymentBackground. */ interface IPaymentBackground { @@ -21968,6 +25482,102 @@ export namespace proto { } } + /** Properties of a PhoneNumberToLIDMapping. */ + interface IPhoneNumberToLIDMapping { + + /** PhoneNumberToLIDMapping pnJid */ + pnJid?: (string|null); + + /** PhoneNumberToLIDMapping lidJid */ + lidJid?: (string|null); + } + + /** Represents a PhoneNumberToLIDMapping. */ + class PhoneNumberToLIDMapping implements IPhoneNumberToLIDMapping { + + /** + * Constructs a new PhoneNumberToLIDMapping. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IPhoneNumberToLIDMapping); + + /** PhoneNumberToLIDMapping pnJid. */ + public pnJid: string; + + /** PhoneNumberToLIDMapping lidJid. */ + public lidJid: string; + + /** + * Creates a new PhoneNumberToLIDMapping instance using the specified properties. + * @param [properties] Properties to set + * @returns PhoneNumberToLIDMapping instance + */ + public static create(properties?: proto.IPhoneNumberToLIDMapping): proto.PhoneNumberToLIDMapping; + + /** + * Encodes the specified PhoneNumberToLIDMapping message. Does not implicitly {@link proto.PhoneNumberToLIDMapping.verify|verify} messages. + * @param message PhoneNumberToLIDMapping message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IPhoneNumberToLIDMapping, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PhoneNumberToLIDMapping message, length delimited. Does not implicitly {@link proto.PhoneNumberToLIDMapping.verify|verify} messages. + * @param message PhoneNumberToLIDMapping message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IPhoneNumberToLIDMapping, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PhoneNumberToLIDMapping message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PhoneNumberToLIDMapping + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.PhoneNumberToLIDMapping; + + /** + * Decodes a PhoneNumberToLIDMapping message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PhoneNumberToLIDMapping + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.PhoneNumberToLIDMapping; + + /** + * Verifies a PhoneNumberToLIDMapping message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PhoneNumberToLIDMapping message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PhoneNumberToLIDMapping + */ + public static fromObject(object: { [k: string]: any }): proto.PhoneNumberToLIDMapping; + + /** + * Creates a plain object from a PhoneNumberToLIDMapping message. Also converts values to other types if specified. + * @param message PhoneNumberToLIDMapping + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.PhoneNumberToLIDMapping, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PhoneNumberToLIDMapping to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of a PhotoChange. */ interface IPhotoChange { @@ -22824,6 +26434,96 @@ export namespace proto { public toJSON(): { [k: string]: any }; } + /** Properties of a PremiumMessageInfo. */ + interface IPremiumMessageInfo { + + /** PremiumMessageInfo serverCampaignId */ + serverCampaignId?: (string|null); + } + + /** Represents a PremiumMessageInfo. */ + class PremiumMessageInfo implements IPremiumMessageInfo { + + /** + * Constructs a new PremiumMessageInfo. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IPremiumMessageInfo); + + /** PremiumMessageInfo serverCampaignId. */ + public serverCampaignId: string; + + /** + * Creates a new PremiumMessageInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns PremiumMessageInfo instance + */ + public static create(properties?: proto.IPremiumMessageInfo): proto.PremiumMessageInfo; + + /** + * Encodes the specified PremiumMessageInfo message. Does not implicitly {@link proto.PremiumMessageInfo.verify|verify} messages. + * @param message PremiumMessageInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IPremiumMessageInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PremiumMessageInfo message, length delimited. Does not implicitly {@link proto.PremiumMessageInfo.verify|verify} messages. + * @param message PremiumMessageInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IPremiumMessageInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PremiumMessageInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PremiumMessageInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.PremiumMessageInfo; + + /** + * Decodes a PremiumMessageInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PremiumMessageInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.PremiumMessageInfo; + + /** + * Verifies a PremiumMessageInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PremiumMessageInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PremiumMessageInfo + */ + public static fromObject(object: { [k: string]: any }): proto.PremiumMessageInfo; + + /** + * Creates a plain object from a PremiumMessageInfo message. Also converts values to other types if specified. + * @param message PremiumMessageInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.PremiumMessageInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PremiumMessageInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of a Pushname. */ interface IPushname { @@ -23639,6 +27339,96 @@ export namespace proto { public toJSON(): { [k: string]: any }; } + /** Properties of a ReportingTokenInfo. */ + interface IReportingTokenInfo { + + /** ReportingTokenInfo reportingTag */ + reportingTag?: (Uint8Array|null); + } + + /** Represents a ReportingTokenInfo. */ + class ReportingTokenInfo implements IReportingTokenInfo { + + /** + * Constructs a new ReportingTokenInfo. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IReportingTokenInfo); + + /** ReportingTokenInfo reportingTag. */ + public reportingTag: Uint8Array; + + /** + * Creates a new ReportingTokenInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns ReportingTokenInfo instance + */ + public static create(properties?: proto.IReportingTokenInfo): proto.ReportingTokenInfo; + + /** + * Encodes the specified ReportingTokenInfo message. Does not implicitly {@link proto.ReportingTokenInfo.verify|verify} messages. + * @param message ReportingTokenInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IReportingTokenInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReportingTokenInfo message, length delimited. Does not implicitly {@link proto.ReportingTokenInfo.verify|verify} messages. + * @param message ReportingTokenInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IReportingTokenInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReportingTokenInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReportingTokenInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.ReportingTokenInfo; + + /** + * Decodes a ReportingTokenInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReportingTokenInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.ReportingTokenInfo; + + /** + * Verifies a ReportingTokenInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReportingTokenInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReportingTokenInfo + */ + public static fromObject(object: { [k: string]: any }): proto.ReportingTokenInfo; + + /** + * Creates a plain object from a ReportingTokenInfo message. Also converts values to other types if specified. + * @param message ReportingTokenInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.ReportingTokenInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReportingTokenInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of a SenderKeyDistributionMessage. */ interface ISenderKeyDistributionMessage { @@ -25822,6 +29612,27 @@ export namespace proto { /** SyncActionValue privacySettingRelayAllCalls */ privacySettingRelayAllCalls?: (proto.SyncActionValue.IPrivacySettingRelayAllCalls|null); + + /** SyncActionValue callLogAction */ + callLogAction?: (proto.SyncActionValue.ICallLogAction|null); + + /** SyncActionValue statusPrivacy */ + statusPrivacy?: (proto.SyncActionValue.IStatusPrivacyAction|null); + + /** SyncActionValue botWelcomeRequestAction */ + botWelcomeRequestAction?: (proto.SyncActionValue.IBotWelcomeRequestAction|null); + + /** SyncActionValue deleteIndividualCallLog */ + deleteIndividualCallLog?: (proto.SyncActionValue.IDeleteIndividualCallLogAction|null); + + /** SyncActionValue labelReorderingAction */ + labelReorderingAction?: (proto.SyncActionValue.ILabelReorderingAction|null); + + /** SyncActionValue paymentInfoAction */ + paymentInfoAction?: (proto.SyncActionValue.IPaymentInfoAction|null); + + /** SyncActionValue customPaymentMethodsAction */ + customPaymentMethodsAction?: (proto.SyncActionValue.ICustomPaymentMethodsAction|null); } /** Represents a SyncActionValue. */ @@ -25941,6 +29752,27 @@ export namespace proto { /** SyncActionValue privacySettingRelayAllCalls. */ public privacySettingRelayAllCalls?: (proto.SyncActionValue.IPrivacySettingRelayAllCalls|null); + /** SyncActionValue callLogAction. */ + public callLogAction?: (proto.SyncActionValue.ICallLogAction|null); + + /** SyncActionValue statusPrivacy. */ + public statusPrivacy?: (proto.SyncActionValue.IStatusPrivacyAction|null); + + /** SyncActionValue botWelcomeRequestAction. */ + public botWelcomeRequestAction?: (proto.SyncActionValue.IBotWelcomeRequestAction|null); + + /** SyncActionValue deleteIndividualCallLog. */ + public deleteIndividualCallLog?: (proto.SyncActionValue.IDeleteIndividualCallLogAction|null); + + /** SyncActionValue labelReorderingAction. */ + public labelReorderingAction?: (proto.SyncActionValue.ILabelReorderingAction|null); + + /** SyncActionValue paymentInfoAction. */ + public paymentInfoAction?: (proto.SyncActionValue.IPaymentInfoAction|null); + + /** SyncActionValue customPaymentMethodsAction. */ + public customPaymentMethodsAction?: (proto.SyncActionValue.ICustomPaymentMethodsAction|null); + /** * Creates a new SyncActionValue instance using the specified properties. * @param [properties] Properties to set @@ -26302,6 +30134,186 @@ export namespace proto { public toJSON(): { [k: string]: any }; } + /** Properties of a BotWelcomeRequestAction. */ + interface IBotWelcomeRequestAction { + + /** BotWelcomeRequestAction isSent */ + isSent?: (boolean|null); + } + + /** Represents a BotWelcomeRequestAction. */ + class BotWelcomeRequestAction implements IBotWelcomeRequestAction { + + /** + * Constructs a new BotWelcomeRequestAction. + * @param [properties] Properties to set + */ + constructor(properties?: proto.SyncActionValue.IBotWelcomeRequestAction); + + /** BotWelcomeRequestAction isSent. */ + public isSent: boolean; + + /** + * Creates a new BotWelcomeRequestAction instance using the specified properties. + * @param [properties] Properties to set + * @returns BotWelcomeRequestAction instance + */ + public static create(properties?: proto.SyncActionValue.IBotWelcomeRequestAction): proto.SyncActionValue.BotWelcomeRequestAction; + + /** + * Encodes the specified BotWelcomeRequestAction message. Does not implicitly {@link proto.SyncActionValue.BotWelcomeRequestAction.verify|verify} messages. + * @param message BotWelcomeRequestAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.SyncActionValue.IBotWelcomeRequestAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BotWelcomeRequestAction message, length delimited. Does not implicitly {@link proto.SyncActionValue.BotWelcomeRequestAction.verify|verify} messages. + * @param message BotWelcomeRequestAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.SyncActionValue.IBotWelcomeRequestAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BotWelcomeRequestAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BotWelcomeRequestAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.SyncActionValue.BotWelcomeRequestAction; + + /** + * Decodes a BotWelcomeRequestAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BotWelcomeRequestAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.SyncActionValue.BotWelcomeRequestAction; + + /** + * Verifies a BotWelcomeRequestAction message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BotWelcomeRequestAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BotWelcomeRequestAction + */ + public static fromObject(object: { [k: string]: any }): proto.SyncActionValue.BotWelcomeRequestAction; + + /** + * Creates a plain object from a BotWelcomeRequestAction message. Also converts values to other types if specified. + * @param message BotWelcomeRequestAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.SyncActionValue.BotWelcomeRequestAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BotWelcomeRequestAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CallLogAction. */ + interface ICallLogAction { + + /** CallLogAction callLogRecord */ + callLogRecord?: (proto.ICallLogRecord|null); + } + + /** Represents a CallLogAction. */ + class CallLogAction implements ICallLogAction { + + /** + * Constructs a new CallLogAction. + * @param [properties] Properties to set + */ + constructor(properties?: proto.SyncActionValue.ICallLogAction); + + /** CallLogAction callLogRecord. */ + public callLogRecord?: (proto.ICallLogRecord|null); + + /** + * Creates a new CallLogAction instance using the specified properties. + * @param [properties] Properties to set + * @returns CallLogAction instance + */ + public static create(properties?: proto.SyncActionValue.ICallLogAction): proto.SyncActionValue.CallLogAction; + + /** + * Encodes the specified CallLogAction message. Does not implicitly {@link proto.SyncActionValue.CallLogAction.verify|verify} messages. + * @param message CallLogAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.SyncActionValue.ICallLogAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CallLogAction message, length delimited. Does not implicitly {@link proto.SyncActionValue.CallLogAction.verify|verify} messages. + * @param message CallLogAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.SyncActionValue.ICallLogAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CallLogAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CallLogAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.SyncActionValue.CallLogAction; + + /** + * Decodes a CallLogAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CallLogAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.SyncActionValue.CallLogAction; + + /** + * Verifies a CallLogAction message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CallLogAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CallLogAction + */ + public static fromObject(object: { [k: string]: any }): proto.SyncActionValue.CallLogAction; + + /** + * Creates a plain object from a CallLogAction message. Also converts values to other types if specified. + * @param message CallLogAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.SyncActionValue.CallLogAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CallLogAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of a ChatAssignmentAction. */ interface IChatAssignmentAction { @@ -26583,6 +30595,9 @@ export namespace proto { /** ContactAction lidJid */ lidJid?: (string|null); + + /** ContactAction saveOnPrimaryAddressbook */ + saveOnPrimaryAddressbook?: (boolean|null); } /** Represents a ContactAction. */ @@ -26603,6 +30618,9 @@ export namespace proto { /** ContactAction lidJid. */ public lidJid: string; + /** ContactAction saveOnPrimaryAddressbook. */ + public saveOnPrimaryAddressbook: boolean; + /** * Creates a new ContactAction instance using the specified properties. * @param [properties] Properties to set @@ -26674,6 +30692,300 @@ export namespace proto { public toJSON(): { [k: string]: any }; } + /** Properties of a CustomPaymentMethod. */ + interface ICustomPaymentMethod { + + /** CustomPaymentMethod credentialId */ + credentialId: string; + + /** CustomPaymentMethod country */ + country: string; + + /** CustomPaymentMethod type */ + type: string; + + /** CustomPaymentMethod metadata */ + metadata?: (proto.SyncActionValue.ICustomPaymentMethodMetadata[]|null); + } + + /** Represents a CustomPaymentMethod. */ + class CustomPaymentMethod implements ICustomPaymentMethod { + + /** + * Constructs a new CustomPaymentMethod. + * @param [properties] Properties to set + */ + constructor(properties?: proto.SyncActionValue.ICustomPaymentMethod); + + /** CustomPaymentMethod credentialId. */ + public credentialId: string; + + /** CustomPaymentMethod country. */ + public country: string; + + /** CustomPaymentMethod type. */ + public type: string; + + /** CustomPaymentMethod metadata. */ + public metadata: proto.SyncActionValue.ICustomPaymentMethodMetadata[]; + + /** + * Creates a new CustomPaymentMethod instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomPaymentMethod instance + */ + public static create(properties?: proto.SyncActionValue.ICustomPaymentMethod): proto.SyncActionValue.CustomPaymentMethod; + + /** + * Encodes the specified CustomPaymentMethod message. Does not implicitly {@link proto.SyncActionValue.CustomPaymentMethod.verify|verify} messages. + * @param message CustomPaymentMethod message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.SyncActionValue.ICustomPaymentMethod, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomPaymentMethod message, length delimited. Does not implicitly {@link proto.SyncActionValue.CustomPaymentMethod.verify|verify} messages. + * @param message CustomPaymentMethod message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.SyncActionValue.ICustomPaymentMethod, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomPaymentMethod message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomPaymentMethod + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.SyncActionValue.CustomPaymentMethod; + + /** + * Decodes a CustomPaymentMethod message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomPaymentMethod + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.SyncActionValue.CustomPaymentMethod; + + /** + * Verifies a CustomPaymentMethod message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CustomPaymentMethod message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomPaymentMethod + */ + public static fromObject(object: { [k: string]: any }): proto.SyncActionValue.CustomPaymentMethod; + + /** + * Creates a plain object from a CustomPaymentMethod message. Also converts values to other types if specified. + * @param message CustomPaymentMethod + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.SyncActionValue.CustomPaymentMethod, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomPaymentMethod to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CustomPaymentMethodMetadata. */ + interface ICustomPaymentMethodMetadata { + + /** CustomPaymentMethodMetadata key */ + key: string; + + /** CustomPaymentMethodMetadata value */ + value: string; + } + + /** Represents a CustomPaymentMethodMetadata. */ + class CustomPaymentMethodMetadata implements ICustomPaymentMethodMetadata { + + /** + * Constructs a new CustomPaymentMethodMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: proto.SyncActionValue.ICustomPaymentMethodMetadata); + + /** CustomPaymentMethodMetadata key. */ + public key: string; + + /** CustomPaymentMethodMetadata value. */ + public value: string; + + /** + * Creates a new CustomPaymentMethodMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomPaymentMethodMetadata instance + */ + public static create(properties?: proto.SyncActionValue.ICustomPaymentMethodMetadata): proto.SyncActionValue.CustomPaymentMethodMetadata; + + /** + * Encodes the specified CustomPaymentMethodMetadata message. Does not implicitly {@link proto.SyncActionValue.CustomPaymentMethodMetadata.verify|verify} messages. + * @param message CustomPaymentMethodMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.SyncActionValue.ICustomPaymentMethodMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomPaymentMethodMetadata message, length delimited. Does not implicitly {@link proto.SyncActionValue.CustomPaymentMethodMetadata.verify|verify} messages. + * @param message CustomPaymentMethodMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.SyncActionValue.ICustomPaymentMethodMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomPaymentMethodMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomPaymentMethodMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.SyncActionValue.CustomPaymentMethodMetadata; + + /** + * Decodes a CustomPaymentMethodMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomPaymentMethodMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.SyncActionValue.CustomPaymentMethodMetadata; + + /** + * Verifies a CustomPaymentMethodMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CustomPaymentMethodMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomPaymentMethodMetadata + */ + public static fromObject(object: { [k: string]: any }): proto.SyncActionValue.CustomPaymentMethodMetadata; + + /** + * Creates a plain object from a CustomPaymentMethodMetadata message. Also converts values to other types if specified. + * @param message CustomPaymentMethodMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.SyncActionValue.CustomPaymentMethodMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomPaymentMethodMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CustomPaymentMethodsAction. */ + interface ICustomPaymentMethodsAction { + + /** CustomPaymentMethodsAction customPaymentMethods */ + customPaymentMethods?: (proto.SyncActionValue.ICustomPaymentMethod[]|null); + } + + /** Represents a CustomPaymentMethodsAction. */ + class CustomPaymentMethodsAction implements ICustomPaymentMethodsAction { + + /** + * Constructs a new CustomPaymentMethodsAction. + * @param [properties] Properties to set + */ + constructor(properties?: proto.SyncActionValue.ICustomPaymentMethodsAction); + + /** CustomPaymentMethodsAction customPaymentMethods. */ + public customPaymentMethods: proto.SyncActionValue.ICustomPaymentMethod[]; + + /** + * Creates a new CustomPaymentMethodsAction instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomPaymentMethodsAction instance + */ + public static create(properties?: proto.SyncActionValue.ICustomPaymentMethodsAction): proto.SyncActionValue.CustomPaymentMethodsAction; + + /** + * Encodes the specified CustomPaymentMethodsAction message. Does not implicitly {@link proto.SyncActionValue.CustomPaymentMethodsAction.verify|verify} messages. + * @param message CustomPaymentMethodsAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.SyncActionValue.ICustomPaymentMethodsAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomPaymentMethodsAction message, length delimited. Does not implicitly {@link proto.SyncActionValue.CustomPaymentMethodsAction.verify|verify} messages. + * @param message CustomPaymentMethodsAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.SyncActionValue.ICustomPaymentMethodsAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomPaymentMethodsAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomPaymentMethodsAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.SyncActionValue.CustomPaymentMethodsAction; + + /** + * Decodes a CustomPaymentMethodsAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomPaymentMethodsAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.SyncActionValue.CustomPaymentMethodsAction; + + /** + * Verifies a CustomPaymentMethodsAction message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CustomPaymentMethodsAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomPaymentMethodsAction + */ + public static fromObject(object: { [k: string]: any }): proto.SyncActionValue.CustomPaymentMethodsAction; + + /** + * Creates a plain object from a CustomPaymentMethodsAction message. Also converts values to other types if specified. + * @param message CustomPaymentMethodsAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.SyncActionValue.CustomPaymentMethodsAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomPaymentMethodsAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of a DeleteChatAction. */ interface IDeleteChatAction { @@ -26764,6 +31076,102 @@ export namespace proto { public toJSON(): { [k: string]: any }; } + /** Properties of a DeleteIndividualCallLogAction. */ + interface IDeleteIndividualCallLogAction { + + /** DeleteIndividualCallLogAction peerJid */ + peerJid?: (string|null); + + /** DeleteIndividualCallLogAction isIncoming */ + isIncoming?: (boolean|null); + } + + /** Represents a DeleteIndividualCallLogAction. */ + class DeleteIndividualCallLogAction implements IDeleteIndividualCallLogAction { + + /** + * Constructs a new DeleteIndividualCallLogAction. + * @param [properties] Properties to set + */ + constructor(properties?: proto.SyncActionValue.IDeleteIndividualCallLogAction); + + /** DeleteIndividualCallLogAction peerJid. */ + public peerJid: string; + + /** DeleteIndividualCallLogAction isIncoming. */ + public isIncoming: boolean; + + /** + * Creates a new DeleteIndividualCallLogAction instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteIndividualCallLogAction instance + */ + public static create(properties?: proto.SyncActionValue.IDeleteIndividualCallLogAction): proto.SyncActionValue.DeleteIndividualCallLogAction; + + /** + * Encodes the specified DeleteIndividualCallLogAction message. Does not implicitly {@link proto.SyncActionValue.DeleteIndividualCallLogAction.verify|verify} messages. + * @param message DeleteIndividualCallLogAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.SyncActionValue.IDeleteIndividualCallLogAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteIndividualCallLogAction message, length delimited. Does not implicitly {@link proto.SyncActionValue.DeleteIndividualCallLogAction.verify|verify} messages. + * @param message DeleteIndividualCallLogAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.SyncActionValue.IDeleteIndividualCallLogAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteIndividualCallLogAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteIndividualCallLogAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.SyncActionValue.DeleteIndividualCallLogAction; + + /** + * Decodes a DeleteIndividualCallLogAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteIndividualCallLogAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.SyncActionValue.DeleteIndividualCallLogAction; + + /** + * Verifies a DeleteIndividualCallLogAction message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteIndividualCallLogAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteIndividualCallLogAction + */ + public static fromObject(object: { [k: string]: any }): proto.SyncActionValue.DeleteIndividualCallLogAction; + + /** + * Creates a plain object from a DeleteIndividualCallLogAction message. Also converts values to other types if specified. + * @param message DeleteIndividualCallLogAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.SyncActionValue.DeleteIndividualCallLogAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteIndividualCallLogAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of a DeleteMessageForMeAction. */ interface IDeleteMessageForMeAction { @@ -27144,6 +31552,9 @@ export namespace proto { /** LabelEditAction deleted */ deleted?: (boolean|null); + + /** LabelEditAction orderIndex */ + orderIndex?: (number|null); } /** Represents a LabelEditAction. */ @@ -27167,6 +31578,9 @@ export namespace proto { /** LabelEditAction deleted. */ public deleted: boolean; + /** LabelEditAction orderIndex. */ + public orderIndex: number; + /** * Creates a new LabelEditAction instance using the specified properties. * @param [properties] Properties to set @@ -27238,6 +31652,96 @@ export namespace proto { public toJSON(): { [k: string]: any }; } + /** Properties of a LabelReorderingAction. */ + interface ILabelReorderingAction { + + /** LabelReorderingAction sortedLabelIds */ + sortedLabelIds?: (number[]|null); + } + + /** Represents a LabelReorderingAction. */ + class LabelReorderingAction implements ILabelReorderingAction { + + /** + * Constructs a new LabelReorderingAction. + * @param [properties] Properties to set + */ + constructor(properties?: proto.SyncActionValue.ILabelReorderingAction); + + /** LabelReorderingAction sortedLabelIds. */ + public sortedLabelIds: number[]; + + /** + * Creates a new LabelReorderingAction instance using the specified properties. + * @param [properties] Properties to set + * @returns LabelReorderingAction instance + */ + public static create(properties?: proto.SyncActionValue.ILabelReorderingAction): proto.SyncActionValue.LabelReorderingAction; + + /** + * Encodes the specified LabelReorderingAction message. Does not implicitly {@link proto.SyncActionValue.LabelReorderingAction.verify|verify} messages. + * @param message LabelReorderingAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.SyncActionValue.ILabelReorderingAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LabelReorderingAction message, length delimited. Does not implicitly {@link proto.SyncActionValue.LabelReorderingAction.verify|verify} messages. + * @param message LabelReorderingAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.SyncActionValue.ILabelReorderingAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LabelReorderingAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LabelReorderingAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.SyncActionValue.LabelReorderingAction; + + /** + * Decodes a LabelReorderingAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LabelReorderingAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.SyncActionValue.LabelReorderingAction; + + /** + * Verifies a LabelReorderingAction message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LabelReorderingAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LabelReorderingAction + */ + public static fromObject(object: { [k: string]: any }): proto.SyncActionValue.LabelReorderingAction; + + /** + * Creates a plain object from a LabelReorderingAction message. Also converts values to other types if specified. + * @param message LabelReorderingAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.SyncActionValue.LabelReorderingAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LabelReorderingAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of a LocaleSetting. */ interface ILocaleSetting { @@ -27840,6 +32344,96 @@ export namespace proto { public toJSON(): { [k: string]: any }; } + /** Properties of a PaymentInfoAction. */ + interface IPaymentInfoAction { + + /** PaymentInfoAction cpi */ + cpi?: (string|null); + } + + /** Represents a PaymentInfoAction. */ + class PaymentInfoAction implements IPaymentInfoAction { + + /** + * Constructs a new PaymentInfoAction. + * @param [properties] Properties to set + */ + constructor(properties?: proto.SyncActionValue.IPaymentInfoAction); + + /** PaymentInfoAction cpi. */ + public cpi: string; + + /** + * Creates a new PaymentInfoAction instance using the specified properties. + * @param [properties] Properties to set + * @returns PaymentInfoAction instance + */ + public static create(properties?: proto.SyncActionValue.IPaymentInfoAction): proto.SyncActionValue.PaymentInfoAction; + + /** + * Encodes the specified PaymentInfoAction message. Does not implicitly {@link proto.SyncActionValue.PaymentInfoAction.verify|verify} messages. + * @param message PaymentInfoAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.SyncActionValue.IPaymentInfoAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PaymentInfoAction message, length delimited. Does not implicitly {@link proto.SyncActionValue.PaymentInfoAction.verify|verify} messages. + * @param message PaymentInfoAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.SyncActionValue.IPaymentInfoAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PaymentInfoAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PaymentInfoAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.SyncActionValue.PaymentInfoAction; + + /** + * Decodes a PaymentInfoAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PaymentInfoAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.SyncActionValue.PaymentInfoAction; + + /** + * Verifies a PaymentInfoAction message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PaymentInfoAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PaymentInfoAction + */ + public static fromObject(object: { [k: string]: any }): proto.SyncActionValue.PaymentInfoAction; + + /** + * Creates a plain object from a PaymentInfoAction message. Also converts values to other types if specified. + * @param message PaymentInfoAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.SyncActionValue.PaymentInfoAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PaymentInfoAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of a PinAction. */ interface IPinAction { @@ -28854,6 +33448,112 @@ export namespace proto { public toJSON(): { [k: string]: any }; } + /** Properties of a StatusPrivacyAction. */ + interface IStatusPrivacyAction { + + /** StatusPrivacyAction mode */ + mode?: (proto.SyncActionValue.StatusPrivacyAction.StatusDistributionMode|null); + + /** StatusPrivacyAction userJid */ + userJid?: (string[]|null); + } + + /** Represents a StatusPrivacyAction. */ + class StatusPrivacyAction implements IStatusPrivacyAction { + + /** + * Constructs a new StatusPrivacyAction. + * @param [properties] Properties to set + */ + constructor(properties?: proto.SyncActionValue.IStatusPrivacyAction); + + /** StatusPrivacyAction mode. */ + public mode: proto.SyncActionValue.StatusPrivacyAction.StatusDistributionMode; + + /** StatusPrivacyAction userJid. */ + public userJid: string[]; + + /** + * Creates a new StatusPrivacyAction instance using the specified properties. + * @param [properties] Properties to set + * @returns StatusPrivacyAction instance + */ + public static create(properties?: proto.SyncActionValue.IStatusPrivacyAction): proto.SyncActionValue.StatusPrivacyAction; + + /** + * Encodes the specified StatusPrivacyAction message. Does not implicitly {@link proto.SyncActionValue.StatusPrivacyAction.verify|verify} messages. + * @param message StatusPrivacyAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.SyncActionValue.IStatusPrivacyAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StatusPrivacyAction message, length delimited. Does not implicitly {@link proto.SyncActionValue.StatusPrivacyAction.verify|verify} messages. + * @param message StatusPrivacyAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.SyncActionValue.IStatusPrivacyAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StatusPrivacyAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StatusPrivacyAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.SyncActionValue.StatusPrivacyAction; + + /** + * Decodes a StatusPrivacyAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StatusPrivacyAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.SyncActionValue.StatusPrivacyAction; + + /** + * Verifies a StatusPrivacyAction message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StatusPrivacyAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StatusPrivacyAction + */ + public static fromObject(object: { [k: string]: any }): proto.SyncActionValue.StatusPrivacyAction; + + /** + * Creates a plain object from a StatusPrivacyAction message. Also converts values to other types if specified. + * @param message StatusPrivacyAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.SyncActionValue.StatusPrivacyAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StatusPrivacyAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace StatusPrivacyAction { + + /** StatusDistributionMode enum. */ + enum StatusDistributionMode { + ALLOW_LIST = 0, + DENY_LIST = 1, + CONTACTS = 2 + } + } + /** Properties of a StickerAction. */ interface IStickerAction { @@ -29880,6 +34580,9 @@ export namespace proto { /** SyncdPatch deviceIndex */ deviceIndex?: (number|null); + + /** SyncdPatch clientDebugData */ + clientDebugData?: (Uint8Array|null); } /** Represents a SyncdPatch. */ @@ -29915,6 +34618,9 @@ export namespace proto { /** SyncdPatch deviceIndex. */ public deviceIndex: number; + /** SyncdPatch clientDebugData. */ + public clientDebugData: Uint8Array; + /** * Creates a new SyncdPatch instance using the specified properties. * @param [properties] Properties to set @@ -31712,6 +36418,30 @@ export namespace proto { /** WebMessageInfo pinInChat */ pinInChat?: (proto.IPinInChat|null); + + /** WebMessageInfo premiumMessageInfo */ + premiumMessageInfo?: (proto.IPremiumMessageInfo|null); + + /** WebMessageInfo is1PBizBotMessage */ + is1PBizBotMessage?: (boolean|null); + + /** WebMessageInfo isGroupHistoryMessage */ + isGroupHistoryMessage?: (boolean|null); + + /** WebMessageInfo botMessageInvokerJid */ + botMessageInvokerJid?: (string|null); + + /** WebMessageInfo commentMetadata */ + commentMetadata?: (proto.ICommentMetadata|null); + + /** WebMessageInfo eventResponses */ + eventResponses?: (proto.IEventResponse[]|null); + + /** WebMessageInfo reportingTokenInfo */ + reportingTokenInfo?: (proto.IReportingTokenInfo|null); + + /** WebMessageInfo newsletterServerId */ + newsletterServerId?: (number|Long|null); } /** Represents a WebMessageInfo. */ @@ -31855,6 +36585,30 @@ export namespace proto { /** WebMessageInfo pinInChat. */ public pinInChat?: (proto.IPinInChat|null); + /** WebMessageInfo premiumMessageInfo. */ + public premiumMessageInfo?: (proto.IPremiumMessageInfo|null); + + /** WebMessageInfo is1PBizBotMessage. */ + public is1PBizBotMessage: boolean; + + /** WebMessageInfo isGroupHistoryMessage. */ + public isGroupHistoryMessage: boolean; + + /** WebMessageInfo botMessageInvokerJid. */ + public botMessageInvokerJid: string; + + /** WebMessageInfo commentMetadata. */ + public commentMetadata?: (proto.ICommentMetadata|null); + + /** WebMessageInfo eventResponses. */ + public eventResponses: proto.IEventResponse[]; + + /** WebMessageInfo reportingTokenInfo. */ + public reportingTokenInfo?: (proto.IReportingTokenInfo|null); + + /** WebMessageInfo newsletterServerId. */ + public newsletterServerId: (number|Long); + /** * Creates a new WebMessageInfo instance using the specified properties. * @param [properties] Properties to set @@ -32131,7 +36885,24 @@ export namespace proto { PAYMENT_INVITE_SETUP_INVITEE_SEND_AND_RECEIVE = 180, LINKED_GROUP_CALL_START = 181, REPORT_TO_ADMIN_ENABLED_STATUS = 182, - EMPTY_SUBGROUP_CREATE = 183 + EMPTY_SUBGROUP_CREATE = 183, + SCHEDULED_CALL_CANCEL = 184, + SUBGROUP_ADMIN_TRIGGERED_AUTO_ADD_RICH = 185, + GROUP_CHANGE_RECENT_HISTORY_SHARING = 186, + PAID_MESSAGE_SERVER_CAMPAIGN_ID = 187, + GENERAL_CHAT_CREATE = 188, + GENERAL_CHAT_ADD = 189, + GENERAL_CHAT_AUTO_ADD_DISABLED = 190, + SUGGESTED_SUBGROUP_ANNOUNCE = 191, + BIZ_BOT_1P_MESSAGING_ENABLED = 192, + CHANGE_USERNAME = 193, + BIZ_COEX_PRIVACY_INIT_SELF = 194, + BIZ_COEX_PRIVACY_TRANSITION_SELF = 195, + SUPPORT_AI_EDUCATION = 196, + BIZ_BOT_3P_MESSAGING_ENABLED = 197, + REMINDER_SETUP_MESSAGE = 198, + REMINDER_SENT_MESSAGE = 199, + REMINDER_CANCEL_MESSAGE = 200 } } diff --git a/WAProto/index.js b/WAProto/index.js index 38714dda7e0..412098b5589 100644 --- a/WAProto/index.js +++ b/WAProto/index.js @@ -974,6 +974,7 @@ $root.proto = (function() { * @interface IADVSignedDeviceIdentityHMAC * @property {Uint8Array|null} [details] ADVSignedDeviceIdentityHMAC details * @property {Uint8Array|null} [hmac] ADVSignedDeviceIdentityHMAC hmac + * @property {proto.ADVEncryptionType|null} [accountType] ADVSignedDeviceIdentityHMAC accountType */ /** @@ -1007,6 +1008,14 @@ $root.proto = (function() { */ ADVSignedDeviceIdentityHMAC.prototype.hmac = $util.newBuffer([]); + /** + * ADVSignedDeviceIdentityHMAC accountType. + * @member {proto.ADVEncryptionType} accountType + * @memberof proto.ADVSignedDeviceIdentityHMAC + * @instance + */ + ADVSignedDeviceIdentityHMAC.prototype.accountType = 0; + /** * Creates a new ADVSignedDeviceIdentityHMAC instance using the specified properties. * @function create @@ -1035,6 +1044,8 @@ $root.proto = (function() { writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.details); if (message.hmac != null && Object.hasOwnProperty.call(message, "hmac")) writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.hmac); + if (message.accountType != null && Object.hasOwnProperty.call(message, "accountType")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.accountType); return writer; }; @@ -1075,6 +1086,9 @@ $root.proto = (function() { case 2: message.hmac = reader.bytes(); break; + case 3: + message.accountType = reader.int32(); + break; default: reader.skipType(tag & 7); break; @@ -1116,6 +1130,14 @@ $root.proto = (function() { if (message.hmac != null && message.hasOwnProperty("hmac")) if (!(message.hmac && typeof message.hmac.length === "number" || $util.isString(message.hmac))) return "hmac: buffer expected"; + if (message.accountType != null && message.hasOwnProperty("accountType")) + switch (message.accountType) { + default: + return "accountType: enum value expected"; + case 0: + case 1: + break; + } return null; }; @@ -1141,6 +1163,16 @@ $root.proto = (function() { $util.base64.decode(object.hmac, message.hmac = $util.newBuffer($util.base64.length(object.hmac)), 0); else if (object.hmac.length) message.hmac = object.hmac; + switch (object.accountType) { + case "E2EE": + case 0: + message.accountType = 0; + break; + case "HOSTED": + case 1: + message.accountType = 1; + break; + } return message; }; @@ -1172,11 +1204,14 @@ $root.proto = (function() { if (options.bytes !== Array) object.hmac = $util.newBuffer(object.hmac); } + object.accountType = options.enums === String ? "E2EE" : 0; } if (message.details != null && message.hasOwnProperty("details")) object.details = options.bytes === String ? $util.base64.encode(message.details, 0, message.details.length) : options.bytes === Array ? Array.prototype.slice.call(message.details) : message.details; if (message.hmac != null && message.hasOwnProperty("hmac")) object.hmac = options.bytes === String ? $util.base64.encode(message.hmac, 0, message.hmac.length) : options.bytes === Array ? Array.prototype.slice.call(message.hmac) : message.hmac; + if (message.accountType != null && message.hasOwnProperty("accountType")) + object.accountType = options.enums === String ? $root.proto.ADVEncryptionType[message.accountType] : message.accountType; return object; }; @@ -1202,6 +1237,7 @@ $root.proto = (function() { * @interface IADVSignedKeyIndexList * @property {Uint8Array|null} [details] ADVSignedKeyIndexList details * @property {Uint8Array|null} [accountSignature] ADVSignedKeyIndexList accountSignature + * @property {Uint8Array|null} [accountSignatureKey] ADVSignedKeyIndexList accountSignatureKey */ /** @@ -1235,6 +1271,14 @@ $root.proto = (function() { */ ADVSignedKeyIndexList.prototype.accountSignature = $util.newBuffer([]); + /** + * ADVSignedKeyIndexList accountSignatureKey. + * @member {Uint8Array} accountSignatureKey + * @memberof proto.ADVSignedKeyIndexList + * @instance + */ + ADVSignedKeyIndexList.prototype.accountSignatureKey = $util.newBuffer([]); + /** * Creates a new ADVSignedKeyIndexList instance using the specified properties. * @function create @@ -1263,6 +1307,8 @@ $root.proto = (function() { writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.details); if (message.accountSignature != null && Object.hasOwnProperty.call(message, "accountSignature")) writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.accountSignature); + if (message.accountSignatureKey != null && Object.hasOwnProperty.call(message, "accountSignatureKey")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.accountSignatureKey); return writer; }; @@ -1303,6 +1349,9 @@ $root.proto = (function() { case 2: message.accountSignature = reader.bytes(); break; + case 3: + message.accountSignatureKey = reader.bytes(); + break; default: reader.skipType(tag & 7); break; @@ -1344,6 +1393,9 @@ $root.proto = (function() { if (message.accountSignature != null && message.hasOwnProperty("accountSignature")) if (!(message.accountSignature && typeof message.accountSignature.length === "number" || $util.isString(message.accountSignature))) return "accountSignature: buffer expected"; + if (message.accountSignatureKey != null && message.hasOwnProperty("accountSignatureKey")) + if (!(message.accountSignatureKey && typeof message.accountSignatureKey.length === "number" || $util.isString(message.accountSignatureKey))) + return "accountSignatureKey: buffer expected"; return null; }; @@ -1369,6 +1421,11 @@ $root.proto = (function() { $util.base64.decode(object.accountSignature, message.accountSignature = $util.newBuffer($util.base64.length(object.accountSignature)), 0); else if (object.accountSignature.length) message.accountSignature = object.accountSignature; + if (object.accountSignatureKey != null) + if (typeof object.accountSignatureKey === "string") + $util.base64.decode(object.accountSignatureKey, message.accountSignatureKey = $util.newBuffer($util.base64.length(object.accountSignatureKey)), 0); + else if (object.accountSignatureKey.length) + message.accountSignatureKey = object.accountSignatureKey; return message; }; @@ -1400,11 +1457,20 @@ $root.proto = (function() { if (options.bytes !== Array) object.accountSignature = $util.newBuffer(object.accountSignature); } + if (options.bytes === String) + object.accountSignatureKey = ""; + else { + object.accountSignatureKey = []; + if (options.bytes !== Array) + object.accountSignatureKey = $util.newBuffer(object.accountSignatureKey); + } } if (message.details != null && message.hasOwnProperty("details")) object.details = options.bytes === String ? $util.base64.encode(message.details, 0, message.details.length) : options.bytes === Array ? Array.prototype.slice.call(message.details) : message.details; if (message.accountSignature != null && message.hasOwnProperty("accountSignature")) object.accountSignature = options.bytes === String ? $util.base64.encode(message.accountSignature, 0, message.accountSignature.length) : options.bytes === Array ? Array.prototype.slice.call(message.accountSignature) : message.accountSignature; + if (message.accountSignatureKey != null && message.hasOwnProperty("accountSignatureKey")) + object.accountSignatureKey = options.bytes === String ? $util.base64.encode(message.accountSignatureKey, 0, message.accountSignatureKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.accountSignatureKey) : message.accountSignatureKey; return object; }; @@ -3142,6 +3208,9 @@ $root.proto = (function() { * @interface IBotAvatarMetadata * @property {number|null} [sentiment] BotAvatarMetadata sentiment * @property {string|null} [behaviorGraph] BotAvatarMetadata behaviorGraph + * @property {number|null} [action] BotAvatarMetadata action + * @property {number|null} [intensity] BotAvatarMetadata intensity + * @property {number|null} [wordCount] BotAvatarMetadata wordCount */ /** @@ -3175,6 +3244,30 @@ $root.proto = (function() { */ BotAvatarMetadata.prototype.behaviorGraph = ""; + /** + * BotAvatarMetadata action. + * @member {number} action + * @memberof proto.BotAvatarMetadata + * @instance + */ + BotAvatarMetadata.prototype.action = 0; + + /** + * BotAvatarMetadata intensity. + * @member {number} intensity + * @memberof proto.BotAvatarMetadata + * @instance + */ + BotAvatarMetadata.prototype.intensity = 0; + + /** + * BotAvatarMetadata wordCount. + * @member {number} wordCount + * @memberof proto.BotAvatarMetadata + * @instance + */ + BotAvatarMetadata.prototype.wordCount = 0; + /** * Creates a new BotAvatarMetadata instance using the specified properties. * @function create @@ -3203,6 +3296,12 @@ $root.proto = (function() { writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.sentiment); if (message.behaviorGraph != null && Object.hasOwnProperty.call(message, "behaviorGraph")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.behaviorGraph); + if (message.action != null && Object.hasOwnProperty.call(message, "action")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.action); + if (message.intensity != null && Object.hasOwnProperty.call(message, "intensity")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.intensity); + if (message.wordCount != null && Object.hasOwnProperty.call(message, "wordCount")) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.wordCount); return writer; }; @@ -3243,6 +3342,15 @@ $root.proto = (function() { case 2: message.behaviorGraph = reader.string(); break; + case 3: + message.action = reader.uint32(); + break; + case 4: + message.intensity = reader.uint32(); + break; + case 5: + message.wordCount = reader.uint32(); + break; default: reader.skipType(tag & 7); break; @@ -3284,6 +3392,15 @@ $root.proto = (function() { if (message.behaviorGraph != null && message.hasOwnProperty("behaviorGraph")) if (!$util.isString(message.behaviorGraph)) return "behaviorGraph: string expected"; + if (message.action != null && message.hasOwnProperty("action")) + if (!$util.isInteger(message.action)) + return "action: integer expected"; + if (message.intensity != null && message.hasOwnProperty("intensity")) + if (!$util.isInteger(message.intensity)) + return "intensity: integer expected"; + if (message.wordCount != null && message.hasOwnProperty("wordCount")) + if (!$util.isInteger(message.wordCount)) + return "wordCount: integer expected"; return null; }; @@ -3303,6 +3420,12 @@ $root.proto = (function() { message.sentiment = object.sentiment >>> 0; if (object.behaviorGraph != null) message.behaviorGraph = String(object.behaviorGraph); + if (object.action != null) + message.action = object.action >>> 0; + if (object.intensity != null) + message.intensity = object.intensity >>> 0; + if (object.wordCount != null) + message.wordCount = object.wordCount >>> 0; return message; }; @@ -3322,11 +3445,20 @@ $root.proto = (function() { if (options.defaults) { object.sentiment = 0; object.behaviorGraph = ""; + object.action = 0; + object.intensity = 0; + object.wordCount = 0; } if (message.sentiment != null && message.hasOwnProperty("sentiment")) object.sentiment = message.sentiment; if (message.behaviorGraph != null && message.hasOwnProperty("behaviorGraph")) object.behaviorGraph = message.behaviorGraph; + if (message.action != null && message.hasOwnProperty("action")) + object.action = message.action; + if (message.intensity != null && message.hasOwnProperty("intensity")) + object.intensity = message.intensity; + if (message.wordCount != null && message.hasOwnProperty("wordCount")) + object.wordCount = message.wordCount; return object; }; @@ -3351,6 +3483,10 @@ $root.proto = (function() { * @memberof proto * @interface IBotMetadata * @property {proto.IBotAvatarMetadata|null} [avatarMetadata] BotMetadata avatarMetadata + * @property {string|null} [personaId] BotMetadata personaId + * @property {proto.IBotPluginMetadata|null} [pluginMetadata] BotMetadata pluginMetadata + * @property {proto.IBotSuggestedPromptMetadata|null} [suggestedPromptMetadata] BotMetadata suggestedPromptMetadata + * @property {string|null} [invokerJid] BotMetadata invokerJid */ /** @@ -3376,6 +3512,38 @@ $root.proto = (function() { */ BotMetadata.prototype.avatarMetadata = null; + /** + * BotMetadata personaId. + * @member {string} personaId + * @memberof proto.BotMetadata + * @instance + */ + BotMetadata.prototype.personaId = ""; + + /** + * BotMetadata pluginMetadata. + * @member {proto.IBotPluginMetadata|null|undefined} pluginMetadata + * @memberof proto.BotMetadata + * @instance + */ + BotMetadata.prototype.pluginMetadata = null; + + /** + * BotMetadata suggestedPromptMetadata. + * @member {proto.IBotSuggestedPromptMetadata|null|undefined} suggestedPromptMetadata + * @memberof proto.BotMetadata + * @instance + */ + BotMetadata.prototype.suggestedPromptMetadata = null; + + /** + * BotMetadata invokerJid. + * @member {string} invokerJid + * @memberof proto.BotMetadata + * @instance + */ + BotMetadata.prototype.invokerJid = ""; + /** * Creates a new BotMetadata instance using the specified properties. * @function create @@ -3402,6 +3570,14 @@ $root.proto = (function() { writer = $Writer.create(); if (message.avatarMetadata != null && Object.hasOwnProperty.call(message, "avatarMetadata")) $root.proto.BotAvatarMetadata.encode(message.avatarMetadata, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.personaId != null && Object.hasOwnProperty.call(message, "personaId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.personaId); + if (message.pluginMetadata != null && Object.hasOwnProperty.call(message, "pluginMetadata")) + $root.proto.BotPluginMetadata.encode(message.pluginMetadata, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.suggestedPromptMetadata != null && Object.hasOwnProperty.call(message, "suggestedPromptMetadata")) + $root.proto.BotSuggestedPromptMetadata.encode(message.suggestedPromptMetadata, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.invokerJid != null && Object.hasOwnProperty.call(message, "invokerJid")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.invokerJid); return writer; }; @@ -3439,6 +3615,18 @@ $root.proto = (function() { case 1: message.avatarMetadata = $root.proto.BotAvatarMetadata.decode(reader, reader.uint32()); break; + case 2: + message.personaId = reader.string(); + break; + case 3: + message.pluginMetadata = $root.proto.BotPluginMetadata.decode(reader, reader.uint32()); + break; + case 4: + message.suggestedPromptMetadata = $root.proto.BotSuggestedPromptMetadata.decode(reader, reader.uint32()); + break; + case 5: + message.invokerJid = reader.string(); + break; default: reader.skipType(tag & 7); break; @@ -3479,6 +3667,22 @@ $root.proto = (function() { if (error) return "avatarMetadata." + error; } + if (message.personaId != null && message.hasOwnProperty("personaId")) + if (!$util.isString(message.personaId)) + return "personaId: string expected"; + if (message.pluginMetadata != null && message.hasOwnProperty("pluginMetadata")) { + var error = $root.proto.BotPluginMetadata.verify(message.pluginMetadata); + if (error) + return "pluginMetadata." + error; + } + if (message.suggestedPromptMetadata != null && message.hasOwnProperty("suggestedPromptMetadata")) { + var error = $root.proto.BotSuggestedPromptMetadata.verify(message.suggestedPromptMetadata); + if (error) + return "suggestedPromptMetadata." + error; + } + if (message.invokerJid != null && message.hasOwnProperty("invokerJid")) + if (!$util.isString(message.invokerJid)) + return "invokerJid: string expected"; return null; }; @@ -3499,6 +3703,20 @@ $root.proto = (function() { throw TypeError(".proto.BotMetadata.avatarMetadata: object expected"); message.avatarMetadata = $root.proto.BotAvatarMetadata.fromObject(object.avatarMetadata); } + if (object.personaId != null) + message.personaId = String(object.personaId); + if (object.pluginMetadata != null) { + if (typeof object.pluginMetadata !== "object") + throw TypeError(".proto.BotMetadata.pluginMetadata: object expected"); + message.pluginMetadata = $root.proto.BotPluginMetadata.fromObject(object.pluginMetadata); + } + if (object.suggestedPromptMetadata != null) { + if (typeof object.suggestedPromptMetadata !== "object") + throw TypeError(".proto.BotMetadata.suggestedPromptMetadata: object expected"); + message.suggestedPromptMetadata = $root.proto.BotSuggestedPromptMetadata.fromObject(object.suggestedPromptMetadata); + } + if (object.invokerJid != null) + message.invokerJid = String(object.invokerJid); return message; }; @@ -3515,10 +3733,23 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.avatarMetadata = null; + object.personaId = ""; + object.pluginMetadata = null; + object.suggestedPromptMetadata = null; + object.invokerJid = ""; + } if (message.avatarMetadata != null && message.hasOwnProperty("avatarMetadata")) object.avatarMetadata = $root.proto.BotAvatarMetadata.toObject(message.avatarMetadata, options); + if (message.personaId != null && message.hasOwnProperty("personaId")) + object.personaId = message.personaId; + if (message.pluginMetadata != null && message.hasOwnProperty("pluginMetadata")) + object.pluginMetadata = $root.proto.BotPluginMetadata.toObject(message.pluginMetadata, options); + if (message.suggestedPromptMetadata != null && message.hasOwnProperty("suggestedPromptMetadata")) + object.suggestedPromptMetadata = $root.proto.BotSuggestedPromptMetadata.toObject(message.suggestedPromptMetadata, options); + if (message.invokerJid != null && message.hasOwnProperty("invokerJid")) + object.invokerJid = message.invokerJid; return object; }; @@ -3536,25 +3767,31 @@ $root.proto = (function() { return BotMetadata; })(); - proto.CertChain = (function() { + proto.BotPluginMetadata = (function() { /** - * Properties of a CertChain. + * Properties of a BotPluginMetadata. * @memberof proto - * @interface ICertChain - * @property {proto.CertChain.INoiseCertificate|null} [leaf] CertChain leaf - * @property {proto.CertChain.INoiseCertificate|null} [intermediate] CertChain intermediate + * @interface IBotPluginMetadata + * @property {proto.BotPluginMetadata.SearchProvider|null} [provider] BotPluginMetadata provider + * @property {proto.BotPluginMetadata.PluginType|null} [pluginType] BotPluginMetadata pluginType + * @property {string|null} [thumbnailCdnUrl] BotPluginMetadata thumbnailCdnUrl + * @property {string|null} [profilePhotoCdnUrl] BotPluginMetadata profilePhotoCdnUrl + * @property {string|null} [searchProviderUrl] BotPluginMetadata searchProviderUrl + * @property {number|null} [referenceIndex] BotPluginMetadata referenceIndex + * @property {number|null} [expectedLinksCount] BotPluginMetadata expectedLinksCount + * @property {number|null} [pluginVersion] BotPluginMetadata pluginVersion */ /** - * Constructs a new CertChain. + * Constructs a new BotPluginMetadata. * @memberof proto - * @classdesc Represents a CertChain. - * @implements ICertChain + * @classdesc Represents a BotPluginMetadata. + * @implements IBotPluginMetadata * @constructor - * @param {proto.ICertChain=} [properties] Properties to set + * @param {proto.IBotPluginMetadata=} [properties] Properties to set */ - function CertChain(properties) { + function BotPluginMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3562,88 +3799,166 @@ $root.proto = (function() { } /** - * CertChain leaf. - * @member {proto.CertChain.INoiseCertificate|null|undefined} leaf - * @memberof proto.CertChain + * BotPluginMetadata provider. + * @member {proto.BotPluginMetadata.SearchProvider} provider + * @memberof proto.BotPluginMetadata * @instance */ - CertChain.prototype.leaf = null; + BotPluginMetadata.prototype.provider = 1; /** - * CertChain intermediate. - * @member {proto.CertChain.INoiseCertificate|null|undefined} intermediate - * @memberof proto.CertChain + * BotPluginMetadata pluginType. + * @member {proto.BotPluginMetadata.PluginType} pluginType + * @memberof proto.BotPluginMetadata * @instance */ - CertChain.prototype.intermediate = null; + BotPluginMetadata.prototype.pluginType = 1; /** - * Creates a new CertChain instance using the specified properties. + * BotPluginMetadata thumbnailCdnUrl. + * @member {string} thumbnailCdnUrl + * @memberof proto.BotPluginMetadata + * @instance + */ + BotPluginMetadata.prototype.thumbnailCdnUrl = ""; + + /** + * BotPluginMetadata profilePhotoCdnUrl. + * @member {string} profilePhotoCdnUrl + * @memberof proto.BotPluginMetadata + * @instance + */ + BotPluginMetadata.prototype.profilePhotoCdnUrl = ""; + + /** + * BotPluginMetadata searchProviderUrl. + * @member {string} searchProviderUrl + * @memberof proto.BotPluginMetadata + * @instance + */ + BotPluginMetadata.prototype.searchProviderUrl = ""; + + /** + * BotPluginMetadata referenceIndex. + * @member {number} referenceIndex + * @memberof proto.BotPluginMetadata + * @instance + */ + BotPluginMetadata.prototype.referenceIndex = 0; + + /** + * BotPluginMetadata expectedLinksCount. + * @member {number} expectedLinksCount + * @memberof proto.BotPluginMetadata + * @instance + */ + BotPluginMetadata.prototype.expectedLinksCount = 0; + + /** + * BotPluginMetadata pluginVersion. + * @member {number} pluginVersion + * @memberof proto.BotPluginMetadata + * @instance + */ + BotPluginMetadata.prototype.pluginVersion = 0; + + /** + * Creates a new BotPluginMetadata instance using the specified properties. * @function create - * @memberof proto.CertChain + * @memberof proto.BotPluginMetadata * @static - * @param {proto.ICertChain=} [properties] Properties to set - * @returns {proto.CertChain} CertChain instance + * @param {proto.IBotPluginMetadata=} [properties] Properties to set + * @returns {proto.BotPluginMetadata} BotPluginMetadata instance */ - CertChain.create = function create(properties) { - return new CertChain(properties); + BotPluginMetadata.create = function create(properties) { + return new BotPluginMetadata(properties); }; /** - * Encodes the specified CertChain message. Does not implicitly {@link proto.CertChain.verify|verify} messages. + * Encodes the specified BotPluginMetadata message. Does not implicitly {@link proto.BotPluginMetadata.verify|verify} messages. * @function encode - * @memberof proto.CertChain + * @memberof proto.BotPluginMetadata * @static - * @param {proto.ICertChain} message CertChain message or plain object to encode + * @param {proto.IBotPluginMetadata} message BotPluginMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CertChain.encode = function encode(message, writer) { + BotPluginMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.leaf != null && Object.hasOwnProperty.call(message, "leaf")) - $root.proto.CertChain.NoiseCertificate.encode(message.leaf, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.intermediate != null && Object.hasOwnProperty.call(message, "intermediate")) - $root.proto.CertChain.NoiseCertificate.encode(message.intermediate, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.provider != null && Object.hasOwnProperty.call(message, "provider")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.provider); + if (message.pluginType != null && Object.hasOwnProperty.call(message, "pluginType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pluginType); + if (message.thumbnailCdnUrl != null && Object.hasOwnProperty.call(message, "thumbnailCdnUrl")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.thumbnailCdnUrl); + if (message.profilePhotoCdnUrl != null && Object.hasOwnProperty.call(message, "profilePhotoCdnUrl")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.profilePhotoCdnUrl); + if (message.searchProviderUrl != null && Object.hasOwnProperty.call(message, "searchProviderUrl")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.searchProviderUrl); + if (message.referenceIndex != null && Object.hasOwnProperty.call(message, "referenceIndex")) + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.referenceIndex); + if (message.expectedLinksCount != null && Object.hasOwnProperty.call(message, "expectedLinksCount")) + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.expectedLinksCount); + if (message.pluginVersion != null && Object.hasOwnProperty.call(message, "pluginVersion")) + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.pluginVersion); return writer; }; /** - * Encodes the specified CertChain message, length delimited. Does not implicitly {@link proto.CertChain.verify|verify} messages. + * Encodes the specified BotPluginMetadata message, length delimited. Does not implicitly {@link proto.BotPluginMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof proto.CertChain + * @memberof proto.BotPluginMetadata * @static - * @param {proto.ICertChain} message CertChain message or plain object to encode + * @param {proto.IBotPluginMetadata} message BotPluginMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CertChain.encodeDelimited = function encodeDelimited(message, writer) { + BotPluginMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CertChain message from the specified reader or buffer. + * Decodes a BotPluginMetadata message from the specified reader or buffer. * @function decode - * @memberof proto.CertChain + * @memberof proto.BotPluginMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {proto.CertChain} CertChain + * @returns {proto.BotPluginMetadata} BotPluginMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CertChain.decode = function decode(reader, length) { + BotPluginMetadata.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.CertChain(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.BotPluginMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.leaf = $root.proto.CertChain.NoiseCertificate.decode(reader, reader.uint32()); + message.provider = reader.int32(); break; case 2: - message.intermediate = $root.proto.CertChain.NoiseCertificate.decode(reader, reader.uint32()); + message.pluginType = reader.int32(); + break; + case 3: + message.thumbnailCdnUrl = reader.string(); + break; + case 4: + message.profilePhotoCdnUrl = reader.string(); + break; + case 5: + message.searchProviderUrl = reader.string(); + break; + case 6: + message.referenceIndex = reader.uint32(); + break; + case 7: + message.expectedLinksCount = reader.uint32(); + break; + case 8: + message.pluginVersion = reader.uint32(); break; default: reader.skipType(tag & 7); @@ -3654,743 +3969,720 @@ $root.proto = (function() { }; /** - * Decodes a CertChain message from the specified reader or buffer, length delimited. + * Decodes a BotPluginMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof proto.CertChain + * @memberof proto.BotPluginMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.CertChain} CertChain + * @returns {proto.BotPluginMetadata} BotPluginMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CertChain.decodeDelimited = function decodeDelimited(reader) { + BotPluginMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CertChain message. + * Verifies a BotPluginMetadata message. * @function verify - * @memberof proto.CertChain + * @memberof proto.BotPluginMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CertChain.verify = function verify(message) { + BotPluginMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.leaf != null && message.hasOwnProperty("leaf")) { - var error = $root.proto.CertChain.NoiseCertificate.verify(message.leaf); - if (error) - return "leaf." + error; - } - if (message.intermediate != null && message.hasOwnProperty("intermediate")) { - var error = $root.proto.CertChain.NoiseCertificate.verify(message.intermediate); - if (error) - return "intermediate." + error; - } + if (message.provider != null && message.hasOwnProperty("provider")) + switch (message.provider) { + default: + return "provider: enum value expected"; + case 1: + case 2: + break; + } + if (message.pluginType != null && message.hasOwnProperty("pluginType")) + switch (message.pluginType) { + default: + return "pluginType: enum value expected"; + case 1: + case 2: + break; + } + if (message.thumbnailCdnUrl != null && message.hasOwnProperty("thumbnailCdnUrl")) + if (!$util.isString(message.thumbnailCdnUrl)) + return "thumbnailCdnUrl: string expected"; + if (message.profilePhotoCdnUrl != null && message.hasOwnProperty("profilePhotoCdnUrl")) + if (!$util.isString(message.profilePhotoCdnUrl)) + return "profilePhotoCdnUrl: string expected"; + if (message.searchProviderUrl != null && message.hasOwnProperty("searchProviderUrl")) + if (!$util.isString(message.searchProviderUrl)) + return "searchProviderUrl: string expected"; + if (message.referenceIndex != null && message.hasOwnProperty("referenceIndex")) + if (!$util.isInteger(message.referenceIndex)) + return "referenceIndex: integer expected"; + if (message.expectedLinksCount != null && message.hasOwnProperty("expectedLinksCount")) + if (!$util.isInteger(message.expectedLinksCount)) + return "expectedLinksCount: integer expected"; + if (message.pluginVersion != null && message.hasOwnProperty("pluginVersion")) + if (!$util.isInteger(message.pluginVersion)) + return "pluginVersion: integer expected"; return null; }; /** - * Creates a CertChain message from a plain object. Also converts values to their respective internal types. + * Creates a BotPluginMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof proto.CertChain + * @memberof proto.BotPluginMetadata * @static * @param {Object.} object Plain object - * @returns {proto.CertChain} CertChain + * @returns {proto.BotPluginMetadata} BotPluginMetadata */ - CertChain.fromObject = function fromObject(object) { - if (object instanceof $root.proto.CertChain) + BotPluginMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.proto.BotPluginMetadata) return object; - var message = new $root.proto.CertChain(); - if (object.leaf != null) { - if (typeof object.leaf !== "object") - throw TypeError(".proto.CertChain.leaf: object expected"); - message.leaf = $root.proto.CertChain.NoiseCertificate.fromObject(object.leaf); - } - if (object.intermediate != null) { - if (typeof object.intermediate !== "object") - throw TypeError(".proto.CertChain.intermediate: object expected"); - message.intermediate = $root.proto.CertChain.NoiseCertificate.fromObject(object.intermediate); + var message = new $root.proto.BotPluginMetadata(); + switch (object.provider) { + case "BING": + case 1: + message.provider = 1; + break; + case "GOOGLE": + case 2: + message.provider = 2; + break; } + switch (object.pluginType) { + case "REELS": + case 1: + message.pluginType = 1; + break; + case "SEARCH": + case 2: + message.pluginType = 2; + break; + } + if (object.thumbnailCdnUrl != null) + message.thumbnailCdnUrl = String(object.thumbnailCdnUrl); + if (object.profilePhotoCdnUrl != null) + message.profilePhotoCdnUrl = String(object.profilePhotoCdnUrl); + if (object.searchProviderUrl != null) + message.searchProviderUrl = String(object.searchProviderUrl); + if (object.referenceIndex != null) + message.referenceIndex = object.referenceIndex >>> 0; + if (object.expectedLinksCount != null) + message.expectedLinksCount = object.expectedLinksCount >>> 0; + if (object.pluginVersion != null) + message.pluginVersion = object.pluginVersion >>> 0; return message; }; /** - * Creates a plain object from a CertChain message. Also converts values to other types if specified. + * Creates a plain object from a BotPluginMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof proto.CertChain + * @memberof proto.BotPluginMetadata * @static - * @param {proto.CertChain} message CertChain + * @param {proto.BotPluginMetadata} message BotPluginMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CertChain.toObject = function toObject(message, options) { + BotPluginMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.leaf = null; - object.intermediate = null; - } - if (message.leaf != null && message.hasOwnProperty("leaf")) - object.leaf = $root.proto.CertChain.NoiseCertificate.toObject(message.leaf, options); - if (message.intermediate != null && message.hasOwnProperty("intermediate")) - object.intermediate = $root.proto.CertChain.NoiseCertificate.toObject(message.intermediate, options); + object.provider = options.enums === String ? "BING" : 1; + object.pluginType = options.enums === String ? "REELS" : 1; + object.thumbnailCdnUrl = ""; + object.profilePhotoCdnUrl = ""; + object.searchProviderUrl = ""; + object.referenceIndex = 0; + object.expectedLinksCount = 0; + object.pluginVersion = 0; + } + if (message.provider != null && message.hasOwnProperty("provider")) + object.provider = options.enums === String ? $root.proto.BotPluginMetadata.SearchProvider[message.provider] : message.provider; + if (message.pluginType != null && message.hasOwnProperty("pluginType")) + object.pluginType = options.enums === String ? $root.proto.BotPluginMetadata.PluginType[message.pluginType] : message.pluginType; + if (message.thumbnailCdnUrl != null && message.hasOwnProperty("thumbnailCdnUrl")) + object.thumbnailCdnUrl = message.thumbnailCdnUrl; + if (message.profilePhotoCdnUrl != null && message.hasOwnProperty("profilePhotoCdnUrl")) + object.profilePhotoCdnUrl = message.profilePhotoCdnUrl; + if (message.searchProviderUrl != null && message.hasOwnProperty("searchProviderUrl")) + object.searchProviderUrl = message.searchProviderUrl; + if (message.referenceIndex != null && message.hasOwnProperty("referenceIndex")) + object.referenceIndex = message.referenceIndex; + if (message.expectedLinksCount != null && message.hasOwnProperty("expectedLinksCount")) + object.expectedLinksCount = message.expectedLinksCount; + if (message.pluginVersion != null && message.hasOwnProperty("pluginVersion")) + object.pluginVersion = message.pluginVersion; return object; }; /** - * Converts this CertChain to JSON. + * Converts this BotPluginMetadata to JSON. * @function toJSON - * @memberof proto.CertChain + * @memberof proto.BotPluginMetadata * @instance * @returns {Object.} JSON object */ - CertChain.prototype.toJSON = function toJSON() { + BotPluginMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - CertChain.NoiseCertificate = (function() { + /** + * PluginType enum. + * @name proto.BotPluginMetadata.PluginType + * @enum {number} + * @property {number} REELS=1 REELS value + * @property {number} SEARCH=2 SEARCH value + */ + BotPluginMetadata.PluginType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "REELS"] = 1; + values[valuesById[2] = "SEARCH"] = 2; + return values; + })(); - /** - * Properties of a NoiseCertificate. - * @memberof proto.CertChain - * @interface INoiseCertificate - * @property {Uint8Array|null} [details] NoiseCertificate details - * @property {Uint8Array|null} [signature] NoiseCertificate signature - */ + /** + * SearchProvider enum. + * @name proto.BotPluginMetadata.SearchProvider + * @enum {number} + * @property {number} BING=1 BING value + * @property {number} GOOGLE=2 GOOGLE value + */ + BotPluginMetadata.SearchProvider = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "BING"] = 1; + values[valuesById[2] = "GOOGLE"] = 2; + return values; + })(); - /** - * Constructs a new NoiseCertificate. - * @memberof proto.CertChain - * @classdesc Represents a NoiseCertificate. - * @implements INoiseCertificate - * @constructor - * @param {proto.CertChain.INoiseCertificate=} [properties] Properties to set - */ - function NoiseCertificate(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + return BotPluginMetadata; + })(); - /** - * NoiseCertificate details. - * @member {Uint8Array} details - * @memberof proto.CertChain.NoiseCertificate - * @instance - */ - NoiseCertificate.prototype.details = $util.newBuffer([]); + proto.BotSuggestedPromptMetadata = (function() { - /** - * NoiseCertificate signature. - * @member {Uint8Array} signature - * @memberof proto.CertChain.NoiseCertificate - * @instance - */ - NoiseCertificate.prototype.signature = $util.newBuffer([]); + /** + * Properties of a BotSuggestedPromptMetadata. + * @memberof proto + * @interface IBotSuggestedPromptMetadata + * @property {Array.|null} [suggestedPrompts] BotSuggestedPromptMetadata suggestedPrompts + * @property {number|null} [selectedPromptIndex] BotSuggestedPromptMetadata selectedPromptIndex + */ - /** - * Creates a new NoiseCertificate instance using the specified properties. - * @function create - * @memberof proto.CertChain.NoiseCertificate - * @static - * @param {proto.CertChain.INoiseCertificate=} [properties] Properties to set - * @returns {proto.CertChain.NoiseCertificate} NoiseCertificate instance - */ - NoiseCertificate.create = function create(properties) { - return new NoiseCertificate(properties); - }; + /** + * Constructs a new BotSuggestedPromptMetadata. + * @memberof proto + * @classdesc Represents a BotSuggestedPromptMetadata. + * @implements IBotSuggestedPromptMetadata + * @constructor + * @param {proto.IBotSuggestedPromptMetadata=} [properties] Properties to set + */ + function BotSuggestedPromptMetadata(properties) { + this.suggestedPrompts = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Encodes the specified NoiseCertificate message. Does not implicitly {@link proto.CertChain.NoiseCertificate.verify|verify} messages. - * @function encode - * @memberof proto.CertChain.NoiseCertificate - * @static - * @param {proto.CertChain.INoiseCertificate} message NoiseCertificate message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NoiseCertificate.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.details != null && Object.hasOwnProperty.call(message, "details")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.details); - if (message.signature != null && Object.hasOwnProperty.call(message, "signature")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.signature); - return writer; - }; + /** + * BotSuggestedPromptMetadata suggestedPrompts. + * @member {Array.} suggestedPrompts + * @memberof proto.BotSuggestedPromptMetadata + * @instance + */ + BotSuggestedPromptMetadata.prototype.suggestedPrompts = $util.emptyArray; - /** - * Encodes the specified NoiseCertificate message, length delimited. Does not implicitly {@link proto.CertChain.NoiseCertificate.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.CertChain.NoiseCertificate - * @static - * @param {proto.CertChain.INoiseCertificate} message NoiseCertificate message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NoiseCertificate.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * BotSuggestedPromptMetadata selectedPromptIndex. + * @member {number} selectedPromptIndex + * @memberof proto.BotSuggestedPromptMetadata + * @instance + */ + BotSuggestedPromptMetadata.prototype.selectedPromptIndex = 0; - /** - * Decodes a NoiseCertificate message from the specified reader or buffer. - * @function decode - * @memberof proto.CertChain.NoiseCertificate - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.CertChain.NoiseCertificate} NoiseCertificate - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NoiseCertificate.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.CertChain.NoiseCertificate(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.details = reader.bytes(); - break; - case 2: - message.signature = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Creates a new BotSuggestedPromptMetadata instance using the specified properties. + * @function create + * @memberof proto.BotSuggestedPromptMetadata + * @static + * @param {proto.IBotSuggestedPromptMetadata=} [properties] Properties to set + * @returns {proto.BotSuggestedPromptMetadata} BotSuggestedPromptMetadata instance + */ + BotSuggestedPromptMetadata.create = function create(properties) { + return new BotSuggestedPromptMetadata(properties); + }; - /** - * Decodes a NoiseCertificate message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.CertChain.NoiseCertificate - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.CertChain.NoiseCertificate} NoiseCertificate - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NoiseCertificate.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encodes the specified BotSuggestedPromptMetadata message. Does not implicitly {@link proto.BotSuggestedPromptMetadata.verify|verify} messages. + * @function encode + * @memberof proto.BotSuggestedPromptMetadata + * @static + * @param {proto.IBotSuggestedPromptMetadata} message BotSuggestedPromptMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BotSuggestedPromptMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.suggestedPrompts != null && message.suggestedPrompts.length) + for (var i = 0; i < message.suggestedPrompts.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.suggestedPrompts[i]); + if (message.selectedPromptIndex != null && Object.hasOwnProperty.call(message, "selectedPromptIndex")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.selectedPromptIndex); + return writer; + }; - /** - * Verifies a NoiseCertificate message. - * @function verify - * @memberof proto.CertChain.NoiseCertificate - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NoiseCertificate.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.details != null && message.hasOwnProperty("details")) - if (!(message.details && typeof message.details.length === "number" || $util.isString(message.details))) - return "details: buffer expected"; - if (message.signature != null && message.hasOwnProperty("signature")) - if (!(message.signature && typeof message.signature.length === "number" || $util.isString(message.signature))) - return "signature: buffer expected"; - return null; - }; + /** + * Encodes the specified BotSuggestedPromptMetadata message, length delimited. Does not implicitly {@link proto.BotSuggestedPromptMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.BotSuggestedPromptMetadata + * @static + * @param {proto.IBotSuggestedPromptMetadata} message BotSuggestedPromptMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BotSuggestedPromptMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a NoiseCertificate message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.CertChain.NoiseCertificate - * @static - * @param {Object.} object Plain object - * @returns {proto.CertChain.NoiseCertificate} NoiseCertificate - */ - NoiseCertificate.fromObject = function fromObject(object) { - if (object instanceof $root.proto.CertChain.NoiseCertificate) - return object; - var message = new $root.proto.CertChain.NoiseCertificate(); - if (object.details != null) - if (typeof object.details === "string") - $util.base64.decode(object.details, message.details = $util.newBuffer($util.base64.length(object.details)), 0); - else if (object.details.length) - message.details = object.details; - if (object.signature != null) - if (typeof object.signature === "string") - $util.base64.decode(object.signature, message.signature = $util.newBuffer($util.base64.length(object.signature)), 0); - else if (object.signature.length) - message.signature = object.signature; - return message; - }; + /** + * Decodes a BotSuggestedPromptMetadata message from the specified reader or buffer. + * @function decode + * @memberof proto.BotSuggestedPromptMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.BotSuggestedPromptMetadata} BotSuggestedPromptMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BotSuggestedPromptMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.BotSuggestedPromptMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.suggestedPrompts && message.suggestedPrompts.length)) + message.suggestedPrompts = []; + message.suggestedPrompts.push(reader.string()); + break; + case 2: + message.selectedPromptIndex = reader.uint32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Creates a plain object from a NoiseCertificate message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.CertChain.NoiseCertificate - * @static - * @param {proto.CertChain.NoiseCertificate} message NoiseCertificate - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NoiseCertificate.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.details = ""; - else { - object.details = []; - if (options.bytes !== Array) - object.details = $util.newBuffer(object.details); - } - if (options.bytes === String) - object.signature = ""; - else { - object.signature = []; - if (options.bytes !== Array) - object.signature = $util.newBuffer(object.signature); - } - } - if (message.details != null && message.hasOwnProperty("details")) - object.details = options.bytes === String ? $util.base64.encode(message.details, 0, message.details.length) : options.bytes === Array ? Array.prototype.slice.call(message.details) : message.details; - if (message.signature != null && message.hasOwnProperty("signature")) - object.signature = options.bytes === String ? $util.base64.encode(message.signature, 0, message.signature.length) : options.bytes === Array ? Array.prototype.slice.call(message.signature) : message.signature; - return object; - }; - - /** - * Converts this NoiseCertificate to JSON. - * @function toJSON - * @memberof proto.CertChain.NoiseCertificate - * @instance - * @returns {Object.} JSON object - */ - NoiseCertificate.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - NoiseCertificate.Details = (function() { - - /** - * Properties of a Details. - * @memberof proto.CertChain.NoiseCertificate - * @interface IDetails - * @property {number|null} [serial] Details serial - * @property {number|null} [issuerSerial] Details issuerSerial - * @property {Uint8Array|null} [key] Details key - * @property {number|Long|null} [notBefore] Details notBefore - * @property {number|Long|null} [notAfter] Details notAfter - */ + /** + * Decodes a BotSuggestedPromptMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.BotSuggestedPromptMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.BotSuggestedPromptMetadata} BotSuggestedPromptMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BotSuggestedPromptMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Constructs a new Details. - * @memberof proto.CertChain.NoiseCertificate - * @classdesc Represents a Details. - * @implements IDetails - * @constructor - * @param {proto.CertChain.NoiseCertificate.IDetails=} [properties] Properties to set - */ - function Details(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Verifies a BotSuggestedPromptMetadata message. + * @function verify + * @memberof proto.BotSuggestedPromptMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BotSuggestedPromptMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.suggestedPrompts != null && message.hasOwnProperty("suggestedPrompts")) { + if (!Array.isArray(message.suggestedPrompts)) + return "suggestedPrompts: array expected"; + for (var i = 0; i < message.suggestedPrompts.length; ++i) + if (!$util.isString(message.suggestedPrompts[i])) + return "suggestedPrompts: string[] expected"; + } + if (message.selectedPromptIndex != null && message.hasOwnProperty("selectedPromptIndex")) + if (!$util.isInteger(message.selectedPromptIndex)) + return "selectedPromptIndex: integer expected"; + return null; + }; - /** - * Details serial. - * @member {number} serial - * @memberof proto.CertChain.NoiseCertificate.Details - * @instance - */ - Details.prototype.serial = 0; + /** + * Creates a BotSuggestedPromptMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.BotSuggestedPromptMetadata + * @static + * @param {Object.} object Plain object + * @returns {proto.BotSuggestedPromptMetadata} BotSuggestedPromptMetadata + */ + BotSuggestedPromptMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.proto.BotSuggestedPromptMetadata) + return object; + var message = new $root.proto.BotSuggestedPromptMetadata(); + if (object.suggestedPrompts) { + if (!Array.isArray(object.suggestedPrompts)) + throw TypeError(".proto.BotSuggestedPromptMetadata.suggestedPrompts: array expected"); + message.suggestedPrompts = []; + for (var i = 0; i < object.suggestedPrompts.length; ++i) + message.suggestedPrompts[i] = String(object.suggestedPrompts[i]); + } + if (object.selectedPromptIndex != null) + message.selectedPromptIndex = object.selectedPromptIndex >>> 0; + return message; + }; - /** - * Details issuerSerial. - * @member {number} issuerSerial - * @memberof proto.CertChain.NoiseCertificate.Details - * @instance - */ - Details.prototype.issuerSerial = 0; + /** + * Creates a plain object from a BotSuggestedPromptMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.BotSuggestedPromptMetadata + * @static + * @param {proto.BotSuggestedPromptMetadata} message BotSuggestedPromptMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BotSuggestedPromptMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.suggestedPrompts = []; + if (options.defaults) + object.selectedPromptIndex = 0; + if (message.suggestedPrompts && message.suggestedPrompts.length) { + object.suggestedPrompts = []; + for (var j = 0; j < message.suggestedPrompts.length; ++j) + object.suggestedPrompts[j] = message.suggestedPrompts[j]; + } + if (message.selectedPromptIndex != null && message.hasOwnProperty("selectedPromptIndex")) + object.selectedPromptIndex = message.selectedPromptIndex; + return object; + }; - /** - * Details key. - * @member {Uint8Array} key - * @memberof proto.CertChain.NoiseCertificate.Details - * @instance - */ - Details.prototype.key = $util.newBuffer([]); + /** + * Converts this BotSuggestedPromptMetadata to JSON. + * @function toJSON + * @memberof proto.BotSuggestedPromptMetadata + * @instance + * @returns {Object.} JSON object + */ + BotSuggestedPromptMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Details notBefore. - * @member {number|Long} notBefore - * @memberof proto.CertChain.NoiseCertificate.Details - * @instance - */ - Details.prototype.notBefore = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + return BotSuggestedPromptMetadata; + })(); - /** - * Details notAfter. - * @member {number|Long} notAfter - * @memberof proto.CertChain.NoiseCertificate.Details - * @instance - */ - Details.prototype.notAfter = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + proto.CallLogRecord = (function() { - /** - * Creates a new Details instance using the specified properties. - * @function create - * @memberof proto.CertChain.NoiseCertificate.Details - * @static - * @param {proto.CertChain.NoiseCertificate.IDetails=} [properties] Properties to set - * @returns {proto.CertChain.NoiseCertificate.Details} Details instance - */ - Details.create = function create(properties) { - return new Details(properties); - }; + /** + * Properties of a CallLogRecord. + * @memberof proto + * @interface ICallLogRecord + * @property {proto.CallLogRecord.CallResult|null} [callResult] CallLogRecord callResult + * @property {boolean|null} [isDndMode] CallLogRecord isDndMode + * @property {proto.CallLogRecord.SilenceReason|null} [silenceReason] CallLogRecord silenceReason + * @property {number|Long|null} [duration] CallLogRecord duration + * @property {number|Long|null} [startTime] CallLogRecord startTime + * @property {boolean|null} [isIncoming] CallLogRecord isIncoming + * @property {boolean|null} [isVideo] CallLogRecord isVideo + * @property {boolean|null} [isCallLink] CallLogRecord isCallLink + * @property {string|null} [callLinkToken] CallLogRecord callLinkToken + * @property {string|null} [scheduledCallId] CallLogRecord scheduledCallId + * @property {string|null} [callId] CallLogRecord callId + * @property {string|null} [callCreatorJid] CallLogRecord callCreatorJid + * @property {string|null} [groupJid] CallLogRecord groupJid + * @property {Array.|null} [participants] CallLogRecord participants + * @property {proto.CallLogRecord.CallType|null} [callType] CallLogRecord callType + */ + + /** + * Constructs a new CallLogRecord. + * @memberof proto + * @classdesc Represents a CallLogRecord. + * @implements ICallLogRecord + * @constructor + * @param {proto.ICallLogRecord=} [properties] Properties to set + */ + function CallLogRecord(properties) { + this.participants = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Encodes the specified Details message. Does not implicitly {@link proto.CertChain.NoiseCertificate.Details.verify|verify} messages. - * @function encode - * @memberof proto.CertChain.NoiseCertificate.Details - * @static - * @param {proto.CertChain.NoiseCertificate.IDetails} message Details message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Details.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.serial != null && Object.hasOwnProperty.call(message, "serial")) - writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.serial); - if (message.issuerSerial != null && Object.hasOwnProperty.call(message, "issuerSerial")) - writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.issuerSerial); - if (message.key != null && Object.hasOwnProperty.call(message, "key")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.key); - if (message.notBefore != null && Object.hasOwnProperty.call(message, "notBefore")) - writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.notBefore); - if (message.notAfter != null && Object.hasOwnProperty.call(message, "notAfter")) - writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.notAfter); - return writer; - }; + /** + * CallLogRecord callResult. + * @member {proto.CallLogRecord.CallResult} callResult + * @memberof proto.CallLogRecord + * @instance + */ + CallLogRecord.prototype.callResult = 0; - /** - * Encodes the specified Details message, length delimited. Does not implicitly {@link proto.CertChain.NoiseCertificate.Details.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.CertChain.NoiseCertificate.Details - * @static - * @param {proto.CertChain.NoiseCertificate.IDetails} message Details message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Details.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * CallLogRecord isDndMode. + * @member {boolean} isDndMode + * @memberof proto.CallLogRecord + * @instance + */ + CallLogRecord.prototype.isDndMode = false; - /** - * Decodes a Details message from the specified reader or buffer. - * @function decode - * @memberof proto.CertChain.NoiseCertificate.Details - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.CertChain.NoiseCertificate.Details} Details - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Details.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.CertChain.NoiseCertificate.Details(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.serial = reader.uint32(); - break; - case 2: - message.issuerSerial = reader.uint32(); - break; - case 3: - message.key = reader.bytes(); - break; - case 4: - message.notBefore = reader.uint64(); - break; - case 5: - message.notAfter = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * CallLogRecord silenceReason. + * @member {proto.CallLogRecord.SilenceReason} silenceReason + * @memberof proto.CallLogRecord + * @instance + */ + CallLogRecord.prototype.silenceReason = 0; - /** - * Decodes a Details message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.CertChain.NoiseCertificate.Details - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.CertChain.NoiseCertificate.Details} Details - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Details.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * CallLogRecord duration. + * @member {number|Long} duration + * @memberof proto.CallLogRecord + * @instance + */ + CallLogRecord.prototype.duration = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * Verifies a Details message. - * @function verify - * @memberof proto.CertChain.NoiseCertificate.Details - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Details.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.serial != null && message.hasOwnProperty("serial")) - if (!$util.isInteger(message.serial)) - return "serial: integer expected"; - if (message.issuerSerial != null && message.hasOwnProperty("issuerSerial")) - if (!$util.isInteger(message.issuerSerial)) - return "issuerSerial: integer expected"; - if (message.key != null && message.hasOwnProperty("key")) - if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) - return "key: buffer expected"; - if (message.notBefore != null && message.hasOwnProperty("notBefore")) - if (!$util.isInteger(message.notBefore) && !(message.notBefore && $util.isInteger(message.notBefore.low) && $util.isInteger(message.notBefore.high))) - return "notBefore: integer|Long expected"; - if (message.notAfter != null && message.hasOwnProperty("notAfter")) - if (!$util.isInteger(message.notAfter) && !(message.notAfter && $util.isInteger(message.notAfter.low) && $util.isInteger(message.notAfter.high))) - return "notAfter: integer|Long expected"; - return null; - }; + /** + * CallLogRecord startTime. + * @member {number|Long} startTime + * @memberof proto.CallLogRecord + * @instance + */ + CallLogRecord.prototype.startTime = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * Creates a Details message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.CertChain.NoiseCertificate.Details - * @static - * @param {Object.} object Plain object - * @returns {proto.CertChain.NoiseCertificate.Details} Details - */ - Details.fromObject = function fromObject(object) { - if (object instanceof $root.proto.CertChain.NoiseCertificate.Details) - return object; - var message = new $root.proto.CertChain.NoiseCertificate.Details(); - if (object.serial != null) - message.serial = object.serial >>> 0; - if (object.issuerSerial != null) - message.issuerSerial = object.issuerSerial >>> 0; - if (object.key != null) - if (typeof object.key === "string") - $util.base64.decode(object.key, message.key = $util.newBuffer($util.base64.length(object.key)), 0); - else if (object.key.length) - message.key = object.key; - if (object.notBefore != null) - if ($util.Long) - (message.notBefore = $util.Long.fromValue(object.notBefore)).unsigned = true; - else if (typeof object.notBefore === "string") - message.notBefore = parseInt(object.notBefore, 10); - else if (typeof object.notBefore === "number") - message.notBefore = object.notBefore; - else if (typeof object.notBefore === "object") - message.notBefore = new $util.LongBits(object.notBefore.low >>> 0, object.notBefore.high >>> 0).toNumber(true); - if (object.notAfter != null) - if ($util.Long) - (message.notAfter = $util.Long.fromValue(object.notAfter)).unsigned = true; - else if (typeof object.notAfter === "string") - message.notAfter = parseInt(object.notAfter, 10); - else if (typeof object.notAfter === "number") - message.notAfter = object.notAfter; - else if (typeof object.notAfter === "object") - message.notAfter = new $util.LongBits(object.notAfter.low >>> 0, object.notAfter.high >>> 0).toNumber(true); - return message; - }; + /** + * CallLogRecord isIncoming. + * @member {boolean} isIncoming + * @memberof proto.CallLogRecord + * @instance + */ + CallLogRecord.prototype.isIncoming = false; - /** - * Creates a plain object from a Details message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.CertChain.NoiseCertificate.Details - * @static - * @param {proto.CertChain.NoiseCertificate.Details} message Details - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Details.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.serial = 0; - object.issuerSerial = 0; - if (options.bytes === String) - object.key = ""; - else { - object.key = []; - if (options.bytes !== Array) - object.key = $util.newBuffer(object.key); - } - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.notBefore = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.notBefore = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.notAfter = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.notAfter = options.longs === String ? "0" : 0; - } - if (message.serial != null && message.hasOwnProperty("serial")) - object.serial = message.serial; - if (message.issuerSerial != null && message.hasOwnProperty("issuerSerial")) - object.issuerSerial = message.issuerSerial; - if (message.key != null && message.hasOwnProperty("key")) - object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; - if (message.notBefore != null && message.hasOwnProperty("notBefore")) - if (typeof message.notBefore === "number") - object.notBefore = options.longs === String ? String(message.notBefore) : message.notBefore; - else - object.notBefore = options.longs === String ? $util.Long.prototype.toString.call(message.notBefore) : options.longs === Number ? new $util.LongBits(message.notBefore.low >>> 0, message.notBefore.high >>> 0).toNumber(true) : message.notBefore; - if (message.notAfter != null && message.hasOwnProperty("notAfter")) - if (typeof message.notAfter === "number") - object.notAfter = options.longs === String ? String(message.notAfter) : message.notAfter; - else - object.notAfter = options.longs === String ? $util.Long.prototype.toString.call(message.notAfter) : options.longs === Number ? new $util.LongBits(message.notAfter.low >>> 0, message.notAfter.high >>> 0).toNumber(true) : message.notAfter; - return object; - }; + /** + * CallLogRecord isVideo. + * @member {boolean} isVideo + * @memberof proto.CallLogRecord + * @instance + */ + CallLogRecord.prototype.isVideo = false; - /** - * Converts this Details to JSON. - * @function toJSON - * @memberof proto.CertChain.NoiseCertificate.Details - * @instance - * @returns {Object.} JSON object - */ - Details.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * CallLogRecord isCallLink. + * @member {boolean} isCallLink + * @memberof proto.CallLogRecord + * @instance + */ + CallLogRecord.prototype.isCallLink = false; - return Details; - })(); + /** + * CallLogRecord callLinkToken. + * @member {string} callLinkToken + * @memberof proto.CallLogRecord + * @instance + */ + CallLogRecord.prototype.callLinkToken = ""; - return NoiseCertificate; - })(); + /** + * CallLogRecord scheduledCallId. + * @member {string} scheduledCallId + * @memberof proto.CallLogRecord + * @instance + */ + CallLogRecord.prototype.scheduledCallId = ""; - return CertChain; - })(); + /** + * CallLogRecord callId. + * @member {string} callId + * @memberof proto.CallLogRecord + * @instance + */ + CallLogRecord.prototype.callId = ""; - proto.ChatRowOpaqueData = (function() { + /** + * CallLogRecord callCreatorJid. + * @member {string} callCreatorJid + * @memberof proto.CallLogRecord + * @instance + */ + CallLogRecord.prototype.callCreatorJid = ""; /** - * Properties of a ChatRowOpaqueData. - * @memberof proto - * @interface IChatRowOpaqueData - * @property {proto.ChatRowOpaqueData.IDraftMessage|null} [draftMessage] ChatRowOpaqueData draftMessage + * CallLogRecord groupJid. + * @member {string} groupJid + * @memberof proto.CallLogRecord + * @instance */ + CallLogRecord.prototype.groupJid = ""; /** - * Constructs a new ChatRowOpaqueData. - * @memberof proto - * @classdesc Represents a ChatRowOpaqueData. - * @implements IChatRowOpaqueData - * @constructor - * @param {proto.IChatRowOpaqueData=} [properties] Properties to set + * CallLogRecord participants. + * @member {Array.} participants + * @memberof proto.CallLogRecord + * @instance */ - function ChatRowOpaqueData(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + CallLogRecord.prototype.participants = $util.emptyArray; /** - * ChatRowOpaqueData draftMessage. - * @member {proto.ChatRowOpaqueData.IDraftMessage|null|undefined} draftMessage - * @memberof proto.ChatRowOpaqueData + * CallLogRecord callType. + * @member {proto.CallLogRecord.CallType} callType + * @memberof proto.CallLogRecord * @instance */ - ChatRowOpaqueData.prototype.draftMessage = null; + CallLogRecord.prototype.callType = 0; /** - * Creates a new ChatRowOpaqueData instance using the specified properties. + * Creates a new CallLogRecord instance using the specified properties. * @function create - * @memberof proto.ChatRowOpaqueData + * @memberof proto.CallLogRecord * @static - * @param {proto.IChatRowOpaqueData=} [properties] Properties to set - * @returns {proto.ChatRowOpaqueData} ChatRowOpaqueData instance + * @param {proto.ICallLogRecord=} [properties] Properties to set + * @returns {proto.CallLogRecord} CallLogRecord instance */ - ChatRowOpaqueData.create = function create(properties) { - return new ChatRowOpaqueData(properties); + CallLogRecord.create = function create(properties) { + return new CallLogRecord(properties); }; /** - * Encodes the specified ChatRowOpaqueData message. Does not implicitly {@link proto.ChatRowOpaqueData.verify|verify} messages. + * Encodes the specified CallLogRecord message. Does not implicitly {@link proto.CallLogRecord.verify|verify} messages. * @function encode - * @memberof proto.ChatRowOpaqueData + * @memberof proto.CallLogRecord * @static - * @param {proto.IChatRowOpaqueData} message ChatRowOpaqueData message or plain object to encode + * @param {proto.ICallLogRecord} message CallLogRecord message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ChatRowOpaqueData.encode = function encode(message, writer) { + CallLogRecord.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.draftMessage != null && Object.hasOwnProperty.call(message, "draftMessage")) - $root.proto.ChatRowOpaqueData.DraftMessage.encode(message.draftMessage, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.callResult != null && Object.hasOwnProperty.call(message, "callResult")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.callResult); + if (message.isDndMode != null && Object.hasOwnProperty.call(message, "isDndMode")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isDndMode); + if (message.silenceReason != null && Object.hasOwnProperty.call(message, "silenceReason")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.silenceReason); + if (message.duration != null && Object.hasOwnProperty.call(message, "duration")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.duration); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.startTime); + if (message.isIncoming != null && Object.hasOwnProperty.call(message, "isIncoming")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.isIncoming); + if (message.isVideo != null && Object.hasOwnProperty.call(message, "isVideo")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.isVideo); + if (message.isCallLink != null && Object.hasOwnProperty.call(message, "isCallLink")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.isCallLink); + if (message.callLinkToken != null && Object.hasOwnProperty.call(message, "callLinkToken")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.callLinkToken); + if (message.scheduledCallId != null && Object.hasOwnProperty.call(message, "scheduledCallId")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.scheduledCallId); + if (message.callId != null && Object.hasOwnProperty.call(message, "callId")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.callId); + if (message.callCreatorJid != null && Object.hasOwnProperty.call(message, "callCreatorJid")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.callCreatorJid); + if (message.groupJid != null && Object.hasOwnProperty.call(message, "groupJid")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.groupJid); + if (message.participants != null && message.participants.length) + for (var i = 0; i < message.participants.length; ++i) + $root.proto.CallLogRecord.ParticipantInfo.encode(message.participants[i], writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.callType != null && Object.hasOwnProperty.call(message, "callType")) + writer.uint32(/* id 15, wireType 0 =*/120).int32(message.callType); return writer; }; /** - * Encodes the specified ChatRowOpaqueData message, length delimited. Does not implicitly {@link proto.ChatRowOpaqueData.verify|verify} messages. + * Encodes the specified CallLogRecord message, length delimited. Does not implicitly {@link proto.CallLogRecord.verify|verify} messages. * @function encodeDelimited - * @memberof proto.ChatRowOpaqueData + * @memberof proto.CallLogRecord * @static - * @param {proto.IChatRowOpaqueData} message ChatRowOpaqueData message or plain object to encode + * @param {proto.ICallLogRecord} message CallLogRecord message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ChatRowOpaqueData.encodeDelimited = function encodeDelimited(message, writer) { + CallLogRecord.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ChatRowOpaqueData message from the specified reader or buffer. + * Decodes a CallLogRecord message from the specified reader or buffer. * @function decode - * @memberof proto.ChatRowOpaqueData + * @memberof proto.CallLogRecord * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {proto.ChatRowOpaqueData} ChatRowOpaqueData + * @returns {proto.CallLogRecord} CallLogRecord * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ChatRowOpaqueData.decode = function decode(reader, length) { + CallLogRecord.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.ChatRowOpaqueData(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.CallLogRecord(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.draftMessage = $root.proto.ChatRowOpaqueData.DraftMessage.decode(reader, reader.uint32()); + message.callResult = reader.int32(); + break; + case 2: + message.isDndMode = reader.bool(); + break; + case 3: + message.silenceReason = reader.int32(); + break; + case 4: + message.duration = reader.int64(); + break; + case 5: + message.startTime = reader.int64(); + break; + case 6: + message.isIncoming = reader.bool(); + break; + case 7: + message.isVideo = reader.bool(); + break; + case 8: + message.isCallLink = reader.bool(); + break; + case 9: + message.callLinkToken = reader.string(); + break; + case 10: + message.scheduledCallId = reader.string(); + break; + case 11: + message.callId = reader.string(); + break; + case 12: + message.callCreatorJid = reader.string(); + break; + case 13: + message.groupJid = reader.string(); + break; + case 14: + if (!(message.participants && message.participants.length)) + message.participants = []; + message.participants.push($root.proto.CallLogRecord.ParticipantInfo.decode(reader, reader.uint32())); + break; + case 15: + message.callType = reader.int32(); break; default: reader.skipType(tag & 7); @@ -4401,113 +4693,411 @@ $root.proto = (function() { }; /** - * Decodes a ChatRowOpaqueData message from the specified reader or buffer, length delimited. + * Decodes a CallLogRecord message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof proto.ChatRowOpaqueData + * @memberof proto.CallLogRecord * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.ChatRowOpaqueData} ChatRowOpaqueData + * @returns {proto.CallLogRecord} CallLogRecord * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ChatRowOpaqueData.decodeDelimited = function decodeDelimited(reader) { + CallLogRecord.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ChatRowOpaqueData message. + * Verifies a CallLogRecord message. * @function verify - * @memberof proto.ChatRowOpaqueData + * @memberof proto.CallLogRecord * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ChatRowOpaqueData.verify = function verify(message) { + CallLogRecord.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.draftMessage != null && message.hasOwnProperty("draftMessage")) { - var error = $root.proto.ChatRowOpaqueData.DraftMessage.verify(message.draftMessage); - if (error) - return "draftMessage." + error; + if (message.callResult != null && message.hasOwnProperty("callResult")) + switch (message.callResult) { + default: + return "callResult: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + break; + } + if (message.isDndMode != null && message.hasOwnProperty("isDndMode")) + if (typeof message.isDndMode !== "boolean") + return "isDndMode: boolean expected"; + if (message.silenceReason != null && message.hasOwnProperty("silenceReason")) + switch (message.silenceReason) { + default: + return "silenceReason: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.duration != null && message.hasOwnProperty("duration")) + if (!$util.isInteger(message.duration) && !(message.duration && $util.isInteger(message.duration.low) && $util.isInteger(message.duration.high))) + return "duration: integer|Long expected"; + if (message.startTime != null && message.hasOwnProperty("startTime")) + if (!$util.isInteger(message.startTime) && !(message.startTime && $util.isInteger(message.startTime.low) && $util.isInteger(message.startTime.high))) + return "startTime: integer|Long expected"; + if (message.isIncoming != null && message.hasOwnProperty("isIncoming")) + if (typeof message.isIncoming !== "boolean") + return "isIncoming: boolean expected"; + if (message.isVideo != null && message.hasOwnProperty("isVideo")) + if (typeof message.isVideo !== "boolean") + return "isVideo: boolean expected"; + if (message.isCallLink != null && message.hasOwnProperty("isCallLink")) + if (typeof message.isCallLink !== "boolean") + return "isCallLink: boolean expected"; + if (message.callLinkToken != null && message.hasOwnProperty("callLinkToken")) + if (!$util.isString(message.callLinkToken)) + return "callLinkToken: string expected"; + if (message.scheduledCallId != null && message.hasOwnProperty("scheduledCallId")) + if (!$util.isString(message.scheduledCallId)) + return "scheduledCallId: string expected"; + if (message.callId != null && message.hasOwnProperty("callId")) + if (!$util.isString(message.callId)) + return "callId: string expected"; + if (message.callCreatorJid != null && message.hasOwnProperty("callCreatorJid")) + if (!$util.isString(message.callCreatorJid)) + return "callCreatorJid: string expected"; + if (message.groupJid != null && message.hasOwnProperty("groupJid")) + if (!$util.isString(message.groupJid)) + return "groupJid: string expected"; + if (message.participants != null && message.hasOwnProperty("participants")) { + if (!Array.isArray(message.participants)) + return "participants: array expected"; + for (var i = 0; i < message.participants.length; ++i) { + var error = $root.proto.CallLogRecord.ParticipantInfo.verify(message.participants[i]); + if (error) + return "participants." + error; + } } + if (message.callType != null && message.hasOwnProperty("callType")) + switch (message.callType) { + default: + return "callType: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; /** - * Creates a ChatRowOpaqueData message from a plain object. Also converts values to their respective internal types. + * Creates a CallLogRecord message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof proto.ChatRowOpaqueData + * @memberof proto.CallLogRecord * @static * @param {Object.} object Plain object - * @returns {proto.ChatRowOpaqueData} ChatRowOpaqueData + * @returns {proto.CallLogRecord} CallLogRecord */ - ChatRowOpaqueData.fromObject = function fromObject(object) { - if (object instanceof $root.proto.ChatRowOpaqueData) + CallLogRecord.fromObject = function fromObject(object) { + if (object instanceof $root.proto.CallLogRecord) return object; - var message = new $root.proto.ChatRowOpaqueData(); - if (object.draftMessage != null) { - if (typeof object.draftMessage !== "object") - throw TypeError(".proto.ChatRowOpaqueData.draftMessage: object expected"); - message.draftMessage = $root.proto.ChatRowOpaqueData.DraftMessage.fromObject(object.draftMessage); + var message = new $root.proto.CallLogRecord(); + switch (object.callResult) { + case "CONNECTED": + case 0: + message.callResult = 0; + break; + case "REJECTED": + case 1: + message.callResult = 1; + break; + case "CANCELLED": + case 2: + message.callResult = 2; + break; + case "ACCEPTEDELSEWHERE": + case 3: + message.callResult = 3; + break; + case "MISSED": + case 4: + message.callResult = 4; + break; + case "INVALID": + case 5: + message.callResult = 5; + break; + case "UNAVAILABLE": + case 6: + message.callResult = 6; + break; + case "UPCOMING": + case 7: + message.callResult = 7; + break; + case "FAILED": + case 8: + message.callResult = 8; + break; + case "ABANDONED": + case 9: + message.callResult = 9; + break; + case "ONGOING": + case 10: + message.callResult = 10; + break; + } + if (object.isDndMode != null) + message.isDndMode = Boolean(object.isDndMode); + switch (object.silenceReason) { + case "NONE": + case 0: + message.silenceReason = 0; + break; + case "SCHEDULED": + case 1: + message.silenceReason = 1; + break; + case "PRIVACY": + case 2: + message.silenceReason = 2; + break; + case "LIGHTWEIGHT": + case 3: + message.silenceReason = 3; + break; + } + if (object.duration != null) + if ($util.Long) + (message.duration = $util.Long.fromValue(object.duration)).unsigned = false; + else if (typeof object.duration === "string") + message.duration = parseInt(object.duration, 10); + else if (typeof object.duration === "number") + message.duration = object.duration; + else if (typeof object.duration === "object") + message.duration = new $util.LongBits(object.duration.low >>> 0, object.duration.high >>> 0).toNumber(); + if (object.startTime != null) + if ($util.Long) + (message.startTime = $util.Long.fromValue(object.startTime)).unsigned = false; + else if (typeof object.startTime === "string") + message.startTime = parseInt(object.startTime, 10); + else if (typeof object.startTime === "number") + message.startTime = object.startTime; + else if (typeof object.startTime === "object") + message.startTime = new $util.LongBits(object.startTime.low >>> 0, object.startTime.high >>> 0).toNumber(); + if (object.isIncoming != null) + message.isIncoming = Boolean(object.isIncoming); + if (object.isVideo != null) + message.isVideo = Boolean(object.isVideo); + if (object.isCallLink != null) + message.isCallLink = Boolean(object.isCallLink); + if (object.callLinkToken != null) + message.callLinkToken = String(object.callLinkToken); + if (object.scheduledCallId != null) + message.scheduledCallId = String(object.scheduledCallId); + if (object.callId != null) + message.callId = String(object.callId); + if (object.callCreatorJid != null) + message.callCreatorJid = String(object.callCreatorJid); + if (object.groupJid != null) + message.groupJid = String(object.groupJid); + if (object.participants) { + if (!Array.isArray(object.participants)) + throw TypeError(".proto.CallLogRecord.participants: array expected"); + message.participants = []; + for (var i = 0; i < object.participants.length; ++i) { + if (typeof object.participants[i] !== "object") + throw TypeError(".proto.CallLogRecord.participants: object expected"); + message.participants[i] = $root.proto.CallLogRecord.ParticipantInfo.fromObject(object.participants[i]); + } + } + switch (object.callType) { + case "REGULAR": + case 0: + message.callType = 0; + break; + case "SCHEDULED_CALL": + case 1: + message.callType = 1; + break; + case "VOICE_CHAT": + case 2: + message.callType = 2; + break; } return message; }; /** - * Creates a plain object from a ChatRowOpaqueData message. Also converts values to other types if specified. + * Creates a plain object from a CallLogRecord message. Also converts values to other types if specified. * @function toObject - * @memberof proto.ChatRowOpaqueData + * @memberof proto.CallLogRecord * @static - * @param {proto.ChatRowOpaqueData} message ChatRowOpaqueData + * @param {proto.CallLogRecord} message CallLogRecord * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ChatRowOpaqueData.toObject = function toObject(message, options) { + CallLogRecord.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.draftMessage = null; - if (message.draftMessage != null && message.hasOwnProperty("draftMessage")) - object.draftMessage = $root.proto.ChatRowOpaqueData.DraftMessage.toObject(message.draftMessage, options); + if (options.arrays || options.defaults) + object.participants = []; + if (options.defaults) { + object.callResult = options.enums === String ? "CONNECTED" : 0; + object.isDndMode = false; + object.silenceReason = options.enums === String ? "NONE" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.duration = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.duration = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.startTime = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.startTime = options.longs === String ? "0" : 0; + object.isIncoming = false; + object.isVideo = false; + object.isCallLink = false; + object.callLinkToken = ""; + object.scheduledCallId = ""; + object.callId = ""; + object.callCreatorJid = ""; + object.groupJid = ""; + object.callType = options.enums === String ? "REGULAR" : 0; + } + if (message.callResult != null && message.hasOwnProperty("callResult")) + object.callResult = options.enums === String ? $root.proto.CallLogRecord.CallResult[message.callResult] : message.callResult; + if (message.isDndMode != null && message.hasOwnProperty("isDndMode")) + object.isDndMode = message.isDndMode; + if (message.silenceReason != null && message.hasOwnProperty("silenceReason")) + object.silenceReason = options.enums === String ? $root.proto.CallLogRecord.SilenceReason[message.silenceReason] : message.silenceReason; + if (message.duration != null && message.hasOwnProperty("duration")) + if (typeof message.duration === "number") + object.duration = options.longs === String ? String(message.duration) : message.duration; + else + object.duration = options.longs === String ? $util.Long.prototype.toString.call(message.duration) : options.longs === Number ? new $util.LongBits(message.duration.low >>> 0, message.duration.high >>> 0).toNumber() : message.duration; + if (message.startTime != null && message.hasOwnProperty("startTime")) + if (typeof message.startTime === "number") + object.startTime = options.longs === String ? String(message.startTime) : message.startTime; + else + object.startTime = options.longs === String ? $util.Long.prototype.toString.call(message.startTime) : options.longs === Number ? new $util.LongBits(message.startTime.low >>> 0, message.startTime.high >>> 0).toNumber() : message.startTime; + if (message.isIncoming != null && message.hasOwnProperty("isIncoming")) + object.isIncoming = message.isIncoming; + if (message.isVideo != null && message.hasOwnProperty("isVideo")) + object.isVideo = message.isVideo; + if (message.isCallLink != null && message.hasOwnProperty("isCallLink")) + object.isCallLink = message.isCallLink; + if (message.callLinkToken != null && message.hasOwnProperty("callLinkToken")) + object.callLinkToken = message.callLinkToken; + if (message.scheduledCallId != null && message.hasOwnProperty("scheduledCallId")) + object.scheduledCallId = message.scheduledCallId; + if (message.callId != null && message.hasOwnProperty("callId")) + object.callId = message.callId; + if (message.callCreatorJid != null && message.hasOwnProperty("callCreatorJid")) + object.callCreatorJid = message.callCreatorJid; + if (message.groupJid != null && message.hasOwnProperty("groupJid")) + object.groupJid = message.groupJid; + if (message.participants && message.participants.length) { + object.participants = []; + for (var j = 0; j < message.participants.length; ++j) + object.participants[j] = $root.proto.CallLogRecord.ParticipantInfo.toObject(message.participants[j], options); + } + if (message.callType != null && message.hasOwnProperty("callType")) + object.callType = options.enums === String ? $root.proto.CallLogRecord.CallType[message.callType] : message.callType; return object; }; /** - * Converts this ChatRowOpaqueData to JSON. + * Converts this CallLogRecord to JSON. * @function toJSON - * @memberof proto.ChatRowOpaqueData + * @memberof proto.CallLogRecord * @instance * @returns {Object.} JSON object */ - ChatRowOpaqueData.prototype.toJSON = function toJSON() { + CallLogRecord.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - ChatRowOpaqueData.DraftMessage = (function() { + /** + * CallResult enum. + * @name proto.CallLogRecord.CallResult + * @enum {number} + * @property {number} CONNECTED=0 CONNECTED value + * @property {number} REJECTED=1 REJECTED value + * @property {number} CANCELLED=2 CANCELLED value + * @property {number} ACCEPTEDELSEWHERE=3 ACCEPTEDELSEWHERE value + * @property {number} MISSED=4 MISSED value + * @property {number} INVALID=5 INVALID value + * @property {number} UNAVAILABLE=6 UNAVAILABLE value + * @property {number} UPCOMING=7 UPCOMING value + * @property {number} FAILED=8 FAILED value + * @property {number} ABANDONED=9 ABANDONED value + * @property {number} ONGOING=10 ONGOING value + */ + CallLogRecord.CallResult = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CONNECTED"] = 0; + values[valuesById[1] = "REJECTED"] = 1; + values[valuesById[2] = "CANCELLED"] = 2; + values[valuesById[3] = "ACCEPTEDELSEWHERE"] = 3; + values[valuesById[4] = "MISSED"] = 4; + values[valuesById[5] = "INVALID"] = 5; + values[valuesById[6] = "UNAVAILABLE"] = 6; + values[valuesById[7] = "UPCOMING"] = 7; + values[valuesById[8] = "FAILED"] = 8; + values[valuesById[9] = "ABANDONED"] = 9; + values[valuesById[10] = "ONGOING"] = 10; + return values; + })(); + + /** + * CallType enum. + * @name proto.CallLogRecord.CallType + * @enum {number} + * @property {number} REGULAR=0 REGULAR value + * @property {number} SCHEDULED_CALL=1 SCHEDULED_CALL value + * @property {number} VOICE_CHAT=2 VOICE_CHAT value + */ + CallLogRecord.CallType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REGULAR"] = 0; + values[valuesById[1] = "SCHEDULED_CALL"] = 1; + values[valuesById[2] = "VOICE_CHAT"] = 2; + return values; + })(); + + CallLogRecord.ParticipantInfo = (function() { /** - * Properties of a DraftMessage. - * @memberof proto.ChatRowOpaqueData - * @interface IDraftMessage - * @property {string|null} [text] DraftMessage text - * @property {string|null} [omittedUrl] DraftMessage omittedUrl - * @property {proto.ChatRowOpaqueData.DraftMessage.ICtwaContextLinkData|null} [ctwaContextLinkData] DraftMessage ctwaContextLinkData - * @property {proto.ChatRowOpaqueData.DraftMessage.ICtwaContextData|null} [ctwaContext] DraftMessage ctwaContext - * @property {number|Long|null} [timestamp] DraftMessage timestamp + * Properties of a ParticipantInfo. + * @memberof proto.CallLogRecord + * @interface IParticipantInfo + * @property {string|null} [userJid] ParticipantInfo userJid + * @property {proto.CallLogRecord.CallResult|null} [callResult] ParticipantInfo callResult */ /** - * Constructs a new DraftMessage. - * @memberof proto.ChatRowOpaqueData - * @classdesc Represents a DraftMessage. - * @implements IDraftMessage + * Constructs a new ParticipantInfo. + * @memberof proto.CallLogRecord + * @classdesc Represents a ParticipantInfo. + * @implements IParticipantInfo * @constructor - * @param {proto.ChatRowOpaqueData.IDraftMessage=} [properties] Properties to set + * @param {proto.CallLogRecord.IParticipantInfo=} [properties] Properties to set */ - function DraftMessage(properties) { + function ParticipantInfo(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4515,127 +5105,88 @@ $root.proto = (function() { } /** - * DraftMessage text. - * @member {string} text - * @memberof proto.ChatRowOpaqueData.DraftMessage - * @instance - */ - DraftMessage.prototype.text = ""; - - /** - * DraftMessage omittedUrl. - * @member {string} omittedUrl - * @memberof proto.ChatRowOpaqueData.DraftMessage - * @instance - */ - DraftMessage.prototype.omittedUrl = ""; - - /** - * DraftMessage ctwaContextLinkData. - * @member {proto.ChatRowOpaqueData.DraftMessage.ICtwaContextLinkData|null|undefined} ctwaContextLinkData - * @memberof proto.ChatRowOpaqueData.DraftMessage - * @instance - */ - DraftMessage.prototype.ctwaContextLinkData = null; - - /** - * DraftMessage ctwaContext. - * @member {proto.ChatRowOpaqueData.DraftMessage.ICtwaContextData|null|undefined} ctwaContext - * @memberof proto.ChatRowOpaqueData.DraftMessage + * ParticipantInfo userJid. + * @member {string} userJid + * @memberof proto.CallLogRecord.ParticipantInfo * @instance */ - DraftMessage.prototype.ctwaContext = null; + ParticipantInfo.prototype.userJid = ""; /** - * DraftMessage timestamp. - * @member {number|Long} timestamp - * @memberof proto.ChatRowOpaqueData.DraftMessage + * ParticipantInfo callResult. + * @member {proto.CallLogRecord.CallResult} callResult + * @memberof proto.CallLogRecord.ParticipantInfo * @instance */ - DraftMessage.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + ParticipantInfo.prototype.callResult = 0; /** - * Creates a new DraftMessage instance using the specified properties. + * Creates a new ParticipantInfo instance using the specified properties. * @function create - * @memberof proto.ChatRowOpaqueData.DraftMessage + * @memberof proto.CallLogRecord.ParticipantInfo * @static - * @param {proto.ChatRowOpaqueData.IDraftMessage=} [properties] Properties to set - * @returns {proto.ChatRowOpaqueData.DraftMessage} DraftMessage instance + * @param {proto.CallLogRecord.IParticipantInfo=} [properties] Properties to set + * @returns {proto.CallLogRecord.ParticipantInfo} ParticipantInfo instance */ - DraftMessage.create = function create(properties) { - return new DraftMessage(properties); + ParticipantInfo.create = function create(properties) { + return new ParticipantInfo(properties); }; /** - * Encodes the specified DraftMessage message. Does not implicitly {@link proto.ChatRowOpaqueData.DraftMessage.verify|verify} messages. + * Encodes the specified ParticipantInfo message. Does not implicitly {@link proto.CallLogRecord.ParticipantInfo.verify|verify} messages. * @function encode - * @memberof proto.ChatRowOpaqueData.DraftMessage + * @memberof proto.CallLogRecord.ParticipantInfo * @static - * @param {proto.ChatRowOpaqueData.IDraftMessage} message DraftMessage message or plain object to encode + * @param {proto.CallLogRecord.IParticipantInfo} message ParticipantInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DraftMessage.encode = function encode(message, writer) { + ParticipantInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.text != null && Object.hasOwnProperty.call(message, "text")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); - if (message.omittedUrl != null && Object.hasOwnProperty.call(message, "omittedUrl")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.omittedUrl); - if (message.ctwaContextLinkData != null && Object.hasOwnProperty.call(message, "ctwaContextLinkData")) - $root.proto.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData.encode(message.ctwaContextLinkData, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.ctwaContext != null && Object.hasOwnProperty.call(message, "ctwaContext")) - $root.proto.ChatRowOpaqueData.DraftMessage.CtwaContextData.encode(message.ctwaContext, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.timestamp); + if (message.userJid != null && Object.hasOwnProperty.call(message, "userJid")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.userJid); + if (message.callResult != null && Object.hasOwnProperty.call(message, "callResult")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.callResult); return writer; }; /** - * Encodes the specified DraftMessage message, length delimited. Does not implicitly {@link proto.ChatRowOpaqueData.DraftMessage.verify|verify} messages. + * Encodes the specified ParticipantInfo message, length delimited. Does not implicitly {@link proto.CallLogRecord.ParticipantInfo.verify|verify} messages. * @function encodeDelimited - * @memberof proto.ChatRowOpaqueData.DraftMessage + * @memberof proto.CallLogRecord.ParticipantInfo * @static - * @param {proto.ChatRowOpaqueData.IDraftMessage} message DraftMessage message or plain object to encode + * @param {proto.CallLogRecord.IParticipantInfo} message ParticipantInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DraftMessage.encodeDelimited = function encodeDelimited(message, writer) { + ParticipantInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DraftMessage message from the specified reader or buffer. + * Decodes a ParticipantInfo message from the specified reader or buffer. * @function decode - * @memberof proto.ChatRowOpaqueData.DraftMessage + * @memberof proto.CallLogRecord.ParticipantInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {proto.ChatRowOpaqueData.DraftMessage} DraftMessage + * @returns {proto.CallLogRecord.ParticipantInfo} ParticipantInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DraftMessage.decode = function decode(reader, length) { + ParticipantInfo.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.ChatRowOpaqueData.DraftMessage(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.CallLogRecord.ParticipantInfo(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.text = reader.string(); + message.userJid = reader.string(); break; case 2: - message.omittedUrl = reader.string(); - break; - case 3: - message.ctwaContextLinkData = $root.proto.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData.decode(reader, reader.uint32()); - break; - case 4: - message.ctwaContext = $root.proto.ChatRowOpaqueData.DraftMessage.CtwaContextData.decode(reader, reader.uint32()); - break; - case 5: - message.timestamp = reader.int64(); + message.callResult = reader.int32(); break; default: reader.skipType(tag & 7); @@ -4646,391 +5197,769 @@ $root.proto = (function() { }; /** - * Decodes a DraftMessage message from the specified reader or buffer, length delimited. + * Decodes a ParticipantInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof proto.ChatRowOpaqueData.DraftMessage + * @memberof proto.CallLogRecord.ParticipantInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.ChatRowOpaqueData.DraftMessage} DraftMessage + * @returns {proto.CallLogRecord.ParticipantInfo} ParticipantInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DraftMessage.decodeDelimited = function decodeDelimited(reader) { + ParticipantInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DraftMessage message. + * Verifies a ParticipantInfo message. * @function verify - * @memberof proto.ChatRowOpaqueData.DraftMessage + * @memberof proto.CallLogRecord.ParticipantInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DraftMessage.verify = function verify(message) { + ParticipantInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.text != null && message.hasOwnProperty("text")) - if (!$util.isString(message.text)) - return "text: string expected"; - if (message.omittedUrl != null && message.hasOwnProperty("omittedUrl")) - if (!$util.isString(message.omittedUrl)) - return "omittedUrl: string expected"; - if (message.ctwaContextLinkData != null && message.hasOwnProperty("ctwaContextLinkData")) { - var error = $root.proto.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData.verify(message.ctwaContextLinkData); - if (error) - return "ctwaContextLinkData." + error; - } - if (message.ctwaContext != null && message.hasOwnProperty("ctwaContext")) { - var error = $root.proto.ChatRowOpaqueData.DraftMessage.CtwaContextData.verify(message.ctwaContext); - if (error) - return "ctwaContext." + error; - } - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high))) - return "timestamp: integer|Long expected"; + if (message.userJid != null && message.hasOwnProperty("userJid")) + if (!$util.isString(message.userJid)) + return "userJid: string expected"; + if (message.callResult != null && message.hasOwnProperty("callResult")) + switch (message.callResult) { + default: + return "callResult: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + break; + } return null; }; /** - * Creates a DraftMessage message from a plain object. Also converts values to their respective internal types. + * Creates a ParticipantInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof proto.ChatRowOpaqueData.DraftMessage + * @memberof proto.CallLogRecord.ParticipantInfo * @static * @param {Object.} object Plain object - * @returns {proto.ChatRowOpaqueData.DraftMessage} DraftMessage + * @returns {proto.CallLogRecord.ParticipantInfo} ParticipantInfo */ - DraftMessage.fromObject = function fromObject(object) { - if (object instanceof $root.proto.ChatRowOpaqueData.DraftMessage) + ParticipantInfo.fromObject = function fromObject(object) { + if (object instanceof $root.proto.CallLogRecord.ParticipantInfo) return object; - var message = new $root.proto.ChatRowOpaqueData.DraftMessage(); - if (object.text != null) - message.text = String(object.text); - if (object.omittedUrl != null) - message.omittedUrl = String(object.omittedUrl); - if (object.ctwaContextLinkData != null) { - if (typeof object.ctwaContextLinkData !== "object") - throw TypeError(".proto.ChatRowOpaqueData.DraftMessage.ctwaContextLinkData: object expected"); - message.ctwaContextLinkData = $root.proto.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData.fromObject(object.ctwaContextLinkData); - } - if (object.ctwaContext != null) { - if (typeof object.ctwaContext !== "object") - throw TypeError(".proto.ChatRowOpaqueData.DraftMessage.ctwaContext: object expected"); - message.ctwaContext = $root.proto.ChatRowOpaqueData.DraftMessage.CtwaContextData.fromObject(object.ctwaContext); + var message = new $root.proto.CallLogRecord.ParticipantInfo(); + if (object.userJid != null) + message.userJid = String(object.userJid); + switch (object.callResult) { + case "CONNECTED": + case 0: + message.callResult = 0; + break; + case "REJECTED": + case 1: + message.callResult = 1; + break; + case "CANCELLED": + case 2: + message.callResult = 2; + break; + case "ACCEPTEDELSEWHERE": + case 3: + message.callResult = 3; + break; + case "MISSED": + case 4: + message.callResult = 4; + break; + case "INVALID": + case 5: + message.callResult = 5; + break; + case "UNAVAILABLE": + case 6: + message.callResult = 6; + break; + case "UPCOMING": + case 7: + message.callResult = 7; + break; + case "FAILED": + case 8: + message.callResult = 8; + break; + case "ABANDONED": + case 9: + message.callResult = 9; + break; + case "ONGOING": + case 10: + message.callResult = 10; + break; } - if (object.timestamp != null) - if ($util.Long) - (message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = false; - else if (typeof object.timestamp === "string") - message.timestamp = parseInt(object.timestamp, 10); - else if (typeof object.timestamp === "number") - message.timestamp = object.timestamp; - else if (typeof object.timestamp === "object") - message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from a DraftMessage message. Also converts values to other types if specified. + * Creates a plain object from a ParticipantInfo message. Also converts values to other types if specified. * @function toObject - * @memberof proto.ChatRowOpaqueData.DraftMessage + * @memberof proto.CallLogRecord.ParticipantInfo * @static - * @param {proto.ChatRowOpaqueData.DraftMessage} message DraftMessage + * @param {proto.CallLogRecord.ParticipantInfo} message ParticipantInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DraftMessage.toObject = function toObject(message, options) { + ParticipantInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.text = ""; - object.omittedUrl = ""; - object.ctwaContextLinkData = null; - object.ctwaContext = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.timestamp = options.longs === String ? "0" : 0; + object.userJid = ""; + object.callResult = options.enums === String ? "CONNECTED" : 0; } - if (message.text != null && message.hasOwnProperty("text")) - object.text = message.text; - if (message.omittedUrl != null && message.hasOwnProperty("omittedUrl")) - object.omittedUrl = message.omittedUrl; - if (message.ctwaContextLinkData != null && message.hasOwnProperty("ctwaContextLinkData")) - object.ctwaContextLinkData = $root.proto.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData.toObject(message.ctwaContextLinkData, options); - if (message.ctwaContext != null && message.hasOwnProperty("ctwaContext")) - object.ctwaContext = $root.proto.ChatRowOpaqueData.DraftMessage.CtwaContextData.toObject(message.ctwaContext, options); - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - if (typeof message.timestamp === "number") - object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp; - else - object.timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber() : message.timestamp; + if (message.userJid != null && message.hasOwnProperty("userJid")) + object.userJid = message.userJid; + if (message.callResult != null && message.hasOwnProperty("callResult")) + object.callResult = options.enums === String ? $root.proto.CallLogRecord.CallResult[message.callResult] : message.callResult; return object; }; /** - * Converts this DraftMessage to JSON. + * Converts this ParticipantInfo to JSON. * @function toJSON - * @memberof proto.ChatRowOpaqueData.DraftMessage + * @memberof proto.CallLogRecord.ParticipantInfo * @instance * @returns {Object.} JSON object */ - DraftMessage.prototype.toJSON = function toJSON() { + ParticipantInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - DraftMessage.CtwaContextData = (function() { - - /** - * Properties of a CtwaContextData. - * @memberof proto.ChatRowOpaqueData.DraftMessage - * @interface ICtwaContextData - * @property {string|null} [conversionSource] CtwaContextData conversionSource - * @property {Uint8Array|null} [conversionData] CtwaContextData conversionData - * @property {string|null} [sourceUrl] CtwaContextData sourceUrl - * @property {string|null} [sourceId] CtwaContextData sourceId - * @property {string|null} [sourceType] CtwaContextData sourceType - * @property {string|null} [title] CtwaContextData title - * @property {string|null} [description] CtwaContextData description - * @property {string|null} [thumbnail] CtwaContextData thumbnail - * @property {string|null} [thumbnailUrl] CtwaContextData thumbnailUrl - * @property {proto.ChatRowOpaqueData.DraftMessage.CtwaContextData.ContextInfoExternalAdReplyInfoMediaType|null} [mediaType] CtwaContextData mediaType - * @property {string|null} [mediaUrl] CtwaContextData mediaUrl - * @property {boolean|null} [isSuspiciousLink] CtwaContextData isSuspiciousLink - */ + return ParticipantInfo; + })(); - /** - * Constructs a new CtwaContextData. - * @memberof proto.ChatRowOpaqueData.DraftMessage - * @classdesc Represents a CtwaContextData. - * @implements ICtwaContextData - * @constructor - * @param {proto.ChatRowOpaqueData.DraftMessage.ICtwaContextData=} [properties] Properties to set - */ - function CtwaContextData(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * SilenceReason enum. + * @name proto.CallLogRecord.SilenceReason + * @enum {number} + * @property {number} NONE=0 NONE value + * @property {number} SCHEDULED=1 SCHEDULED value + * @property {number} PRIVACY=2 PRIVACY value + * @property {number} LIGHTWEIGHT=3 LIGHTWEIGHT value + */ + CallLogRecord.SilenceReason = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NONE"] = 0; + values[valuesById[1] = "SCHEDULED"] = 1; + values[valuesById[2] = "PRIVACY"] = 2; + values[valuesById[3] = "LIGHTWEIGHT"] = 3; + return values; + })(); - /** - * CtwaContextData conversionSource. - * @member {string} conversionSource - * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextData - * @instance - */ - CtwaContextData.prototype.conversionSource = ""; + return CallLogRecord; + })(); - /** - * CtwaContextData conversionData. - * @member {Uint8Array} conversionData - * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextData - * @instance - */ - CtwaContextData.prototype.conversionData = $util.newBuffer([]); + proto.CertChain = (function() { - /** - * CtwaContextData sourceUrl. - * @member {string} sourceUrl - * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextData - * @instance - */ - CtwaContextData.prototype.sourceUrl = ""; + /** + * Properties of a CertChain. + * @memberof proto + * @interface ICertChain + * @property {proto.CertChain.INoiseCertificate|null} [leaf] CertChain leaf + * @property {proto.CertChain.INoiseCertificate|null} [intermediate] CertChain intermediate + */ - /** - * CtwaContextData sourceId. - * @member {string} sourceId - * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextData - * @instance - */ - CtwaContextData.prototype.sourceId = ""; + /** + * Constructs a new CertChain. + * @memberof proto + * @classdesc Represents a CertChain. + * @implements ICertChain + * @constructor + * @param {proto.ICertChain=} [properties] Properties to set + */ + function CertChain(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * CtwaContextData sourceType. - * @member {string} sourceType - * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextData - * @instance - */ - CtwaContextData.prototype.sourceType = ""; + /** + * CertChain leaf. + * @member {proto.CertChain.INoiseCertificate|null|undefined} leaf + * @memberof proto.CertChain + * @instance + */ + CertChain.prototype.leaf = null; - /** - * CtwaContextData title. - * @member {string} title - * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextData - * @instance - */ - CtwaContextData.prototype.title = ""; + /** + * CertChain intermediate. + * @member {proto.CertChain.INoiseCertificate|null|undefined} intermediate + * @memberof proto.CertChain + * @instance + */ + CertChain.prototype.intermediate = null; - /** - * CtwaContextData description. - * @member {string} description - * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextData - * @instance - */ - CtwaContextData.prototype.description = ""; + /** + * Creates a new CertChain instance using the specified properties. + * @function create + * @memberof proto.CertChain + * @static + * @param {proto.ICertChain=} [properties] Properties to set + * @returns {proto.CertChain} CertChain instance + */ + CertChain.create = function create(properties) { + return new CertChain(properties); + }; - /** - * CtwaContextData thumbnail. - * @member {string} thumbnail - * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextData - * @instance - */ - CtwaContextData.prototype.thumbnail = ""; + /** + * Encodes the specified CertChain message. Does not implicitly {@link proto.CertChain.verify|verify} messages. + * @function encode + * @memberof proto.CertChain + * @static + * @param {proto.ICertChain} message CertChain message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CertChain.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.leaf != null && Object.hasOwnProperty.call(message, "leaf")) + $root.proto.CertChain.NoiseCertificate.encode(message.leaf, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.intermediate != null && Object.hasOwnProperty.call(message, "intermediate")) + $root.proto.CertChain.NoiseCertificate.encode(message.intermediate, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; - /** - * CtwaContextData thumbnailUrl. - * @member {string} thumbnailUrl - * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextData + /** + * Encodes the specified CertChain message, length delimited. Does not implicitly {@link proto.CertChain.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.CertChain + * @static + * @param {proto.ICertChain} message CertChain message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CertChain.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CertChain message from the specified reader or buffer. + * @function decode + * @memberof proto.CertChain + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.CertChain} CertChain + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CertChain.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.CertChain(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.leaf = $root.proto.CertChain.NoiseCertificate.decode(reader, reader.uint32()); + break; + case 2: + message.intermediate = $root.proto.CertChain.NoiseCertificate.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CertChain message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.CertChain + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.CertChain} CertChain + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CertChain.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CertChain message. + * @function verify + * @memberof proto.CertChain + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CertChain.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.leaf != null && message.hasOwnProperty("leaf")) { + var error = $root.proto.CertChain.NoiseCertificate.verify(message.leaf); + if (error) + return "leaf." + error; + } + if (message.intermediate != null && message.hasOwnProperty("intermediate")) { + var error = $root.proto.CertChain.NoiseCertificate.verify(message.intermediate); + if (error) + return "intermediate." + error; + } + return null; + }; + + /** + * Creates a CertChain message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.CertChain + * @static + * @param {Object.} object Plain object + * @returns {proto.CertChain} CertChain + */ + CertChain.fromObject = function fromObject(object) { + if (object instanceof $root.proto.CertChain) + return object; + var message = new $root.proto.CertChain(); + if (object.leaf != null) { + if (typeof object.leaf !== "object") + throw TypeError(".proto.CertChain.leaf: object expected"); + message.leaf = $root.proto.CertChain.NoiseCertificate.fromObject(object.leaf); + } + if (object.intermediate != null) { + if (typeof object.intermediate !== "object") + throw TypeError(".proto.CertChain.intermediate: object expected"); + message.intermediate = $root.proto.CertChain.NoiseCertificate.fromObject(object.intermediate); + } + return message; + }; + + /** + * Creates a plain object from a CertChain message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.CertChain + * @static + * @param {proto.CertChain} message CertChain + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CertChain.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.leaf = null; + object.intermediate = null; + } + if (message.leaf != null && message.hasOwnProperty("leaf")) + object.leaf = $root.proto.CertChain.NoiseCertificate.toObject(message.leaf, options); + if (message.intermediate != null && message.hasOwnProperty("intermediate")) + object.intermediate = $root.proto.CertChain.NoiseCertificate.toObject(message.intermediate, options); + return object; + }; + + /** + * Converts this CertChain to JSON. + * @function toJSON + * @memberof proto.CertChain + * @instance + * @returns {Object.} JSON object + */ + CertChain.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + CertChain.NoiseCertificate = (function() { + + /** + * Properties of a NoiseCertificate. + * @memberof proto.CertChain + * @interface INoiseCertificate + * @property {Uint8Array|null} [details] NoiseCertificate details + * @property {Uint8Array|null} [signature] NoiseCertificate signature + */ + + /** + * Constructs a new NoiseCertificate. + * @memberof proto.CertChain + * @classdesc Represents a NoiseCertificate. + * @implements INoiseCertificate + * @constructor + * @param {proto.CertChain.INoiseCertificate=} [properties] Properties to set + */ + function NoiseCertificate(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NoiseCertificate details. + * @member {Uint8Array} details + * @memberof proto.CertChain.NoiseCertificate + * @instance + */ + NoiseCertificate.prototype.details = $util.newBuffer([]); + + /** + * NoiseCertificate signature. + * @member {Uint8Array} signature + * @memberof proto.CertChain.NoiseCertificate + * @instance + */ + NoiseCertificate.prototype.signature = $util.newBuffer([]); + + /** + * Creates a new NoiseCertificate instance using the specified properties. + * @function create + * @memberof proto.CertChain.NoiseCertificate + * @static + * @param {proto.CertChain.INoiseCertificate=} [properties] Properties to set + * @returns {proto.CertChain.NoiseCertificate} NoiseCertificate instance + */ + NoiseCertificate.create = function create(properties) { + return new NoiseCertificate(properties); + }; + + /** + * Encodes the specified NoiseCertificate message. Does not implicitly {@link proto.CertChain.NoiseCertificate.verify|verify} messages. + * @function encode + * @memberof proto.CertChain.NoiseCertificate + * @static + * @param {proto.CertChain.INoiseCertificate} message NoiseCertificate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NoiseCertificate.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.details != null && Object.hasOwnProperty.call(message, "details")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.details); + if (message.signature != null && Object.hasOwnProperty.call(message, "signature")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.signature); + return writer; + }; + + /** + * Encodes the specified NoiseCertificate message, length delimited. Does not implicitly {@link proto.CertChain.NoiseCertificate.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.CertChain.NoiseCertificate + * @static + * @param {proto.CertChain.INoiseCertificate} message NoiseCertificate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NoiseCertificate.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NoiseCertificate message from the specified reader or buffer. + * @function decode + * @memberof proto.CertChain.NoiseCertificate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.CertChain.NoiseCertificate} NoiseCertificate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NoiseCertificate.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.CertChain.NoiseCertificate(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.details = reader.bytes(); + break; + case 2: + message.signature = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NoiseCertificate message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.CertChain.NoiseCertificate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.CertChain.NoiseCertificate} NoiseCertificate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NoiseCertificate.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NoiseCertificate message. + * @function verify + * @memberof proto.CertChain.NoiseCertificate + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NoiseCertificate.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.details != null && message.hasOwnProperty("details")) + if (!(message.details && typeof message.details.length === "number" || $util.isString(message.details))) + return "details: buffer expected"; + if (message.signature != null && message.hasOwnProperty("signature")) + if (!(message.signature && typeof message.signature.length === "number" || $util.isString(message.signature))) + return "signature: buffer expected"; + return null; + }; + + /** + * Creates a NoiseCertificate message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.CertChain.NoiseCertificate + * @static + * @param {Object.} object Plain object + * @returns {proto.CertChain.NoiseCertificate} NoiseCertificate + */ + NoiseCertificate.fromObject = function fromObject(object) { + if (object instanceof $root.proto.CertChain.NoiseCertificate) + return object; + var message = new $root.proto.CertChain.NoiseCertificate(); + if (object.details != null) + if (typeof object.details === "string") + $util.base64.decode(object.details, message.details = $util.newBuffer($util.base64.length(object.details)), 0); + else if (object.details.length) + message.details = object.details; + if (object.signature != null) + if (typeof object.signature === "string") + $util.base64.decode(object.signature, message.signature = $util.newBuffer($util.base64.length(object.signature)), 0); + else if (object.signature.length) + message.signature = object.signature; + return message; + }; + + /** + * Creates a plain object from a NoiseCertificate message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.CertChain.NoiseCertificate + * @static + * @param {proto.CertChain.NoiseCertificate} message NoiseCertificate + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NoiseCertificate.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.details = ""; + else { + object.details = []; + if (options.bytes !== Array) + object.details = $util.newBuffer(object.details); + } + if (options.bytes === String) + object.signature = ""; + else { + object.signature = []; + if (options.bytes !== Array) + object.signature = $util.newBuffer(object.signature); + } + } + if (message.details != null && message.hasOwnProperty("details")) + object.details = options.bytes === String ? $util.base64.encode(message.details, 0, message.details.length) : options.bytes === Array ? Array.prototype.slice.call(message.details) : message.details; + if (message.signature != null && message.hasOwnProperty("signature")) + object.signature = options.bytes === String ? $util.base64.encode(message.signature, 0, message.signature.length) : options.bytes === Array ? Array.prototype.slice.call(message.signature) : message.signature; + return object; + }; + + /** + * Converts this NoiseCertificate to JSON. + * @function toJSON + * @memberof proto.CertChain.NoiseCertificate + * @instance + * @returns {Object.} JSON object + */ + NoiseCertificate.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + NoiseCertificate.Details = (function() { + + /** + * Properties of a Details. + * @memberof proto.CertChain.NoiseCertificate + * @interface IDetails + * @property {number|null} [serial] Details serial + * @property {number|null} [issuerSerial] Details issuerSerial + * @property {Uint8Array|null} [key] Details key + * @property {number|Long|null} [notBefore] Details notBefore + * @property {number|Long|null} [notAfter] Details notAfter + */ + + /** + * Constructs a new Details. + * @memberof proto.CertChain.NoiseCertificate + * @classdesc Represents a Details. + * @implements IDetails + * @constructor + * @param {proto.CertChain.NoiseCertificate.IDetails=} [properties] Properties to set + */ + function Details(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Details serial. + * @member {number} serial + * @memberof proto.CertChain.NoiseCertificate.Details * @instance */ - CtwaContextData.prototype.thumbnailUrl = ""; + Details.prototype.serial = 0; /** - * CtwaContextData mediaType. - * @member {proto.ChatRowOpaqueData.DraftMessage.CtwaContextData.ContextInfoExternalAdReplyInfoMediaType} mediaType - * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextData + * Details issuerSerial. + * @member {number} issuerSerial + * @memberof proto.CertChain.NoiseCertificate.Details * @instance */ - CtwaContextData.prototype.mediaType = 0; + Details.prototype.issuerSerial = 0; /** - * CtwaContextData mediaUrl. - * @member {string} mediaUrl - * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextData + * Details key. + * @member {Uint8Array} key + * @memberof proto.CertChain.NoiseCertificate.Details * @instance */ - CtwaContextData.prototype.mediaUrl = ""; + Details.prototype.key = $util.newBuffer([]); /** - * CtwaContextData isSuspiciousLink. - * @member {boolean} isSuspiciousLink - * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextData + * Details notBefore. + * @member {number|Long} notBefore + * @memberof proto.CertChain.NoiseCertificate.Details * @instance */ - CtwaContextData.prototype.isSuspiciousLink = false; + Details.prototype.notBefore = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** - * Creates a new CtwaContextData instance using the specified properties. + * Details notAfter. + * @member {number|Long} notAfter + * @memberof proto.CertChain.NoiseCertificate.Details + * @instance + */ + Details.prototype.notAfter = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new Details instance using the specified properties. * @function create - * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextData + * @memberof proto.CertChain.NoiseCertificate.Details * @static - * @param {proto.ChatRowOpaqueData.DraftMessage.ICtwaContextData=} [properties] Properties to set - * @returns {proto.ChatRowOpaqueData.DraftMessage.CtwaContextData} CtwaContextData instance + * @param {proto.CertChain.NoiseCertificate.IDetails=} [properties] Properties to set + * @returns {proto.CertChain.NoiseCertificate.Details} Details instance */ - CtwaContextData.create = function create(properties) { - return new CtwaContextData(properties); + Details.create = function create(properties) { + return new Details(properties); }; /** - * Encodes the specified CtwaContextData message. Does not implicitly {@link proto.ChatRowOpaqueData.DraftMessage.CtwaContextData.verify|verify} messages. + * Encodes the specified Details message. Does not implicitly {@link proto.CertChain.NoiseCertificate.Details.verify|verify} messages. * @function encode - * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextData + * @memberof proto.CertChain.NoiseCertificate.Details * @static - * @param {proto.ChatRowOpaqueData.DraftMessage.ICtwaContextData} message CtwaContextData message or plain object to encode + * @param {proto.CertChain.NoiseCertificate.IDetails} message Details message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CtwaContextData.encode = function encode(message, writer) { + Details.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.conversionSource != null && Object.hasOwnProperty.call(message, "conversionSource")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.conversionSource); - if (message.conversionData != null && Object.hasOwnProperty.call(message, "conversionData")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.conversionData); - if (message.sourceUrl != null && Object.hasOwnProperty.call(message, "sourceUrl")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.sourceUrl); - if (message.sourceId != null && Object.hasOwnProperty.call(message, "sourceId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.sourceId); - if (message.sourceType != null && Object.hasOwnProperty.call(message, "sourceType")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.sourceType); - if (message.title != null && Object.hasOwnProperty.call(message, "title")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.title); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.description); - if (message.thumbnail != null && Object.hasOwnProperty.call(message, "thumbnail")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.thumbnail); - if (message.thumbnailUrl != null && Object.hasOwnProperty.call(message, "thumbnailUrl")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.thumbnailUrl); - if (message.mediaType != null && Object.hasOwnProperty.call(message, "mediaType")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.mediaType); - if (message.mediaUrl != null && Object.hasOwnProperty.call(message, "mediaUrl")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.mediaUrl); - if (message.isSuspiciousLink != null && Object.hasOwnProperty.call(message, "isSuspiciousLink")) - writer.uint32(/* id 12, wireType 0 =*/96).bool(message.isSuspiciousLink); + if (message.serial != null && Object.hasOwnProperty.call(message, "serial")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.serial); + if (message.issuerSerial != null && Object.hasOwnProperty.call(message, "issuerSerial")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.issuerSerial); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.key); + if (message.notBefore != null && Object.hasOwnProperty.call(message, "notBefore")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.notBefore); + if (message.notAfter != null && Object.hasOwnProperty.call(message, "notAfter")) + writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.notAfter); return writer; }; /** - * Encodes the specified CtwaContextData message, length delimited. Does not implicitly {@link proto.ChatRowOpaqueData.DraftMessage.CtwaContextData.verify|verify} messages. + * Encodes the specified Details message, length delimited. Does not implicitly {@link proto.CertChain.NoiseCertificate.Details.verify|verify} messages. * @function encodeDelimited - * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextData + * @memberof proto.CertChain.NoiseCertificate.Details * @static - * @param {proto.ChatRowOpaqueData.DraftMessage.ICtwaContextData} message CtwaContextData message or plain object to encode + * @param {proto.CertChain.NoiseCertificate.IDetails} message Details message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CtwaContextData.encodeDelimited = function encodeDelimited(message, writer) { + Details.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CtwaContextData message from the specified reader or buffer. + * Decodes a Details message from the specified reader or buffer. * @function decode - * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextData + * @memberof proto.CertChain.NoiseCertificate.Details * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {proto.ChatRowOpaqueData.DraftMessage.CtwaContextData} CtwaContextData + * @returns {proto.CertChain.NoiseCertificate.Details} Details * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CtwaContextData.decode = function decode(reader, length) { + Details.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.ChatRowOpaqueData.DraftMessage.CtwaContextData(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.CertChain.NoiseCertificate.Details(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.conversionSource = reader.string(); + message.serial = reader.uint32(); break; case 2: - message.conversionData = reader.bytes(); + message.issuerSerial = reader.uint32(); break; case 3: - message.sourceUrl = reader.string(); + message.key = reader.bytes(); break; case 4: - message.sourceId = reader.string(); + message.notBefore = reader.uint64(); break; case 5: - message.sourceType = reader.string(); - break; - case 6: - message.title = reader.string(); - break; - case 7: - message.description = reader.string(); - break; - case 8: - message.thumbnail = reader.string(); - break; - case 9: - message.thumbnailUrl = reader.string(); - break; - case 10: - message.mediaType = reader.int32(); - break; - case 11: - message.mediaUrl = reader.string(); - break; - case 12: - message.isSuspiciousLink = reader.bool(); + message.notAfter = reader.uint64(); break; default: reader.skipType(tag & 7); @@ -5041,1584 +5970,6516 @@ $root.proto = (function() { }; /** - * Decodes a CtwaContextData message from the specified reader or buffer, length delimited. + * Decodes a Details message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextData + * @memberof proto.CertChain.NoiseCertificate.Details * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.ChatRowOpaqueData.DraftMessage.CtwaContextData} CtwaContextData + * @returns {proto.CertChain.NoiseCertificate.Details} Details * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CtwaContextData.decodeDelimited = function decodeDelimited(reader) { + Details.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CtwaContextData message. + * Verifies a Details message. * @function verify - * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextData + * @memberof proto.CertChain.NoiseCertificate.Details * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CtwaContextData.verify = function verify(message) { + Details.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.conversionSource != null && message.hasOwnProperty("conversionSource")) - if (!$util.isString(message.conversionSource)) - return "conversionSource: string expected"; - if (message.conversionData != null && message.hasOwnProperty("conversionData")) - if (!(message.conversionData && typeof message.conversionData.length === "number" || $util.isString(message.conversionData))) - return "conversionData: buffer expected"; - if (message.sourceUrl != null && message.hasOwnProperty("sourceUrl")) - if (!$util.isString(message.sourceUrl)) - return "sourceUrl: string expected"; - if (message.sourceId != null && message.hasOwnProperty("sourceId")) - if (!$util.isString(message.sourceId)) - return "sourceId: string expected"; - if (message.sourceType != null && message.hasOwnProperty("sourceType")) - if (!$util.isString(message.sourceType)) - return "sourceType: string expected"; - if (message.title != null && message.hasOwnProperty("title")) - if (!$util.isString(message.title)) - return "title: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.thumbnail != null && message.hasOwnProperty("thumbnail")) - if (!$util.isString(message.thumbnail)) - return "thumbnail: string expected"; - if (message.thumbnailUrl != null && message.hasOwnProperty("thumbnailUrl")) - if (!$util.isString(message.thumbnailUrl)) - return "thumbnailUrl: string expected"; - if (message.mediaType != null && message.hasOwnProperty("mediaType")) - switch (message.mediaType) { - default: - return "mediaType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.mediaUrl != null && message.hasOwnProperty("mediaUrl")) - if (!$util.isString(message.mediaUrl)) - return "mediaUrl: string expected"; - if (message.isSuspiciousLink != null && message.hasOwnProperty("isSuspiciousLink")) - if (typeof message.isSuspiciousLink !== "boolean") - return "isSuspiciousLink: boolean expected"; + if (message.serial != null && message.hasOwnProperty("serial")) + if (!$util.isInteger(message.serial)) + return "serial: integer expected"; + if (message.issuerSerial != null && message.hasOwnProperty("issuerSerial")) + if (!$util.isInteger(message.issuerSerial)) + return "issuerSerial: integer expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) + return "key: buffer expected"; + if (message.notBefore != null && message.hasOwnProperty("notBefore")) + if (!$util.isInteger(message.notBefore) && !(message.notBefore && $util.isInteger(message.notBefore.low) && $util.isInteger(message.notBefore.high))) + return "notBefore: integer|Long expected"; + if (message.notAfter != null && message.hasOwnProperty("notAfter")) + if (!$util.isInteger(message.notAfter) && !(message.notAfter && $util.isInteger(message.notAfter.low) && $util.isInteger(message.notAfter.high))) + return "notAfter: integer|Long expected"; return null; }; /** - * Creates a CtwaContextData message from a plain object. Also converts values to their respective internal types. + * Creates a Details message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextData + * @memberof proto.CertChain.NoiseCertificate.Details * @static * @param {Object.} object Plain object - * @returns {proto.ChatRowOpaqueData.DraftMessage.CtwaContextData} CtwaContextData + * @returns {proto.CertChain.NoiseCertificate.Details} Details */ - CtwaContextData.fromObject = function fromObject(object) { - if (object instanceof $root.proto.ChatRowOpaqueData.DraftMessage.CtwaContextData) + Details.fromObject = function fromObject(object) { + if (object instanceof $root.proto.CertChain.NoiseCertificate.Details) return object; - var message = new $root.proto.ChatRowOpaqueData.DraftMessage.CtwaContextData(); - if (object.conversionSource != null) - message.conversionSource = String(object.conversionSource); - if (object.conversionData != null) - if (typeof object.conversionData === "string") - $util.base64.decode(object.conversionData, message.conversionData = $util.newBuffer($util.base64.length(object.conversionData)), 0); - else if (object.conversionData.length) - message.conversionData = object.conversionData; - if (object.sourceUrl != null) - message.sourceUrl = String(object.sourceUrl); - if (object.sourceId != null) - message.sourceId = String(object.sourceId); - if (object.sourceType != null) - message.sourceType = String(object.sourceType); - if (object.title != null) - message.title = String(object.title); - if (object.description != null) - message.description = String(object.description); - if (object.thumbnail != null) - message.thumbnail = String(object.thumbnail); - if (object.thumbnailUrl != null) - message.thumbnailUrl = String(object.thumbnailUrl); - switch (object.mediaType) { - case "NONE": - case 0: - message.mediaType = 0; - break; - case "IMAGE": - case 1: - message.mediaType = 1; - break; - case "VIDEO": - case 2: - message.mediaType = 2; - break; - } - if (object.mediaUrl != null) - message.mediaUrl = String(object.mediaUrl); - if (object.isSuspiciousLink != null) - message.isSuspiciousLink = Boolean(object.isSuspiciousLink); + var message = new $root.proto.CertChain.NoiseCertificate.Details(); + if (object.serial != null) + message.serial = object.serial >>> 0; + if (object.issuerSerial != null) + message.issuerSerial = object.issuerSerial >>> 0; + if (object.key != null) + if (typeof object.key === "string") + $util.base64.decode(object.key, message.key = $util.newBuffer($util.base64.length(object.key)), 0); + else if (object.key.length) + message.key = object.key; + if (object.notBefore != null) + if ($util.Long) + (message.notBefore = $util.Long.fromValue(object.notBefore)).unsigned = true; + else if (typeof object.notBefore === "string") + message.notBefore = parseInt(object.notBefore, 10); + else if (typeof object.notBefore === "number") + message.notBefore = object.notBefore; + else if (typeof object.notBefore === "object") + message.notBefore = new $util.LongBits(object.notBefore.low >>> 0, object.notBefore.high >>> 0).toNumber(true); + if (object.notAfter != null) + if ($util.Long) + (message.notAfter = $util.Long.fromValue(object.notAfter)).unsigned = true; + else if (typeof object.notAfter === "string") + message.notAfter = parseInt(object.notAfter, 10); + else if (typeof object.notAfter === "number") + message.notAfter = object.notAfter; + else if (typeof object.notAfter === "object") + message.notAfter = new $util.LongBits(object.notAfter.low >>> 0, object.notAfter.high >>> 0).toNumber(true); return message; }; /** - * Creates a plain object from a CtwaContextData message. Also converts values to other types if specified. + * Creates a plain object from a Details message. Also converts values to other types if specified. * @function toObject - * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextData + * @memberof proto.CertChain.NoiseCertificate.Details * @static - * @param {proto.ChatRowOpaqueData.DraftMessage.CtwaContextData} message CtwaContextData + * @param {proto.CertChain.NoiseCertificate.Details} message Details * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CtwaContextData.toObject = function toObject(message, options) { + Details.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.conversionSource = ""; + object.serial = 0; + object.issuerSerial = 0; if (options.bytes === String) - object.conversionData = ""; + object.key = ""; else { - object.conversionData = []; + object.key = []; if (options.bytes !== Array) - object.conversionData = $util.newBuffer(object.conversionData); + object.key = $util.newBuffer(object.key); } - object.sourceUrl = ""; - object.sourceId = ""; - object.sourceType = ""; - object.title = ""; - object.description = ""; - object.thumbnail = ""; - object.thumbnailUrl = ""; - object.mediaType = options.enums === String ? "NONE" : 0; - object.mediaUrl = ""; - object.isSuspiciousLink = false; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.notBefore = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.notBefore = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.notAfter = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.notAfter = options.longs === String ? "0" : 0; } - if (message.conversionSource != null && message.hasOwnProperty("conversionSource")) - object.conversionSource = message.conversionSource; - if (message.conversionData != null && message.hasOwnProperty("conversionData")) - object.conversionData = options.bytes === String ? $util.base64.encode(message.conversionData, 0, message.conversionData.length) : options.bytes === Array ? Array.prototype.slice.call(message.conversionData) : message.conversionData; - if (message.sourceUrl != null && message.hasOwnProperty("sourceUrl")) - object.sourceUrl = message.sourceUrl; - if (message.sourceId != null && message.hasOwnProperty("sourceId")) - object.sourceId = message.sourceId; - if (message.sourceType != null && message.hasOwnProperty("sourceType")) - object.sourceType = message.sourceType; - if (message.title != null && message.hasOwnProperty("title")) - object.title = message.title; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.thumbnail != null && message.hasOwnProperty("thumbnail")) - object.thumbnail = message.thumbnail; - if (message.thumbnailUrl != null && message.hasOwnProperty("thumbnailUrl")) - object.thumbnailUrl = message.thumbnailUrl; - if (message.mediaType != null && message.hasOwnProperty("mediaType")) - object.mediaType = options.enums === String ? $root.proto.ChatRowOpaqueData.DraftMessage.CtwaContextData.ContextInfoExternalAdReplyInfoMediaType[message.mediaType] : message.mediaType; - if (message.mediaUrl != null && message.hasOwnProperty("mediaUrl")) - object.mediaUrl = message.mediaUrl; - if (message.isSuspiciousLink != null && message.hasOwnProperty("isSuspiciousLink")) - object.isSuspiciousLink = message.isSuspiciousLink; + if (message.serial != null && message.hasOwnProperty("serial")) + object.serial = message.serial; + if (message.issuerSerial != null && message.hasOwnProperty("issuerSerial")) + object.issuerSerial = message.issuerSerial; + if (message.key != null && message.hasOwnProperty("key")) + object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; + if (message.notBefore != null && message.hasOwnProperty("notBefore")) + if (typeof message.notBefore === "number") + object.notBefore = options.longs === String ? String(message.notBefore) : message.notBefore; + else + object.notBefore = options.longs === String ? $util.Long.prototype.toString.call(message.notBefore) : options.longs === Number ? new $util.LongBits(message.notBefore.low >>> 0, message.notBefore.high >>> 0).toNumber(true) : message.notBefore; + if (message.notAfter != null && message.hasOwnProperty("notAfter")) + if (typeof message.notAfter === "number") + object.notAfter = options.longs === String ? String(message.notAfter) : message.notAfter; + else + object.notAfter = options.longs === String ? $util.Long.prototype.toString.call(message.notAfter) : options.longs === Number ? new $util.LongBits(message.notAfter.low >>> 0, message.notAfter.high >>> 0).toNumber(true) : message.notAfter; return object; }; /** - * Converts this CtwaContextData to JSON. + * Converts this Details to JSON. * @function toJSON - * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextData + * @memberof proto.CertChain.NoiseCertificate.Details * @instance * @returns {Object.} JSON object */ - CtwaContextData.prototype.toJSON = function toJSON() { + Details.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * ContextInfoExternalAdReplyInfoMediaType enum. - * @name proto.ChatRowOpaqueData.DraftMessage.CtwaContextData.ContextInfoExternalAdReplyInfoMediaType - * @enum {number} - * @property {number} NONE=0 NONE value - * @property {number} IMAGE=1 IMAGE value - * @property {number} VIDEO=2 VIDEO value - */ - CtwaContextData.ContextInfoExternalAdReplyInfoMediaType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NONE"] = 0; - values[valuesById[1] = "IMAGE"] = 1; - values[valuesById[2] = "VIDEO"] = 2; - return values; - })(); - - return CtwaContextData; + return Details; })(); - DraftMessage.CtwaContextLinkData = (function() { + return NoiseCertificate; + })(); - /** - * Properties of a CtwaContextLinkData. - * @memberof proto.ChatRowOpaqueData.DraftMessage - * @interface ICtwaContextLinkData - * @property {string|null} [context] CtwaContextLinkData context - * @property {string|null} [sourceUrl] CtwaContextLinkData sourceUrl - * @property {string|null} [icebreaker] CtwaContextLinkData icebreaker - * @property {string|null} [phone] CtwaContextLinkData phone - */ + return CertChain; + })(); - /** - * Constructs a new CtwaContextLinkData. - * @memberof proto.ChatRowOpaqueData.DraftMessage - * @classdesc Represents a CtwaContextLinkData. - * @implements ICtwaContextLinkData - * @constructor - * @param {proto.ChatRowOpaqueData.DraftMessage.ICtwaContextLinkData=} [properties] Properties to set - */ - function CtwaContextLinkData(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + proto.ChatRowOpaqueData = (function() { - /** - * CtwaContextLinkData context. - * @member {string} context - * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData - * @instance - */ - CtwaContextLinkData.prototype.context = ""; + /** + * Properties of a ChatRowOpaqueData. + * @memberof proto + * @interface IChatRowOpaqueData + * @property {proto.ChatRowOpaqueData.IDraftMessage|null} [draftMessage] ChatRowOpaqueData draftMessage + */ - /** - * CtwaContextLinkData sourceUrl. - * @member {string} sourceUrl - * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData - * @instance - */ - CtwaContextLinkData.prototype.sourceUrl = ""; + /** + * Constructs a new ChatRowOpaqueData. + * @memberof proto + * @classdesc Represents a ChatRowOpaqueData. + * @implements IChatRowOpaqueData + * @constructor + * @param {proto.IChatRowOpaqueData=} [properties] Properties to set + */ + function ChatRowOpaqueData(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * CtwaContextLinkData icebreaker. - * @member {string} icebreaker - * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData - * @instance - */ - CtwaContextLinkData.prototype.icebreaker = ""; + /** + * ChatRowOpaqueData draftMessage. + * @member {proto.ChatRowOpaqueData.IDraftMessage|null|undefined} draftMessage + * @memberof proto.ChatRowOpaqueData + * @instance + */ + ChatRowOpaqueData.prototype.draftMessage = null; - /** - * CtwaContextLinkData phone. - * @member {string} phone - * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData - * @instance - */ - CtwaContextLinkData.prototype.phone = ""; + /** + * Creates a new ChatRowOpaqueData instance using the specified properties. + * @function create + * @memberof proto.ChatRowOpaqueData + * @static + * @param {proto.IChatRowOpaqueData=} [properties] Properties to set + * @returns {proto.ChatRowOpaqueData} ChatRowOpaqueData instance + */ + ChatRowOpaqueData.create = function create(properties) { + return new ChatRowOpaqueData(properties); + }; - /** - * Creates a new CtwaContextLinkData instance using the specified properties. - * @function create - * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData - * @static - * @param {proto.ChatRowOpaqueData.DraftMessage.ICtwaContextLinkData=} [properties] Properties to set - * @returns {proto.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData} CtwaContextLinkData instance - */ - CtwaContextLinkData.create = function create(properties) { - return new CtwaContextLinkData(properties); - }; + /** + * Encodes the specified ChatRowOpaqueData message. Does not implicitly {@link proto.ChatRowOpaqueData.verify|verify} messages. + * @function encode + * @memberof proto.ChatRowOpaqueData + * @static + * @param {proto.IChatRowOpaqueData} message ChatRowOpaqueData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChatRowOpaqueData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.draftMessage != null && Object.hasOwnProperty.call(message, "draftMessage")) + $root.proto.ChatRowOpaqueData.DraftMessage.encode(message.draftMessage, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; - /** - * Encodes the specified CtwaContextLinkData message. Does not implicitly {@link proto.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData.verify|verify} messages. - * @function encode - * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData - * @static - * @param {proto.ChatRowOpaqueData.DraftMessage.ICtwaContextLinkData} message CtwaContextLinkData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CtwaContextLinkData.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.context != null && Object.hasOwnProperty.call(message, "context")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.context); - if (message.sourceUrl != null && Object.hasOwnProperty.call(message, "sourceUrl")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceUrl); - if (message.icebreaker != null && Object.hasOwnProperty.call(message, "icebreaker")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.icebreaker); - if (message.phone != null && Object.hasOwnProperty.call(message, "phone")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.phone); - return writer; - }; + /** + * Encodes the specified ChatRowOpaqueData message, length delimited. Does not implicitly {@link proto.ChatRowOpaqueData.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.ChatRowOpaqueData + * @static + * @param {proto.IChatRowOpaqueData} message ChatRowOpaqueData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChatRowOpaqueData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Encodes the specified CtwaContextLinkData message, length delimited. Does not implicitly {@link proto.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData - * @static - * @param {proto.ChatRowOpaqueData.DraftMessage.ICtwaContextLinkData} message CtwaContextLinkData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CtwaContextLinkData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CtwaContextLinkData message from the specified reader or buffer. - * @function decode - * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData} CtwaContextLinkData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CtwaContextLinkData.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.context = reader.string(); - break; - case 2: - message.sourceUrl = reader.string(); - break; - case 3: - message.icebreaker = reader.string(); - break; - case 4: - message.phone = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CtwaContextLinkData message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData} CtwaContextLinkData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CtwaContextLinkData.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CtwaContextLinkData message. - * @function verify - * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CtwaContextLinkData.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.context != null && message.hasOwnProperty("context")) - if (!$util.isString(message.context)) - return "context: string expected"; - if (message.sourceUrl != null && message.hasOwnProperty("sourceUrl")) - if (!$util.isString(message.sourceUrl)) - return "sourceUrl: string expected"; - if (message.icebreaker != null && message.hasOwnProperty("icebreaker")) - if (!$util.isString(message.icebreaker)) - return "icebreaker: string expected"; - if (message.phone != null && message.hasOwnProperty("phone")) - if (!$util.isString(message.phone)) - return "phone: string expected"; - return null; - }; - - /** - * Creates a CtwaContextLinkData message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData - * @static - * @param {Object.} object Plain object - * @returns {proto.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData} CtwaContextLinkData - */ - CtwaContextLinkData.fromObject = function fromObject(object) { - if (object instanceof $root.proto.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData) - return object; - var message = new $root.proto.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData(); - if (object.context != null) - message.context = String(object.context); - if (object.sourceUrl != null) - message.sourceUrl = String(object.sourceUrl); - if (object.icebreaker != null) - message.icebreaker = String(object.icebreaker); - if (object.phone != null) - message.phone = String(object.phone); - return message; - }; - - /** - * Creates a plain object from a CtwaContextLinkData message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData - * @static - * @param {proto.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData} message CtwaContextLinkData - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CtwaContextLinkData.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.context = ""; - object.sourceUrl = ""; - object.icebreaker = ""; - object.phone = ""; - } - if (message.context != null && message.hasOwnProperty("context")) - object.context = message.context; - if (message.sourceUrl != null && message.hasOwnProperty("sourceUrl")) - object.sourceUrl = message.sourceUrl; - if (message.icebreaker != null && message.hasOwnProperty("icebreaker")) - object.icebreaker = message.icebreaker; - if (message.phone != null && message.hasOwnProperty("phone")) - object.phone = message.phone; - return object; - }; - - /** - * Converts this CtwaContextLinkData to JSON. - * @function toJSON - * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData - * @instance - * @returns {Object.} JSON object - */ - CtwaContextLinkData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return CtwaContextLinkData; - })(); - - return DraftMessage; - })(); - - return ChatRowOpaqueData; - })(); - - proto.ClientPayload = (function() { - - /** - * Properties of a ClientPayload. - * @memberof proto - * @interface IClientPayload - * @property {number|Long|null} [username] ClientPayload username - * @property {boolean|null} [passive] ClientPayload passive - * @property {proto.ClientPayload.IUserAgent|null} [userAgent] ClientPayload userAgent - * @property {proto.ClientPayload.IWebInfo|null} [webInfo] ClientPayload webInfo - * @property {string|null} [pushName] ClientPayload pushName - * @property {number|null} [sessionId] ClientPayload sessionId - * @property {boolean|null} [shortConnect] ClientPayload shortConnect - * @property {proto.ClientPayload.ConnectType|null} [connectType] ClientPayload connectType - * @property {proto.ClientPayload.ConnectReason|null} [connectReason] ClientPayload connectReason - * @property {Array.|null} [shards] ClientPayload shards - * @property {proto.ClientPayload.IDNSSource|null} [dnsSource] ClientPayload dnsSource - * @property {number|null} [connectAttemptCount] ClientPayload connectAttemptCount - * @property {number|null} [device] ClientPayload device - * @property {proto.ClientPayload.IDevicePairingRegistrationData|null} [devicePairingData] ClientPayload devicePairingData - * @property {proto.ClientPayload.Product|null} [product] ClientPayload product - * @property {Uint8Array|null} [fbCat] ClientPayload fbCat - * @property {Uint8Array|null} [fbUserAgent] ClientPayload fbUserAgent - * @property {boolean|null} [oc] ClientPayload oc - * @property {number|null} [lc] ClientPayload lc - * @property {proto.ClientPayload.IOSAppExtension|null} [iosAppExtension] ClientPayload iosAppExtension - * @property {number|Long|null} [fbAppId] ClientPayload fbAppId - * @property {Uint8Array|null} [fbDeviceId] ClientPayload fbDeviceId - * @property {boolean|null} [pull] ClientPayload pull - * @property {Uint8Array|null} [paddingBytes] ClientPayload paddingBytes - * @property {number|null} [yearClass] ClientPayload yearClass - * @property {number|null} [memClass] ClientPayload memClass - * @property {proto.ClientPayload.IInteropData|null} [interopData] ClientPayload interopData - */ + /** + * Decodes a ChatRowOpaqueData message from the specified reader or buffer. + * @function decode + * @memberof proto.ChatRowOpaqueData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.ChatRowOpaqueData} ChatRowOpaqueData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChatRowOpaqueData.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.ChatRowOpaqueData(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.draftMessage = $root.proto.ChatRowOpaqueData.DraftMessage.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Constructs a new ClientPayload. - * @memberof proto - * @classdesc Represents a ClientPayload. - * @implements IClientPayload - * @constructor - * @param {proto.IClientPayload=} [properties] Properties to set + * Decodes a ChatRowOpaqueData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.ChatRowOpaqueData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.ChatRowOpaqueData} ChatRowOpaqueData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - function ClientPayload(properties) { - this.shards = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + ChatRowOpaqueData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * ClientPayload username. - * @member {number|Long} username - * @memberof proto.ClientPayload - * @instance + * Verifies a ChatRowOpaqueData message. + * @function verify + * @memberof proto.ChatRowOpaqueData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ClientPayload.prototype.username = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + ChatRowOpaqueData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.draftMessage != null && message.hasOwnProperty("draftMessage")) { + var error = $root.proto.ChatRowOpaqueData.DraftMessage.verify(message.draftMessage); + if (error) + return "draftMessage." + error; + } + return null; + }; /** - * ClientPayload passive. - * @member {boolean} passive - * @memberof proto.ClientPayload - * @instance + * Creates a ChatRowOpaqueData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.ChatRowOpaqueData + * @static + * @param {Object.} object Plain object + * @returns {proto.ChatRowOpaqueData} ChatRowOpaqueData */ - ClientPayload.prototype.passive = false; + ChatRowOpaqueData.fromObject = function fromObject(object) { + if (object instanceof $root.proto.ChatRowOpaqueData) + return object; + var message = new $root.proto.ChatRowOpaqueData(); + if (object.draftMessage != null) { + if (typeof object.draftMessage !== "object") + throw TypeError(".proto.ChatRowOpaqueData.draftMessage: object expected"); + message.draftMessage = $root.proto.ChatRowOpaqueData.DraftMessage.fromObject(object.draftMessage); + } + return message; + }; /** - * ClientPayload userAgent. - * @member {proto.ClientPayload.IUserAgent|null|undefined} userAgent - * @memberof proto.ClientPayload - * @instance + * Creates a plain object from a ChatRowOpaqueData message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.ChatRowOpaqueData + * @static + * @param {proto.ChatRowOpaqueData} message ChatRowOpaqueData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - ClientPayload.prototype.userAgent = null; + ChatRowOpaqueData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.draftMessage = null; + if (message.draftMessage != null && message.hasOwnProperty("draftMessage")) + object.draftMessage = $root.proto.ChatRowOpaqueData.DraftMessage.toObject(message.draftMessage, options); + return object; + }; /** - * ClientPayload webInfo. - * @member {proto.ClientPayload.IWebInfo|null|undefined} webInfo - * @memberof proto.ClientPayload + * Converts this ChatRowOpaqueData to JSON. + * @function toJSON + * @memberof proto.ChatRowOpaqueData * @instance + * @returns {Object.} JSON object */ - ClientPayload.prototype.webInfo = null; + ChatRowOpaqueData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * ClientPayload pushName. - * @member {string} pushName - * @memberof proto.ClientPayload - * @instance - */ - ClientPayload.prototype.pushName = ""; + ChatRowOpaqueData.DraftMessage = (function() { - /** - * ClientPayload sessionId. - * @member {number} sessionId - * @memberof proto.ClientPayload - * @instance - */ - ClientPayload.prototype.sessionId = 0; + /** + * Properties of a DraftMessage. + * @memberof proto.ChatRowOpaqueData + * @interface IDraftMessage + * @property {string|null} [text] DraftMessage text + * @property {string|null} [omittedUrl] DraftMessage omittedUrl + * @property {proto.ChatRowOpaqueData.DraftMessage.ICtwaContextLinkData|null} [ctwaContextLinkData] DraftMessage ctwaContextLinkData + * @property {proto.ChatRowOpaqueData.DraftMessage.ICtwaContextData|null} [ctwaContext] DraftMessage ctwaContext + * @property {number|Long|null} [timestamp] DraftMessage timestamp + */ - /** - * ClientPayload shortConnect. - * @member {boolean} shortConnect - * @memberof proto.ClientPayload - * @instance - */ - ClientPayload.prototype.shortConnect = false; + /** + * Constructs a new DraftMessage. + * @memberof proto.ChatRowOpaqueData + * @classdesc Represents a DraftMessage. + * @implements IDraftMessage + * @constructor + * @param {proto.ChatRowOpaqueData.IDraftMessage=} [properties] Properties to set + */ + function DraftMessage(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * ClientPayload connectType. - * @member {proto.ClientPayload.ConnectType} connectType - * @memberof proto.ClientPayload - * @instance - */ - ClientPayload.prototype.connectType = 0; + /** + * DraftMessage text. + * @member {string} text + * @memberof proto.ChatRowOpaqueData.DraftMessage + * @instance + */ + DraftMessage.prototype.text = ""; - /** - * ClientPayload connectReason. - * @member {proto.ClientPayload.ConnectReason} connectReason - * @memberof proto.ClientPayload - * @instance - */ - ClientPayload.prototype.connectReason = 0; + /** + * DraftMessage omittedUrl. + * @member {string} omittedUrl + * @memberof proto.ChatRowOpaqueData.DraftMessage + * @instance + */ + DraftMessage.prototype.omittedUrl = ""; - /** - * ClientPayload shards. - * @member {Array.} shards - * @memberof proto.ClientPayload - * @instance - */ - ClientPayload.prototype.shards = $util.emptyArray; + /** + * DraftMessage ctwaContextLinkData. + * @member {proto.ChatRowOpaqueData.DraftMessage.ICtwaContextLinkData|null|undefined} ctwaContextLinkData + * @memberof proto.ChatRowOpaqueData.DraftMessage + * @instance + */ + DraftMessage.prototype.ctwaContextLinkData = null; - /** - * ClientPayload dnsSource. - * @member {proto.ClientPayload.IDNSSource|null|undefined} dnsSource - * @memberof proto.ClientPayload - * @instance - */ - ClientPayload.prototype.dnsSource = null; + /** + * DraftMessage ctwaContext. + * @member {proto.ChatRowOpaqueData.DraftMessage.ICtwaContextData|null|undefined} ctwaContext + * @memberof proto.ChatRowOpaqueData.DraftMessage + * @instance + */ + DraftMessage.prototype.ctwaContext = null; - /** - * ClientPayload connectAttemptCount. - * @member {number} connectAttemptCount - * @memberof proto.ClientPayload - * @instance - */ - ClientPayload.prototype.connectAttemptCount = 0; + /** + * DraftMessage timestamp. + * @member {number|Long} timestamp + * @memberof proto.ChatRowOpaqueData.DraftMessage + * @instance + */ + DraftMessage.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * ClientPayload device. - * @member {number} device - * @memberof proto.ClientPayload - * @instance - */ - ClientPayload.prototype.device = 0; + /** + * Creates a new DraftMessage instance using the specified properties. + * @function create + * @memberof proto.ChatRowOpaqueData.DraftMessage + * @static + * @param {proto.ChatRowOpaqueData.IDraftMessage=} [properties] Properties to set + * @returns {proto.ChatRowOpaqueData.DraftMessage} DraftMessage instance + */ + DraftMessage.create = function create(properties) { + return new DraftMessage(properties); + }; - /** - * ClientPayload devicePairingData. - * @member {proto.ClientPayload.IDevicePairingRegistrationData|null|undefined} devicePairingData - * @memberof proto.ClientPayload - * @instance - */ - ClientPayload.prototype.devicePairingData = null; + /** + * Encodes the specified DraftMessage message. Does not implicitly {@link proto.ChatRowOpaqueData.DraftMessage.verify|verify} messages. + * @function encode + * @memberof proto.ChatRowOpaqueData.DraftMessage + * @static + * @param {proto.ChatRowOpaqueData.IDraftMessage} message DraftMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DraftMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); + if (message.omittedUrl != null && Object.hasOwnProperty.call(message, "omittedUrl")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.omittedUrl); + if (message.ctwaContextLinkData != null && Object.hasOwnProperty.call(message, "ctwaContextLinkData")) + $root.proto.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData.encode(message.ctwaContextLinkData, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.ctwaContext != null && Object.hasOwnProperty.call(message, "ctwaContext")) + $root.proto.ChatRowOpaqueData.DraftMessage.CtwaContextData.encode(message.ctwaContext, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.timestamp); + return writer; + }; - /** - * ClientPayload product. - * @member {proto.ClientPayload.Product} product - * @memberof proto.ClientPayload - * @instance - */ - ClientPayload.prototype.product = 0; + /** + * Encodes the specified DraftMessage message, length delimited. Does not implicitly {@link proto.ChatRowOpaqueData.DraftMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.ChatRowOpaqueData.DraftMessage + * @static + * @param {proto.ChatRowOpaqueData.IDraftMessage} message DraftMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DraftMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * ClientPayload fbCat. - * @member {Uint8Array} fbCat - * @memberof proto.ClientPayload - * @instance - */ - ClientPayload.prototype.fbCat = $util.newBuffer([]); + /** + * Decodes a DraftMessage message from the specified reader or buffer. + * @function decode + * @memberof proto.ChatRowOpaqueData.DraftMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.ChatRowOpaqueData.DraftMessage} DraftMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DraftMessage.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.ChatRowOpaqueData.DraftMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.text = reader.string(); + break; + case 2: + message.omittedUrl = reader.string(); + break; + case 3: + message.ctwaContextLinkData = $root.proto.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData.decode(reader, reader.uint32()); + break; + case 4: + message.ctwaContext = $root.proto.ChatRowOpaqueData.DraftMessage.CtwaContextData.decode(reader, reader.uint32()); + break; + case 5: + message.timestamp = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * ClientPayload fbUserAgent. - * @member {Uint8Array} fbUserAgent - * @memberof proto.ClientPayload - * @instance - */ - ClientPayload.prototype.fbUserAgent = $util.newBuffer([]); + /** + * Decodes a DraftMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.ChatRowOpaqueData.DraftMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.ChatRowOpaqueData.DraftMessage} DraftMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DraftMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * ClientPayload oc. - * @member {boolean} oc - * @memberof proto.ClientPayload - * @instance - */ - ClientPayload.prototype.oc = false; + /** + * Verifies a DraftMessage message. + * @function verify + * @memberof proto.ChatRowOpaqueData.DraftMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DraftMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.text != null && message.hasOwnProperty("text")) + if (!$util.isString(message.text)) + return "text: string expected"; + if (message.omittedUrl != null && message.hasOwnProperty("omittedUrl")) + if (!$util.isString(message.omittedUrl)) + return "omittedUrl: string expected"; + if (message.ctwaContextLinkData != null && message.hasOwnProperty("ctwaContextLinkData")) { + var error = $root.proto.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData.verify(message.ctwaContextLinkData); + if (error) + return "ctwaContextLinkData." + error; + } + if (message.ctwaContext != null && message.hasOwnProperty("ctwaContext")) { + var error = $root.proto.ChatRowOpaqueData.DraftMessage.CtwaContextData.verify(message.ctwaContext); + if (error) + return "ctwaContext." + error; + } + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high))) + return "timestamp: integer|Long expected"; + return null; + }; - /** - * ClientPayload lc. - * @member {number} lc - * @memberof proto.ClientPayload - * @instance - */ - ClientPayload.prototype.lc = 0; + /** + * Creates a DraftMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.ChatRowOpaqueData.DraftMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.ChatRowOpaqueData.DraftMessage} DraftMessage + */ + DraftMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.ChatRowOpaqueData.DraftMessage) + return object; + var message = new $root.proto.ChatRowOpaqueData.DraftMessage(); + if (object.text != null) + message.text = String(object.text); + if (object.omittedUrl != null) + message.omittedUrl = String(object.omittedUrl); + if (object.ctwaContextLinkData != null) { + if (typeof object.ctwaContextLinkData !== "object") + throw TypeError(".proto.ChatRowOpaqueData.DraftMessage.ctwaContextLinkData: object expected"); + message.ctwaContextLinkData = $root.proto.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData.fromObject(object.ctwaContextLinkData); + } + if (object.ctwaContext != null) { + if (typeof object.ctwaContext !== "object") + throw TypeError(".proto.ChatRowOpaqueData.DraftMessage.ctwaContext: object expected"); + message.ctwaContext = $root.proto.ChatRowOpaqueData.DraftMessage.CtwaContextData.fromObject(object.ctwaContext); + } + if (object.timestamp != null) + if ($util.Long) + (message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = false; + else if (typeof object.timestamp === "string") + message.timestamp = parseInt(object.timestamp, 10); + else if (typeof object.timestamp === "number") + message.timestamp = object.timestamp; + else if (typeof object.timestamp === "object") + message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber(); + return message; + }; - /** - * ClientPayload iosAppExtension. - * @member {proto.ClientPayload.IOSAppExtension} iosAppExtension - * @memberof proto.ClientPayload - * @instance - */ - ClientPayload.prototype.iosAppExtension = 0; + /** + * Creates a plain object from a DraftMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.ChatRowOpaqueData.DraftMessage + * @static + * @param {proto.ChatRowOpaqueData.DraftMessage} message DraftMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DraftMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.text = ""; + object.omittedUrl = ""; + object.ctwaContextLinkData = null; + object.ctwaContext = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.timestamp = options.longs === String ? "0" : 0; + } + if (message.text != null && message.hasOwnProperty("text")) + object.text = message.text; + if (message.omittedUrl != null && message.hasOwnProperty("omittedUrl")) + object.omittedUrl = message.omittedUrl; + if (message.ctwaContextLinkData != null && message.hasOwnProperty("ctwaContextLinkData")) + object.ctwaContextLinkData = $root.proto.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData.toObject(message.ctwaContextLinkData, options); + if (message.ctwaContext != null && message.hasOwnProperty("ctwaContext")) + object.ctwaContext = $root.proto.ChatRowOpaqueData.DraftMessage.CtwaContextData.toObject(message.ctwaContext, options); + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + if (typeof message.timestamp === "number") + object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp; + else + object.timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber() : message.timestamp; + return object; + }; - /** - * ClientPayload fbAppId. - * @member {number|Long} fbAppId - * @memberof proto.ClientPayload - * @instance - */ - ClientPayload.prototype.fbAppId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + /** + * Converts this DraftMessage to JSON. + * @function toJSON + * @memberof proto.ChatRowOpaqueData.DraftMessage + * @instance + * @returns {Object.} JSON object + */ + DraftMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * ClientPayload fbDeviceId. - * @member {Uint8Array} fbDeviceId - * @memberof proto.ClientPayload - * @instance - */ - ClientPayload.prototype.fbDeviceId = $util.newBuffer([]); + DraftMessage.CtwaContextData = (function() { - /** - * ClientPayload pull. - * @member {boolean} pull - * @memberof proto.ClientPayload - * @instance - */ - ClientPayload.prototype.pull = false; + /** + * Properties of a CtwaContextData. + * @memberof proto.ChatRowOpaqueData.DraftMessage + * @interface ICtwaContextData + * @property {string|null} [conversionSource] CtwaContextData conversionSource + * @property {Uint8Array|null} [conversionData] CtwaContextData conversionData + * @property {string|null} [sourceUrl] CtwaContextData sourceUrl + * @property {string|null} [sourceId] CtwaContextData sourceId + * @property {string|null} [sourceType] CtwaContextData sourceType + * @property {string|null} [title] CtwaContextData title + * @property {string|null} [description] CtwaContextData description + * @property {string|null} [thumbnail] CtwaContextData thumbnail + * @property {string|null} [thumbnailUrl] CtwaContextData thumbnailUrl + * @property {proto.ChatRowOpaqueData.DraftMessage.CtwaContextData.ContextInfoExternalAdReplyInfoMediaType|null} [mediaType] CtwaContextData mediaType + * @property {string|null} [mediaUrl] CtwaContextData mediaUrl + * @property {boolean|null} [isSuspiciousLink] CtwaContextData isSuspiciousLink + */ - /** - * ClientPayload paddingBytes. - * @member {Uint8Array} paddingBytes - * @memberof proto.ClientPayload - * @instance - */ - ClientPayload.prototype.paddingBytes = $util.newBuffer([]); + /** + * Constructs a new CtwaContextData. + * @memberof proto.ChatRowOpaqueData.DraftMessage + * @classdesc Represents a CtwaContextData. + * @implements ICtwaContextData + * @constructor + * @param {proto.ChatRowOpaqueData.DraftMessage.ICtwaContextData=} [properties] Properties to set + */ + function CtwaContextData(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * ClientPayload yearClass. - * @member {number} yearClass - * @memberof proto.ClientPayload - * @instance - */ - ClientPayload.prototype.yearClass = 0; + /** + * CtwaContextData conversionSource. + * @member {string} conversionSource + * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextData + * @instance + */ + CtwaContextData.prototype.conversionSource = ""; - /** - * ClientPayload memClass. - * @member {number} memClass - * @memberof proto.ClientPayload - * @instance - */ - ClientPayload.prototype.memClass = 0; + /** + * CtwaContextData conversionData. + * @member {Uint8Array} conversionData + * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextData + * @instance + */ + CtwaContextData.prototype.conversionData = $util.newBuffer([]); - /** - * ClientPayload interopData. - * @member {proto.ClientPayload.IInteropData|null|undefined} interopData - * @memberof proto.ClientPayload - * @instance - */ - ClientPayload.prototype.interopData = null; + /** + * CtwaContextData sourceUrl. + * @member {string} sourceUrl + * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextData + * @instance + */ + CtwaContextData.prototype.sourceUrl = ""; - /** - * Creates a new ClientPayload instance using the specified properties. - * @function create - * @memberof proto.ClientPayload - * @static - * @param {proto.IClientPayload=} [properties] Properties to set - * @returns {proto.ClientPayload} ClientPayload instance - */ - ClientPayload.create = function create(properties) { - return new ClientPayload(properties); - }; + /** + * CtwaContextData sourceId. + * @member {string} sourceId + * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextData + * @instance + */ + CtwaContextData.prototype.sourceId = ""; - /** - * Encodes the specified ClientPayload message. Does not implicitly {@link proto.ClientPayload.verify|verify} messages. - * @function encode - * @memberof proto.ClientPayload - * @static - * @param {proto.IClientPayload} message ClientPayload message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientPayload.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.username != null && Object.hasOwnProperty.call(message, "username")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.username); - if (message.passive != null && Object.hasOwnProperty.call(message, "passive")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.passive); - if (message.userAgent != null && Object.hasOwnProperty.call(message, "userAgent")) - $root.proto.ClientPayload.UserAgent.encode(message.userAgent, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.webInfo != null && Object.hasOwnProperty.call(message, "webInfo")) - $root.proto.ClientPayload.WebInfo.encode(message.webInfo, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.pushName != null && Object.hasOwnProperty.call(message, "pushName")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.pushName); - if (message.sessionId != null && Object.hasOwnProperty.call(message, "sessionId")) - writer.uint32(/* id 9, wireType 5 =*/77).sfixed32(message.sessionId); - if (message.shortConnect != null && Object.hasOwnProperty.call(message, "shortConnect")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.shortConnect); - if (message.connectType != null && Object.hasOwnProperty.call(message, "connectType")) - writer.uint32(/* id 12, wireType 0 =*/96).int32(message.connectType); - if (message.connectReason != null && Object.hasOwnProperty.call(message, "connectReason")) - writer.uint32(/* id 13, wireType 0 =*/104).int32(message.connectReason); - if (message.shards != null && message.shards.length) - for (var i = 0; i < message.shards.length; ++i) - writer.uint32(/* id 14, wireType 0 =*/112).int32(message.shards[i]); - if (message.dnsSource != null && Object.hasOwnProperty.call(message, "dnsSource")) - $root.proto.ClientPayload.DNSSource.encode(message.dnsSource, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - if (message.connectAttemptCount != null && Object.hasOwnProperty.call(message, "connectAttemptCount")) - writer.uint32(/* id 16, wireType 0 =*/128).uint32(message.connectAttemptCount); - if (message.device != null && Object.hasOwnProperty.call(message, "device")) - writer.uint32(/* id 18, wireType 0 =*/144).uint32(message.device); - if (message.devicePairingData != null && Object.hasOwnProperty.call(message, "devicePairingData")) - $root.proto.ClientPayload.DevicePairingRegistrationData.encode(message.devicePairingData, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); - if (message.product != null && Object.hasOwnProperty.call(message, "product")) - writer.uint32(/* id 20, wireType 0 =*/160).int32(message.product); - if (message.fbCat != null && Object.hasOwnProperty.call(message, "fbCat")) - writer.uint32(/* id 21, wireType 2 =*/170).bytes(message.fbCat); - if (message.fbUserAgent != null && Object.hasOwnProperty.call(message, "fbUserAgent")) - writer.uint32(/* id 22, wireType 2 =*/178).bytes(message.fbUserAgent); - if (message.oc != null && Object.hasOwnProperty.call(message, "oc")) - writer.uint32(/* id 23, wireType 0 =*/184).bool(message.oc); - if (message.lc != null && Object.hasOwnProperty.call(message, "lc")) - writer.uint32(/* id 24, wireType 0 =*/192).int32(message.lc); - if (message.iosAppExtension != null && Object.hasOwnProperty.call(message, "iosAppExtension")) - writer.uint32(/* id 30, wireType 0 =*/240).int32(message.iosAppExtension); - if (message.fbAppId != null && Object.hasOwnProperty.call(message, "fbAppId")) - writer.uint32(/* id 31, wireType 0 =*/248).uint64(message.fbAppId); - if (message.fbDeviceId != null && Object.hasOwnProperty.call(message, "fbDeviceId")) - writer.uint32(/* id 32, wireType 2 =*/258).bytes(message.fbDeviceId); - if (message.pull != null && Object.hasOwnProperty.call(message, "pull")) - writer.uint32(/* id 33, wireType 0 =*/264).bool(message.pull); - if (message.paddingBytes != null && Object.hasOwnProperty.call(message, "paddingBytes")) - writer.uint32(/* id 34, wireType 2 =*/274).bytes(message.paddingBytes); - if (message.yearClass != null && Object.hasOwnProperty.call(message, "yearClass")) - writer.uint32(/* id 36, wireType 0 =*/288).int32(message.yearClass); - if (message.memClass != null && Object.hasOwnProperty.call(message, "memClass")) - writer.uint32(/* id 37, wireType 0 =*/296).int32(message.memClass); - if (message.interopData != null && Object.hasOwnProperty.call(message, "interopData")) - $root.proto.ClientPayload.InteropData.encode(message.interopData, writer.uint32(/* id 38, wireType 2 =*/306).fork()).ldelim(); - return writer; - }; + /** + * CtwaContextData sourceType. + * @member {string} sourceType + * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextData + * @instance + */ + CtwaContextData.prototype.sourceType = ""; - /** - * Encodes the specified ClientPayload message, length delimited. Does not implicitly {@link proto.ClientPayload.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.ClientPayload - * @static - * @param {proto.IClientPayload} message ClientPayload message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientPayload.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * CtwaContextData title. + * @member {string} title + * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextData + * @instance + */ + CtwaContextData.prototype.title = ""; - /** - * Decodes a ClientPayload message from the specified reader or buffer. - * @function decode - * @memberof proto.ClientPayload - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.ClientPayload} ClientPayload - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientPayload.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.ClientPayload(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.username = reader.uint64(); - break; - case 3: - message.passive = reader.bool(); - break; - case 5: - message.userAgent = $root.proto.ClientPayload.UserAgent.decode(reader, reader.uint32()); - break; - case 6: - message.webInfo = $root.proto.ClientPayload.WebInfo.decode(reader, reader.uint32()); - break; - case 7: - message.pushName = reader.string(); - break; - case 9: - message.sessionId = reader.sfixed32(); - break; - case 10: - message.shortConnect = reader.bool(); - break; - case 12: - message.connectType = reader.int32(); - break; - case 13: - message.connectReason = reader.int32(); - break; - case 14: - if (!(message.shards && message.shards.length)) - message.shards = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.shards.push(reader.int32()); - } else - message.shards.push(reader.int32()); - break; - case 15: - message.dnsSource = $root.proto.ClientPayload.DNSSource.decode(reader, reader.uint32()); - break; - case 16: - message.connectAttemptCount = reader.uint32(); - break; - case 18: - message.device = reader.uint32(); - break; - case 19: - message.devicePairingData = $root.proto.ClientPayload.DevicePairingRegistrationData.decode(reader, reader.uint32()); - break; - case 20: - message.product = reader.int32(); - break; - case 21: - message.fbCat = reader.bytes(); - break; - case 22: - message.fbUserAgent = reader.bytes(); - break; - case 23: - message.oc = reader.bool(); - break; - case 24: - message.lc = reader.int32(); - break; - case 30: - message.iosAppExtension = reader.int32(); - break; - case 31: - message.fbAppId = reader.uint64(); - break; - case 32: - message.fbDeviceId = reader.bytes(); - break; - case 33: - message.pull = reader.bool(); - break; - case 34: - message.paddingBytes = reader.bytes(); - break; - case 36: - message.yearClass = reader.int32(); - break; - case 37: - message.memClass = reader.int32(); - break; - case 38: - message.interopData = $root.proto.ClientPayload.InteropData.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * CtwaContextData description. + * @member {string} description + * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextData + * @instance + */ + CtwaContextData.prototype.description = ""; - /** - * Decodes a ClientPayload message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.ClientPayload - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.ClientPayload} ClientPayload - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientPayload.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * CtwaContextData thumbnail. + * @member {string} thumbnail + * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextData + * @instance + */ + CtwaContextData.prototype.thumbnail = ""; - /** - * Verifies a ClientPayload message. - * @function verify - * @memberof proto.ClientPayload - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ClientPayload.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.username != null && message.hasOwnProperty("username")) - if (!$util.isInteger(message.username) && !(message.username && $util.isInteger(message.username.low) && $util.isInteger(message.username.high))) - return "username: integer|Long expected"; - if (message.passive != null && message.hasOwnProperty("passive")) - if (typeof message.passive !== "boolean") - return "passive: boolean expected"; - if (message.userAgent != null && message.hasOwnProperty("userAgent")) { - var error = $root.proto.ClientPayload.UserAgent.verify(message.userAgent); - if (error) - return "userAgent." + error; + /** + * CtwaContextData thumbnailUrl. + * @member {string} thumbnailUrl + * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextData + * @instance + */ + CtwaContextData.prototype.thumbnailUrl = ""; + + /** + * CtwaContextData mediaType. + * @member {proto.ChatRowOpaqueData.DraftMessage.CtwaContextData.ContextInfoExternalAdReplyInfoMediaType} mediaType + * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextData + * @instance + */ + CtwaContextData.prototype.mediaType = 0; + + /** + * CtwaContextData mediaUrl. + * @member {string} mediaUrl + * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextData + * @instance + */ + CtwaContextData.prototype.mediaUrl = ""; + + /** + * CtwaContextData isSuspiciousLink. + * @member {boolean} isSuspiciousLink + * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextData + * @instance + */ + CtwaContextData.prototype.isSuspiciousLink = false; + + /** + * Creates a new CtwaContextData instance using the specified properties. + * @function create + * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextData + * @static + * @param {proto.ChatRowOpaqueData.DraftMessage.ICtwaContextData=} [properties] Properties to set + * @returns {proto.ChatRowOpaqueData.DraftMessage.CtwaContextData} CtwaContextData instance + */ + CtwaContextData.create = function create(properties) { + return new CtwaContextData(properties); + }; + + /** + * Encodes the specified CtwaContextData message. Does not implicitly {@link proto.ChatRowOpaqueData.DraftMessage.CtwaContextData.verify|verify} messages. + * @function encode + * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextData + * @static + * @param {proto.ChatRowOpaqueData.DraftMessage.ICtwaContextData} message CtwaContextData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CtwaContextData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.conversionSource != null && Object.hasOwnProperty.call(message, "conversionSource")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.conversionSource); + if (message.conversionData != null && Object.hasOwnProperty.call(message, "conversionData")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.conversionData); + if (message.sourceUrl != null && Object.hasOwnProperty.call(message, "sourceUrl")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.sourceUrl); + if (message.sourceId != null && Object.hasOwnProperty.call(message, "sourceId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.sourceId); + if (message.sourceType != null && Object.hasOwnProperty.call(message, "sourceType")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.sourceType); + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.title); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.description); + if (message.thumbnail != null && Object.hasOwnProperty.call(message, "thumbnail")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.thumbnail); + if (message.thumbnailUrl != null && Object.hasOwnProperty.call(message, "thumbnailUrl")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.thumbnailUrl); + if (message.mediaType != null && Object.hasOwnProperty.call(message, "mediaType")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.mediaType); + if (message.mediaUrl != null && Object.hasOwnProperty.call(message, "mediaUrl")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.mediaUrl); + if (message.isSuspiciousLink != null && Object.hasOwnProperty.call(message, "isSuspiciousLink")) + writer.uint32(/* id 12, wireType 0 =*/96).bool(message.isSuspiciousLink); + return writer; + }; + + /** + * Encodes the specified CtwaContextData message, length delimited. Does not implicitly {@link proto.ChatRowOpaqueData.DraftMessage.CtwaContextData.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextData + * @static + * @param {proto.ChatRowOpaqueData.DraftMessage.ICtwaContextData} message CtwaContextData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CtwaContextData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CtwaContextData message from the specified reader or buffer. + * @function decode + * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.ChatRowOpaqueData.DraftMessage.CtwaContextData} CtwaContextData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CtwaContextData.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.ChatRowOpaqueData.DraftMessage.CtwaContextData(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.conversionSource = reader.string(); + break; + case 2: + message.conversionData = reader.bytes(); + break; + case 3: + message.sourceUrl = reader.string(); + break; + case 4: + message.sourceId = reader.string(); + break; + case 5: + message.sourceType = reader.string(); + break; + case 6: + message.title = reader.string(); + break; + case 7: + message.description = reader.string(); + break; + case 8: + message.thumbnail = reader.string(); + break; + case 9: + message.thumbnailUrl = reader.string(); + break; + case 10: + message.mediaType = reader.int32(); + break; + case 11: + message.mediaUrl = reader.string(); + break; + case 12: + message.isSuspiciousLink = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CtwaContextData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.ChatRowOpaqueData.DraftMessage.CtwaContextData} CtwaContextData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CtwaContextData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CtwaContextData message. + * @function verify + * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CtwaContextData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.conversionSource != null && message.hasOwnProperty("conversionSource")) + if (!$util.isString(message.conversionSource)) + return "conversionSource: string expected"; + if (message.conversionData != null && message.hasOwnProperty("conversionData")) + if (!(message.conversionData && typeof message.conversionData.length === "number" || $util.isString(message.conversionData))) + return "conversionData: buffer expected"; + if (message.sourceUrl != null && message.hasOwnProperty("sourceUrl")) + if (!$util.isString(message.sourceUrl)) + return "sourceUrl: string expected"; + if (message.sourceId != null && message.hasOwnProperty("sourceId")) + if (!$util.isString(message.sourceId)) + return "sourceId: string expected"; + if (message.sourceType != null && message.hasOwnProperty("sourceType")) + if (!$util.isString(message.sourceType)) + return "sourceType: string expected"; + if (message.title != null && message.hasOwnProperty("title")) + if (!$util.isString(message.title)) + return "title: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.thumbnail != null && message.hasOwnProperty("thumbnail")) + if (!$util.isString(message.thumbnail)) + return "thumbnail: string expected"; + if (message.thumbnailUrl != null && message.hasOwnProperty("thumbnailUrl")) + if (!$util.isString(message.thumbnailUrl)) + return "thumbnailUrl: string expected"; + if (message.mediaType != null && message.hasOwnProperty("mediaType")) + switch (message.mediaType) { + default: + return "mediaType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.mediaUrl != null && message.hasOwnProperty("mediaUrl")) + if (!$util.isString(message.mediaUrl)) + return "mediaUrl: string expected"; + if (message.isSuspiciousLink != null && message.hasOwnProperty("isSuspiciousLink")) + if (typeof message.isSuspiciousLink !== "boolean") + return "isSuspiciousLink: boolean expected"; + return null; + }; + + /** + * Creates a CtwaContextData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextData + * @static + * @param {Object.} object Plain object + * @returns {proto.ChatRowOpaqueData.DraftMessage.CtwaContextData} CtwaContextData + */ + CtwaContextData.fromObject = function fromObject(object) { + if (object instanceof $root.proto.ChatRowOpaqueData.DraftMessage.CtwaContextData) + return object; + var message = new $root.proto.ChatRowOpaqueData.DraftMessage.CtwaContextData(); + if (object.conversionSource != null) + message.conversionSource = String(object.conversionSource); + if (object.conversionData != null) + if (typeof object.conversionData === "string") + $util.base64.decode(object.conversionData, message.conversionData = $util.newBuffer($util.base64.length(object.conversionData)), 0); + else if (object.conversionData.length) + message.conversionData = object.conversionData; + if (object.sourceUrl != null) + message.sourceUrl = String(object.sourceUrl); + if (object.sourceId != null) + message.sourceId = String(object.sourceId); + if (object.sourceType != null) + message.sourceType = String(object.sourceType); + if (object.title != null) + message.title = String(object.title); + if (object.description != null) + message.description = String(object.description); + if (object.thumbnail != null) + message.thumbnail = String(object.thumbnail); + if (object.thumbnailUrl != null) + message.thumbnailUrl = String(object.thumbnailUrl); + switch (object.mediaType) { + case "NONE": + case 0: + message.mediaType = 0; + break; + case "IMAGE": + case 1: + message.mediaType = 1; + break; + case "VIDEO": + case 2: + message.mediaType = 2; + break; + } + if (object.mediaUrl != null) + message.mediaUrl = String(object.mediaUrl); + if (object.isSuspiciousLink != null) + message.isSuspiciousLink = Boolean(object.isSuspiciousLink); + return message; + }; + + /** + * Creates a plain object from a CtwaContextData message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextData + * @static + * @param {proto.ChatRowOpaqueData.DraftMessage.CtwaContextData} message CtwaContextData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CtwaContextData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.conversionSource = ""; + if (options.bytes === String) + object.conversionData = ""; + else { + object.conversionData = []; + if (options.bytes !== Array) + object.conversionData = $util.newBuffer(object.conversionData); + } + object.sourceUrl = ""; + object.sourceId = ""; + object.sourceType = ""; + object.title = ""; + object.description = ""; + object.thumbnail = ""; + object.thumbnailUrl = ""; + object.mediaType = options.enums === String ? "NONE" : 0; + object.mediaUrl = ""; + object.isSuspiciousLink = false; + } + if (message.conversionSource != null && message.hasOwnProperty("conversionSource")) + object.conversionSource = message.conversionSource; + if (message.conversionData != null && message.hasOwnProperty("conversionData")) + object.conversionData = options.bytes === String ? $util.base64.encode(message.conversionData, 0, message.conversionData.length) : options.bytes === Array ? Array.prototype.slice.call(message.conversionData) : message.conversionData; + if (message.sourceUrl != null && message.hasOwnProperty("sourceUrl")) + object.sourceUrl = message.sourceUrl; + if (message.sourceId != null && message.hasOwnProperty("sourceId")) + object.sourceId = message.sourceId; + if (message.sourceType != null && message.hasOwnProperty("sourceType")) + object.sourceType = message.sourceType; + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.thumbnail != null && message.hasOwnProperty("thumbnail")) + object.thumbnail = message.thumbnail; + if (message.thumbnailUrl != null && message.hasOwnProperty("thumbnailUrl")) + object.thumbnailUrl = message.thumbnailUrl; + if (message.mediaType != null && message.hasOwnProperty("mediaType")) + object.mediaType = options.enums === String ? $root.proto.ChatRowOpaqueData.DraftMessage.CtwaContextData.ContextInfoExternalAdReplyInfoMediaType[message.mediaType] : message.mediaType; + if (message.mediaUrl != null && message.hasOwnProperty("mediaUrl")) + object.mediaUrl = message.mediaUrl; + if (message.isSuspiciousLink != null && message.hasOwnProperty("isSuspiciousLink")) + object.isSuspiciousLink = message.isSuspiciousLink; + return object; + }; + + /** + * Converts this CtwaContextData to JSON. + * @function toJSON + * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextData + * @instance + * @returns {Object.} JSON object + */ + CtwaContextData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * ContextInfoExternalAdReplyInfoMediaType enum. + * @name proto.ChatRowOpaqueData.DraftMessage.CtwaContextData.ContextInfoExternalAdReplyInfoMediaType + * @enum {number} + * @property {number} NONE=0 NONE value + * @property {number} IMAGE=1 IMAGE value + * @property {number} VIDEO=2 VIDEO value + */ + CtwaContextData.ContextInfoExternalAdReplyInfoMediaType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NONE"] = 0; + values[valuesById[1] = "IMAGE"] = 1; + values[valuesById[2] = "VIDEO"] = 2; + return values; + })(); + + return CtwaContextData; + })(); + + DraftMessage.CtwaContextLinkData = (function() { + + /** + * Properties of a CtwaContextLinkData. + * @memberof proto.ChatRowOpaqueData.DraftMessage + * @interface ICtwaContextLinkData + * @property {string|null} [context] CtwaContextLinkData context + * @property {string|null} [sourceUrl] CtwaContextLinkData sourceUrl + * @property {string|null} [icebreaker] CtwaContextLinkData icebreaker + * @property {string|null} [phone] CtwaContextLinkData phone + */ + + /** + * Constructs a new CtwaContextLinkData. + * @memberof proto.ChatRowOpaqueData.DraftMessage + * @classdesc Represents a CtwaContextLinkData. + * @implements ICtwaContextLinkData + * @constructor + * @param {proto.ChatRowOpaqueData.DraftMessage.ICtwaContextLinkData=} [properties] Properties to set + */ + function CtwaContextLinkData(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CtwaContextLinkData context. + * @member {string} context + * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData + * @instance + */ + CtwaContextLinkData.prototype.context = ""; + + /** + * CtwaContextLinkData sourceUrl. + * @member {string} sourceUrl + * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData + * @instance + */ + CtwaContextLinkData.prototype.sourceUrl = ""; + + /** + * CtwaContextLinkData icebreaker. + * @member {string} icebreaker + * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData + * @instance + */ + CtwaContextLinkData.prototype.icebreaker = ""; + + /** + * CtwaContextLinkData phone. + * @member {string} phone + * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData + * @instance + */ + CtwaContextLinkData.prototype.phone = ""; + + /** + * Creates a new CtwaContextLinkData instance using the specified properties. + * @function create + * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData + * @static + * @param {proto.ChatRowOpaqueData.DraftMessage.ICtwaContextLinkData=} [properties] Properties to set + * @returns {proto.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData} CtwaContextLinkData instance + */ + CtwaContextLinkData.create = function create(properties) { + return new CtwaContextLinkData(properties); + }; + + /** + * Encodes the specified CtwaContextLinkData message. Does not implicitly {@link proto.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData.verify|verify} messages. + * @function encode + * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData + * @static + * @param {proto.ChatRowOpaqueData.DraftMessage.ICtwaContextLinkData} message CtwaContextLinkData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CtwaContextLinkData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.context != null && Object.hasOwnProperty.call(message, "context")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.context); + if (message.sourceUrl != null && Object.hasOwnProperty.call(message, "sourceUrl")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceUrl); + if (message.icebreaker != null && Object.hasOwnProperty.call(message, "icebreaker")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.icebreaker); + if (message.phone != null && Object.hasOwnProperty.call(message, "phone")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.phone); + return writer; + }; + + /** + * Encodes the specified CtwaContextLinkData message, length delimited. Does not implicitly {@link proto.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData + * @static + * @param {proto.ChatRowOpaqueData.DraftMessage.ICtwaContextLinkData} message CtwaContextLinkData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CtwaContextLinkData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CtwaContextLinkData message from the specified reader or buffer. + * @function decode + * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData} CtwaContextLinkData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CtwaContextLinkData.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.context = reader.string(); + break; + case 2: + message.sourceUrl = reader.string(); + break; + case 3: + message.icebreaker = reader.string(); + break; + case 4: + message.phone = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CtwaContextLinkData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData} CtwaContextLinkData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CtwaContextLinkData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CtwaContextLinkData message. + * @function verify + * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CtwaContextLinkData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.context != null && message.hasOwnProperty("context")) + if (!$util.isString(message.context)) + return "context: string expected"; + if (message.sourceUrl != null && message.hasOwnProperty("sourceUrl")) + if (!$util.isString(message.sourceUrl)) + return "sourceUrl: string expected"; + if (message.icebreaker != null && message.hasOwnProperty("icebreaker")) + if (!$util.isString(message.icebreaker)) + return "icebreaker: string expected"; + if (message.phone != null && message.hasOwnProperty("phone")) + if (!$util.isString(message.phone)) + return "phone: string expected"; + return null; + }; + + /** + * Creates a CtwaContextLinkData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData + * @static + * @param {Object.} object Plain object + * @returns {proto.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData} CtwaContextLinkData + */ + CtwaContextLinkData.fromObject = function fromObject(object) { + if (object instanceof $root.proto.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData) + return object; + var message = new $root.proto.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData(); + if (object.context != null) + message.context = String(object.context); + if (object.sourceUrl != null) + message.sourceUrl = String(object.sourceUrl); + if (object.icebreaker != null) + message.icebreaker = String(object.icebreaker); + if (object.phone != null) + message.phone = String(object.phone); + return message; + }; + + /** + * Creates a plain object from a CtwaContextLinkData message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData + * @static + * @param {proto.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData} message CtwaContextLinkData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CtwaContextLinkData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.context = ""; + object.sourceUrl = ""; + object.icebreaker = ""; + object.phone = ""; + } + if (message.context != null && message.hasOwnProperty("context")) + object.context = message.context; + if (message.sourceUrl != null && message.hasOwnProperty("sourceUrl")) + object.sourceUrl = message.sourceUrl; + if (message.icebreaker != null && message.hasOwnProperty("icebreaker")) + object.icebreaker = message.icebreaker; + if (message.phone != null && message.hasOwnProperty("phone")) + object.phone = message.phone; + return object; + }; + + /** + * Converts this CtwaContextLinkData to JSON. + * @function toJSON + * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData + * @instance + * @returns {Object.} JSON object + */ + CtwaContextLinkData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CtwaContextLinkData; + })(); + + return DraftMessage; + })(); + + return ChatRowOpaqueData; + })(); + + proto.ClientPayload = (function() { + + /** + * Properties of a ClientPayload. + * @memberof proto + * @interface IClientPayload + * @property {number|Long|null} [username] ClientPayload username + * @property {boolean|null} [passive] ClientPayload passive + * @property {proto.ClientPayload.IUserAgent|null} [userAgent] ClientPayload userAgent + * @property {proto.ClientPayload.IWebInfo|null} [webInfo] ClientPayload webInfo + * @property {string|null} [pushName] ClientPayload pushName + * @property {number|null} [sessionId] ClientPayload sessionId + * @property {boolean|null} [shortConnect] ClientPayload shortConnect + * @property {proto.ClientPayload.ConnectType|null} [connectType] ClientPayload connectType + * @property {proto.ClientPayload.ConnectReason|null} [connectReason] ClientPayload connectReason + * @property {Array.|null} [shards] ClientPayload shards + * @property {proto.ClientPayload.IDNSSource|null} [dnsSource] ClientPayload dnsSource + * @property {number|null} [connectAttemptCount] ClientPayload connectAttemptCount + * @property {number|null} [device] ClientPayload device + * @property {proto.ClientPayload.IDevicePairingRegistrationData|null} [devicePairingData] ClientPayload devicePairingData + * @property {proto.ClientPayload.Product|null} [product] ClientPayload product + * @property {Uint8Array|null} [fbCat] ClientPayload fbCat + * @property {Uint8Array|null} [fbUserAgent] ClientPayload fbUserAgent + * @property {boolean|null} [oc] ClientPayload oc + * @property {number|null} [lc] ClientPayload lc + * @property {proto.ClientPayload.IOSAppExtension|null} [iosAppExtension] ClientPayload iosAppExtension + * @property {number|Long|null} [fbAppId] ClientPayload fbAppId + * @property {Uint8Array|null} [fbDeviceId] ClientPayload fbDeviceId + * @property {boolean|null} [pull] ClientPayload pull + * @property {Uint8Array|null} [paddingBytes] ClientPayload paddingBytes + * @property {number|null} [yearClass] ClientPayload yearClass + * @property {number|null} [memClass] ClientPayload memClass + * @property {proto.ClientPayload.IInteropData|null} [interopData] ClientPayload interopData + */ + + /** + * Constructs a new ClientPayload. + * @memberof proto + * @classdesc Represents a ClientPayload. + * @implements IClientPayload + * @constructor + * @param {proto.IClientPayload=} [properties] Properties to set + */ + function ClientPayload(properties) { + this.shards = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ClientPayload username. + * @member {number|Long} username + * @memberof proto.ClientPayload + * @instance + */ + ClientPayload.prototype.username = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * ClientPayload passive. + * @member {boolean} passive + * @memberof proto.ClientPayload + * @instance + */ + ClientPayload.prototype.passive = false; + + /** + * ClientPayload userAgent. + * @member {proto.ClientPayload.IUserAgent|null|undefined} userAgent + * @memberof proto.ClientPayload + * @instance + */ + ClientPayload.prototype.userAgent = null; + + /** + * ClientPayload webInfo. + * @member {proto.ClientPayload.IWebInfo|null|undefined} webInfo + * @memberof proto.ClientPayload + * @instance + */ + ClientPayload.prototype.webInfo = null; + + /** + * ClientPayload pushName. + * @member {string} pushName + * @memberof proto.ClientPayload + * @instance + */ + ClientPayload.prototype.pushName = ""; + + /** + * ClientPayload sessionId. + * @member {number} sessionId + * @memberof proto.ClientPayload + * @instance + */ + ClientPayload.prototype.sessionId = 0; + + /** + * ClientPayload shortConnect. + * @member {boolean} shortConnect + * @memberof proto.ClientPayload + * @instance + */ + ClientPayload.prototype.shortConnect = false; + + /** + * ClientPayload connectType. + * @member {proto.ClientPayload.ConnectType} connectType + * @memberof proto.ClientPayload + * @instance + */ + ClientPayload.prototype.connectType = 0; + + /** + * ClientPayload connectReason. + * @member {proto.ClientPayload.ConnectReason} connectReason + * @memberof proto.ClientPayload + * @instance + */ + ClientPayload.prototype.connectReason = 0; + + /** + * ClientPayload shards. + * @member {Array.} shards + * @memberof proto.ClientPayload + * @instance + */ + ClientPayload.prototype.shards = $util.emptyArray; + + /** + * ClientPayload dnsSource. + * @member {proto.ClientPayload.IDNSSource|null|undefined} dnsSource + * @memberof proto.ClientPayload + * @instance + */ + ClientPayload.prototype.dnsSource = null; + + /** + * ClientPayload connectAttemptCount. + * @member {number} connectAttemptCount + * @memberof proto.ClientPayload + * @instance + */ + ClientPayload.prototype.connectAttemptCount = 0; + + /** + * ClientPayload device. + * @member {number} device + * @memberof proto.ClientPayload + * @instance + */ + ClientPayload.prototype.device = 0; + + /** + * ClientPayload devicePairingData. + * @member {proto.ClientPayload.IDevicePairingRegistrationData|null|undefined} devicePairingData + * @memberof proto.ClientPayload + * @instance + */ + ClientPayload.prototype.devicePairingData = null; + + /** + * ClientPayload product. + * @member {proto.ClientPayload.Product} product + * @memberof proto.ClientPayload + * @instance + */ + ClientPayload.prototype.product = 0; + + /** + * ClientPayload fbCat. + * @member {Uint8Array} fbCat + * @memberof proto.ClientPayload + * @instance + */ + ClientPayload.prototype.fbCat = $util.newBuffer([]); + + /** + * ClientPayload fbUserAgent. + * @member {Uint8Array} fbUserAgent + * @memberof proto.ClientPayload + * @instance + */ + ClientPayload.prototype.fbUserAgent = $util.newBuffer([]); + + /** + * ClientPayload oc. + * @member {boolean} oc + * @memberof proto.ClientPayload + * @instance + */ + ClientPayload.prototype.oc = false; + + /** + * ClientPayload lc. + * @member {number} lc + * @memberof proto.ClientPayload + * @instance + */ + ClientPayload.prototype.lc = 0; + + /** + * ClientPayload iosAppExtension. + * @member {proto.ClientPayload.IOSAppExtension} iosAppExtension + * @memberof proto.ClientPayload + * @instance + */ + ClientPayload.prototype.iosAppExtension = 0; + + /** + * ClientPayload fbAppId. + * @member {number|Long} fbAppId + * @memberof proto.ClientPayload + * @instance + */ + ClientPayload.prototype.fbAppId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * ClientPayload fbDeviceId. + * @member {Uint8Array} fbDeviceId + * @memberof proto.ClientPayload + * @instance + */ + ClientPayload.prototype.fbDeviceId = $util.newBuffer([]); + + /** + * ClientPayload pull. + * @member {boolean} pull + * @memberof proto.ClientPayload + * @instance + */ + ClientPayload.prototype.pull = false; + + /** + * ClientPayload paddingBytes. + * @member {Uint8Array} paddingBytes + * @memberof proto.ClientPayload + * @instance + */ + ClientPayload.prototype.paddingBytes = $util.newBuffer([]); + + /** + * ClientPayload yearClass. + * @member {number} yearClass + * @memberof proto.ClientPayload + * @instance + */ + ClientPayload.prototype.yearClass = 0; + + /** + * ClientPayload memClass. + * @member {number} memClass + * @memberof proto.ClientPayload + * @instance + */ + ClientPayload.prototype.memClass = 0; + + /** + * ClientPayload interopData. + * @member {proto.ClientPayload.IInteropData|null|undefined} interopData + * @memberof proto.ClientPayload + * @instance + */ + ClientPayload.prototype.interopData = null; + + /** + * Creates a new ClientPayload instance using the specified properties. + * @function create + * @memberof proto.ClientPayload + * @static + * @param {proto.IClientPayload=} [properties] Properties to set + * @returns {proto.ClientPayload} ClientPayload instance + */ + ClientPayload.create = function create(properties) { + return new ClientPayload(properties); + }; + + /** + * Encodes the specified ClientPayload message. Does not implicitly {@link proto.ClientPayload.verify|verify} messages. + * @function encode + * @memberof proto.ClientPayload + * @static + * @param {proto.IClientPayload} message ClientPayload message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientPayload.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.username != null && Object.hasOwnProperty.call(message, "username")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.username); + if (message.passive != null && Object.hasOwnProperty.call(message, "passive")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.passive); + if (message.userAgent != null && Object.hasOwnProperty.call(message, "userAgent")) + $root.proto.ClientPayload.UserAgent.encode(message.userAgent, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.webInfo != null && Object.hasOwnProperty.call(message, "webInfo")) + $root.proto.ClientPayload.WebInfo.encode(message.webInfo, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.pushName != null && Object.hasOwnProperty.call(message, "pushName")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.pushName); + if (message.sessionId != null && Object.hasOwnProperty.call(message, "sessionId")) + writer.uint32(/* id 9, wireType 5 =*/77).sfixed32(message.sessionId); + if (message.shortConnect != null && Object.hasOwnProperty.call(message, "shortConnect")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.shortConnect); + if (message.connectType != null && Object.hasOwnProperty.call(message, "connectType")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.connectType); + if (message.connectReason != null && Object.hasOwnProperty.call(message, "connectReason")) + writer.uint32(/* id 13, wireType 0 =*/104).int32(message.connectReason); + if (message.shards != null && message.shards.length) + for (var i = 0; i < message.shards.length; ++i) + writer.uint32(/* id 14, wireType 0 =*/112).int32(message.shards[i]); + if (message.dnsSource != null && Object.hasOwnProperty.call(message, "dnsSource")) + $root.proto.ClientPayload.DNSSource.encode(message.dnsSource, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.connectAttemptCount != null && Object.hasOwnProperty.call(message, "connectAttemptCount")) + writer.uint32(/* id 16, wireType 0 =*/128).uint32(message.connectAttemptCount); + if (message.device != null && Object.hasOwnProperty.call(message, "device")) + writer.uint32(/* id 18, wireType 0 =*/144).uint32(message.device); + if (message.devicePairingData != null && Object.hasOwnProperty.call(message, "devicePairingData")) + $root.proto.ClientPayload.DevicePairingRegistrationData.encode(message.devicePairingData, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); + if (message.product != null && Object.hasOwnProperty.call(message, "product")) + writer.uint32(/* id 20, wireType 0 =*/160).int32(message.product); + if (message.fbCat != null && Object.hasOwnProperty.call(message, "fbCat")) + writer.uint32(/* id 21, wireType 2 =*/170).bytes(message.fbCat); + if (message.fbUserAgent != null && Object.hasOwnProperty.call(message, "fbUserAgent")) + writer.uint32(/* id 22, wireType 2 =*/178).bytes(message.fbUserAgent); + if (message.oc != null && Object.hasOwnProperty.call(message, "oc")) + writer.uint32(/* id 23, wireType 0 =*/184).bool(message.oc); + if (message.lc != null && Object.hasOwnProperty.call(message, "lc")) + writer.uint32(/* id 24, wireType 0 =*/192).int32(message.lc); + if (message.iosAppExtension != null && Object.hasOwnProperty.call(message, "iosAppExtension")) + writer.uint32(/* id 30, wireType 0 =*/240).int32(message.iosAppExtension); + if (message.fbAppId != null && Object.hasOwnProperty.call(message, "fbAppId")) + writer.uint32(/* id 31, wireType 0 =*/248).uint64(message.fbAppId); + if (message.fbDeviceId != null && Object.hasOwnProperty.call(message, "fbDeviceId")) + writer.uint32(/* id 32, wireType 2 =*/258).bytes(message.fbDeviceId); + if (message.pull != null && Object.hasOwnProperty.call(message, "pull")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.pull); + if (message.paddingBytes != null && Object.hasOwnProperty.call(message, "paddingBytes")) + writer.uint32(/* id 34, wireType 2 =*/274).bytes(message.paddingBytes); + if (message.yearClass != null && Object.hasOwnProperty.call(message, "yearClass")) + writer.uint32(/* id 36, wireType 0 =*/288).int32(message.yearClass); + if (message.memClass != null && Object.hasOwnProperty.call(message, "memClass")) + writer.uint32(/* id 37, wireType 0 =*/296).int32(message.memClass); + if (message.interopData != null && Object.hasOwnProperty.call(message, "interopData")) + $root.proto.ClientPayload.InteropData.encode(message.interopData, writer.uint32(/* id 38, wireType 2 =*/306).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ClientPayload message, length delimited. Does not implicitly {@link proto.ClientPayload.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.ClientPayload + * @static + * @param {proto.IClientPayload} message ClientPayload message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientPayload.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ClientPayload message from the specified reader or buffer. + * @function decode + * @memberof proto.ClientPayload + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.ClientPayload} ClientPayload + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientPayload.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.ClientPayload(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.username = reader.uint64(); + break; + case 3: + message.passive = reader.bool(); + break; + case 5: + message.userAgent = $root.proto.ClientPayload.UserAgent.decode(reader, reader.uint32()); + break; + case 6: + message.webInfo = $root.proto.ClientPayload.WebInfo.decode(reader, reader.uint32()); + break; + case 7: + message.pushName = reader.string(); + break; + case 9: + message.sessionId = reader.sfixed32(); + break; + case 10: + message.shortConnect = reader.bool(); + break; + case 12: + message.connectType = reader.int32(); + break; + case 13: + message.connectReason = reader.int32(); + break; + case 14: + if (!(message.shards && message.shards.length)) + message.shards = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.shards.push(reader.int32()); + } else + message.shards.push(reader.int32()); + break; + case 15: + message.dnsSource = $root.proto.ClientPayload.DNSSource.decode(reader, reader.uint32()); + break; + case 16: + message.connectAttemptCount = reader.uint32(); + break; + case 18: + message.device = reader.uint32(); + break; + case 19: + message.devicePairingData = $root.proto.ClientPayload.DevicePairingRegistrationData.decode(reader, reader.uint32()); + break; + case 20: + message.product = reader.int32(); + break; + case 21: + message.fbCat = reader.bytes(); + break; + case 22: + message.fbUserAgent = reader.bytes(); + break; + case 23: + message.oc = reader.bool(); + break; + case 24: + message.lc = reader.int32(); + break; + case 30: + message.iosAppExtension = reader.int32(); + break; + case 31: + message.fbAppId = reader.uint64(); + break; + case 32: + message.fbDeviceId = reader.bytes(); + break; + case 33: + message.pull = reader.bool(); + break; + case 34: + message.paddingBytes = reader.bytes(); + break; + case 36: + message.yearClass = reader.int32(); + break; + case 37: + message.memClass = reader.int32(); + break; + case 38: + message.interopData = $root.proto.ClientPayload.InteropData.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ClientPayload message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.ClientPayload + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.ClientPayload} ClientPayload + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientPayload.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ClientPayload message. + * @function verify + * @memberof proto.ClientPayload + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ClientPayload.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.username != null && message.hasOwnProperty("username")) + if (!$util.isInteger(message.username) && !(message.username && $util.isInteger(message.username.low) && $util.isInteger(message.username.high))) + return "username: integer|Long expected"; + if (message.passive != null && message.hasOwnProperty("passive")) + if (typeof message.passive !== "boolean") + return "passive: boolean expected"; + if (message.userAgent != null && message.hasOwnProperty("userAgent")) { + var error = $root.proto.ClientPayload.UserAgent.verify(message.userAgent); + if (error) + return "userAgent." + error; + } + if (message.webInfo != null && message.hasOwnProperty("webInfo")) { + var error = $root.proto.ClientPayload.WebInfo.verify(message.webInfo); + if (error) + return "webInfo." + error; + } + if (message.pushName != null && message.hasOwnProperty("pushName")) + if (!$util.isString(message.pushName)) + return "pushName: string expected"; + if (message.sessionId != null && message.hasOwnProperty("sessionId")) + if (!$util.isInteger(message.sessionId)) + return "sessionId: integer expected"; + if (message.shortConnect != null && message.hasOwnProperty("shortConnect")) + if (typeof message.shortConnect !== "boolean") + return "shortConnect: boolean expected"; + if (message.connectType != null && message.hasOwnProperty("connectType")) + switch (message.connectType) { + default: + return "connectType: enum value expected"; + case 0: + case 1: + case 100: + case 101: + case 102: + case 103: + case 104: + case 105: + case 106: + case 107: + case 108: + case 109: + case 110: + case 111: + case 112: + break; + } + if (message.connectReason != null && message.hasOwnProperty("connectReason")) + switch (message.connectReason) { + default: + return "connectReason: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.shards != null && message.hasOwnProperty("shards")) { + if (!Array.isArray(message.shards)) + return "shards: array expected"; + for (var i = 0; i < message.shards.length; ++i) + if (!$util.isInteger(message.shards[i])) + return "shards: integer[] expected"; + } + if (message.dnsSource != null && message.hasOwnProperty("dnsSource")) { + var error = $root.proto.ClientPayload.DNSSource.verify(message.dnsSource); + if (error) + return "dnsSource." + error; + } + if (message.connectAttemptCount != null && message.hasOwnProperty("connectAttemptCount")) + if (!$util.isInteger(message.connectAttemptCount)) + return "connectAttemptCount: integer expected"; + if (message.device != null && message.hasOwnProperty("device")) + if (!$util.isInteger(message.device)) + return "device: integer expected"; + if (message.devicePairingData != null && message.hasOwnProperty("devicePairingData")) { + var error = $root.proto.ClientPayload.DevicePairingRegistrationData.verify(message.devicePairingData); + if (error) + return "devicePairingData." + error; + } + if (message.product != null && message.hasOwnProperty("product")) + switch (message.product) { + default: + return "product: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.fbCat != null && message.hasOwnProperty("fbCat")) + if (!(message.fbCat && typeof message.fbCat.length === "number" || $util.isString(message.fbCat))) + return "fbCat: buffer expected"; + if (message.fbUserAgent != null && message.hasOwnProperty("fbUserAgent")) + if (!(message.fbUserAgent && typeof message.fbUserAgent.length === "number" || $util.isString(message.fbUserAgent))) + return "fbUserAgent: buffer expected"; + if (message.oc != null && message.hasOwnProperty("oc")) + if (typeof message.oc !== "boolean") + return "oc: boolean expected"; + if (message.lc != null && message.hasOwnProperty("lc")) + if (!$util.isInteger(message.lc)) + return "lc: integer expected"; + if (message.iosAppExtension != null && message.hasOwnProperty("iosAppExtension")) + switch (message.iosAppExtension) { + default: + return "iosAppExtension: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.fbAppId != null && message.hasOwnProperty("fbAppId")) + if (!$util.isInteger(message.fbAppId) && !(message.fbAppId && $util.isInteger(message.fbAppId.low) && $util.isInteger(message.fbAppId.high))) + return "fbAppId: integer|Long expected"; + if (message.fbDeviceId != null && message.hasOwnProperty("fbDeviceId")) + if (!(message.fbDeviceId && typeof message.fbDeviceId.length === "number" || $util.isString(message.fbDeviceId))) + return "fbDeviceId: buffer expected"; + if (message.pull != null && message.hasOwnProperty("pull")) + if (typeof message.pull !== "boolean") + return "pull: boolean expected"; + if (message.paddingBytes != null && message.hasOwnProperty("paddingBytes")) + if (!(message.paddingBytes && typeof message.paddingBytes.length === "number" || $util.isString(message.paddingBytes))) + return "paddingBytes: buffer expected"; + if (message.yearClass != null && message.hasOwnProperty("yearClass")) + if (!$util.isInteger(message.yearClass)) + return "yearClass: integer expected"; + if (message.memClass != null && message.hasOwnProperty("memClass")) + if (!$util.isInteger(message.memClass)) + return "memClass: integer expected"; + if (message.interopData != null && message.hasOwnProperty("interopData")) { + var error = $root.proto.ClientPayload.InteropData.verify(message.interopData); + if (error) + return "interopData." + error; + } + return null; + }; + + /** + * Creates a ClientPayload message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.ClientPayload + * @static + * @param {Object.} object Plain object + * @returns {proto.ClientPayload} ClientPayload + */ + ClientPayload.fromObject = function fromObject(object) { + if (object instanceof $root.proto.ClientPayload) + return object; + var message = new $root.proto.ClientPayload(); + if (object.username != null) + if ($util.Long) + (message.username = $util.Long.fromValue(object.username)).unsigned = true; + else if (typeof object.username === "string") + message.username = parseInt(object.username, 10); + else if (typeof object.username === "number") + message.username = object.username; + else if (typeof object.username === "object") + message.username = new $util.LongBits(object.username.low >>> 0, object.username.high >>> 0).toNumber(true); + if (object.passive != null) + message.passive = Boolean(object.passive); + if (object.userAgent != null) { + if (typeof object.userAgent !== "object") + throw TypeError(".proto.ClientPayload.userAgent: object expected"); + message.userAgent = $root.proto.ClientPayload.UserAgent.fromObject(object.userAgent); + } + if (object.webInfo != null) { + if (typeof object.webInfo !== "object") + throw TypeError(".proto.ClientPayload.webInfo: object expected"); + message.webInfo = $root.proto.ClientPayload.WebInfo.fromObject(object.webInfo); + } + if (object.pushName != null) + message.pushName = String(object.pushName); + if (object.sessionId != null) + message.sessionId = object.sessionId | 0; + if (object.shortConnect != null) + message.shortConnect = Boolean(object.shortConnect); + switch (object.connectType) { + case "CELLULAR_UNKNOWN": + case 0: + message.connectType = 0; + break; + case "WIFI_UNKNOWN": + case 1: + message.connectType = 1; + break; + case "CELLULAR_EDGE": + case 100: + message.connectType = 100; + break; + case "CELLULAR_IDEN": + case 101: + message.connectType = 101; + break; + case "CELLULAR_UMTS": + case 102: + message.connectType = 102; + break; + case "CELLULAR_EVDO": + case 103: + message.connectType = 103; + break; + case "CELLULAR_GPRS": + case 104: + message.connectType = 104; + break; + case "CELLULAR_HSDPA": + case 105: + message.connectType = 105; + break; + case "CELLULAR_HSUPA": + case 106: + message.connectType = 106; + break; + case "CELLULAR_HSPA": + case 107: + message.connectType = 107; + break; + case "CELLULAR_CDMA": + case 108: + message.connectType = 108; + break; + case "CELLULAR_1XRTT": + case 109: + message.connectType = 109; + break; + case "CELLULAR_EHRPD": + case 110: + message.connectType = 110; + break; + case "CELLULAR_LTE": + case 111: + message.connectType = 111; + break; + case "CELLULAR_HSPAP": + case 112: + message.connectType = 112; + break; + } + switch (object.connectReason) { + case "PUSH": + case 0: + message.connectReason = 0; + break; + case "USER_ACTIVATED": + case 1: + message.connectReason = 1; + break; + case "SCHEDULED": + case 2: + message.connectReason = 2; + break; + case "ERROR_RECONNECT": + case 3: + message.connectReason = 3; + break; + case "NETWORK_SWITCH": + case 4: + message.connectReason = 4; + break; + case "PING_RECONNECT": + case 5: + message.connectReason = 5; + break; + case "UNKNOWN": + case 6: + message.connectReason = 6; + break; + } + if (object.shards) { + if (!Array.isArray(object.shards)) + throw TypeError(".proto.ClientPayload.shards: array expected"); + message.shards = []; + for (var i = 0; i < object.shards.length; ++i) + message.shards[i] = object.shards[i] | 0; + } + if (object.dnsSource != null) { + if (typeof object.dnsSource !== "object") + throw TypeError(".proto.ClientPayload.dnsSource: object expected"); + message.dnsSource = $root.proto.ClientPayload.DNSSource.fromObject(object.dnsSource); + } + if (object.connectAttemptCount != null) + message.connectAttemptCount = object.connectAttemptCount >>> 0; + if (object.device != null) + message.device = object.device >>> 0; + if (object.devicePairingData != null) { + if (typeof object.devicePairingData !== "object") + throw TypeError(".proto.ClientPayload.devicePairingData: object expected"); + message.devicePairingData = $root.proto.ClientPayload.DevicePairingRegistrationData.fromObject(object.devicePairingData); + } + switch (object.product) { + case "WHATSAPP": + case 0: + message.product = 0; + break; + case "MESSENGER": + case 1: + message.product = 1; + break; + case "INTEROP": + case 2: + message.product = 2; + break; + case "INTEROP_MSGR": + case 3: + message.product = 3; + break; + } + if (object.fbCat != null) + if (typeof object.fbCat === "string") + $util.base64.decode(object.fbCat, message.fbCat = $util.newBuffer($util.base64.length(object.fbCat)), 0); + else if (object.fbCat.length) + message.fbCat = object.fbCat; + if (object.fbUserAgent != null) + if (typeof object.fbUserAgent === "string") + $util.base64.decode(object.fbUserAgent, message.fbUserAgent = $util.newBuffer($util.base64.length(object.fbUserAgent)), 0); + else if (object.fbUserAgent.length) + message.fbUserAgent = object.fbUserAgent; + if (object.oc != null) + message.oc = Boolean(object.oc); + if (object.lc != null) + message.lc = object.lc | 0; + switch (object.iosAppExtension) { + case "SHARE_EXTENSION": + case 0: + message.iosAppExtension = 0; + break; + case "SERVICE_EXTENSION": + case 1: + message.iosAppExtension = 1; + break; + case "INTENTS_EXTENSION": + case 2: + message.iosAppExtension = 2; + break; + } + if (object.fbAppId != null) + if ($util.Long) + (message.fbAppId = $util.Long.fromValue(object.fbAppId)).unsigned = true; + else if (typeof object.fbAppId === "string") + message.fbAppId = parseInt(object.fbAppId, 10); + else if (typeof object.fbAppId === "number") + message.fbAppId = object.fbAppId; + else if (typeof object.fbAppId === "object") + message.fbAppId = new $util.LongBits(object.fbAppId.low >>> 0, object.fbAppId.high >>> 0).toNumber(true); + if (object.fbDeviceId != null) + if (typeof object.fbDeviceId === "string") + $util.base64.decode(object.fbDeviceId, message.fbDeviceId = $util.newBuffer($util.base64.length(object.fbDeviceId)), 0); + else if (object.fbDeviceId.length) + message.fbDeviceId = object.fbDeviceId; + if (object.pull != null) + message.pull = Boolean(object.pull); + if (object.paddingBytes != null) + if (typeof object.paddingBytes === "string") + $util.base64.decode(object.paddingBytes, message.paddingBytes = $util.newBuffer($util.base64.length(object.paddingBytes)), 0); + else if (object.paddingBytes.length) + message.paddingBytes = object.paddingBytes; + if (object.yearClass != null) + message.yearClass = object.yearClass | 0; + if (object.memClass != null) + message.memClass = object.memClass | 0; + if (object.interopData != null) { + if (typeof object.interopData !== "object") + throw TypeError(".proto.ClientPayload.interopData: object expected"); + message.interopData = $root.proto.ClientPayload.InteropData.fromObject(object.interopData); + } + return message; + }; + + /** + * Creates a plain object from a ClientPayload message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.ClientPayload + * @static + * @param {proto.ClientPayload} message ClientPayload + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ClientPayload.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.shards = []; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.username = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.username = options.longs === String ? "0" : 0; + object.passive = false; + object.userAgent = null; + object.webInfo = null; + object.pushName = ""; + object.sessionId = 0; + object.shortConnect = false; + object.connectType = options.enums === String ? "CELLULAR_UNKNOWN" : 0; + object.connectReason = options.enums === String ? "PUSH" : 0; + object.dnsSource = null; + object.connectAttemptCount = 0; + object.device = 0; + object.devicePairingData = null; + object.product = options.enums === String ? "WHATSAPP" : 0; + if (options.bytes === String) + object.fbCat = ""; + else { + object.fbCat = []; + if (options.bytes !== Array) + object.fbCat = $util.newBuffer(object.fbCat); + } + if (options.bytes === String) + object.fbUserAgent = ""; + else { + object.fbUserAgent = []; + if (options.bytes !== Array) + object.fbUserAgent = $util.newBuffer(object.fbUserAgent); + } + object.oc = false; + object.lc = 0; + object.iosAppExtension = options.enums === String ? "SHARE_EXTENSION" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.fbAppId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.fbAppId = options.longs === String ? "0" : 0; + if (options.bytes === String) + object.fbDeviceId = ""; + else { + object.fbDeviceId = []; + if (options.bytes !== Array) + object.fbDeviceId = $util.newBuffer(object.fbDeviceId); + } + object.pull = false; + if (options.bytes === String) + object.paddingBytes = ""; + else { + object.paddingBytes = []; + if (options.bytes !== Array) + object.paddingBytes = $util.newBuffer(object.paddingBytes); + } + object.yearClass = 0; + object.memClass = 0; + object.interopData = null; + } + if (message.username != null && message.hasOwnProperty("username")) + if (typeof message.username === "number") + object.username = options.longs === String ? String(message.username) : message.username; + else + object.username = options.longs === String ? $util.Long.prototype.toString.call(message.username) : options.longs === Number ? new $util.LongBits(message.username.low >>> 0, message.username.high >>> 0).toNumber(true) : message.username; + if (message.passive != null && message.hasOwnProperty("passive")) + object.passive = message.passive; + if (message.userAgent != null && message.hasOwnProperty("userAgent")) + object.userAgent = $root.proto.ClientPayload.UserAgent.toObject(message.userAgent, options); + if (message.webInfo != null && message.hasOwnProperty("webInfo")) + object.webInfo = $root.proto.ClientPayload.WebInfo.toObject(message.webInfo, options); + if (message.pushName != null && message.hasOwnProperty("pushName")) + object.pushName = message.pushName; + if (message.sessionId != null && message.hasOwnProperty("sessionId")) + object.sessionId = message.sessionId; + if (message.shortConnect != null && message.hasOwnProperty("shortConnect")) + object.shortConnect = message.shortConnect; + if (message.connectType != null && message.hasOwnProperty("connectType")) + object.connectType = options.enums === String ? $root.proto.ClientPayload.ConnectType[message.connectType] : message.connectType; + if (message.connectReason != null && message.hasOwnProperty("connectReason")) + object.connectReason = options.enums === String ? $root.proto.ClientPayload.ConnectReason[message.connectReason] : message.connectReason; + if (message.shards && message.shards.length) { + object.shards = []; + for (var j = 0; j < message.shards.length; ++j) + object.shards[j] = message.shards[j]; + } + if (message.dnsSource != null && message.hasOwnProperty("dnsSource")) + object.dnsSource = $root.proto.ClientPayload.DNSSource.toObject(message.dnsSource, options); + if (message.connectAttemptCount != null && message.hasOwnProperty("connectAttemptCount")) + object.connectAttemptCount = message.connectAttemptCount; + if (message.device != null && message.hasOwnProperty("device")) + object.device = message.device; + if (message.devicePairingData != null && message.hasOwnProperty("devicePairingData")) + object.devicePairingData = $root.proto.ClientPayload.DevicePairingRegistrationData.toObject(message.devicePairingData, options); + if (message.product != null && message.hasOwnProperty("product")) + object.product = options.enums === String ? $root.proto.ClientPayload.Product[message.product] : message.product; + if (message.fbCat != null && message.hasOwnProperty("fbCat")) + object.fbCat = options.bytes === String ? $util.base64.encode(message.fbCat, 0, message.fbCat.length) : options.bytes === Array ? Array.prototype.slice.call(message.fbCat) : message.fbCat; + if (message.fbUserAgent != null && message.hasOwnProperty("fbUserAgent")) + object.fbUserAgent = options.bytes === String ? $util.base64.encode(message.fbUserAgent, 0, message.fbUserAgent.length) : options.bytes === Array ? Array.prototype.slice.call(message.fbUserAgent) : message.fbUserAgent; + if (message.oc != null && message.hasOwnProperty("oc")) + object.oc = message.oc; + if (message.lc != null && message.hasOwnProperty("lc")) + object.lc = message.lc; + if (message.iosAppExtension != null && message.hasOwnProperty("iosAppExtension")) + object.iosAppExtension = options.enums === String ? $root.proto.ClientPayload.IOSAppExtension[message.iosAppExtension] : message.iosAppExtension; + if (message.fbAppId != null && message.hasOwnProperty("fbAppId")) + if (typeof message.fbAppId === "number") + object.fbAppId = options.longs === String ? String(message.fbAppId) : message.fbAppId; + else + object.fbAppId = options.longs === String ? $util.Long.prototype.toString.call(message.fbAppId) : options.longs === Number ? new $util.LongBits(message.fbAppId.low >>> 0, message.fbAppId.high >>> 0).toNumber(true) : message.fbAppId; + if (message.fbDeviceId != null && message.hasOwnProperty("fbDeviceId")) + object.fbDeviceId = options.bytes === String ? $util.base64.encode(message.fbDeviceId, 0, message.fbDeviceId.length) : options.bytes === Array ? Array.prototype.slice.call(message.fbDeviceId) : message.fbDeviceId; + if (message.pull != null && message.hasOwnProperty("pull")) + object.pull = message.pull; + if (message.paddingBytes != null && message.hasOwnProperty("paddingBytes")) + object.paddingBytes = options.bytes === String ? $util.base64.encode(message.paddingBytes, 0, message.paddingBytes.length) : options.bytes === Array ? Array.prototype.slice.call(message.paddingBytes) : message.paddingBytes; + if (message.yearClass != null && message.hasOwnProperty("yearClass")) + object.yearClass = message.yearClass; + if (message.memClass != null && message.hasOwnProperty("memClass")) + object.memClass = message.memClass; + if (message.interopData != null && message.hasOwnProperty("interopData")) + object.interopData = $root.proto.ClientPayload.InteropData.toObject(message.interopData, options); + return object; + }; + + /** + * Converts this ClientPayload to JSON. + * @function toJSON + * @memberof proto.ClientPayload + * @instance + * @returns {Object.} JSON object + */ + ClientPayload.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * ConnectReason enum. + * @name proto.ClientPayload.ConnectReason + * @enum {number} + * @property {number} PUSH=0 PUSH value + * @property {number} USER_ACTIVATED=1 USER_ACTIVATED value + * @property {number} SCHEDULED=2 SCHEDULED value + * @property {number} ERROR_RECONNECT=3 ERROR_RECONNECT value + * @property {number} NETWORK_SWITCH=4 NETWORK_SWITCH value + * @property {number} PING_RECONNECT=5 PING_RECONNECT value + * @property {number} UNKNOWN=6 UNKNOWN value + */ + ClientPayload.ConnectReason = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PUSH"] = 0; + values[valuesById[1] = "USER_ACTIVATED"] = 1; + values[valuesById[2] = "SCHEDULED"] = 2; + values[valuesById[3] = "ERROR_RECONNECT"] = 3; + values[valuesById[4] = "NETWORK_SWITCH"] = 4; + values[valuesById[5] = "PING_RECONNECT"] = 5; + values[valuesById[6] = "UNKNOWN"] = 6; + return values; + })(); + + /** + * ConnectType enum. + * @name proto.ClientPayload.ConnectType + * @enum {number} + * @property {number} CELLULAR_UNKNOWN=0 CELLULAR_UNKNOWN value + * @property {number} WIFI_UNKNOWN=1 WIFI_UNKNOWN value + * @property {number} CELLULAR_EDGE=100 CELLULAR_EDGE value + * @property {number} CELLULAR_IDEN=101 CELLULAR_IDEN value + * @property {number} CELLULAR_UMTS=102 CELLULAR_UMTS value + * @property {number} CELLULAR_EVDO=103 CELLULAR_EVDO value + * @property {number} CELLULAR_GPRS=104 CELLULAR_GPRS value + * @property {number} CELLULAR_HSDPA=105 CELLULAR_HSDPA value + * @property {number} CELLULAR_HSUPA=106 CELLULAR_HSUPA value + * @property {number} CELLULAR_HSPA=107 CELLULAR_HSPA value + * @property {number} CELLULAR_CDMA=108 CELLULAR_CDMA value + * @property {number} CELLULAR_1XRTT=109 CELLULAR_1XRTT value + * @property {number} CELLULAR_EHRPD=110 CELLULAR_EHRPD value + * @property {number} CELLULAR_LTE=111 CELLULAR_LTE value + * @property {number} CELLULAR_HSPAP=112 CELLULAR_HSPAP value + */ + ClientPayload.ConnectType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CELLULAR_UNKNOWN"] = 0; + values[valuesById[1] = "WIFI_UNKNOWN"] = 1; + values[valuesById[100] = "CELLULAR_EDGE"] = 100; + values[valuesById[101] = "CELLULAR_IDEN"] = 101; + values[valuesById[102] = "CELLULAR_UMTS"] = 102; + values[valuesById[103] = "CELLULAR_EVDO"] = 103; + values[valuesById[104] = "CELLULAR_GPRS"] = 104; + values[valuesById[105] = "CELLULAR_HSDPA"] = 105; + values[valuesById[106] = "CELLULAR_HSUPA"] = 106; + values[valuesById[107] = "CELLULAR_HSPA"] = 107; + values[valuesById[108] = "CELLULAR_CDMA"] = 108; + values[valuesById[109] = "CELLULAR_1XRTT"] = 109; + values[valuesById[110] = "CELLULAR_EHRPD"] = 110; + values[valuesById[111] = "CELLULAR_LTE"] = 111; + values[valuesById[112] = "CELLULAR_HSPAP"] = 112; + return values; + })(); + + ClientPayload.DNSSource = (function() { + + /** + * Properties of a DNSSource. + * @memberof proto.ClientPayload + * @interface IDNSSource + * @property {proto.ClientPayload.DNSSource.DNSResolutionMethod|null} [dnsMethod] DNSSource dnsMethod + * @property {boolean|null} [appCached] DNSSource appCached + */ + + /** + * Constructs a new DNSSource. + * @memberof proto.ClientPayload + * @classdesc Represents a DNSSource. + * @implements IDNSSource + * @constructor + * @param {proto.ClientPayload.IDNSSource=} [properties] Properties to set + */ + function DNSSource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DNSSource dnsMethod. + * @member {proto.ClientPayload.DNSSource.DNSResolutionMethod} dnsMethod + * @memberof proto.ClientPayload.DNSSource + * @instance + */ + DNSSource.prototype.dnsMethod = 0; + + /** + * DNSSource appCached. + * @member {boolean} appCached + * @memberof proto.ClientPayload.DNSSource + * @instance + */ + DNSSource.prototype.appCached = false; + + /** + * Creates a new DNSSource instance using the specified properties. + * @function create + * @memberof proto.ClientPayload.DNSSource + * @static + * @param {proto.ClientPayload.IDNSSource=} [properties] Properties to set + * @returns {proto.ClientPayload.DNSSource} DNSSource instance + */ + DNSSource.create = function create(properties) { + return new DNSSource(properties); + }; + + /** + * Encodes the specified DNSSource message. Does not implicitly {@link proto.ClientPayload.DNSSource.verify|verify} messages. + * @function encode + * @memberof proto.ClientPayload.DNSSource + * @static + * @param {proto.ClientPayload.IDNSSource} message DNSSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DNSSource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dnsMethod != null && Object.hasOwnProperty.call(message, "dnsMethod")) + writer.uint32(/* id 15, wireType 0 =*/120).int32(message.dnsMethod); + if (message.appCached != null && Object.hasOwnProperty.call(message, "appCached")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.appCached); + return writer; + }; + + /** + * Encodes the specified DNSSource message, length delimited. Does not implicitly {@link proto.ClientPayload.DNSSource.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.ClientPayload.DNSSource + * @static + * @param {proto.ClientPayload.IDNSSource} message DNSSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DNSSource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DNSSource message from the specified reader or buffer. + * @function decode + * @memberof proto.ClientPayload.DNSSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.ClientPayload.DNSSource} DNSSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DNSSource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.ClientPayload.DNSSource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 15: + message.dnsMethod = reader.int32(); + break; + case 16: + message.appCached = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DNSSource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.ClientPayload.DNSSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.ClientPayload.DNSSource} DNSSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DNSSource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DNSSource message. + * @function verify + * @memberof proto.ClientPayload.DNSSource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DNSSource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dnsMethod != null && message.hasOwnProperty("dnsMethod")) + switch (message.dnsMethod) { + default: + return "dnsMethod: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.appCached != null && message.hasOwnProperty("appCached")) + if (typeof message.appCached !== "boolean") + return "appCached: boolean expected"; + return null; + }; + + /** + * Creates a DNSSource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.ClientPayload.DNSSource + * @static + * @param {Object.} object Plain object + * @returns {proto.ClientPayload.DNSSource} DNSSource + */ + DNSSource.fromObject = function fromObject(object) { + if (object instanceof $root.proto.ClientPayload.DNSSource) + return object; + var message = new $root.proto.ClientPayload.DNSSource(); + switch (object.dnsMethod) { + case "SYSTEM": + case 0: + message.dnsMethod = 0; + break; + case "GOOGLE": + case 1: + message.dnsMethod = 1; + break; + case "HARDCODED": + case 2: + message.dnsMethod = 2; + break; + case "OVERRIDE": + case 3: + message.dnsMethod = 3; + break; + case "FALLBACK": + case 4: + message.dnsMethod = 4; + break; + } + if (object.appCached != null) + message.appCached = Boolean(object.appCached); + return message; + }; + + /** + * Creates a plain object from a DNSSource message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.ClientPayload.DNSSource + * @static + * @param {proto.ClientPayload.DNSSource} message DNSSource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DNSSource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.dnsMethod = options.enums === String ? "SYSTEM" : 0; + object.appCached = false; + } + if (message.dnsMethod != null && message.hasOwnProperty("dnsMethod")) + object.dnsMethod = options.enums === String ? $root.proto.ClientPayload.DNSSource.DNSResolutionMethod[message.dnsMethod] : message.dnsMethod; + if (message.appCached != null && message.hasOwnProperty("appCached")) + object.appCached = message.appCached; + return object; + }; + + /** + * Converts this DNSSource to JSON. + * @function toJSON + * @memberof proto.ClientPayload.DNSSource + * @instance + * @returns {Object.} JSON object + */ + DNSSource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * DNSResolutionMethod enum. + * @name proto.ClientPayload.DNSSource.DNSResolutionMethod + * @enum {number} + * @property {number} SYSTEM=0 SYSTEM value + * @property {number} GOOGLE=1 GOOGLE value + * @property {number} HARDCODED=2 HARDCODED value + * @property {number} OVERRIDE=3 OVERRIDE value + * @property {number} FALLBACK=4 FALLBACK value + */ + DNSSource.DNSResolutionMethod = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SYSTEM"] = 0; + values[valuesById[1] = "GOOGLE"] = 1; + values[valuesById[2] = "HARDCODED"] = 2; + values[valuesById[3] = "OVERRIDE"] = 3; + values[valuesById[4] = "FALLBACK"] = 4; + return values; + })(); + + return DNSSource; + })(); + + ClientPayload.DevicePairingRegistrationData = (function() { + + /** + * Properties of a DevicePairingRegistrationData. + * @memberof proto.ClientPayload + * @interface IDevicePairingRegistrationData + * @property {Uint8Array|null} [eRegid] DevicePairingRegistrationData eRegid + * @property {Uint8Array|null} [eKeytype] DevicePairingRegistrationData eKeytype + * @property {Uint8Array|null} [eIdent] DevicePairingRegistrationData eIdent + * @property {Uint8Array|null} [eSkeyId] DevicePairingRegistrationData eSkeyId + * @property {Uint8Array|null} [eSkeyVal] DevicePairingRegistrationData eSkeyVal + * @property {Uint8Array|null} [eSkeySig] DevicePairingRegistrationData eSkeySig + * @property {Uint8Array|null} [buildHash] DevicePairingRegistrationData buildHash + * @property {Uint8Array|null} [deviceProps] DevicePairingRegistrationData deviceProps + */ + + /** + * Constructs a new DevicePairingRegistrationData. + * @memberof proto.ClientPayload + * @classdesc Represents a DevicePairingRegistrationData. + * @implements IDevicePairingRegistrationData + * @constructor + * @param {proto.ClientPayload.IDevicePairingRegistrationData=} [properties] Properties to set + */ + function DevicePairingRegistrationData(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DevicePairingRegistrationData eRegid. + * @member {Uint8Array} eRegid + * @memberof proto.ClientPayload.DevicePairingRegistrationData + * @instance + */ + DevicePairingRegistrationData.prototype.eRegid = $util.newBuffer([]); + + /** + * DevicePairingRegistrationData eKeytype. + * @member {Uint8Array} eKeytype + * @memberof proto.ClientPayload.DevicePairingRegistrationData + * @instance + */ + DevicePairingRegistrationData.prototype.eKeytype = $util.newBuffer([]); + + /** + * DevicePairingRegistrationData eIdent. + * @member {Uint8Array} eIdent + * @memberof proto.ClientPayload.DevicePairingRegistrationData + * @instance + */ + DevicePairingRegistrationData.prototype.eIdent = $util.newBuffer([]); + + /** + * DevicePairingRegistrationData eSkeyId. + * @member {Uint8Array} eSkeyId + * @memberof proto.ClientPayload.DevicePairingRegistrationData + * @instance + */ + DevicePairingRegistrationData.prototype.eSkeyId = $util.newBuffer([]); + + /** + * DevicePairingRegistrationData eSkeyVal. + * @member {Uint8Array} eSkeyVal + * @memberof proto.ClientPayload.DevicePairingRegistrationData + * @instance + */ + DevicePairingRegistrationData.prototype.eSkeyVal = $util.newBuffer([]); + + /** + * DevicePairingRegistrationData eSkeySig. + * @member {Uint8Array} eSkeySig + * @memberof proto.ClientPayload.DevicePairingRegistrationData + * @instance + */ + DevicePairingRegistrationData.prototype.eSkeySig = $util.newBuffer([]); + + /** + * DevicePairingRegistrationData buildHash. + * @member {Uint8Array} buildHash + * @memberof proto.ClientPayload.DevicePairingRegistrationData + * @instance + */ + DevicePairingRegistrationData.prototype.buildHash = $util.newBuffer([]); + + /** + * DevicePairingRegistrationData deviceProps. + * @member {Uint8Array} deviceProps + * @memberof proto.ClientPayload.DevicePairingRegistrationData + * @instance + */ + DevicePairingRegistrationData.prototype.deviceProps = $util.newBuffer([]); + + /** + * Creates a new DevicePairingRegistrationData instance using the specified properties. + * @function create + * @memberof proto.ClientPayload.DevicePairingRegistrationData + * @static + * @param {proto.ClientPayload.IDevicePairingRegistrationData=} [properties] Properties to set + * @returns {proto.ClientPayload.DevicePairingRegistrationData} DevicePairingRegistrationData instance + */ + DevicePairingRegistrationData.create = function create(properties) { + return new DevicePairingRegistrationData(properties); + }; + + /** + * Encodes the specified DevicePairingRegistrationData message. Does not implicitly {@link proto.ClientPayload.DevicePairingRegistrationData.verify|verify} messages. + * @function encode + * @memberof proto.ClientPayload.DevicePairingRegistrationData + * @static + * @param {proto.ClientPayload.IDevicePairingRegistrationData} message DevicePairingRegistrationData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DevicePairingRegistrationData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.eRegid != null && Object.hasOwnProperty.call(message, "eRegid")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.eRegid); + if (message.eKeytype != null && Object.hasOwnProperty.call(message, "eKeytype")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.eKeytype); + if (message.eIdent != null && Object.hasOwnProperty.call(message, "eIdent")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.eIdent); + if (message.eSkeyId != null && Object.hasOwnProperty.call(message, "eSkeyId")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.eSkeyId); + if (message.eSkeyVal != null && Object.hasOwnProperty.call(message, "eSkeyVal")) + writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.eSkeyVal); + if (message.eSkeySig != null && Object.hasOwnProperty.call(message, "eSkeySig")) + writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.eSkeySig); + if (message.buildHash != null && Object.hasOwnProperty.call(message, "buildHash")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.buildHash); + if (message.deviceProps != null && Object.hasOwnProperty.call(message, "deviceProps")) + writer.uint32(/* id 8, wireType 2 =*/66).bytes(message.deviceProps); + return writer; + }; + + /** + * Encodes the specified DevicePairingRegistrationData message, length delimited. Does not implicitly {@link proto.ClientPayload.DevicePairingRegistrationData.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.ClientPayload.DevicePairingRegistrationData + * @static + * @param {proto.ClientPayload.IDevicePairingRegistrationData} message DevicePairingRegistrationData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DevicePairingRegistrationData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DevicePairingRegistrationData message from the specified reader or buffer. + * @function decode + * @memberof proto.ClientPayload.DevicePairingRegistrationData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.ClientPayload.DevicePairingRegistrationData} DevicePairingRegistrationData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DevicePairingRegistrationData.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.ClientPayload.DevicePairingRegistrationData(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.eRegid = reader.bytes(); + break; + case 2: + message.eKeytype = reader.bytes(); + break; + case 3: + message.eIdent = reader.bytes(); + break; + case 4: + message.eSkeyId = reader.bytes(); + break; + case 5: + message.eSkeyVal = reader.bytes(); + break; + case 6: + message.eSkeySig = reader.bytes(); + break; + case 7: + message.buildHash = reader.bytes(); + break; + case 8: + message.deviceProps = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DevicePairingRegistrationData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.ClientPayload.DevicePairingRegistrationData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.ClientPayload.DevicePairingRegistrationData} DevicePairingRegistrationData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DevicePairingRegistrationData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DevicePairingRegistrationData message. + * @function verify + * @memberof proto.ClientPayload.DevicePairingRegistrationData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DevicePairingRegistrationData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.eRegid != null && message.hasOwnProperty("eRegid")) + if (!(message.eRegid && typeof message.eRegid.length === "number" || $util.isString(message.eRegid))) + return "eRegid: buffer expected"; + if (message.eKeytype != null && message.hasOwnProperty("eKeytype")) + if (!(message.eKeytype && typeof message.eKeytype.length === "number" || $util.isString(message.eKeytype))) + return "eKeytype: buffer expected"; + if (message.eIdent != null && message.hasOwnProperty("eIdent")) + if (!(message.eIdent && typeof message.eIdent.length === "number" || $util.isString(message.eIdent))) + return "eIdent: buffer expected"; + if (message.eSkeyId != null && message.hasOwnProperty("eSkeyId")) + if (!(message.eSkeyId && typeof message.eSkeyId.length === "number" || $util.isString(message.eSkeyId))) + return "eSkeyId: buffer expected"; + if (message.eSkeyVal != null && message.hasOwnProperty("eSkeyVal")) + if (!(message.eSkeyVal && typeof message.eSkeyVal.length === "number" || $util.isString(message.eSkeyVal))) + return "eSkeyVal: buffer expected"; + if (message.eSkeySig != null && message.hasOwnProperty("eSkeySig")) + if (!(message.eSkeySig && typeof message.eSkeySig.length === "number" || $util.isString(message.eSkeySig))) + return "eSkeySig: buffer expected"; + if (message.buildHash != null && message.hasOwnProperty("buildHash")) + if (!(message.buildHash && typeof message.buildHash.length === "number" || $util.isString(message.buildHash))) + return "buildHash: buffer expected"; + if (message.deviceProps != null && message.hasOwnProperty("deviceProps")) + if (!(message.deviceProps && typeof message.deviceProps.length === "number" || $util.isString(message.deviceProps))) + return "deviceProps: buffer expected"; + return null; + }; + + /** + * Creates a DevicePairingRegistrationData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.ClientPayload.DevicePairingRegistrationData + * @static + * @param {Object.} object Plain object + * @returns {proto.ClientPayload.DevicePairingRegistrationData} DevicePairingRegistrationData + */ + DevicePairingRegistrationData.fromObject = function fromObject(object) { + if (object instanceof $root.proto.ClientPayload.DevicePairingRegistrationData) + return object; + var message = new $root.proto.ClientPayload.DevicePairingRegistrationData(); + if (object.eRegid != null) + if (typeof object.eRegid === "string") + $util.base64.decode(object.eRegid, message.eRegid = $util.newBuffer($util.base64.length(object.eRegid)), 0); + else if (object.eRegid.length) + message.eRegid = object.eRegid; + if (object.eKeytype != null) + if (typeof object.eKeytype === "string") + $util.base64.decode(object.eKeytype, message.eKeytype = $util.newBuffer($util.base64.length(object.eKeytype)), 0); + else if (object.eKeytype.length) + message.eKeytype = object.eKeytype; + if (object.eIdent != null) + if (typeof object.eIdent === "string") + $util.base64.decode(object.eIdent, message.eIdent = $util.newBuffer($util.base64.length(object.eIdent)), 0); + else if (object.eIdent.length) + message.eIdent = object.eIdent; + if (object.eSkeyId != null) + if (typeof object.eSkeyId === "string") + $util.base64.decode(object.eSkeyId, message.eSkeyId = $util.newBuffer($util.base64.length(object.eSkeyId)), 0); + else if (object.eSkeyId.length) + message.eSkeyId = object.eSkeyId; + if (object.eSkeyVal != null) + if (typeof object.eSkeyVal === "string") + $util.base64.decode(object.eSkeyVal, message.eSkeyVal = $util.newBuffer($util.base64.length(object.eSkeyVal)), 0); + else if (object.eSkeyVal.length) + message.eSkeyVal = object.eSkeyVal; + if (object.eSkeySig != null) + if (typeof object.eSkeySig === "string") + $util.base64.decode(object.eSkeySig, message.eSkeySig = $util.newBuffer($util.base64.length(object.eSkeySig)), 0); + else if (object.eSkeySig.length) + message.eSkeySig = object.eSkeySig; + if (object.buildHash != null) + if (typeof object.buildHash === "string") + $util.base64.decode(object.buildHash, message.buildHash = $util.newBuffer($util.base64.length(object.buildHash)), 0); + else if (object.buildHash.length) + message.buildHash = object.buildHash; + if (object.deviceProps != null) + if (typeof object.deviceProps === "string") + $util.base64.decode(object.deviceProps, message.deviceProps = $util.newBuffer($util.base64.length(object.deviceProps)), 0); + else if (object.deviceProps.length) + message.deviceProps = object.deviceProps; + return message; + }; + + /** + * Creates a plain object from a DevicePairingRegistrationData message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.ClientPayload.DevicePairingRegistrationData + * @static + * @param {proto.ClientPayload.DevicePairingRegistrationData} message DevicePairingRegistrationData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DevicePairingRegistrationData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.eRegid = ""; + else { + object.eRegid = []; + if (options.bytes !== Array) + object.eRegid = $util.newBuffer(object.eRegid); + } + if (options.bytes === String) + object.eKeytype = ""; + else { + object.eKeytype = []; + if (options.bytes !== Array) + object.eKeytype = $util.newBuffer(object.eKeytype); + } + if (options.bytes === String) + object.eIdent = ""; + else { + object.eIdent = []; + if (options.bytes !== Array) + object.eIdent = $util.newBuffer(object.eIdent); + } + if (options.bytes === String) + object.eSkeyId = ""; + else { + object.eSkeyId = []; + if (options.bytes !== Array) + object.eSkeyId = $util.newBuffer(object.eSkeyId); + } + if (options.bytes === String) + object.eSkeyVal = ""; + else { + object.eSkeyVal = []; + if (options.bytes !== Array) + object.eSkeyVal = $util.newBuffer(object.eSkeyVal); + } + if (options.bytes === String) + object.eSkeySig = ""; + else { + object.eSkeySig = []; + if (options.bytes !== Array) + object.eSkeySig = $util.newBuffer(object.eSkeySig); + } + if (options.bytes === String) + object.buildHash = ""; + else { + object.buildHash = []; + if (options.bytes !== Array) + object.buildHash = $util.newBuffer(object.buildHash); + } + if (options.bytes === String) + object.deviceProps = ""; + else { + object.deviceProps = []; + if (options.bytes !== Array) + object.deviceProps = $util.newBuffer(object.deviceProps); + } + } + if (message.eRegid != null && message.hasOwnProperty("eRegid")) + object.eRegid = options.bytes === String ? $util.base64.encode(message.eRegid, 0, message.eRegid.length) : options.bytes === Array ? Array.prototype.slice.call(message.eRegid) : message.eRegid; + if (message.eKeytype != null && message.hasOwnProperty("eKeytype")) + object.eKeytype = options.bytes === String ? $util.base64.encode(message.eKeytype, 0, message.eKeytype.length) : options.bytes === Array ? Array.prototype.slice.call(message.eKeytype) : message.eKeytype; + if (message.eIdent != null && message.hasOwnProperty("eIdent")) + object.eIdent = options.bytes === String ? $util.base64.encode(message.eIdent, 0, message.eIdent.length) : options.bytes === Array ? Array.prototype.slice.call(message.eIdent) : message.eIdent; + if (message.eSkeyId != null && message.hasOwnProperty("eSkeyId")) + object.eSkeyId = options.bytes === String ? $util.base64.encode(message.eSkeyId, 0, message.eSkeyId.length) : options.bytes === Array ? Array.prototype.slice.call(message.eSkeyId) : message.eSkeyId; + if (message.eSkeyVal != null && message.hasOwnProperty("eSkeyVal")) + object.eSkeyVal = options.bytes === String ? $util.base64.encode(message.eSkeyVal, 0, message.eSkeyVal.length) : options.bytes === Array ? Array.prototype.slice.call(message.eSkeyVal) : message.eSkeyVal; + if (message.eSkeySig != null && message.hasOwnProperty("eSkeySig")) + object.eSkeySig = options.bytes === String ? $util.base64.encode(message.eSkeySig, 0, message.eSkeySig.length) : options.bytes === Array ? Array.prototype.slice.call(message.eSkeySig) : message.eSkeySig; + if (message.buildHash != null && message.hasOwnProperty("buildHash")) + object.buildHash = options.bytes === String ? $util.base64.encode(message.buildHash, 0, message.buildHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.buildHash) : message.buildHash; + if (message.deviceProps != null && message.hasOwnProperty("deviceProps")) + object.deviceProps = options.bytes === String ? $util.base64.encode(message.deviceProps, 0, message.deviceProps.length) : options.bytes === Array ? Array.prototype.slice.call(message.deviceProps) : message.deviceProps; + return object; + }; + + /** + * Converts this DevicePairingRegistrationData to JSON. + * @function toJSON + * @memberof proto.ClientPayload.DevicePairingRegistrationData + * @instance + * @returns {Object.} JSON object + */ + DevicePairingRegistrationData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DevicePairingRegistrationData; + })(); + + /** + * IOSAppExtension enum. + * @name proto.ClientPayload.IOSAppExtension + * @enum {number} + * @property {number} SHARE_EXTENSION=0 SHARE_EXTENSION value + * @property {number} SERVICE_EXTENSION=1 SERVICE_EXTENSION value + * @property {number} INTENTS_EXTENSION=2 INTENTS_EXTENSION value + */ + ClientPayload.IOSAppExtension = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SHARE_EXTENSION"] = 0; + values[valuesById[1] = "SERVICE_EXTENSION"] = 1; + values[valuesById[2] = "INTENTS_EXTENSION"] = 2; + return values; + })(); + + ClientPayload.InteropData = (function() { + + /** + * Properties of an InteropData. + * @memberof proto.ClientPayload + * @interface IInteropData + * @property {number|Long|null} [accountId] InteropData accountId + * @property {Uint8Array|null} [token] InteropData token + */ + + /** + * Constructs a new InteropData. + * @memberof proto.ClientPayload + * @classdesc Represents an InteropData. + * @implements IInteropData + * @constructor + * @param {proto.ClientPayload.IInteropData=} [properties] Properties to set + */ + function InteropData(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * InteropData accountId. + * @member {number|Long} accountId + * @memberof proto.ClientPayload.InteropData + * @instance + */ + InteropData.prototype.accountId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * InteropData token. + * @member {Uint8Array} token + * @memberof proto.ClientPayload.InteropData + * @instance + */ + InteropData.prototype.token = $util.newBuffer([]); + + /** + * Creates a new InteropData instance using the specified properties. + * @function create + * @memberof proto.ClientPayload.InteropData + * @static + * @param {proto.ClientPayload.IInteropData=} [properties] Properties to set + * @returns {proto.ClientPayload.InteropData} InteropData instance + */ + InteropData.create = function create(properties) { + return new InteropData(properties); + }; + + /** + * Encodes the specified InteropData message. Does not implicitly {@link proto.ClientPayload.InteropData.verify|verify} messages. + * @function encode + * @memberof proto.ClientPayload.InteropData + * @static + * @param {proto.ClientPayload.IInteropData} message InteropData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InteropData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.accountId != null && Object.hasOwnProperty.call(message, "accountId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.accountId); + if (message.token != null && Object.hasOwnProperty.call(message, "token")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.token); + return writer; + }; + + /** + * Encodes the specified InteropData message, length delimited. Does not implicitly {@link proto.ClientPayload.InteropData.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.ClientPayload.InteropData + * @static + * @param {proto.ClientPayload.IInteropData} message InteropData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InteropData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InteropData message from the specified reader or buffer. + * @function decode + * @memberof proto.ClientPayload.InteropData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.ClientPayload.InteropData} InteropData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InteropData.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.ClientPayload.InteropData(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.accountId = reader.uint64(); + break; + case 2: + message.token = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InteropData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.ClientPayload.InteropData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.ClientPayload.InteropData} InteropData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InteropData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InteropData message. + * @function verify + * @memberof proto.ClientPayload.InteropData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InteropData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.accountId != null && message.hasOwnProperty("accountId")) + if (!$util.isInteger(message.accountId) && !(message.accountId && $util.isInteger(message.accountId.low) && $util.isInteger(message.accountId.high))) + return "accountId: integer|Long expected"; + if (message.token != null && message.hasOwnProperty("token")) + if (!(message.token && typeof message.token.length === "number" || $util.isString(message.token))) + return "token: buffer expected"; + return null; + }; + + /** + * Creates an InteropData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.ClientPayload.InteropData + * @static + * @param {Object.} object Plain object + * @returns {proto.ClientPayload.InteropData} InteropData + */ + InteropData.fromObject = function fromObject(object) { + if (object instanceof $root.proto.ClientPayload.InteropData) + return object; + var message = new $root.proto.ClientPayload.InteropData(); + if (object.accountId != null) + if ($util.Long) + (message.accountId = $util.Long.fromValue(object.accountId)).unsigned = true; + else if (typeof object.accountId === "string") + message.accountId = parseInt(object.accountId, 10); + else if (typeof object.accountId === "number") + message.accountId = object.accountId; + else if (typeof object.accountId === "object") + message.accountId = new $util.LongBits(object.accountId.low >>> 0, object.accountId.high >>> 0).toNumber(true); + if (object.token != null) + if (typeof object.token === "string") + $util.base64.decode(object.token, message.token = $util.newBuffer($util.base64.length(object.token)), 0); + else if (object.token.length) + message.token = object.token; + return message; + }; + + /** + * Creates a plain object from an InteropData message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.ClientPayload.InteropData + * @static + * @param {proto.ClientPayload.InteropData} message InteropData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InteropData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.accountId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.accountId = options.longs === String ? "0" : 0; + if (options.bytes === String) + object.token = ""; + else { + object.token = []; + if (options.bytes !== Array) + object.token = $util.newBuffer(object.token); + } + } + if (message.accountId != null && message.hasOwnProperty("accountId")) + if (typeof message.accountId === "number") + object.accountId = options.longs === String ? String(message.accountId) : message.accountId; + else + object.accountId = options.longs === String ? $util.Long.prototype.toString.call(message.accountId) : options.longs === Number ? new $util.LongBits(message.accountId.low >>> 0, message.accountId.high >>> 0).toNumber(true) : message.accountId; + if (message.token != null && message.hasOwnProperty("token")) + object.token = options.bytes === String ? $util.base64.encode(message.token, 0, message.token.length) : options.bytes === Array ? Array.prototype.slice.call(message.token) : message.token; + return object; + }; + + /** + * Converts this InteropData to JSON. + * @function toJSON + * @memberof proto.ClientPayload.InteropData + * @instance + * @returns {Object.} JSON object + */ + InteropData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return InteropData; + })(); + + /** + * Product enum. + * @name proto.ClientPayload.Product + * @enum {number} + * @property {number} WHATSAPP=0 WHATSAPP value + * @property {number} MESSENGER=1 MESSENGER value + * @property {number} INTEROP=2 INTEROP value + * @property {number} INTEROP_MSGR=3 INTEROP_MSGR value + */ + ClientPayload.Product = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "WHATSAPP"] = 0; + values[valuesById[1] = "MESSENGER"] = 1; + values[valuesById[2] = "INTEROP"] = 2; + values[valuesById[3] = "INTEROP_MSGR"] = 3; + return values; + })(); + + ClientPayload.UserAgent = (function() { + + /** + * Properties of a UserAgent. + * @memberof proto.ClientPayload + * @interface IUserAgent + * @property {proto.ClientPayload.UserAgent.Platform|null} [platform] UserAgent platform + * @property {proto.ClientPayload.UserAgent.IAppVersion|null} [appVersion] UserAgent appVersion + * @property {string|null} [mcc] UserAgent mcc + * @property {string|null} [mnc] UserAgent mnc + * @property {string|null} [osVersion] UserAgent osVersion + * @property {string|null} [manufacturer] UserAgent manufacturer + * @property {string|null} [device] UserAgent device + * @property {string|null} [osBuildNumber] UserAgent osBuildNumber + * @property {string|null} [phoneId] UserAgent phoneId + * @property {proto.ClientPayload.UserAgent.ReleaseChannel|null} [releaseChannel] UserAgent releaseChannel + * @property {string|null} [localeLanguageIso6391] UserAgent localeLanguageIso6391 + * @property {string|null} [localeCountryIso31661Alpha2] UserAgent localeCountryIso31661Alpha2 + * @property {string|null} [deviceBoard] UserAgent deviceBoard + * @property {string|null} [deviceExpId] UserAgent deviceExpId + * @property {proto.ClientPayload.UserAgent.DeviceType|null} [deviceType] UserAgent deviceType + */ + + /** + * Constructs a new UserAgent. + * @memberof proto.ClientPayload + * @classdesc Represents a UserAgent. + * @implements IUserAgent + * @constructor + * @param {proto.ClientPayload.IUserAgent=} [properties] Properties to set + */ + function UserAgent(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UserAgent platform. + * @member {proto.ClientPayload.UserAgent.Platform} platform + * @memberof proto.ClientPayload.UserAgent + * @instance + */ + UserAgent.prototype.platform = 0; + + /** + * UserAgent appVersion. + * @member {proto.ClientPayload.UserAgent.IAppVersion|null|undefined} appVersion + * @memberof proto.ClientPayload.UserAgent + * @instance + */ + UserAgent.prototype.appVersion = null; + + /** + * UserAgent mcc. + * @member {string} mcc + * @memberof proto.ClientPayload.UserAgent + * @instance + */ + UserAgent.prototype.mcc = ""; + + /** + * UserAgent mnc. + * @member {string} mnc + * @memberof proto.ClientPayload.UserAgent + * @instance + */ + UserAgent.prototype.mnc = ""; + + /** + * UserAgent osVersion. + * @member {string} osVersion + * @memberof proto.ClientPayload.UserAgent + * @instance + */ + UserAgent.prototype.osVersion = ""; + + /** + * UserAgent manufacturer. + * @member {string} manufacturer + * @memberof proto.ClientPayload.UserAgent + * @instance + */ + UserAgent.prototype.manufacturer = ""; + + /** + * UserAgent device. + * @member {string} device + * @memberof proto.ClientPayload.UserAgent + * @instance + */ + UserAgent.prototype.device = ""; + + /** + * UserAgent osBuildNumber. + * @member {string} osBuildNumber + * @memberof proto.ClientPayload.UserAgent + * @instance + */ + UserAgent.prototype.osBuildNumber = ""; + + /** + * UserAgent phoneId. + * @member {string} phoneId + * @memberof proto.ClientPayload.UserAgent + * @instance + */ + UserAgent.prototype.phoneId = ""; + + /** + * UserAgent releaseChannel. + * @member {proto.ClientPayload.UserAgent.ReleaseChannel} releaseChannel + * @memberof proto.ClientPayload.UserAgent + * @instance + */ + UserAgent.prototype.releaseChannel = 0; + + /** + * UserAgent localeLanguageIso6391. + * @member {string} localeLanguageIso6391 + * @memberof proto.ClientPayload.UserAgent + * @instance + */ + UserAgent.prototype.localeLanguageIso6391 = ""; + + /** + * UserAgent localeCountryIso31661Alpha2. + * @member {string} localeCountryIso31661Alpha2 + * @memberof proto.ClientPayload.UserAgent + * @instance + */ + UserAgent.prototype.localeCountryIso31661Alpha2 = ""; + + /** + * UserAgent deviceBoard. + * @member {string} deviceBoard + * @memberof proto.ClientPayload.UserAgent + * @instance + */ + UserAgent.prototype.deviceBoard = ""; + + /** + * UserAgent deviceExpId. + * @member {string} deviceExpId + * @memberof proto.ClientPayload.UserAgent + * @instance + */ + UserAgent.prototype.deviceExpId = ""; + + /** + * UserAgent deviceType. + * @member {proto.ClientPayload.UserAgent.DeviceType} deviceType + * @memberof proto.ClientPayload.UserAgent + * @instance + */ + UserAgent.prototype.deviceType = 0; + + /** + * Creates a new UserAgent instance using the specified properties. + * @function create + * @memberof proto.ClientPayload.UserAgent + * @static + * @param {proto.ClientPayload.IUserAgent=} [properties] Properties to set + * @returns {proto.ClientPayload.UserAgent} UserAgent instance + */ + UserAgent.create = function create(properties) { + return new UserAgent(properties); + }; + + /** + * Encodes the specified UserAgent message. Does not implicitly {@link proto.ClientPayload.UserAgent.verify|verify} messages. + * @function encode + * @memberof proto.ClientPayload.UserAgent + * @static + * @param {proto.ClientPayload.IUserAgent} message UserAgent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserAgent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.platform != null && Object.hasOwnProperty.call(message, "platform")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.platform); + if (message.appVersion != null && Object.hasOwnProperty.call(message, "appVersion")) + $root.proto.ClientPayload.UserAgent.AppVersion.encode(message.appVersion, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.mcc != null && Object.hasOwnProperty.call(message, "mcc")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.mcc); + if (message.mnc != null && Object.hasOwnProperty.call(message, "mnc")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.mnc); + if (message.osVersion != null && Object.hasOwnProperty.call(message, "osVersion")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.osVersion); + if (message.manufacturer != null && Object.hasOwnProperty.call(message, "manufacturer")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.manufacturer); + if (message.device != null && Object.hasOwnProperty.call(message, "device")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.device); + if (message.osBuildNumber != null && Object.hasOwnProperty.call(message, "osBuildNumber")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.osBuildNumber); + if (message.phoneId != null && Object.hasOwnProperty.call(message, "phoneId")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.phoneId); + if (message.releaseChannel != null && Object.hasOwnProperty.call(message, "releaseChannel")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.releaseChannel); + if (message.localeLanguageIso6391 != null && Object.hasOwnProperty.call(message, "localeLanguageIso6391")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.localeLanguageIso6391); + if (message.localeCountryIso31661Alpha2 != null && Object.hasOwnProperty.call(message, "localeCountryIso31661Alpha2")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.localeCountryIso31661Alpha2); + if (message.deviceBoard != null && Object.hasOwnProperty.call(message, "deviceBoard")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.deviceBoard); + if (message.deviceExpId != null && Object.hasOwnProperty.call(message, "deviceExpId")) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.deviceExpId); + if (message.deviceType != null && Object.hasOwnProperty.call(message, "deviceType")) + writer.uint32(/* id 15, wireType 0 =*/120).int32(message.deviceType); + return writer; + }; + + /** + * Encodes the specified UserAgent message, length delimited. Does not implicitly {@link proto.ClientPayload.UserAgent.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.ClientPayload.UserAgent + * @static + * @param {proto.ClientPayload.IUserAgent} message UserAgent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserAgent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UserAgent message from the specified reader or buffer. + * @function decode + * @memberof proto.ClientPayload.UserAgent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.ClientPayload.UserAgent} UserAgent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserAgent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.ClientPayload.UserAgent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.platform = reader.int32(); + break; + case 2: + message.appVersion = $root.proto.ClientPayload.UserAgent.AppVersion.decode(reader, reader.uint32()); + break; + case 3: + message.mcc = reader.string(); + break; + case 4: + message.mnc = reader.string(); + break; + case 5: + message.osVersion = reader.string(); + break; + case 6: + message.manufacturer = reader.string(); + break; + case 7: + message.device = reader.string(); + break; + case 8: + message.osBuildNumber = reader.string(); + break; + case 9: + message.phoneId = reader.string(); + break; + case 10: + message.releaseChannel = reader.int32(); + break; + case 11: + message.localeLanguageIso6391 = reader.string(); + break; + case 12: + message.localeCountryIso31661Alpha2 = reader.string(); + break; + case 13: + message.deviceBoard = reader.string(); + break; + case 14: + message.deviceExpId = reader.string(); + break; + case 15: + message.deviceType = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UserAgent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.ClientPayload.UserAgent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.ClientPayload.UserAgent} UserAgent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserAgent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UserAgent message. + * @function verify + * @memberof proto.ClientPayload.UserAgent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UserAgent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.platform != null && message.hasOwnProperty("platform")) + switch (message.platform) { + default: + return "platform: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + case 20: + case 21: + case 22: + case 23: + case 24: + case 25: + case 26: + case 27: + case 28: + case 29: + case 30: + case 31: + case 32: + case 33: + case 34: + case 35: + break; + } + if (message.appVersion != null && message.hasOwnProperty("appVersion")) { + var error = $root.proto.ClientPayload.UserAgent.AppVersion.verify(message.appVersion); + if (error) + return "appVersion." + error; + } + if (message.mcc != null && message.hasOwnProperty("mcc")) + if (!$util.isString(message.mcc)) + return "mcc: string expected"; + if (message.mnc != null && message.hasOwnProperty("mnc")) + if (!$util.isString(message.mnc)) + return "mnc: string expected"; + if (message.osVersion != null && message.hasOwnProperty("osVersion")) + if (!$util.isString(message.osVersion)) + return "osVersion: string expected"; + if (message.manufacturer != null && message.hasOwnProperty("manufacturer")) + if (!$util.isString(message.manufacturer)) + return "manufacturer: string expected"; + if (message.device != null && message.hasOwnProperty("device")) + if (!$util.isString(message.device)) + return "device: string expected"; + if (message.osBuildNumber != null && message.hasOwnProperty("osBuildNumber")) + if (!$util.isString(message.osBuildNumber)) + return "osBuildNumber: string expected"; + if (message.phoneId != null && message.hasOwnProperty("phoneId")) + if (!$util.isString(message.phoneId)) + return "phoneId: string expected"; + if (message.releaseChannel != null && message.hasOwnProperty("releaseChannel")) + switch (message.releaseChannel) { + default: + return "releaseChannel: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.localeLanguageIso6391 != null && message.hasOwnProperty("localeLanguageIso6391")) + if (!$util.isString(message.localeLanguageIso6391)) + return "localeLanguageIso6391: string expected"; + if (message.localeCountryIso31661Alpha2 != null && message.hasOwnProperty("localeCountryIso31661Alpha2")) + if (!$util.isString(message.localeCountryIso31661Alpha2)) + return "localeCountryIso31661Alpha2: string expected"; + if (message.deviceBoard != null && message.hasOwnProperty("deviceBoard")) + if (!$util.isString(message.deviceBoard)) + return "deviceBoard: string expected"; + if (message.deviceExpId != null && message.hasOwnProperty("deviceExpId")) + if (!$util.isString(message.deviceExpId)) + return "deviceExpId: string expected"; + if (message.deviceType != null && message.hasOwnProperty("deviceType")) + switch (message.deviceType) { + default: + return "deviceType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + return null; + }; + + /** + * Creates a UserAgent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.ClientPayload.UserAgent + * @static + * @param {Object.} object Plain object + * @returns {proto.ClientPayload.UserAgent} UserAgent + */ + UserAgent.fromObject = function fromObject(object) { + if (object instanceof $root.proto.ClientPayload.UserAgent) + return object; + var message = new $root.proto.ClientPayload.UserAgent(); + switch (object.platform) { + case "ANDROID": + case 0: + message.platform = 0; + break; + case "IOS": + case 1: + message.platform = 1; + break; + case "WINDOWS_PHONE": + case 2: + message.platform = 2; + break; + case "BLACKBERRY": + case 3: + message.platform = 3; + break; + case "BLACKBERRYX": + case 4: + message.platform = 4; + break; + case "S40": + case 5: + message.platform = 5; + break; + case "S60": + case 6: + message.platform = 6; + break; + case "PYTHON_CLIENT": + case 7: + message.platform = 7; + break; + case "TIZEN": + case 8: + message.platform = 8; + break; + case "ENTERPRISE": + case 9: + message.platform = 9; + break; + case "SMB_ANDROID": + case 10: + message.platform = 10; + break; + case "KAIOS": + case 11: + message.platform = 11; + break; + case "SMB_IOS": + case 12: + message.platform = 12; + break; + case "WINDOWS": + case 13: + message.platform = 13; + break; + case "WEB": + case 14: + message.platform = 14; + break; + case "PORTAL": + case 15: + message.platform = 15; + break; + case "GREEN_ANDROID": + case 16: + message.platform = 16; + break; + case "GREEN_IPHONE": + case 17: + message.platform = 17; + break; + case "BLUE_ANDROID": + case 18: + message.platform = 18; + break; + case "BLUE_IPHONE": + case 19: + message.platform = 19; + break; + case "FBLITE_ANDROID": + case 20: + message.platform = 20; + break; + case "MLITE_ANDROID": + case 21: + message.platform = 21; + break; + case "IGLITE_ANDROID": + case 22: + message.platform = 22; + break; + case "PAGE": + case 23: + message.platform = 23; + break; + case "MACOS": + case 24: + message.platform = 24; + break; + case "OCULUS_MSG": + case 25: + message.platform = 25; + break; + case "OCULUS_CALL": + case 26: + message.platform = 26; + break; + case "MILAN": + case 27: + message.platform = 27; + break; + case "CAPI": + case 28: + message.platform = 28; + break; + case "WEAROS": + case 29: + message.platform = 29; + break; + case "ARDEVICE": + case 30: + message.platform = 30; + break; + case "VRDEVICE": + case 31: + message.platform = 31; + break; + case "BLUE_WEB": + case 32: + message.platform = 32; + break; + case "IPAD": + case 33: + message.platform = 33; + break; + case "TEST": + case 34: + message.platform = 34; + break; + case "SMART_GLASSES": + case 35: + message.platform = 35; + break; + } + if (object.appVersion != null) { + if (typeof object.appVersion !== "object") + throw TypeError(".proto.ClientPayload.UserAgent.appVersion: object expected"); + message.appVersion = $root.proto.ClientPayload.UserAgent.AppVersion.fromObject(object.appVersion); + } + if (object.mcc != null) + message.mcc = String(object.mcc); + if (object.mnc != null) + message.mnc = String(object.mnc); + if (object.osVersion != null) + message.osVersion = String(object.osVersion); + if (object.manufacturer != null) + message.manufacturer = String(object.manufacturer); + if (object.device != null) + message.device = String(object.device); + if (object.osBuildNumber != null) + message.osBuildNumber = String(object.osBuildNumber); + if (object.phoneId != null) + message.phoneId = String(object.phoneId); + switch (object.releaseChannel) { + case "RELEASE": + case 0: + message.releaseChannel = 0; + break; + case "BETA": + case 1: + message.releaseChannel = 1; + break; + case "ALPHA": + case 2: + message.releaseChannel = 2; + break; + case "DEBUG": + case 3: + message.releaseChannel = 3; + break; + } + if (object.localeLanguageIso6391 != null) + message.localeLanguageIso6391 = String(object.localeLanguageIso6391); + if (object.localeCountryIso31661Alpha2 != null) + message.localeCountryIso31661Alpha2 = String(object.localeCountryIso31661Alpha2); + if (object.deviceBoard != null) + message.deviceBoard = String(object.deviceBoard); + if (object.deviceExpId != null) + message.deviceExpId = String(object.deviceExpId); + switch (object.deviceType) { + case "PHONE": + case 0: + message.deviceType = 0; + break; + case "TABLET": + case 1: + message.deviceType = 1; + break; + case "DESKTOP": + case 2: + message.deviceType = 2; + break; + case "WEARABLE": + case 3: + message.deviceType = 3; + break; + case "VR": + case 4: + message.deviceType = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from a UserAgent message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.ClientPayload.UserAgent + * @static + * @param {proto.ClientPayload.UserAgent} message UserAgent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UserAgent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.platform = options.enums === String ? "ANDROID" : 0; + object.appVersion = null; + object.mcc = ""; + object.mnc = ""; + object.osVersion = ""; + object.manufacturer = ""; + object.device = ""; + object.osBuildNumber = ""; + object.phoneId = ""; + object.releaseChannel = options.enums === String ? "RELEASE" : 0; + object.localeLanguageIso6391 = ""; + object.localeCountryIso31661Alpha2 = ""; + object.deviceBoard = ""; + object.deviceExpId = ""; + object.deviceType = options.enums === String ? "PHONE" : 0; + } + if (message.platform != null && message.hasOwnProperty("platform")) + object.platform = options.enums === String ? $root.proto.ClientPayload.UserAgent.Platform[message.platform] : message.platform; + if (message.appVersion != null && message.hasOwnProperty("appVersion")) + object.appVersion = $root.proto.ClientPayload.UserAgent.AppVersion.toObject(message.appVersion, options); + if (message.mcc != null && message.hasOwnProperty("mcc")) + object.mcc = message.mcc; + if (message.mnc != null && message.hasOwnProperty("mnc")) + object.mnc = message.mnc; + if (message.osVersion != null && message.hasOwnProperty("osVersion")) + object.osVersion = message.osVersion; + if (message.manufacturer != null && message.hasOwnProperty("manufacturer")) + object.manufacturer = message.manufacturer; + if (message.device != null && message.hasOwnProperty("device")) + object.device = message.device; + if (message.osBuildNumber != null && message.hasOwnProperty("osBuildNumber")) + object.osBuildNumber = message.osBuildNumber; + if (message.phoneId != null && message.hasOwnProperty("phoneId")) + object.phoneId = message.phoneId; + if (message.releaseChannel != null && message.hasOwnProperty("releaseChannel")) + object.releaseChannel = options.enums === String ? $root.proto.ClientPayload.UserAgent.ReleaseChannel[message.releaseChannel] : message.releaseChannel; + if (message.localeLanguageIso6391 != null && message.hasOwnProperty("localeLanguageIso6391")) + object.localeLanguageIso6391 = message.localeLanguageIso6391; + if (message.localeCountryIso31661Alpha2 != null && message.hasOwnProperty("localeCountryIso31661Alpha2")) + object.localeCountryIso31661Alpha2 = message.localeCountryIso31661Alpha2; + if (message.deviceBoard != null && message.hasOwnProperty("deviceBoard")) + object.deviceBoard = message.deviceBoard; + if (message.deviceExpId != null && message.hasOwnProperty("deviceExpId")) + object.deviceExpId = message.deviceExpId; + if (message.deviceType != null && message.hasOwnProperty("deviceType")) + object.deviceType = options.enums === String ? $root.proto.ClientPayload.UserAgent.DeviceType[message.deviceType] : message.deviceType; + return object; + }; + + /** + * Converts this UserAgent to JSON. + * @function toJSON + * @memberof proto.ClientPayload.UserAgent + * @instance + * @returns {Object.} JSON object + */ + UserAgent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + UserAgent.AppVersion = (function() { + + /** + * Properties of an AppVersion. + * @memberof proto.ClientPayload.UserAgent + * @interface IAppVersion + * @property {number|null} [primary] AppVersion primary + * @property {number|null} [secondary] AppVersion secondary + * @property {number|null} [tertiary] AppVersion tertiary + * @property {number|null} [quaternary] AppVersion quaternary + * @property {number|null} [quinary] AppVersion quinary + */ + + /** + * Constructs a new AppVersion. + * @memberof proto.ClientPayload.UserAgent + * @classdesc Represents an AppVersion. + * @implements IAppVersion + * @constructor + * @param {proto.ClientPayload.UserAgent.IAppVersion=} [properties] Properties to set + */ + function AppVersion(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AppVersion primary. + * @member {number} primary + * @memberof proto.ClientPayload.UserAgent.AppVersion + * @instance + */ + AppVersion.prototype.primary = 0; + + /** + * AppVersion secondary. + * @member {number} secondary + * @memberof proto.ClientPayload.UserAgent.AppVersion + * @instance + */ + AppVersion.prototype.secondary = 0; + + /** + * AppVersion tertiary. + * @member {number} tertiary + * @memberof proto.ClientPayload.UserAgent.AppVersion + * @instance + */ + AppVersion.prototype.tertiary = 0; + + /** + * AppVersion quaternary. + * @member {number} quaternary + * @memberof proto.ClientPayload.UserAgent.AppVersion + * @instance + */ + AppVersion.prototype.quaternary = 0; + + /** + * AppVersion quinary. + * @member {number} quinary + * @memberof proto.ClientPayload.UserAgent.AppVersion + * @instance + */ + AppVersion.prototype.quinary = 0; + + /** + * Creates a new AppVersion instance using the specified properties. + * @function create + * @memberof proto.ClientPayload.UserAgent.AppVersion + * @static + * @param {proto.ClientPayload.UserAgent.IAppVersion=} [properties] Properties to set + * @returns {proto.ClientPayload.UserAgent.AppVersion} AppVersion instance + */ + AppVersion.create = function create(properties) { + return new AppVersion(properties); + }; + + /** + * Encodes the specified AppVersion message. Does not implicitly {@link proto.ClientPayload.UserAgent.AppVersion.verify|verify} messages. + * @function encode + * @memberof proto.ClientPayload.UserAgent.AppVersion + * @static + * @param {proto.ClientPayload.UserAgent.IAppVersion} message AppVersion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AppVersion.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.primary != null && Object.hasOwnProperty.call(message, "primary")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.primary); + if (message.secondary != null && Object.hasOwnProperty.call(message, "secondary")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.secondary); + if (message.tertiary != null && Object.hasOwnProperty.call(message, "tertiary")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.tertiary); + if (message.quaternary != null && Object.hasOwnProperty.call(message, "quaternary")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.quaternary); + if (message.quinary != null && Object.hasOwnProperty.call(message, "quinary")) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.quinary); + return writer; + }; + + /** + * Encodes the specified AppVersion message, length delimited. Does not implicitly {@link proto.ClientPayload.UserAgent.AppVersion.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.ClientPayload.UserAgent.AppVersion + * @static + * @param {proto.ClientPayload.UserAgent.IAppVersion} message AppVersion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AppVersion.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AppVersion message from the specified reader or buffer. + * @function decode + * @memberof proto.ClientPayload.UserAgent.AppVersion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.ClientPayload.UserAgent.AppVersion} AppVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AppVersion.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.ClientPayload.UserAgent.AppVersion(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.primary = reader.uint32(); + break; + case 2: + message.secondary = reader.uint32(); + break; + case 3: + message.tertiary = reader.uint32(); + break; + case 4: + message.quaternary = reader.uint32(); + break; + case 5: + message.quinary = reader.uint32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AppVersion message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.ClientPayload.UserAgent.AppVersion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.ClientPayload.UserAgent.AppVersion} AppVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AppVersion.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AppVersion message. + * @function verify + * @memberof proto.ClientPayload.UserAgent.AppVersion + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AppVersion.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.primary != null && message.hasOwnProperty("primary")) + if (!$util.isInteger(message.primary)) + return "primary: integer expected"; + if (message.secondary != null && message.hasOwnProperty("secondary")) + if (!$util.isInteger(message.secondary)) + return "secondary: integer expected"; + if (message.tertiary != null && message.hasOwnProperty("tertiary")) + if (!$util.isInteger(message.tertiary)) + return "tertiary: integer expected"; + if (message.quaternary != null && message.hasOwnProperty("quaternary")) + if (!$util.isInteger(message.quaternary)) + return "quaternary: integer expected"; + if (message.quinary != null && message.hasOwnProperty("quinary")) + if (!$util.isInteger(message.quinary)) + return "quinary: integer expected"; + return null; + }; + + /** + * Creates an AppVersion message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.ClientPayload.UserAgent.AppVersion + * @static + * @param {Object.} object Plain object + * @returns {proto.ClientPayload.UserAgent.AppVersion} AppVersion + */ + AppVersion.fromObject = function fromObject(object) { + if (object instanceof $root.proto.ClientPayload.UserAgent.AppVersion) + return object; + var message = new $root.proto.ClientPayload.UserAgent.AppVersion(); + if (object.primary != null) + message.primary = object.primary >>> 0; + if (object.secondary != null) + message.secondary = object.secondary >>> 0; + if (object.tertiary != null) + message.tertiary = object.tertiary >>> 0; + if (object.quaternary != null) + message.quaternary = object.quaternary >>> 0; + if (object.quinary != null) + message.quinary = object.quinary >>> 0; + return message; + }; + + /** + * Creates a plain object from an AppVersion message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.ClientPayload.UserAgent.AppVersion + * @static + * @param {proto.ClientPayload.UserAgent.AppVersion} message AppVersion + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AppVersion.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.primary = 0; + object.secondary = 0; + object.tertiary = 0; + object.quaternary = 0; + object.quinary = 0; + } + if (message.primary != null && message.hasOwnProperty("primary")) + object.primary = message.primary; + if (message.secondary != null && message.hasOwnProperty("secondary")) + object.secondary = message.secondary; + if (message.tertiary != null && message.hasOwnProperty("tertiary")) + object.tertiary = message.tertiary; + if (message.quaternary != null && message.hasOwnProperty("quaternary")) + object.quaternary = message.quaternary; + if (message.quinary != null && message.hasOwnProperty("quinary")) + object.quinary = message.quinary; + return object; + }; + + /** + * Converts this AppVersion to JSON. + * @function toJSON + * @memberof proto.ClientPayload.UserAgent.AppVersion + * @instance + * @returns {Object.} JSON object + */ + AppVersion.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AppVersion; + })(); + + /** + * DeviceType enum. + * @name proto.ClientPayload.UserAgent.DeviceType + * @enum {number} + * @property {number} PHONE=0 PHONE value + * @property {number} TABLET=1 TABLET value + * @property {number} DESKTOP=2 DESKTOP value + * @property {number} WEARABLE=3 WEARABLE value + * @property {number} VR=4 VR value + */ + UserAgent.DeviceType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PHONE"] = 0; + values[valuesById[1] = "TABLET"] = 1; + values[valuesById[2] = "DESKTOP"] = 2; + values[valuesById[3] = "WEARABLE"] = 3; + values[valuesById[4] = "VR"] = 4; + return values; + })(); + + /** + * Platform enum. + * @name proto.ClientPayload.UserAgent.Platform + * @enum {number} + * @property {number} ANDROID=0 ANDROID value + * @property {number} IOS=1 IOS value + * @property {number} WINDOWS_PHONE=2 WINDOWS_PHONE value + * @property {number} BLACKBERRY=3 BLACKBERRY value + * @property {number} BLACKBERRYX=4 BLACKBERRYX value + * @property {number} S40=5 S40 value + * @property {number} S60=6 S60 value + * @property {number} PYTHON_CLIENT=7 PYTHON_CLIENT value + * @property {number} TIZEN=8 TIZEN value + * @property {number} ENTERPRISE=9 ENTERPRISE value + * @property {number} SMB_ANDROID=10 SMB_ANDROID value + * @property {number} KAIOS=11 KAIOS value + * @property {number} SMB_IOS=12 SMB_IOS value + * @property {number} WINDOWS=13 WINDOWS value + * @property {number} WEB=14 WEB value + * @property {number} PORTAL=15 PORTAL value + * @property {number} GREEN_ANDROID=16 GREEN_ANDROID value + * @property {number} GREEN_IPHONE=17 GREEN_IPHONE value + * @property {number} BLUE_ANDROID=18 BLUE_ANDROID value + * @property {number} BLUE_IPHONE=19 BLUE_IPHONE value + * @property {number} FBLITE_ANDROID=20 FBLITE_ANDROID value + * @property {number} MLITE_ANDROID=21 MLITE_ANDROID value + * @property {number} IGLITE_ANDROID=22 IGLITE_ANDROID value + * @property {number} PAGE=23 PAGE value + * @property {number} MACOS=24 MACOS value + * @property {number} OCULUS_MSG=25 OCULUS_MSG value + * @property {number} OCULUS_CALL=26 OCULUS_CALL value + * @property {number} MILAN=27 MILAN value + * @property {number} CAPI=28 CAPI value + * @property {number} WEAROS=29 WEAROS value + * @property {number} ARDEVICE=30 ARDEVICE value + * @property {number} VRDEVICE=31 VRDEVICE value + * @property {number} BLUE_WEB=32 BLUE_WEB value + * @property {number} IPAD=33 IPAD value + * @property {number} TEST=34 TEST value + * @property {number} SMART_GLASSES=35 SMART_GLASSES value + */ + UserAgent.Platform = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ANDROID"] = 0; + values[valuesById[1] = "IOS"] = 1; + values[valuesById[2] = "WINDOWS_PHONE"] = 2; + values[valuesById[3] = "BLACKBERRY"] = 3; + values[valuesById[4] = "BLACKBERRYX"] = 4; + values[valuesById[5] = "S40"] = 5; + values[valuesById[6] = "S60"] = 6; + values[valuesById[7] = "PYTHON_CLIENT"] = 7; + values[valuesById[8] = "TIZEN"] = 8; + values[valuesById[9] = "ENTERPRISE"] = 9; + values[valuesById[10] = "SMB_ANDROID"] = 10; + values[valuesById[11] = "KAIOS"] = 11; + values[valuesById[12] = "SMB_IOS"] = 12; + values[valuesById[13] = "WINDOWS"] = 13; + values[valuesById[14] = "WEB"] = 14; + values[valuesById[15] = "PORTAL"] = 15; + values[valuesById[16] = "GREEN_ANDROID"] = 16; + values[valuesById[17] = "GREEN_IPHONE"] = 17; + values[valuesById[18] = "BLUE_ANDROID"] = 18; + values[valuesById[19] = "BLUE_IPHONE"] = 19; + values[valuesById[20] = "FBLITE_ANDROID"] = 20; + values[valuesById[21] = "MLITE_ANDROID"] = 21; + values[valuesById[22] = "IGLITE_ANDROID"] = 22; + values[valuesById[23] = "PAGE"] = 23; + values[valuesById[24] = "MACOS"] = 24; + values[valuesById[25] = "OCULUS_MSG"] = 25; + values[valuesById[26] = "OCULUS_CALL"] = 26; + values[valuesById[27] = "MILAN"] = 27; + values[valuesById[28] = "CAPI"] = 28; + values[valuesById[29] = "WEAROS"] = 29; + values[valuesById[30] = "ARDEVICE"] = 30; + values[valuesById[31] = "VRDEVICE"] = 31; + values[valuesById[32] = "BLUE_WEB"] = 32; + values[valuesById[33] = "IPAD"] = 33; + values[valuesById[34] = "TEST"] = 34; + values[valuesById[35] = "SMART_GLASSES"] = 35; + return values; + })(); + + /** + * ReleaseChannel enum. + * @name proto.ClientPayload.UserAgent.ReleaseChannel + * @enum {number} + * @property {number} RELEASE=0 RELEASE value + * @property {number} BETA=1 BETA value + * @property {number} ALPHA=2 ALPHA value + * @property {number} DEBUG=3 DEBUG value + */ + UserAgent.ReleaseChannel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RELEASE"] = 0; + values[valuesById[1] = "BETA"] = 1; + values[valuesById[2] = "ALPHA"] = 2; + values[valuesById[3] = "DEBUG"] = 3; + return values; + })(); + + return UserAgent; + })(); + + ClientPayload.WebInfo = (function() { + + /** + * Properties of a WebInfo. + * @memberof proto.ClientPayload + * @interface IWebInfo + * @property {string|null} [refToken] WebInfo refToken + * @property {string|null} [version] WebInfo version + * @property {proto.ClientPayload.WebInfo.IWebdPayload|null} [webdPayload] WebInfo webdPayload + * @property {proto.ClientPayload.WebInfo.WebSubPlatform|null} [webSubPlatform] WebInfo webSubPlatform + */ + + /** + * Constructs a new WebInfo. + * @memberof proto.ClientPayload + * @classdesc Represents a WebInfo. + * @implements IWebInfo + * @constructor + * @param {proto.ClientPayload.IWebInfo=} [properties] Properties to set + */ + function WebInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WebInfo refToken. + * @member {string} refToken + * @memberof proto.ClientPayload.WebInfo + * @instance + */ + WebInfo.prototype.refToken = ""; + + /** + * WebInfo version. + * @member {string} version + * @memberof proto.ClientPayload.WebInfo + * @instance + */ + WebInfo.prototype.version = ""; + + /** + * WebInfo webdPayload. + * @member {proto.ClientPayload.WebInfo.IWebdPayload|null|undefined} webdPayload + * @memberof proto.ClientPayload.WebInfo + * @instance + */ + WebInfo.prototype.webdPayload = null; + + /** + * WebInfo webSubPlatform. + * @member {proto.ClientPayload.WebInfo.WebSubPlatform} webSubPlatform + * @memberof proto.ClientPayload.WebInfo + * @instance + */ + WebInfo.prototype.webSubPlatform = 0; + + /** + * Creates a new WebInfo instance using the specified properties. + * @function create + * @memberof proto.ClientPayload.WebInfo + * @static + * @param {proto.ClientPayload.IWebInfo=} [properties] Properties to set + * @returns {proto.ClientPayload.WebInfo} WebInfo instance + */ + WebInfo.create = function create(properties) { + return new WebInfo(properties); + }; + + /** + * Encodes the specified WebInfo message. Does not implicitly {@link proto.ClientPayload.WebInfo.verify|verify} messages. + * @function encode + * @memberof proto.ClientPayload.WebInfo + * @static + * @param {proto.ClientPayload.IWebInfo} message WebInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WebInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.refToken != null && Object.hasOwnProperty.call(message, "refToken")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.refToken); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.version); + if (message.webdPayload != null && Object.hasOwnProperty.call(message, "webdPayload")) + $root.proto.ClientPayload.WebInfo.WebdPayload.encode(message.webdPayload, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.webSubPlatform != null && Object.hasOwnProperty.call(message, "webSubPlatform")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.webSubPlatform); + return writer; + }; + + /** + * Encodes the specified WebInfo message, length delimited. Does not implicitly {@link proto.ClientPayload.WebInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.ClientPayload.WebInfo + * @static + * @param {proto.ClientPayload.IWebInfo} message WebInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WebInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WebInfo message from the specified reader or buffer. + * @function decode + * @memberof proto.ClientPayload.WebInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.ClientPayload.WebInfo} WebInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WebInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.ClientPayload.WebInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.refToken = reader.string(); + break; + case 2: + message.version = reader.string(); + break; + case 3: + message.webdPayload = $root.proto.ClientPayload.WebInfo.WebdPayload.decode(reader, reader.uint32()); + break; + case 4: + message.webSubPlatform = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WebInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.ClientPayload.WebInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.ClientPayload.WebInfo} WebInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WebInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WebInfo message. + * @function verify + * @memberof proto.ClientPayload.WebInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WebInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.refToken != null && message.hasOwnProperty("refToken")) + if (!$util.isString(message.refToken)) + return "refToken: string expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.webdPayload != null && message.hasOwnProperty("webdPayload")) { + var error = $root.proto.ClientPayload.WebInfo.WebdPayload.verify(message.webdPayload); + if (error) + return "webdPayload." + error; + } + if (message.webSubPlatform != null && message.hasOwnProperty("webSubPlatform")) + switch (message.webSubPlatform) { + default: + return "webSubPlatform: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + return null; + }; + + /** + * Creates a WebInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.ClientPayload.WebInfo + * @static + * @param {Object.} object Plain object + * @returns {proto.ClientPayload.WebInfo} WebInfo + */ + WebInfo.fromObject = function fromObject(object) { + if (object instanceof $root.proto.ClientPayload.WebInfo) + return object; + var message = new $root.proto.ClientPayload.WebInfo(); + if (object.refToken != null) + message.refToken = String(object.refToken); + if (object.version != null) + message.version = String(object.version); + if (object.webdPayload != null) { + if (typeof object.webdPayload !== "object") + throw TypeError(".proto.ClientPayload.WebInfo.webdPayload: object expected"); + message.webdPayload = $root.proto.ClientPayload.WebInfo.WebdPayload.fromObject(object.webdPayload); + } + switch (object.webSubPlatform) { + case "WEB_BROWSER": + case 0: + message.webSubPlatform = 0; + break; + case "APP_STORE": + case 1: + message.webSubPlatform = 1; + break; + case "WIN_STORE": + case 2: + message.webSubPlatform = 2; + break; + case "DARWIN": + case 3: + message.webSubPlatform = 3; + break; + case "WIN32": + case 4: + message.webSubPlatform = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from a WebInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.ClientPayload.WebInfo + * @static + * @param {proto.ClientPayload.WebInfo} message WebInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WebInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.refToken = ""; + object.version = ""; + object.webdPayload = null; + object.webSubPlatform = options.enums === String ? "WEB_BROWSER" : 0; + } + if (message.refToken != null && message.hasOwnProperty("refToken")) + object.refToken = message.refToken; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.webdPayload != null && message.hasOwnProperty("webdPayload")) + object.webdPayload = $root.proto.ClientPayload.WebInfo.WebdPayload.toObject(message.webdPayload, options); + if (message.webSubPlatform != null && message.hasOwnProperty("webSubPlatform")) + object.webSubPlatform = options.enums === String ? $root.proto.ClientPayload.WebInfo.WebSubPlatform[message.webSubPlatform] : message.webSubPlatform; + return object; + }; + + /** + * Converts this WebInfo to JSON. + * @function toJSON + * @memberof proto.ClientPayload.WebInfo + * @instance + * @returns {Object.} JSON object + */ + WebInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * WebSubPlatform enum. + * @name proto.ClientPayload.WebInfo.WebSubPlatform + * @enum {number} + * @property {number} WEB_BROWSER=0 WEB_BROWSER value + * @property {number} APP_STORE=1 APP_STORE value + * @property {number} WIN_STORE=2 WIN_STORE value + * @property {number} DARWIN=3 DARWIN value + * @property {number} WIN32=4 WIN32 value + */ + WebInfo.WebSubPlatform = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "WEB_BROWSER"] = 0; + values[valuesById[1] = "APP_STORE"] = 1; + values[valuesById[2] = "WIN_STORE"] = 2; + values[valuesById[3] = "DARWIN"] = 3; + values[valuesById[4] = "WIN32"] = 4; + return values; + })(); + + WebInfo.WebdPayload = (function() { + + /** + * Properties of a WebdPayload. + * @memberof proto.ClientPayload.WebInfo + * @interface IWebdPayload + * @property {boolean|null} [usesParticipantInKey] WebdPayload usesParticipantInKey + * @property {boolean|null} [supportsStarredMessages] WebdPayload supportsStarredMessages + * @property {boolean|null} [supportsDocumentMessages] WebdPayload supportsDocumentMessages + * @property {boolean|null} [supportsUrlMessages] WebdPayload supportsUrlMessages + * @property {boolean|null} [supportsMediaRetry] WebdPayload supportsMediaRetry + * @property {boolean|null} [supportsE2EImage] WebdPayload supportsE2EImage + * @property {boolean|null} [supportsE2EVideo] WebdPayload supportsE2EVideo + * @property {boolean|null} [supportsE2EAudio] WebdPayload supportsE2EAudio + * @property {boolean|null} [supportsE2EDocument] WebdPayload supportsE2EDocument + * @property {string|null} [documentTypes] WebdPayload documentTypes + * @property {Uint8Array|null} [features] WebdPayload features + */ + + /** + * Constructs a new WebdPayload. + * @memberof proto.ClientPayload.WebInfo + * @classdesc Represents a WebdPayload. + * @implements IWebdPayload + * @constructor + * @param {proto.ClientPayload.WebInfo.IWebdPayload=} [properties] Properties to set + */ + function WebdPayload(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WebdPayload usesParticipantInKey. + * @member {boolean} usesParticipantInKey + * @memberof proto.ClientPayload.WebInfo.WebdPayload + * @instance + */ + WebdPayload.prototype.usesParticipantInKey = false; + + /** + * WebdPayload supportsStarredMessages. + * @member {boolean} supportsStarredMessages + * @memberof proto.ClientPayload.WebInfo.WebdPayload + * @instance + */ + WebdPayload.prototype.supportsStarredMessages = false; + + /** + * WebdPayload supportsDocumentMessages. + * @member {boolean} supportsDocumentMessages + * @memberof proto.ClientPayload.WebInfo.WebdPayload + * @instance + */ + WebdPayload.prototype.supportsDocumentMessages = false; + + /** + * WebdPayload supportsUrlMessages. + * @member {boolean} supportsUrlMessages + * @memberof proto.ClientPayload.WebInfo.WebdPayload + * @instance + */ + WebdPayload.prototype.supportsUrlMessages = false; + + /** + * WebdPayload supportsMediaRetry. + * @member {boolean} supportsMediaRetry + * @memberof proto.ClientPayload.WebInfo.WebdPayload + * @instance + */ + WebdPayload.prototype.supportsMediaRetry = false; + + /** + * WebdPayload supportsE2EImage. + * @member {boolean} supportsE2EImage + * @memberof proto.ClientPayload.WebInfo.WebdPayload + * @instance + */ + WebdPayload.prototype.supportsE2EImage = false; + + /** + * WebdPayload supportsE2EVideo. + * @member {boolean} supportsE2EVideo + * @memberof proto.ClientPayload.WebInfo.WebdPayload + * @instance + */ + WebdPayload.prototype.supportsE2EVideo = false; + + /** + * WebdPayload supportsE2EAudio. + * @member {boolean} supportsE2EAudio + * @memberof proto.ClientPayload.WebInfo.WebdPayload + * @instance + */ + WebdPayload.prototype.supportsE2EAudio = false; + + /** + * WebdPayload supportsE2EDocument. + * @member {boolean} supportsE2EDocument + * @memberof proto.ClientPayload.WebInfo.WebdPayload + * @instance + */ + WebdPayload.prototype.supportsE2EDocument = false; + + /** + * WebdPayload documentTypes. + * @member {string} documentTypes + * @memberof proto.ClientPayload.WebInfo.WebdPayload + * @instance + */ + WebdPayload.prototype.documentTypes = ""; + + /** + * WebdPayload features. + * @member {Uint8Array} features + * @memberof proto.ClientPayload.WebInfo.WebdPayload + * @instance + */ + WebdPayload.prototype.features = $util.newBuffer([]); + + /** + * Creates a new WebdPayload instance using the specified properties. + * @function create + * @memberof proto.ClientPayload.WebInfo.WebdPayload + * @static + * @param {proto.ClientPayload.WebInfo.IWebdPayload=} [properties] Properties to set + * @returns {proto.ClientPayload.WebInfo.WebdPayload} WebdPayload instance + */ + WebdPayload.create = function create(properties) { + return new WebdPayload(properties); + }; + + /** + * Encodes the specified WebdPayload message. Does not implicitly {@link proto.ClientPayload.WebInfo.WebdPayload.verify|verify} messages. + * @function encode + * @memberof proto.ClientPayload.WebInfo.WebdPayload + * @static + * @param {proto.ClientPayload.WebInfo.IWebdPayload} message WebdPayload message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WebdPayload.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.usesParticipantInKey != null && Object.hasOwnProperty.call(message, "usesParticipantInKey")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.usesParticipantInKey); + if (message.supportsStarredMessages != null && Object.hasOwnProperty.call(message, "supportsStarredMessages")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.supportsStarredMessages); + if (message.supportsDocumentMessages != null && Object.hasOwnProperty.call(message, "supportsDocumentMessages")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.supportsDocumentMessages); + if (message.supportsUrlMessages != null && Object.hasOwnProperty.call(message, "supportsUrlMessages")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.supportsUrlMessages); + if (message.supportsMediaRetry != null && Object.hasOwnProperty.call(message, "supportsMediaRetry")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.supportsMediaRetry); + if (message.supportsE2EImage != null && Object.hasOwnProperty.call(message, "supportsE2EImage")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.supportsE2EImage); + if (message.supportsE2EVideo != null && Object.hasOwnProperty.call(message, "supportsE2EVideo")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.supportsE2EVideo); + if (message.supportsE2EAudio != null && Object.hasOwnProperty.call(message, "supportsE2EAudio")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.supportsE2EAudio); + if (message.supportsE2EDocument != null && Object.hasOwnProperty.call(message, "supportsE2EDocument")) + writer.uint32(/* id 9, wireType 0 =*/72).bool(message.supportsE2EDocument); + if (message.documentTypes != null && Object.hasOwnProperty.call(message, "documentTypes")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.documentTypes); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + writer.uint32(/* id 11, wireType 2 =*/90).bytes(message.features); + return writer; + }; + + /** + * Encodes the specified WebdPayload message, length delimited. Does not implicitly {@link proto.ClientPayload.WebInfo.WebdPayload.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.ClientPayload.WebInfo.WebdPayload + * @static + * @param {proto.ClientPayload.WebInfo.IWebdPayload} message WebdPayload message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WebdPayload.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WebdPayload message from the specified reader or buffer. + * @function decode + * @memberof proto.ClientPayload.WebInfo.WebdPayload + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.ClientPayload.WebInfo.WebdPayload} WebdPayload + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WebdPayload.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.ClientPayload.WebInfo.WebdPayload(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.usesParticipantInKey = reader.bool(); + break; + case 2: + message.supportsStarredMessages = reader.bool(); + break; + case 3: + message.supportsDocumentMessages = reader.bool(); + break; + case 4: + message.supportsUrlMessages = reader.bool(); + break; + case 5: + message.supportsMediaRetry = reader.bool(); + break; + case 6: + message.supportsE2EImage = reader.bool(); + break; + case 7: + message.supportsE2EVideo = reader.bool(); + break; + case 8: + message.supportsE2EAudio = reader.bool(); + break; + case 9: + message.supportsE2EDocument = reader.bool(); + break; + case 10: + message.documentTypes = reader.string(); + break; + case 11: + message.features = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WebdPayload message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.ClientPayload.WebInfo.WebdPayload + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.ClientPayload.WebInfo.WebdPayload} WebdPayload + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WebdPayload.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WebdPayload message. + * @function verify + * @memberof proto.ClientPayload.WebInfo.WebdPayload + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WebdPayload.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.usesParticipantInKey != null && message.hasOwnProperty("usesParticipantInKey")) + if (typeof message.usesParticipantInKey !== "boolean") + return "usesParticipantInKey: boolean expected"; + if (message.supportsStarredMessages != null && message.hasOwnProperty("supportsStarredMessages")) + if (typeof message.supportsStarredMessages !== "boolean") + return "supportsStarredMessages: boolean expected"; + if (message.supportsDocumentMessages != null && message.hasOwnProperty("supportsDocumentMessages")) + if (typeof message.supportsDocumentMessages !== "boolean") + return "supportsDocumentMessages: boolean expected"; + if (message.supportsUrlMessages != null && message.hasOwnProperty("supportsUrlMessages")) + if (typeof message.supportsUrlMessages !== "boolean") + return "supportsUrlMessages: boolean expected"; + if (message.supportsMediaRetry != null && message.hasOwnProperty("supportsMediaRetry")) + if (typeof message.supportsMediaRetry !== "boolean") + return "supportsMediaRetry: boolean expected"; + if (message.supportsE2EImage != null && message.hasOwnProperty("supportsE2EImage")) + if (typeof message.supportsE2EImage !== "boolean") + return "supportsE2EImage: boolean expected"; + if (message.supportsE2EVideo != null && message.hasOwnProperty("supportsE2EVideo")) + if (typeof message.supportsE2EVideo !== "boolean") + return "supportsE2EVideo: boolean expected"; + if (message.supportsE2EAudio != null && message.hasOwnProperty("supportsE2EAudio")) + if (typeof message.supportsE2EAudio !== "boolean") + return "supportsE2EAudio: boolean expected"; + if (message.supportsE2EDocument != null && message.hasOwnProperty("supportsE2EDocument")) + if (typeof message.supportsE2EDocument !== "boolean") + return "supportsE2EDocument: boolean expected"; + if (message.documentTypes != null && message.hasOwnProperty("documentTypes")) + if (!$util.isString(message.documentTypes)) + return "documentTypes: string expected"; + if (message.features != null && message.hasOwnProperty("features")) + if (!(message.features && typeof message.features.length === "number" || $util.isString(message.features))) + return "features: buffer expected"; + return null; + }; + + /** + * Creates a WebdPayload message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.ClientPayload.WebInfo.WebdPayload + * @static + * @param {Object.} object Plain object + * @returns {proto.ClientPayload.WebInfo.WebdPayload} WebdPayload + */ + WebdPayload.fromObject = function fromObject(object) { + if (object instanceof $root.proto.ClientPayload.WebInfo.WebdPayload) + return object; + var message = new $root.proto.ClientPayload.WebInfo.WebdPayload(); + if (object.usesParticipantInKey != null) + message.usesParticipantInKey = Boolean(object.usesParticipantInKey); + if (object.supportsStarredMessages != null) + message.supportsStarredMessages = Boolean(object.supportsStarredMessages); + if (object.supportsDocumentMessages != null) + message.supportsDocumentMessages = Boolean(object.supportsDocumentMessages); + if (object.supportsUrlMessages != null) + message.supportsUrlMessages = Boolean(object.supportsUrlMessages); + if (object.supportsMediaRetry != null) + message.supportsMediaRetry = Boolean(object.supportsMediaRetry); + if (object.supportsE2EImage != null) + message.supportsE2EImage = Boolean(object.supportsE2EImage); + if (object.supportsE2EVideo != null) + message.supportsE2EVideo = Boolean(object.supportsE2EVideo); + if (object.supportsE2EAudio != null) + message.supportsE2EAudio = Boolean(object.supportsE2EAudio); + if (object.supportsE2EDocument != null) + message.supportsE2EDocument = Boolean(object.supportsE2EDocument); + if (object.documentTypes != null) + message.documentTypes = String(object.documentTypes); + if (object.features != null) + if (typeof object.features === "string") + $util.base64.decode(object.features, message.features = $util.newBuffer($util.base64.length(object.features)), 0); + else if (object.features.length) + message.features = object.features; + return message; + }; + + /** + * Creates a plain object from a WebdPayload message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.ClientPayload.WebInfo.WebdPayload + * @static + * @param {proto.ClientPayload.WebInfo.WebdPayload} message WebdPayload + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WebdPayload.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.usesParticipantInKey = false; + object.supportsStarredMessages = false; + object.supportsDocumentMessages = false; + object.supportsUrlMessages = false; + object.supportsMediaRetry = false; + object.supportsE2EImage = false; + object.supportsE2EVideo = false; + object.supportsE2EAudio = false; + object.supportsE2EDocument = false; + object.documentTypes = ""; + if (options.bytes === String) + object.features = ""; + else { + object.features = []; + if (options.bytes !== Array) + object.features = $util.newBuffer(object.features); + } + } + if (message.usesParticipantInKey != null && message.hasOwnProperty("usesParticipantInKey")) + object.usesParticipantInKey = message.usesParticipantInKey; + if (message.supportsStarredMessages != null && message.hasOwnProperty("supportsStarredMessages")) + object.supportsStarredMessages = message.supportsStarredMessages; + if (message.supportsDocumentMessages != null && message.hasOwnProperty("supportsDocumentMessages")) + object.supportsDocumentMessages = message.supportsDocumentMessages; + if (message.supportsUrlMessages != null && message.hasOwnProperty("supportsUrlMessages")) + object.supportsUrlMessages = message.supportsUrlMessages; + if (message.supportsMediaRetry != null && message.hasOwnProperty("supportsMediaRetry")) + object.supportsMediaRetry = message.supportsMediaRetry; + if (message.supportsE2EImage != null && message.hasOwnProperty("supportsE2EImage")) + object.supportsE2EImage = message.supportsE2EImage; + if (message.supportsE2EVideo != null && message.hasOwnProperty("supportsE2EVideo")) + object.supportsE2EVideo = message.supportsE2EVideo; + if (message.supportsE2EAudio != null && message.hasOwnProperty("supportsE2EAudio")) + object.supportsE2EAudio = message.supportsE2EAudio; + if (message.supportsE2EDocument != null && message.hasOwnProperty("supportsE2EDocument")) + object.supportsE2EDocument = message.supportsE2EDocument; + if (message.documentTypes != null && message.hasOwnProperty("documentTypes")) + object.documentTypes = message.documentTypes; + if (message.features != null && message.hasOwnProperty("features")) + object.features = options.bytes === String ? $util.base64.encode(message.features, 0, message.features.length) : options.bytes === Array ? Array.prototype.slice.call(message.features) : message.features; + return object; + }; + + /** + * Converts this WebdPayload to JSON. + * @function toJSON + * @memberof proto.ClientPayload.WebInfo.WebdPayload + * @instance + * @returns {Object.} JSON object + */ + WebdPayload.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return WebdPayload; + })(); + + return WebInfo; + })(); + + return ClientPayload; + })(); + + proto.CommentMetadata = (function() { + + /** + * Properties of a CommentMetadata. + * @memberof proto + * @interface ICommentMetadata + * @property {proto.IMessageKey|null} [commentParentKey] CommentMetadata commentParentKey + * @property {number|null} [replyCount] CommentMetadata replyCount + */ + + /** + * Constructs a new CommentMetadata. + * @memberof proto + * @classdesc Represents a CommentMetadata. + * @implements ICommentMetadata + * @constructor + * @param {proto.ICommentMetadata=} [properties] Properties to set + */ + function CommentMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CommentMetadata commentParentKey. + * @member {proto.IMessageKey|null|undefined} commentParentKey + * @memberof proto.CommentMetadata + * @instance + */ + CommentMetadata.prototype.commentParentKey = null; + + /** + * CommentMetadata replyCount. + * @member {number} replyCount + * @memberof proto.CommentMetadata + * @instance + */ + CommentMetadata.prototype.replyCount = 0; + + /** + * Creates a new CommentMetadata instance using the specified properties. + * @function create + * @memberof proto.CommentMetadata + * @static + * @param {proto.ICommentMetadata=} [properties] Properties to set + * @returns {proto.CommentMetadata} CommentMetadata instance + */ + CommentMetadata.create = function create(properties) { + return new CommentMetadata(properties); + }; + + /** + * Encodes the specified CommentMetadata message. Does not implicitly {@link proto.CommentMetadata.verify|verify} messages. + * @function encode + * @memberof proto.CommentMetadata + * @static + * @param {proto.ICommentMetadata} message CommentMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommentMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.commentParentKey != null && Object.hasOwnProperty.call(message, "commentParentKey")) + $root.proto.MessageKey.encode(message.commentParentKey, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.replyCount != null && Object.hasOwnProperty.call(message, "replyCount")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.replyCount); + return writer; + }; + + /** + * Encodes the specified CommentMetadata message, length delimited. Does not implicitly {@link proto.CommentMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.CommentMetadata + * @static + * @param {proto.ICommentMetadata} message CommentMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommentMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CommentMetadata message from the specified reader or buffer. + * @function decode + * @memberof proto.CommentMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.CommentMetadata} CommentMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommentMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.CommentMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.commentParentKey = $root.proto.MessageKey.decode(reader, reader.uint32()); + break; + case 2: + message.replyCount = reader.uint32(); + break; + default: + reader.skipType(tag & 7); + break; + } } - if (message.webInfo != null && message.hasOwnProperty("webInfo")) { - var error = $root.proto.ClientPayload.WebInfo.verify(message.webInfo); + return message; + }; + + /** + * Decodes a CommentMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.CommentMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.CommentMetadata} CommentMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommentMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CommentMetadata message. + * @function verify + * @memberof proto.CommentMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CommentMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.commentParentKey != null && message.hasOwnProperty("commentParentKey")) { + var error = $root.proto.MessageKey.verify(message.commentParentKey); if (error) - return "webInfo." + error; + return "commentParentKey." + error; } - if (message.pushName != null && message.hasOwnProperty("pushName")) - if (!$util.isString(message.pushName)) - return "pushName: string expected"; - if (message.sessionId != null && message.hasOwnProperty("sessionId")) - if (!$util.isInteger(message.sessionId)) - return "sessionId: integer expected"; - if (message.shortConnect != null && message.hasOwnProperty("shortConnect")) - if (typeof message.shortConnect !== "boolean") - return "shortConnect: boolean expected"; - if (message.connectType != null && message.hasOwnProperty("connectType")) - switch (message.connectType) { - default: - return "connectType: enum value expected"; - case 0: + if (message.replyCount != null && message.hasOwnProperty("replyCount")) + if (!$util.isInteger(message.replyCount)) + return "replyCount: integer expected"; + return null; + }; + + /** + * Creates a CommentMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.CommentMetadata + * @static + * @param {Object.} object Plain object + * @returns {proto.CommentMetadata} CommentMetadata + */ + CommentMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.proto.CommentMetadata) + return object; + var message = new $root.proto.CommentMetadata(); + if (object.commentParentKey != null) { + if (typeof object.commentParentKey !== "object") + throw TypeError(".proto.CommentMetadata.commentParentKey: object expected"); + message.commentParentKey = $root.proto.MessageKey.fromObject(object.commentParentKey); + } + if (object.replyCount != null) + message.replyCount = object.replyCount >>> 0; + return message; + }; + + /** + * Creates a plain object from a CommentMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.CommentMetadata + * @static + * @param {proto.CommentMetadata} message CommentMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CommentMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.commentParentKey = null; + object.replyCount = 0; + } + if (message.commentParentKey != null && message.hasOwnProperty("commentParentKey")) + object.commentParentKey = $root.proto.MessageKey.toObject(message.commentParentKey, options); + if (message.replyCount != null && message.hasOwnProperty("replyCount")) + object.replyCount = message.replyCount; + return object; + }; + + /** + * Converts this CommentMetadata to JSON. + * @function toJSON + * @memberof proto.CommentMetadata + * @instance + * @returns {Object.} JSON object + */ + CommentMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CommentMetadata; + })(); + + proto.ContextInfo = (function() { + + /** + * Properties of a ContextInfo. + * @memberof proto + * @interface IContextInfo + * @property {string|null} [stanzaId] ContextInfo stanzaId + * @property {string|null} [participant] ContextInfo participant + * @property {proto.IMessage|null} [quotedMessage] ContextInfo quotedMessage + * @property {string|null} [remoteJid] ContextInfo remoteJid + * @property {Array.|null} [mentionedJid] ContextInfo mentionedJid + * @property {string|null} [conversionSource] ContextInfo conversionSource + * @property {Uint8Array|null} [conversionData] ContextInfo conversionData + * @property {number|null} [conversionDelaySeconds] ContextInfo conversionDelaySeconds + * @property {number|null} [forwardingScore] ContextInfo forwardingScore + * @property {boolean|null} [isForwarded] ContextInfo isForwarded + * @property {proto.ContextInfo.IAdReplyInfo|null} [quotedAd] ContextInfo quotedAd + * @property {proto.IMessageKey|null} [placeholderKey] ContextInfo placeholderKey + * @property {number|null} [expiration] ContextInfo expiration + * @property {number|Long|null} [ephemeralSettingTimestamp] ContextInfo ephemeralSettingTimestamp + * @property {Uint8Array|null} [ephemeralSharedSecret] ContextInfo ephemeralSharedSecret + * @property {proto.ContextInfo.IExternalAdReplyInfo|null} [externalAdReply] ContextInfo externalAdReply + * @property {string|null} [entryPointConversionSource] ContextInfo entryPointConversionSource + * @property {string|null} [entryPointConversionApp] ContextInfo entryPointConversionApp + * @property {number|null} [entryPointConversionDelaySeconds] ContextInfo entryPointConversionDelaySeconds + * @property {proto.IDisappearingMode|null} [disappearingMode] ContextInfo disappearingMode + * @property {proto.IActionLink|null} [actionLink] ContextInfo actionLink + * @property {string|null} [groupSubject] ContextInfo groupSubject + * @property {string|null} [parentGroupJid] ContextInfo parentGroupJid + * @property {string|null} [trustBannerType] ContextInfo trustBannerType + * @property {number|null} [trustBannerAction] ContextInfo trustBannerAction + * @property {boolean|null} [isSampled] ContextInfo isSampled + * @property {Array.|null} [groupMentions] ContextInfo groupMentions + * @property {proto.ContextInfo.IUTMInfo|null} [utm] ContextInfo utm + * @property {proto.ContextInfo.IForwardedNewsletterMessageInfo|null} [forwardedNewsletterMessageInfo] ContextInfo forwardedNewsletterMessageInfo + * @property {proto.ContextInfo.IBusinessMessageForwardInfo|null} [businessMessageForwardInfo] ContextInfo businessMessageForwardInfo + * @property {string|null} [smbClientCampaignId] ContextInfo smbClientCampaignId + * @property {string|null} [smbServerCampaignId] ContextInfo smbServerCampaignId + * @property {proto.ContextInfo.IDataSharingContext|null} [dataSharingContext] ContextInfo dataSharingContext + */ + + /** + * Constructs a new ContextInfo. + * @memberof proto + * @classdesc Represents a ContextInfo. + * @implements IContextInfo + * @constructor + * @param {proto.IContextInfo=} [properties] Properties to set + */ + function ContextInfo(properties) { + this.mentionedJid = []; + this.groupMentions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ContextInfo stanzaId. + * @member {string} stanzaId + * @memberof proto.ContextInfo + * @instance + */ + ContextInfo.prototype.stanzaId = ""; + + /** + * ContextInfo participant. + * @member {string} participant + * @memberof proto.ContextInfo + * @instance + */ + ContextInfo.prototype.participant = ""; + + /** + * ContextInfo quotedMessage. + * @member {proto.IMessage|null|undefined} quotedMessage + * @memberof proto.ContextInfo + * @instance + */ + ContextInfo.prototype.quotedMessage = null; + + /** + * ContextInfo remoteJid. + * @member {string} remoteJid + * @memberof proto.ContextInfo + * @instance + */ + ContextInfo.prototype.remoteJid = ""; + + /** + * ContextInfo mentionedJid. + * @member {Array.} mentionedJid + * @memberof proto.ContextInfo + * @instance + */ + ContextInfo.prototype.mentionedJid = $util.emptyArray; + + /** + * ContextInfo conversionSource. + * @member {string} conversionSource + * @memberof proto.ContextInfo + * @instance + */ + ContextInfo.prototype.conversionSource = ""; + + /** + * ContextInfo conversionData. + * @member {Uint8Array} conversionData + * @memberof proto.ContextInfo + * @instance + */ + ContextInfo.prototype.conversionData = $util.newBuffer([]); + + /** + * ContextInfo conversionDelaySeconds. + * @member {number} conversionDelaySeconds + * @memberof proto.ContextInfo + * @instance + */ + ContextInfo.prototype.conversionDelaySeconds = 0; + + /** + * ContextInfo forwardingScore. + * @member {number} forwardingScore + * @memberof proto.ContextInfo + * @instance + */ + ContextInfo.prototype.forwardingScore = 0; + + /** + * ContextInfo isForwarded. + * @member {boolean} isForwarded + * @memberof proto.ContextInfo + * @instance + */ + ContextInfo.prototype.isForwarded = false; + + /** + * ContextInfo quotedAd. + * @member {proto.ContextInfo.IAdReplyInfo|null|undefined} quotedAd + * @memberof proto.ContextInfo + * @instance + */ + ContextInfo.prototype.quotedAd = null; + + /** + * ContextInfo placeholderKey. + * @member {proto.IMessageKey|null|undefined} placeholderKey + * @memberof proto.ContextInfo + * @instance + */ + ContextInfo.prototype.placeholderKey = null; + + /** + * ContextInfo expiration. + * @member {number} expiration + * @memberof proto.ContextInfo + * @instance + */ + ContextInfo.prototype.expiration = 0; + + /** + * ContextInfo ephemeralSettingTimestamp. + * @member {number|Long} ephemeralSettingTimestamp + * @memberof proto.ContextInfo + * @instance + */ + ContextInfo.prototype.ephemeralSettingTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ContextInfo ephemeralSharedSecret. + * @member {Uint8Array} ephemeralSharedSecret + * @memberof proto.ContextInfo + * @instance + */ + ContextInfo.prototype.ephemeralSharedSecret = $util.newBuffer([]); + + /** + * ContextInfo externalAdReply. + * @member {proto.ContextInfo.IExternalAdReplyInfo|null|undefined} externalAdReply + * @memberof proto.ContextInfo + * @instance + */ + ContextInfo.prototype.externalAdReply = null; + + /** + * ContextInfo entryPointConversionSource. + * @member {string} entryPointConversionSource + * @memberof proto.ContextInfo + * @instance + */ + ContextInfo.prototype.entryPointConversionSource = ""; + + /** + * ContextInfo entryPointConversionApp. + * @member {string} entryPointConversionApp + * @memberof proto.ContextInfo + * @instance + */ + ContextInfo.prototype.entryPointConversionApp = ""; + + /** + * ContextInfo entryPointConversionDelaySeconds. + * @member {number} entryPointConversionDelaySeconds + * @memberof proto.ContextInfo + * @instance + */ + ContextInfo.prototype.entryPointConversionDelaySeconds = 0; + + /** + * ContextInfo disappearingMode. + * @member {proto.IDisappearingMode|null|undefined} disappearingMode + * @memberof proto.ContextInfo + * @instance + */ + ContextInfo.prototype.disappearingMode = null; + + /** + * ContextInfo actionLink. + * @member {proto.IActionLink|null|undefined} actionLink + * @memberof proto.ContextInfo + * @instance + */ + ContextInfo.prototype.actionLink = null; + + /** + * ContextInfo groupSubject. + * @member {string} groupSubject + * @memberof proto.ContextInfo + * @instance + */ + ContextInfo.prototype.groupSubject = ""; + + /** + * ContextInfo parentGroupJid. + * @member {string} parentGroupJid + * @memberof proto.ContextInfo + * @instance + */ + ContextInfo.prototype.parentGroupJid = ""; + + /** + * ContextInfo trustBannerType. + * @member {string} trustBannerType + * @memberof proto.ContextInfo + * @instance + */ + ContextInfo.prototype.trustBannerType = ""; + + /** + * ContextInfo trustBannerAction. + * @member {number} trustBannerAction + * @memberof proto.ContextInfo + * @instance + */ + ContextInfo.prototype.trustBannerAction = 0; + + /** + * ContextInfo isSampled. + * @member {boolean} isSampled + * @memberof proto.ContextInfo + * @instance + */ + ContextInfo.prototype.isSampled = false; + + /** + * ContextInfo groupMentions. + * @member {Array.} groupMentions + * @memberof proto.ContextInfo + * @instance + */ + ContextInfo.prototype.groupMentions = $util.emptyArray; + + /** + * ContextInfo utm. + * @member {proto.ContextInfo.IUTMInfo|null|undefined} utm + * @memberof proto.ContextInfo + * @instance + */ + ContextInfo.prototype.utm = null; + + /** + * ContextInfo forwardedNewsletterMessageInfo. + * @member {proto.ContextInfo.IForwardedNewsletterMessageInfo|null|undefined} forwardedNewsletterMessageInfo + * @memberof proto.ContextInfo + * @instance + */ + ContextInfo.prototype.forwardedNewsletterMessageInfo = null; + + /** + * ContextInfo businessMessageForwardInfo. + * @member {proto.ContextInfo.IBusinessMessageForwardInfo|null|undefined} businessMessageForwardInfo + * @memberof proto.ContextInfo + * @instance + */ + ContextInfo.prototype.businessMessageForwardInfo = null; + + /** + * ContextInfo smbClientCampaignId. + * @member {string} smbClientCampaignId + * @memberof proto.ContextInfo + * @instance + */ + ContextInfo.prototype.smbClientCampaignId = ""; + + /** + * ContextInfo smbServerCampaignId. + * @member {string} smbServerCampaignId + * @memberof proto.ContextInfo + * @instance + */ + ContextInfo.prototype.smbServerCampaignId = ""; + + /** + * ContextInfo dataSharingContext. + * @member {proto.ContextInfo.IDataSharingContext|null|undefined} dataSharingContext + * @memberof proto.ContextInfo + * @instance + */ + ContextInfo.prototype.dataSharingContext = null; + + /** + * Creates a new ContextInfo instance using the specified properties. + * @function create + * @memberof proto.ContextInfo + * @static + * @param {proto.IContextInfo=} [properties] Properties to set + * @returns {proto.ContextInfo} ContextInfo instance + */ + ContextInfo.create = function create(properties) { + return new ContextInfo(properties); + }; + + /** + * Encodes the specified ContextInfo message. Does not implicitly {@link proto.ContextInfo.verify|verify} messages. + * @function encode + * @memberof proto.ContextInfo + * @static + * @param {proto.IContextInfo} message ContextInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ContextInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.stanzaId != null && Object.hasOwnProperty.call(message, "stanzaId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.stanzaId); + if (message.participant != null && Object.hasOwnProperty.call(message, "participant")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.participant); + if (message.quotedMessage != null && Object.hasOwnProperty.call(message, "quotedMessage")) + $root.proto.Message.encode(message.quotedMessage, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.remoteJid != null && Object.hasOwnProperty.call(message, "remoteJid")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.remoteJid); + if (message.mentionedJid != null && message.mentionedJid.length) + for (var i = 0; i < message.mentionedJid.length; ++i) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.mentionedJid[i]); + if (message.conversionSource != null && Object.hasOwnProperty.call(message, "conversionSource")) + writer.uint32(/* id 18, wireType 2 =*/146).string(message.conversionSource); + if (message.conversionData != null && Object.hasOwnProperty.call(message, "conversionData")) + writer.uint32(/* id 19, wireType 2 =*/154).bytes(message.conversionData); + if (message.conversionDelaySeconds != null && Object.hasOwnProperty.call(message, "conversionDelaySeconds")) + writer.uint32(/* id 20, wireType 0 =*/160).uint32(message.conversionDelaySeconds); + if (message.forwardingScore != null && Object.hasOwnProperty.call(message, "forwardingScore")) + writer.uint32(/* id 21, wireType 0 =*/168).uint32(message.forwardingScore); + if (message.isForwarded != null && Object.hasOwnProperty.call(message, "isForwarded")) + writer.uint32(/* id 22, wireType 0 =*/176).bool(message.isForwarded); + if (message.quotedAd != null && Object.hasOwnProperty.call(message, "quotedAd")) + $root.proto.ContextInfo.AdReplyInfo.encode(message.quotedAd, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.placeholderKey != null && Object.hasOwnProperty.call(message, "placeholderKey")) + $root.proto.MessageKey.encode(message.placeholderKey, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.expiration != null && Object.hasOwnProperty.call(message, "expiration")) + writer.uint32(/* id 25, wireType 0 =*/200).uint32(message.expiration); + if (message.ephemeralSettingTimestamp != null && Object.hasOwnProperty.call(message, "ephemeralSettingTimestamp")) + writer.uint32(/* id 26, wireType 0 =*/208).int64(message.ephemeralSettingTimestamp); + if (message.ephemeralSharedSecret != null && Object.hasOwnProperty.call(message, "ephemeralSharedSecret")) + writer.uint32(/* id 27, wireType 2 =*/218).bytes(message.ephemeralSharedSecret); + if (message.externalAdReply != null && Object.hasOwnProperty.call(message, "externalAdReply")) + $root.proto.ContextInfo.ExternalAdReplyInfo.encode(message.externalAdReply, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); + if (message.entryPointConversionSource != null && Object.hasOwnProperty.call(message, "entryPointConversionSource")) + writer.uint32(/* id 29, wireType 2 =*/234).string(message.entryPointConversionSource); + if (message.entryPointConversionApp != null && Object.hasOwnProperty.call(message, "entryPointConversionApp")) + writer.uint32(/* id 30, wireType 2 =*/242).string(message.entryPointConversionApp); + if (message.entryPointConversionDelaySeconds != null && Object.hasOwnProperty.call(message, "entryPointConversionDelaySeconds")) + writer.uint32(/* id 31, wireType 0 =*/248).uint32(message.entryPointConversionDelaySeconds); + if (message.disappearingMode != null && Object.hasOwnProperty.call(message, "disappearingMode")) + $root.proto.DisappearingMode.encode(message.disappearingMode, writer.uint32(/* id 32, wireType 2 =*/258).fork()).ldelim(); + if (message.actionLink != null && Object.hasOwnProperty.call(message, "actionLink")) + $root.proto.ActionLink.encode(message.actionLink, writer.uint32(/* id 33, wireType 2 =*/266).fork()).ldelim(); + if (message.groupSubject != null && Object.hasOwnProperty.call(message, "groupSubject")) + writer.uint32(/* id 34, wireType 2 =*/274).string(message.groupSubject); + if (message.parentGroupJid != null && Object.hasOwnProperty.call(message, "parentGroupJid")) + writer.uint32(/* id 35, wireType 2 =*/282).string(message.parentGroupJid); + if (message.trustBannerType != null && Object.hasOwnProperty.call(message, "trustBannerType")) + writer.uint32(/* id 37, wireType 2 =*/298).string(message.trustBannerType); + if (message.trustBannerAction != null && Object.hasOwnProperty.call(message, "trustBannerAction")) + writer.uint32(/* id 38, wireType 0 =*/304).uint32(message.trustBannerAction); + if (message.isSampled != null && Object.hasOwnProperty.call(message, "isSampled")) + writer.uint32(/* id 39, wireType 0 =*/312).bool(message.isSampled); + if (message.groupMentions != null && message.groupMentions.length) + for (var i = 0; i < message.groupMentions.length; ++i) + $root.proto.GroupMention.encode(message.groupMentions[i], writer.uint32(/* id 40, wireType 2 =*/322).fork()).ldelim(); + if (message.utm != null && Object.hasOwnProperty.call(message, "utm")) + $root.proto.ContextInfo.UTMInfo.encode(message.utm, writer.uint32(/* id 41, wireType 2 =*/330).fork()).ldelim(); + if (message.forwardedNewsletterMessageInfo != null && Object.hasOwnProperty.call(message, "forwardedNewsletterMessageInfo")) + $root.proto.ContextInfo.ForwardedNewsletterMessageInfo.encode(message.forwardedNewsletterMessageInfo, writer.uint32(/* id 43, wireType 2 =*/346).fork()).ldelim(); + if (message.businessMessageForwardInfo != null && Object.hasOwnProperty.call(message, "businessMessageForwardInfo")) + $root.proto.ContextInfo.BusinessMessageForwardInfo.encode(message.businessMessageForwardInfo, writer.uint32(/* id 44, wireType 2 =*/354).fork()).ldelim(); + if (message.smbClientCampaignId != null && Object.hasOwnProperty.call(message, "smbClientCampaignId")) + writer.uint32(/* id 45, wireType 2 =*/362).string(message.smbClientCampaignId); + if (message.smbServerCampaignId != null && Object.hasOwnProperty.call(message, "smbServerCampaignId")) + writer.uint32(/* id 46, wireType 2 =*/370).string(message.smbServerCampaignId); + if (message.dataSharingContext != null && Object.hasOwnProperty.call(message, "dataSharingContext")) + $root.proto.ContextInfo.DataSharingContext.encode(message.dataSharingContext, writer.uint32(/* id 47, wireType 2 =*/378).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ContextInfo message, length delimited. Does not implicitly {@link proto.ContextInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.ContextInfo + * @static + * @param {proto.IContextInfo} message ContextInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ContextInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ContextInfo message from the specified reader or buffer. + * @function decode + * @memberof proto.ContextInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.ContextInfo} ContextInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ContextInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.ContextInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { case 1: - case 100: - case 101: - case 102: - case 103: - case 104: - case 105: - case 106: - case 107: - case 108: - case 109: - case 110: - case 111: - case 112: + message.stanzaId = reader.string(); break; - } - if (message.connectReason != null && message.hasOwnProperty("connectReason")) - switch (message.connectReason) { - default: - return "connectReason: enum value expected"; - case 0: - case 1: case 2: + message.participant = reader.string(); + break; case 3: + message.quotedMessage = $root.proto.Message.decode(reader, reader.uint32()); + break; case 4: - case 5: - case 6: + message.remoteJid = reader.string(); + break; + case 15: + if (!(message.mentionedJid && message.mentionedJid.length)) + message.mentionedJid = []; + message.mentionedJid.push(reader.string()); + break; + case 18: + message.conversionSource = reader.string(); + break; + case 19: + message.conversionData = reader.bytes(); + break; + case 20: + message.conversionDelaySeconds = reader.uint32(); + break; + case 21: + message.forwardingScore = reader.uint32(); + break; + case 22: + message.isForwarded = reader.bool(); + break; + case 23: + message.quotedAd = $root.proto.ContextInfo.AdReplyInfo.decode(reader, reader.uint32()); + break; + case 24: + message.placeholderKey = $root.proto.MessageKey.decode(reader, reader.uint32()); + break; + case 25: + message.expiration = reader.uint32(); + break; + case 26: + message.ephemeralSettingTimestamp = reader.int64(); + break; + case 27: + message.ephemeralSharedSecret = reader.bytes(); + break; + case 28: + message.externalAdReply = $root.proto.ContextInfo.ExternalAdReplyInfo.decode(reader, reader.uint32()); + break; + case 29: + message.entryPointConversionSource = reader.string(); + break; + case 30: + message.entryPointConversionApp = reader.string(); + break; + case 31: + message.entryPointConversionDelaySeconds = reader.uint32(); + break; + case 32: + message.disappearingMode = $root.proto.DisappearingMode.decode(reader, reader.uint32()); + break; + case 33: + message.actionLink = $root.proto.ActionLink.decode(reader, reader.uint32()); + break; + case 34: + message.groupSubject = reader.string(); + break; + case 35: + message.parentGroupJid = reader.string(); + break; + case 37: + message.trustBannerType = reader.string(); + break; + case 38: + message.trustBannerAction = reader.uint32(); + break; + case 39: + message.isSampled = reader.bool(); + break; + case 40: + if (!(message.groupMentions && message.groupMentions.length)) + message.groupMentions = []; + message.groupMentions.push($root.proto.GroupMention.decode(reader, reader.uint32())); + break; + case 41: + message.utm = $root.proto.ContextInfo.UTMInfo.decode(reader, reader.uint32()); + break; + case 43: + message.forwardedNewsletterMessageInfo = $root.proto.ContextInfo.ForwardedNewsletterMessageInfo.decode(reader, reader.uint32()); + break; + case 44: + message.businessMessageForwardInfo = $root.proto.ContextInfo.BusinessMessageForwardInfo.decode(reader, reader.uint32()); + break; + case 45: + message.smbClientCampaignId = reader.string(); + break; + case 46: + message.smbServerCampaignId = reader.string(); + break; + case 47: + message.dataSharingContext = $root.proto.ContextInfo.DataSharingContext.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); break; } - if (message.shards != null && message.hasOwnProperty("shards")) { - if (!Array.isArray(message.shards)) - return "shards: array expected"; - for (var i = 0; i < message.shards.length; ++i) - if (!$util.isInteger(message.shards[i])) - return "shards: integer[] expected"; } - if (message.dnsSource != null && message.hasOwnProperty("dnsSource")) { - var error = $root.proto.ClientPayload.DNSSource.verify(message.dnsSource); + return message; + }; + + /** + * Decodes a ContextInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.ContextInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.ContextInfo} ContextInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ContextInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ContextInfo message. + * @function verify + * @memberof proto.ContextInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ContextInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.stanzaId != null && message.hasOwnProperty("stanzaId")) + if (!$util.isString(message.stanzaId)) + return "stanzaId: string expected"; + if (message.participant != null && message.hasOwnProperty("participant")) + if (!$util.isString(message.participant)) + return "participant: string expected"; + if (message.quotedMessage != null && message.hasOwnProperty("quotedMessage")) { + var error = $root.proto.Message.verify(message.quotedMessage); if (error) - return "dnsSource." + error; + return "quotedMessage." + error; } - if (message.connectAttemptCount != null && message.hasOwnProperty("connectAttemptCount")) - if (!$util.isInteger(message.connectAttemptCount)) - return "connectAttemptCount: integer expected"; - if (message.device != null && message.hasOwnProperty("device")) - if (!$util.isInteger(message.device)) - return "device: integer expected"; - if (message.devicePairingData != null && message.hasOwnProperty("devicePairingData")) { - var error = $root.proto.ClientPayload.DevicePairingRegistrationData.verify(message.devicePairingData); + if (message.remoteJid != null && message.hasOwnProperty("remoteJid")) + if (!$util.isString(message.remoteJid)) + return "remoteJid: string expected"; + if (message.mentionedJid != null && message.hasOwnProperty("mentionedJid")) { + if (!Array.isArray(message.mentionedJid)) + return "mentionedJid: array expected"; + for (var i = 0; i < message.mentionedJid.length; ++i) + if (!$util.isString(message.mentionedJid[i])) + return "mentionedJid: string[] expected"; + } + if (message.conversionSource != null && message.hasOwnProperty("conversionSource")) + if (!$util.isString(message.conversionSource)) + return "conversionSource: string expected"; + if (message.conversionData != null && message.hasOwnProperty("conversionData")) + if (!(message.conversionData && typeof message.conversionData.length === "number" || $util.isString(message.conversionData))) + return "conversionData: buffer expected"; + if (message.conversionDelaySeconds != null && message.hasOwnProperty("conversionDelaySeconds")) + if (!$util.isInteger(message.conversionDelaySeconds)) + return "conversionDelaySeconds: integer expected"; + if (message.forwardingScore != null && message.hasOwnProperty("forwardingScore")) + if (!$util.isInteger(message.forwardingScore)) + return "forwardingScore: integer expected"; + if (message.isForwarded != null && message.hasOwnProperty("isForwarded")) + if (typeof message.isForwarded !== "boolean") + return "isForwarded: boolean expected"; + if (message.quotedAd != null && message.hasOwnProperty("quotedAd")) { + var error = $root.proto.ContextInfo.AdReplyInfo.verify(message.quotedAd); if (error) - return "devicePairingData." + error; + return "quotedAd." + error; } - if (message.product != null && message.hasOwnProperty("product")) - switch (message.product) { - default: - return "product: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.fbCat != null && message.hasOwnProperty("fbCat")) - if (!(message.fbCat && typeof message.fbCat.length === "number" || $util.isString(message.fbCat))) - return "fbCat: buffer expected"; - if (message.fbUserAgent != null && message.hasOwnProperty("fbUserAgent")) - if (!(message.fbUserAgent && typeof message.fbUserAgent.length === "number" || $util.isString(message.fbUserAgent))) - return "fbUserAgent: buffer expected"; - if (message.oc != null && message.hasOwnProperty("oc")) - if (typeof message.oc !== "boolean") - return "oc: boolean expected"; - if (message.lc != null && message.hasOwnProperty("lc")) - if (!$util.isInteger(message.lc)) - return "lc: integer expected"; - if (message.iosAppExtension != null && message.hasOwnProperty("iosAppExtension")) - switch (message.iosAppExtension) { - default: - return "iosAppExtension: enum value expected"; - case 0: - case 1: - case 2: - break; + if (message.placeholderKey != null && message.hasOwnProperty("placeholderKey")) { + var error = $root.proto.MessageKey.verify(message.placeholderKey); + if (error) + return "placeholderKey." + error; + } + if (message.expiration != null && message.hasOwnProperty("expiration")) + if (!$util.isInteger(message.expiration)) + return "expiration: integer expected"; + if (message.ephemeralSettingTimestamp != null && message.hasOwnProperty("ephemeralSettingTimestamp")) + if (!$util.isInteger(message.ephemeralSettingTimestamp) && !(message.ephemeralSettingTimestamp && $util.isInteger(message.ephemeralSettingTimestamp.low) && $util.isInteger(message.ephemeralSettingTimestamp.high))) + return "ephemeralSettingTimestamp: integer|Long expected"; + if (message.ephemeralSharedSecret != null && message.hasOwnProperty("ephemeralSharedSecret")) + if (!(message.ephemeralSharedSecret && typeof message.ephemeralSharedSecret.length === "number" || $util.isString(message.ephemeralSharedSecret))) + return "ephemeralSharedSecret: buffer expected"; + if (message.externalAdReply != null && message.hasOwnProperty("externalAdReply")) { + var error = $root.proto.ContextInfo.ExternalAdReplyInfo.verify(message.externalAdReply); + if (error) + return "externalAdReply." + error; + } + if (message.entryPointConversionSource != null && message.hasOwnProperty("entryPointConversionSource")) + if (!$util.isString(message.entryPointConversionSource)) + return "entryPointConversionSource: string expected"; + if (message.entryPointConversionApp != null && message.hasOwnProperty("entryPointConversionApp")) + if (!$util.isString(message.entryPointConversionApp)) + return "entryPointConversionApp: string expected"; + if (message.entryPointConversionDelaySeconds != null && message.hasOwnProperty("entryPointConversionDelaySeconds")) + if (!$util.isInteger(message.entryPointConversionDelaySeconds)) + return "entryPointConversionDelaySeconds: integer expected"; + if (message.disappearingMode != null && message.hasOwnProperty("disappearingMode")) { + var error = $root.proto.DisappearingMode.verify(message.disappearingMode); + if (error) + return "disappearingMode." + error; + } + if (message.actionLink != null && message.hasOwnProperty("actionLink")) { + var error = $root.proto.ActionLink.verify(message.actionLink); + if (error) + return "actionLink." + error; + } + if (message.groupSubject != null && message.hasOwnProperty("groupSubject")) + if (!$util.isString(message.groupSubject)) + return "groupSubject: string expected"; + if (message.parentGroupJid != null && message.hasOwnProperty("parentGroupJid")) + if (!$util.isString(message.parentGroupJid)) + return "parentGroupJid: string expected"; + if (message.trustBannerType != null && message.hasOwnProperty("trustBannerType")) + if (!$util.isString(message.trustBannerType)) + return "trustBannerType: string expected"; + if (message.trustBannerAction != null && message.hasOwnProperty("trustBannerAction")) + if (!$util.isInteger(message.trustBannerAction)) + return "trustBannerAction: integer expected"; + if (message.isSampled != null && message.hasOwnProperty("isSampled")) + if (typeof message.isSampled !== "boolean") + return "isSampled: boolean expected"; + if (message.groupMentions != null && message.hasOwnProperty("groupMentions")) { + if (!Array.isArray(message.groupMentions)) + return "groupMentions: array expected"; + for (var i = 0; i < message.groupMentions.length; ++i) { + var error = $root.proto.GroupMention.verify(message.groupMentions[i]); + if (error) + return "groupMentions." + error; } - if (message.fbAppId != null && message.hasOwnProperty("fbAppId")) - if (!$util.isInteger(message.fbAppId) && !(message.fbAppId && $util.isInteger(message.fbAppId.low) && $util.isInteger(message.fbAppId.high))) - return "fbAppId: integer|Long expected"; - if (message.fbDeviceId != null && message.hasOwnProperty("fbDeviceId")) - if (!(message.fbDeviceId && typeof message.fbDeviceId.length === "number" || $util.isString(message.fbDeviceId))) - return "fbDeviceId: buffer expected"; - if (message.pull != null && message.hasOwnProperty("pull")) - if (typeof message.pull !== "boolean") - return "pull: boolean expected"; - if (message.paddingBytes != null && message.hasOwnProperty("paddingBytes")) - if (!(message.paddingBytes && typeof message.paddingBytes.length === "number" || $util.isString(message.paddingBytes))) - return "paddingBytes: buffer expected"; - if (message.yearClass != null && message.hasOwnProperty("yearClass")) - if (!$util.isInteger(message.yearClass)) - return "yearClass: integer expected"; - if (message.memClass != null && message.hasOwnProperty("memClass")) - if (!$util.isInteger(message.memClass)) - return "memClass: integer expected"; - if (message.interopData != null && message.hasOwnProperty("interopData")) { - var error = $root.proto.ClientPayload.InteropData.verify(message.interopData); + } + if (message.utm != null && message.hasOwnProperty("utm")) { + var error = $root.proto.ContextInfo.UTMInfo.verify(message.utm); if (error) - return "interopData." + error; + return "utm." + error; + } + if (message.forwardedNewsletterMessageInfo != null && message.hasOwnProperty("forwardedNewsletterMessageInfo")) { + var error = $root.proto.ContextInfo.ForwardedNewsletterMessageInfo.verify(message.forwardedNewsletterMessageInfo); + if (error) + return "forwardedNewsletterMessageInfo." + error; + } + if (message.businessMessageForwardInfo != null && message.hasOwnProperty("businessMessageForwardInfo")) { + var error = $root.proto.ContextInfo.BusinessMessageForwardInfo.verify(message.businessMessageForwardInfo); + if (error) + return "businessMessageForwardInfo." + error; + } + if (message.smbClientCampaignId != null && message.hasOwnProperty("smbClientCampaignId")) + if (!$util.isString(message.smbClientCampaignId)) + return "smbClientCampaignId: string expected"; + if (message.smbServerCampaignId != null && message.hasOwnProperty("smbServerCampaignId")) + if (!$util.isString(message.smbServerCampaignId)) + return "smbServerCampaignId: string expected"; + if (message.dataSharingContext != null && message.hasOwnProperty("dataSharingContext")) { + var error = $root.proto.ContextInfo.DataSharingContext.verify(message.dataSharingContext); + if (error) + return "dataSharingContext." + error; } return null; }; /** - * Creates a ClientPayload message from a plain object. Also converts values to their respective internal types. + * Creates a ContextInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof proto.ClientPayload + * @memberof proto.ContextInfo * @static * @param {Object.} object Plain object - * @returns {proto.ClientPayload} ClientPayload + * @returns {proto.ContextInfo} ContextInfo */ - ClientPayload.fromObject = function fromObject(object) { - if (object instanceof $root.proto.ClientPayload) + ContextInfo.fromObject = function fromObject(object) { + if (object instanceof $root.proto.ContextInfo) return object; - var message = new $root.proto.ClientPayload(); - if (object.username != null) - if ($util.Long) - (message.username = $util.Long.fromValue(object.username)).unsigned = true; - else if (typeof object.username === "string") - message.username = parseInt(object.username, 10); - else if (typeof object.username === "number") - message.username = object.username; - else if (typeof object.username === "object") - message.username = new $util.LongBits(object.username.low >>> 0, object.username.high >>> 0).toNumber(true); - if (object.passive != null) - message.passive = Boolean(object.passive); - if (object.userAgent != null) { - if (typeof object.userAgent !== "object") - throw TypeError(".proto.ClientPayload.userAgent: object expected"); - message.userAgent = $root.proto.ClientPayload.UserAgent.fromObject(object.userAgent); + var message = new $root.proto.ContextInfo(); + if (object.stanzaId != null) + message.stanzaId = String(object.stanzaId); + if (object.participant != null) + message.participant = String(object.participant); + if (object.quotedMessage != null) { + if (typeof object.quotedMessage !== "object") + throw TypeError(".proto.ContextInfo.quotedMessage: object expected"); + message.quotedMessage = $root.proto.Message.fromObject(object.quotedMessage); } - if (object.webInfo != null) { - if (typeof object.webInfo !== "object") - throw TypeError(".proto.ClientPayload.webInfo: object expected"); - message.webInfo = $root.proto.ClientPayload.WebInfo.fromObject(object.webInfo); + if (object.remoteJid != null) + message.remoteJid = String(object.remoteJid); + if (object.mentionedJid) { + if (!Array.isArray(object.mentionedJid)) + throw TypeError(".proto.ContextInfo.mentionedJid: array expected"); + message.mentionedJid = []; + for (var i = 0; i < object.mentionedJid.length; ++i) + message.mentionedJid[i] = String(object.mentionedJid[i]); } - if (object.pushName != null) - message.pushName = String(object.pushName); - if (object.sessionId != null) - message.sessionId = object.sessionId | 0; - if (object.shortConnect != null) - message.shortConnect = Boolean(object.shortConnect); - switch (object.connectType) { - case "CELLULAR_UNKNOWN": - case 0: - message.connectType = 0; - break; - case "WIFI_UNKNOWN": - case 1: - message.connectType = 1; - break; - case "CELLULAR_EDGE": - case 100: - message.connectType = 100; - break; - case "CELLULAR_IDEN": - case 101: - message.connectType = 101; - break; - case "CELLULAR_UMTS": - case 102: - message.connectType = 102; - break; - case "CELLULAR_EVDO": - case 103: - message.connectType = 103; - break; - case "CELLULAR_GPRS": - case 104: - message.connectType = 104; - break; - case "CELLULAR_HSDPA": - case 105: - message.connectType = 105; - break; - case "CELLULAR_HSUPA": - case 106: - message.connectType = 106; - break; - case "CELLULAR_HSPA": - case 107: - message.connectType = 107; - break; - case "CELLULAR_CDMA": - case 108: - message.connectType = 108; - break; - case "CELLULAR_1XRTT": - case 109: - message.connectType = 109; - break; - case "CELLULAR_EHRPD": - case 110: - message.connectType = 110; - break; - case "CELLULAR_LTE": - case 111: - message.connectType = 111; - break; - case "CELLULAR_HSPAP": - case 112: - message.connectType = 112; - break; + if (object.conversionSource != null) + message.conversionSource = String(object.conversionSource); + if (object.conversionData != null) + if (typeof object.conversionData === "string") + $util.base64.decode(object.conversionData, message.conversionData = $util.newBuffer($util.base64.length(object.conversionData)), 0); + else if (object.conversionData.length) + message.conversionData = object.conversionData; + if (object.conversionDelaySeconds != null) + message.conversionDelaySeconds = object.conversionDelaySeconds >>> 0; + if (object.forwardingScore != null) + message.forwardingScore = object.forwardingScore >>> 0; + if (object.isForwarded != null) + message.isForwarded = Boolean(object.isForwarded); + if (object.quotedAd != null) { + if (typeof object.quotedAd !== "object") + throw TypeError(".proto.ContextInfo.quotedAd: object expected"); + message.quotedAd = $root.proto.ContextInfo.AdReplyInfo.fromObject(object.quotedAd); } - switch (object.connectReason) { - case "PUSH": - case 0: - message.connectReason = 0; - break; - case "USER_ACTIVATED": - case 1: - message.connectReason = 1; - break; - case "SCHEDULED": - case 2: - message.connectReason = 2; - break; - case "ERROR_RECONNECT": - case 3: - message.connectReason = 3; - break; - case "NETWORK_SWITCH": - case 4: - message.connectReason = 4; - break; - case "PING_RECONNECT": - case 5: - message.connectReason = 5; - break; - case "UNKNOWN": - case 6: - message.connectReason = 6; - break; + if (object.placeholderKey != null) { + if (typeof object.placeholderKey !== "object") + throw TypeError(".proto.ContextInfo.placeholderKey: object expected"); + message.placeholderKey = $root.proto.MessageKey.fromObject(object.placeholderKey); } - if (object.shards) { - if (!Array.isArray(object.shards)) - throw TypeError(".proto.ClientPayload.shards: array expected"); - message.shards = []; - for (var i = 0; i < object.shards.length; ++i) - message.shards[i] = object.shards[i] | 0; + if (object.expiration != null) + message.expiration = object.expiration >>> 0; + if (object.ephemeralSettingTimestamp != null) + if ($util.Long) + (message.ephemeralSettingTimestamp = $util.Long.fromValue(object.ephemeralSettingTimestamp)).unsigned = false; + else if (typeof object.ephemeralSettingTimestamp === "string") + message.ephemeralSettingTimestamp = parseInt(object.ephemeralSettingTimestamp, 10); + else if (typeof object.ephemeralSettingTimestamp === "number") + message.ephemeralSettingTimestamp = object.ephemeralSettingTimestamp; + else if (typeof object.ephemeralSettingTimestamp === "object") + message.ephemeralSettingTimestamp = new $util.LongBits(object.ephemeralSettingTimestamp.low >>> 0, object.ephemeralSettingTimestamp.high >>> 0).toNumber(); + if (object.ephemeralSharedSecret != null) + if (typeof object.ephemeralSharedSecret === "string") + $util.base64.decode(object.ephemeralSharedSecret, message.ephemeralSharedSecret = $util.newBuffer($util.base64.length(object.ephemeralSharedSecret)), 0); + else if (object.ephemeralSharedSecret.length) + message.ephemeralSharedSecret = object.ephemeralSharedSecret; + if (object.externalAdReply != null) { + if (typeof object.externalAdReply !== "object") + throw TypeError(".proto.ContextInfo.externalAdReply: object expected"); + message.externalAdReply = $root.proto.ContextInfo.ExternalAdReplyInfo.fromObject(object.externalAdReply); } - if (object.dnsSource != null) { - if (typeof object.dnsSource !== "object") - throw TypeError(".proto.ClientPayload.dnsSource: object expected"); - message.dnsSource = $root.proto.ClientPayload.DNSSource.fromObject(object.dnsSource); + if (object.entryPointConversionSource != null) + message.entryPointConversionSource = String(object.entryPointConversionSource); + if (object.entryPointConversionApp != null) + message.entryPointConversionApp = String(object.entryPointConversionApp); + if (object.entryPointConversionDelaySeconds != null) + message.entryPointConversionDelaySeconds = object.entryPointConversionDelaySeconds >>> 0; + if (object.disappearingMode != null) { + if (typeof object.disappearingMode !== "object") + throw TypeError(".proto.ContextInfo.disappearingMode: object expected"); + message.disappearingMode = $root.proto.DisappearingMode.fromObject(object.disappearingMode); } - if (object.connectAttemptCount != null) - message.connectAttemptCount = object.connectAttemptCount >>> 0; - if (object.device != null) - message.device = object.device >>> 0; - if (object.devicePairingData != null) { - if (typeof object.devicePairingData !== "object") - throw TypeError(".proto.ClientPayload.devicePairingData: object expected"); - message.devicePairingData = $root.proto.ClientPayload.DevicePairingRegistrationData.fromObject(object.devicePairingData); + if (object.actionLink != null) { + if (typeof object.actionLink !== "object") + throw TypeError(".proto.ContextInfo.actionLink: object expected"); + message.actionLink = $root.proto.ActionLink.fromObject(object.actionLink); } - switch (object.product) { - case "WHATSAPP": - case 0: - message.product = 0; - break; - case "MESSENGER": - case 1: - message.product = 1; - break; - case "INTEROP": - case 2: - message.product = 2; - break; + if (object.groupSubject != null) + message.groupSubject = String(object.groupSubject); + if (object.parentGroupJid != null) + message.parentGroupJid = String(object.parentGroupJid); + if (object.trustBannerType != null) + message.trustBannerType = String(object.trustBannerType); + if (object.trustBannerAction != null) + message.trustBannerAction = object.trustBannerAction >>> 0; + if (object.isSampled != null) + message.isSampled = Boolean(object.isSampled); + if (object.groupMentions) { + if (!Array.isArray(object.groupMentions)) + throw TypeError(".proto.ContextInfo.groupMentions: array expected"); + message.groupMentions = []; + for (var i = 0; i < object.groupMentions.length; ++i) { + if (typeof object.groupMentions[i] !== "object") + throw TypeError(".proto.ContextInfo.groupMentions: object expected"); + message.groupMentions[i] = $root.proto.GroupMention.fromObject(object.groupMentions[i]); + } } - if (object.fbCat != null) - if (typeof object.fbCat === "string") - $util.base64.decode(object.fbCat, message.fbCat = $util.newBuffer($util.base64.length(object.fbCat)), 0); - else if (object.fbCat.length) - message.fbCat = object.fbCat; - if (object.fbUserAgent != null) - if (typeof object.fbUserAgent === "string") - $util.base64.decode(object.fbUserAgent, message.fbUserAgent = $util.newBuffer($util.base64.length(object.fbUserAgent)), 0); - else if (object.fbUserAgent.length) - message.fbUserAgent = object.fbUserAgent; - if (object.oc != null) - message.oc = Boolean(object.oc); - if (object.lc != null) - message.lc = object.lc | 0; - switch (object.iosAppExtension) { - case "SHARE_EXTENSION": - case 0: - message.iosAppExtension = 0; - break; - case "SERVICE_EXTENSION": - case 1: - message.iosAppExtension = 1; - break; - case "INTENTS_EXTENSION": - case 2: - message.iosAppExtension = 2; - break; + if (object.utm != null) { + if (typeof object.utm !== "object") + throw TypeError(".proto.ContextInfo.utm: object expected"); + message.utm = $root.proto.ContextInfo.UTMInfo.fromObject(object.utm); } - if (object.fbAppId != null) - if ($util.Long) - (message.fbAppId = $util.Long.fromValue(object.fbAppId)).unsigned = true; - else if (typeof object.fbAppId === "string") - message.fbAppId = parseInt(object.fbAppId, 10); - else if (typeof object.fbAppId === "number") - message.fbAppId = object.fbAppId; - else if (typeof object.fbAppId === "object") - message.fbAppId = new $util.LongBits(object.fbAppId.low >>> 0, object.fbAppId.high >>> 0).toNumber(true); - if (object.fbDeviceId != null) - if (typeof object.fbDeviceId === "string") - $util.base64.decode(object.fbDeviceId, message.fbDeviceId = $util.newBuffer($util.base64.length(object.fbDeviceId)), 0); - else if (object.fbDeviceId.length) - message.fbDeviceId = object.fbDeviceId; - if (object.pull != null) - message.pull = Boolean(object.pull); - if (object.paddingBytes != null) - if (typeof object.paddingBytes === "string") - $util.base64.decode(object.paddingBytes, message.paddingBytes = $util.newBuffer($util.base64.length(object.paddingBytes)), 0); - else if (object.paddingBytes.length) - message.paddingBytes = object.paddingBytes; - if (object.yearClass != null) - message.yearClass = object.yearClass | 0; - if (object.memClass != null) - message.memClass = object.memClass | 0; - if (object.interopData != null) { - if (typeof object.interopData !== "object") - throw TypeError(".proto.ClientPayload.interopData: object expected"); - message.interopData = $root.proto.ClientPayload.InteropData.fromObject(object.interopData); + if (object.forwardedNewsletterMessageInfo != null) { + if (typeof object.forwardedNewsletterMessageInfo !== "object") + throw TypeError(".proto.ContextInfo.forwardedNewsletterMessageInfo: object expected"); + message.forwardedNewsletterMessageInfo = $root.proto.ContextInfo.ForwardedNewsletterMessageInfo.fromObject(object.forwardedNewsletterMessageInfo); + } + if (object.businessMessageForwardInfo != null) { + if (typeof object.businessMessageForwardInfo !== "object") + throw TypeError(".proto.ContextInfo.businessMessageForwardInfo: object expected"); + message.businessMessageForwardInfo = $root.proto.ContextInfo.BusinessMessageForwardInfo.fromObject(object.businessMessageForwardInfo); + } + if (object.smbClientCampaignId != null) + message.smbClientCampaignId = String(object.smbClientCampaignId); + if (object.smbServerCampaignId != null) + message.smbServerCampaignId = String(object.smbServerCampaignId); + if (object.dataSharingContext != null) { + if (typeof object.dataSharingContext !== "object") + throw TypeError(".proto.ContextInfo.dataSharingContext: object expected"); + message.dataSharingContext = $root.proto.ContextInfo.DataSharingContext.fromObject(object.dataSharingContext); } return message; }; /** - * Creates a plain object from a ClientPayload message. Also converts values to other types if specified. + * Creates a plain object from a ContextInfo message. Also converts values to other types if specified. * @function toObject - * @memberof proto.ClientPayload + * @memberof proto.ContextInfo * @static - * @param {proto.ClientPayload} message ClientPayload + * @param {proto.ContextInfo} message ContextInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ClientPayload.toObject = function toObject(message, options) { + ContextInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.shards = []; + if (options.arrays || options.defaults) { + object.mentionedJid = []; + object.groupMentions = []; + } if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.username = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.username = options.longs === String ? "0" : 0; - object.passive = false; - object.userAgent = null; - object.webInfo = null; - object.pushName = ""; - object.sessionId = 0; - object.shortConnect = false; - object.connectType = options.enums === String ? "CELLULAR_UNKNOWN" : 0; - object.connectReason = options.enums === String ? "PUSH" : 0; - object.dnsSource = null; - object.connectAttemptCount = 0; - object.device = 0; - object.devicePairingData = null; - object.product = options.enums === String ? "WHATSAPP" : 0; - if (options.bytes === String) - object.fbCat = ""; - else { - object.fbCat = []; - if (options.bytes !== Array) - object.fbCat = $util.newBuffer(object.fbCat); - } + object.stanzaId = ""; + object.participant = ""; + object.quotedMessage = null; + object.remoteJid = ""; + object.conversionSource = ""; if (options.bytes === String) - object.fbUserAgent = ""; + object.conversionData = ""; else { - object.fbUserAgent = []; + object.conversionData = []; if (options.bytes !== Array) - object.fbUserAgent = $util.newBuffer(object.fbUserAgent); + object.conversionData = $util.newBuffer(object.conversionData); } - object.oc = false; - object.lc = 0; - object.iosAppExtension = options.enums === String ? "SHARE_EXTENSION" : 0; + object.conversionDelaySeconds = 0; + object.forwardingScore = 0; + object.isForwarded = false; + object.quotedAd = null; + object.placeholderKey = null; + object.expiration = 0; if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.fbAppId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, false); + object.ephemeralSettingTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else - object.fbAppId = options.longs === String ? "0" : 0; - if (options.bytes === String) - object.fbDeviceId = ""; - else { - object.fbDeviceId = []; - if (options.bytes !== Array) - object.fbDeviceId = $util.newBuffer(object.fbDeviceId); - } - object.pull = false; + object.ephemeralSettingTimestamp = options.longs === String ? "0" : 0; if (options.bytes === String) - object.paddingBytes = ""; + object.ephemeralSharedSecret = ""; else { - object.paddingBytes = []; + object.ephemeralSharedSecret = []; if (options.bytes !== Array) - object.paddingBytes = $util.newBuffer(object.paddingBytes); + object.ephemeralSharedSecret = $util.newBuffer(object.ephemeralSharedSecret); } - object.yearClass = 0; - object.memClass = 0; - object.interopData = null; + object.externalAdReply = null; + object.entryPointConversionSource = ""; + object.entryPointConversionApp = ""; + object.entryPointConversionDelaySeconds = 0; + object.disappearingMode = null; + object.actionLink = null; + object.groupSubject = ""; + object.parentGroupJid = ""; + object.trustBannerType = ""; + object.trustBannerAction = 0; + object.isSampled = false; + object.utm = null; + object.forwardedNewsletterMessageInfo = null; + object.businessMessageForwardInfo = null; + object.smbClientCampaignId = ""; + object.smbServerCampaignId = ""; + object.dataSharingContext = null; } - if (message.username != null && message.hasOwnProperty("username")) - if (typeof message.username === "number") - object.username = options.longs === String ? String(message.username) : message.username; - else - object.username = options.longs === String ? $util.Long.prototype.toString.call(message.username) : options.longs === Number ? new $util.LongBits(message.username.low >>> 0, message.username.high >>> 0).toNumber(true) : message.username; - if (message.passive != null && message.hasOwnProperty("passive")) - object.passive = message.passive; - if (message.userAgent != null && message.hasOwnProperty("userAgent")) - object.userAgent = $root.proto.ClientPayload.UserAgent.toObject(message.userAgent, options); - if (message.webInfo != null && message.hasOwnProperty("webInfo")) - object.webInfo = $root.proto.ClientPayload.WebInfo.toObject(message.webInfo, options); - if (message.pushName != null && message.hasOwnProperty("pushName")) - object.pushName = message.pushName; - if (message.sessionId != null && message.hasOwnProperty("sessionId")) - object.sessionId = message.sessionId; - if (message.shortConnect != null && message.hasOwnProperty("shortConnect")) - object.shortConnect = message.shortConnect; - if (message.connectType != null && message.hasOwnProperty("connectType")) - object.connectType = options.enums === String ? $root.proto.ClientPayload.ConnectType[message.connectType] : message.connectType; - if (message.connectReason != null && message.hasOwnProperty("connectReason")) - object.connectReason = options.enums === String ? $root.proto.ClientPayload.ConnectReason[message.connectReason] : message.connectReason; - if (message.shards && message.shards.length) { - object.shards = []; - for (var j = 0; j < message.shards.length; ++j) - object.shards[j] = message.shards[j]; + if (message.stanzaId != null && message.hasOwnProperty("stanzaId")) + object.stanzaId = message.stanzaId; + if (message.participant != null && message.hasOwnProperty("participant")) + object.participant = message.participant; + if (message.quotedMessage != null && message.hasOwnProperty("quotedMessage")) + object.quotedMessage = $root.proto.Message.toObject(message.quotedMessage, options); + if (message.remoteJid != null && message.hasOwnProperty("remoteJid")) + object.remoteJid = message.remoteJid; + if (message.mentionedJid && message.mentionedJid.length) { + object.mentionedJid = []; + for (var j = 0; j < message.mentionedJid.length; ++j) + object.mentionedJid[j] = message.mentionedJid[j]; } - if (message.dnsSource != null && message.hasOwnProperty("dnsSource")) - object.dnsSource = $root.proto.ClientPayload.DNSSource.toObject(message.dnsSource, options); - if (message.connectAttemptCount != null && message.hasOwnProperty("connectAttemptCount")) - object.connectAttemptCount = message.connectAttemptCount; - if (message.device != null && message.hasOwnProperty("device")) - object.device = message.device; - if (message.devicePairingData != null && message.hasOwnProperty("devicePairingData")) - object.devicePairingData = $root.proto.ClientPayload.DevicePairingRegistrationData.toObject(message.devicePairingData, options); - if (message.product != null && message.hasOwnProperty("product")) - object.product = options.enums === String ? $root.proto.ClientPayload.Product[message.product] : message.product; - if (message.fbCat != null && message.hasOwnProperty("fbCat")) - object.fbCat = options.bytes === String ? $util.base64.encode(message.fbCat, 0, message.fbCat.length) : options.bytes === Array ? Array.prototype.slice.call(message.fbCat) : message.fbCat; - if (message.fbUserAgent != null && message.hasOwnProperty("fbUserAgent")) - object.fbUserAgent = options.bytes === String ? $util.base64.encode(message.fbUserAgent, 0, message.fbUserAgent.length) : options.bytes === Array ? Array.prototype.slice.call(message.fbUserAgent) : message.fbUserAgent; - if (message.oc != null && message.hasOwnProperty("oc")) - object.oc = message.oc; - if (message.lc != null && message.hasOwnProperty("lc")) - object.lc = message.lc; - if (message.iosAppExtension != null && message.hasOwnProperty("iosAppExtension")) - object.iosAppExtension = options.enums === String ? $root.proto.ClientPayload.IOSAppExtension[message.iosAppExtension] : message.iosAppExtension; - if (message.fbAppId != null && message.hasOwnProperty("fbAppId")) - if (typeof message.fbAppId === "number") - object.fbAppId = options.longs === String ? String(message.fbAppId) : message.fbAppId; + if (message.conversionSource != null && message.hasOwnProperty("conversionSource")) + object.conversionSource = message.conversionSource; + if (message.conversionData != null && message.hasOwnProperty("conversionData")) + object.conversionData = options.bytes === String ? $util.base64.encode(message.conversionData, 0, message.conversionData.length) : options.bytes === Array ? Array.prototype.slice.call(message.conversionData) : message.conversionData; + if (message.conversionDelaySeconds != null && message.hasOwnProperty("conversionDelaySeconds")) + object.conversionDelaySeconds = message.conversionDelaySeconds; + if (message.forwardingScore != null && message.hasOwnProperty("forwardingScore")) + object.forwardingScore = message.forwardingScore; + if (message.isForwarded != null && message.hasOwnProperty("isForwarded")) + object.isForwarded = message.isForwarded; + if (message.quotedAd != null && message.hasOwnProperty("quotedAd")) + object.quotedAd = $root.proto.ContextInfo.AdReplyInfo.toObject(message.quotedAd, options); + if (message.placeholderKey != null && message.hasOwnProperty("placeholderKey")) + object.placeholderKey = $root.proto.MessageKey.toObject(message.placeholderKey, options); + if (message.expiration != null && message.hasOwnProperty("expiration")) + object.expiration = message.expiration; + if (message.ephemeralSettingTimestamp != null && message.hasOwnProperty("ephemeralSettingTimestamp")) + if (typeof message.ephemeralSettingTimestamp === "number") + object.ephemeralSettingTimestamp = options.longs === String ? String(message.ephemeralSettingTimestamp) : message.ephemeralSettingTimestamp; else - object.fbAppId = options.longs === String ? $util.Long.prototype.toString.call(message.fbAppId) : options.longs === Number ? new $util.LongBits(message.fbAppId.low >>> 0, message.fbAppId.high >>> 0).toNumber(true) : message.fbAppId; - if (message.fbDeviceId != null && message.hasOwnProperty("fbDeviceId")) - object.fbDeviceId = options.bytes === String ? $util.base64.encode(message.fbDeviceId, 0, message.fbDeviceId.length) : options.bytes === Array ? Array.prototype.slice.call(message.fbDeviceId) : message.fbDeviceId; - if (message.pull != null && message.hasOwnProperty("pull")) - object.pull = message.pull; - if (message.paddingBytes != null && message.hasOwnProperty("paddingBytes")) - object.paddingBytes = options.bytes === String ? $util.base64.encode(message.paddingBytes, 0, message.paddingBytes.length) : options.bytes === Array ? Array.prototype.slice.call(message.paddingBytes) : message.paddingBytes; - if (message.yearClass != null && message.hasOwnProperty("yearClass")) - object.yearClass = message.yearClass; - if (message.memClass != null && message.hasOwnProperty("memClass")) - object.memClass = message.memClass; - if (message.interopData != null && message.hasOwnProperty("interopData")) - object.interopData = $root.proto.ClientPayload.InteropData.toObject(message.interopData, options); + object.ephemeralSettingTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.ephemeralSettingTimestamp) : options.longs === Number ? new $util.LongBits(message.ephemeralSettingTimestamp.low >>> 0, message.ephemeralSettingTimestamp.high >>> 0).toNumber() : message.ephemeralSettingTimestamp; + if (message.ephemeralSharedSecret != null && message.hasOwnProperty("ephemeralSharedSecret")) + object.ephemeralSharedSecret = options.bytes === String ? $util.base64.encode(message.ephemeralSharedSecret, 0, message.ephemeralSharedSecret.length) : options.bytes === Array ? Array.prototype.slice.call(message.ephemeralSharedSecret) : message.ephemeralSharedSecret; + if (message.externalAdReply != null && message.hasOwnProperty("externalAdReply")) + object.externalAdReply = $root.proto.ContextInfo.ExternalAdReplyInfo.toObject(message.externalAdReply, options); + if (message.entryPointConversionSource != null && message.hasOwnProperty("entryPointConversionSource")) + object.entryPointConversionSource = message.entryPointConversionSource; + if (message.entryPointConversionApp != null && message.hasOwnProperty("entryPointConversionApp")) + object.entryPointConversionApp = message.entryPointConversionApp; + if (message.entryPointConversionDelaySeconds != null && message.hasOwnProperty("entryPointConversionDelaySeconds")) + object.entryPointConversionDelaySeconds = message.entryPointConversionDelaySeconds; + if (message.disappearingMode != null && message.hasOwnProperty("disappearingMode")) + object.disappearingMode = $root.proto.DisappearingMode.toObject(message.disappearingMode, options); + if (message.actionLink != null && message.hasOwnProperty("actionLink")) + object.actionLink = $root.proto.ActionLink.toObject(message.actionLink, options); + if (message.groupSubject != null && message.hasOwnProperty("groupSubject")) + object.groupSubject = message.groupSubject; + if (message.parentGroupJid != null && message.hasOwnProperty("parentGroupJid")) + object.parentGroupJid = message.parentGroupJid; + if (message.trustBannerType != null && message.hasOwnProperty("trustBannerType")) + object.trustBannerType = message.trustBannerType; + if (message.trustBannerAction != null && message.hasOwnProperty("trustBannerAction")) + object.trustBannerAction = message.trustBannerAction; + if (message.isSampled != null && message.hasOwnProperty("isSampled")) + object.isSampled = message.isSampled; + if (message.groupMentions && message.groupMentions.length) { + object.groupMentions = []; + for (var j = 0; j < message.groupMentions.length; ++j) + object.groupMentions[j] = $root.proto.GroupMention.toObject(message.groupMentions[j], options); + } + if (message.utm != null && message.hasOwnProperty("utm")) + object.utm = $root.proto.ContextInfo.UTMInfo.toObject(message.utm, options); + if (message.forwardedNewsletterMessageInfo != null && message.hasOwnProperty("forwardedNewsletterMessageInfo")) + object.forwardedNewsletterMessageInfo = $root.proto.ContextInfo.ForwardedNewsletterMessageInfo.toObject(message.forwardedNewsletterMessageInfo, options); + if (message.businessMessageForwardInfo != null && message.hasOwnProperty("businessMessageForwardInfo")) + object.businessMessageForwardInfo = $root.proto.ContextInfo.BusinessMessageForwardInfo.toObject(message.businessMessageForwardInfo, options); + if (message.smbClientCampaignId != null && message.hasOwnProperty("smbClientCampaignId")) + object.smbClientCampaignId = message.smbClientCampaignId; + if (message.smbServerCampaignId != null && message.hasOwnProperty("smbServerCampaignId")) + object.smbServerCampaignId = message.smbServerCampaignId; + if (message.dataSharingContext != null && message.hasOwnProperty("dataSharingContext")) + object.dataSharingContext = $root.proto.ContextInfo.DataSharingContext.toObject(message.dataSharingContext, options); return object; }; /** - * Converts this ClientPayload to JSON. + * Converts this ContextInfo to JSON. * @function toJSON - * @memberof proto.ClientPayload + * @memberof proto.ContextInfo * @instance * @returns {Object.} JSON object */ - ClientPayload.prototype.toJSON = function toJSON() { + ContextInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * ConnectReason enum. - * @name proto.ClientPayload.ConnectReason - * @enum {number} - * @property {number} PUSH=0 PUSH value - * @property {number} USER_ACTIVATED=1 USER_ACTIVATED value - * @property {number} SCHEDULED=2 SCHEDULED value - * @property {number} ERROR_RECONNECT=3 ERROR_RECONNECT value - * @property {number} NETWORK_SWITCH=4 NETWORK_SWITCH value - * @property {number} PING_RECONNECT=5 PING_RECONNECT value - * @property {number} UNKNOWN=6 UNKNOWN value - */ - ClientPayload.ConnectReason = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PUSH"] = 0; - values[valuesById[1] = "USER_ACTIVATED"] = 1; - values[valuesById[2] = "SCHEDULED"] = 2; - values[valuesById[3] = "ERROR_RECONNECT"] = 3; - values[valuesById[4] = "NETWORK_SWITCH"] = 4; - values[valuesById[5] = "PING_RECONNECT"] = 5; - values[valuesById[6] = "UNKNOWN"] = 6; - return values; - })(); - - /** - * ConnectType enum. - * @name proto.ClientPayload.ConnectType - * @enum {number} - * @property {number} CELLULAR_UNKNOWN=0 CELLULAR_UNKNOWN value - * @property {number} WIFI_UNKNOWN=1 WIFI_UNKNOWN value - * @property {number} CELLULAR_EDGE=100 CELLULAR_EDGE value - * @property {number} CELLULAR_IDEN=101 CELLULAR_IDEN value - * @property {number} CELLULAR_UMTS=102 CELLULAR_UMTS value - * @property {number} CELLULAR_EVDO=103 CELLULAR_EVDO value - * @property {number} CELLULAR_GPRS=104 CELLULAR_GPRS value - * @property {number} CELLULAR_HSDPA=105 CELLULAR_HSDPA value - * @property {number} CELLULAR_HSUPA=106 CELLULAR_HSUPA value - * @property {number} CELLULAR_HSPA=107 CELLULAR_HSPA value - * @property {number} CELLULAR_CDMA=108 CELLULAR_CDMA value - * @property {number} CELLULAR_1XRTT=109 CELLULAR_1XRTT value - * @property {number} CELLULAR_EHRPD=110 CELLULAR_EHRPD value - * @property {number} CELLULAR_LTE=111 CELLULAR_LTE value - * @property {number} CELLULAR_HSPAP=112 CELLULAR_HSPAP value - */ - ClientPayload.ConnectType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CELLULAR_UNKNOWN"] = 0; - values[valuesById[1] = "WIFI_UNKNOWN"] = 1; - values[valuesById[100] = "CELLULAR_EDGE"] = 100; - values[valuesById[101] = "CELLULAR_IDEN"] = 101; - values[valuesById[102] = "CELLULAR_UMTS"] = 102; - values[valuesById[103] = "CELLULAR_EVDO"] = 103; - values[valuesById[104] = "CELLULAR_GPRS"] = 104; - values[valuesById[105] = "CELLULAR_HSDPA"] = 105; - values[valuesById[106] = "CELLULAR_HSUPA"] = 106; - values[valuesById[107] = "CELLULAR_HSPA"] = 107; - values[valuesById[108] = "CELLULAR_CDMA"] = 108; - values[valuesById[109] = "CELLULAR_1XRTT"] = 109; - values[valuesById[110] = "CELLULAR_EHRPD"] = 110; - values[valuesById[111] = "CELLULAR_LTE"] = 111; - values[valuesById[112] = "CELLULAR_HSPAP"] = 112; - return values; - })(); - - ClientPayload.DNSSource = (function() { + ContextInfo.AdReplyInfo = (function() { /** - * Properties of a DNSSource. - * @memberof proto.ClientPayload - * @interface IDNSSource - * @property {proto.ClientPayload.DNSSource.DNSResolutionMethod|null} [dnsMethod] DNSSource dnsMethod - * @property {boolean|null} [appCached] DNSSource appCached + * Properties of an AdReplyInfo. + * @memberof proto.ContextInfo + * @interface IAdReplyInfo + * @property {string|null} [advertiserName] AdReplyInfo advertiserName + * @property {proto.ContextInfo.AdReplyInfo.MediaType|null} [mediaType] AdReplyInfo mediaType + * @property {Uint8Array|null} [jpegThumbnail] AdReplyInfo jpegThumbnail + * @property {string|null} [caption] AdReplyInfo caption */ /** - * Constructs a new DNSSource. - * @memberof proto.ClientPayload - * @classdesc Represents a DNSSource. - * @implements IDNSSource + * Constructs a new AdReplyInfo. + * @memberof proto.ContextInfo + * @classdesc Represents an AdReplyInfo. + * @implements IAdReplyInfo * @constructor - * @param {proto.ClientPayload.IDNSSource=} [properties] Properties to set + * @param {proto.ContextInfo.IAdReplyInfo=} [properties] Properties to set */ - function DNSSource(properties) { + function AdReplyInfo(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6626,88 +12487,114 @@ $root.proto = (function() { } /** - * DNSSource dnsMethod. - * @member {proto.ClientPayload.DNSSource.DNSResolutionMethod} dnsMethod - * @memberof proto.ClientPayload.DNSSource + * AdReplyInfo advertiserName. + * @member {string} advertiserName + * @memberof proto.ContextInfo.AdReplyInfo * @instance */ - DNSSource.prototype.dnsMethod = 0; + AdReplyInfo.prototype.advertiserName = ""; /** - * DNSSource appCached. - * @member {boolean} appCached - * @memberof proto.ClientPayload.DNSSource + * AdReplyInfo mediaType. + * @member {proto.ContextInfo.AdReplyInfo.MediaType} mediaType + * @memberof proto.ContextInfo.AdReplyInfo * @instance */ - DNSSource.prototype.appCached = false; + AdReplyInfo.prototype.mediaType = 0; /** - * Creates a new DNSSource instance using the specified properties. + * AdReplyInfo jpegThumbnail. + * @member {Uint8Array} jpegThumbnail + * @memberof proto.ContextInfo.AdReplyInfo + * @instance + */ + AdReplyInfo.prototype.jpegThumbnail = $util.newBuffer([]); + + /** + * AdReplyInfo caption. + * @member {string} caption + * @memberof proto.ContextInfo.AdReplyInfo + * @instance + */ + AdReplyInfo.prototype.caption = ""; + + /** + * Creates a new AdReplyInfo instance using the specified properties. * @function create - * @memberof proto.ClientPayload.DNSSource + * @memberof proto.ContextInfo.AdReplyInfo * @static - * @param {proto.ClientPayload.IDNSSource=} [properties] Properties to set - * @returns {proto.ClientPayload.DNSSource} DNSSource instance + * @param {proto.ContextInfo.IAdReplyInfo=} [properties] Properties to set + * @returns {proto.ContextInfo.AdReplyInfo} AdReplyInfo instance */ - DNSSource.create = function create(properties) { - return new DNSSource(properties); + AdReplyInfo.create = function create(properties) { + return new AdReplyInfo(properties); }; /** - * Encodes the specified DNSSource message. Does not implicitly {@link proto.ClientPayload.DNSSource.verify|verify} messages. + * Encodes the specified AdReplyInfo message. Does not implicitly {@link proto.ContextInfo.AdReplyInfo.verify|verify} messages. * @function encode - * @memberof proto.ClientPayload.DNSSource + * @memberof proto.ContextInfo.AdReplyInfo * @static - * @param {proto.ClientPayload.IDNSSource} message DNSSource message or plain object to encode + * @param {proto.ContextInfo.IAdReplyInfo} message AdReplyInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DNSSource.encode = function encode(message, writer) { + AdReplyInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.dnsMethod != null && Object.hasOwnProperty.call(message, "dnsMethod")) - writer.uint32(/* id 15, wireType 0 =*/120).int32(message.dnsMethod); - if (message.appCached != null && Object.hasOwnProperty.call(message, "appCached")) - writer.uint32(/* id 16, wireType 0 =*/128).bool(message.appCached); + if (message.advertiserName != null && Object.hasOwnProperty.call(message, "advertiserName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.advertiserName); + if (message.mediaType != null && Object.hasOwnProperty.call(message, "mediaType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.mediaType); + if (message.jpegThumbnail != null && Object.hasOwnProperty.call(message, "jpegThumbnail")) + writer.uint32(/* id 16, wireType 2 =*/130).bytes(message.jpegThumbnail); + if (message.caption != null && Object.hasOwnProperty.call(message, "caption")) + writer.uint32(/* id 17, wireType 2 =*/138).string(message.caption); return writer; }; /** - * Encodes the specified DNSSource message, length delimited. Does not implicitly {@link proto.ClientPayload.DNSSource.verify|verify} messages. + * Encodes the specified AdReplyInfo message, length delimited. Does not implicitly {@link proto.ContextInfo.AdReplyInfo.verify|verify} messages. * @function encodeDelimited - * @memberof proto.ClientPayload.DNSSource + * @memberof proto.ContextInfo.AdReplyInfo * @static - * @param {proto.ClientPayload.IDNSSource} message DNSSource message or plain object to encode + * @param {proto.ContextInfo.IAdReplyInfo} message AdReplyInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DNSSource.encodeDelimited = function encodeDelimited(message, writer) { + AdReplyInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DNSSource message from the specified reader or buffer. + * Decodes an AdReplyInfo message from the specified reader or buffer. * @function decode - * @memberof proto.ClientPayload.DNSSource + * @memberof proto.ContextInfo.AdReplyInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {proto.ClientPayload.DNSSource} DNSSource + * @returns {proto.ContextInfo.AdReplyInfo} AdReplyInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DNSSource.decode = function decode(reader, length) { + AdReplyInfo.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.ClientPayload.DNSSource(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.ContextInfo.AdReplyInfo(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 15: - message.dnsMethod = reader.int32(); + case 1: + message.advertiserName = reader.string(); + break; + case 2: + message.mediaType = reader.int32(); break; case 16: - message.appCached = reader.bool(); + message.jpegThumbnail = reader.bytes(); + break; + case 17: + message.caption = reader.string(); break; default: reader.skipType(tag & 7); @@ -6718,171 +12605,175 @@ $root.proto = (function() { }; /** - * Decodes a DNSSource message from the specified reader or buffer, length delimited. + * Decodes an AdReplyInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof proto.ClientPayload.DNSSource + * @memberof proto.ContextInfo.AdReplyInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.ClientPayload.DNSSource} DNSSource + * @returns {proto.ContextInfo.AdReplyInfo} AdReplyInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DNSSource.decodeDelimited = function decodeDelimited(reader) { + AdReplyInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DNSSource message. + * Verifies an AdReplyInfo message. * @function verify - * @memberof proto.ClientPayload.DNSSource + * @memberof proto.ContextInfo.AdReplyInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DNSSource.verify = function verify(message) { + AdReplyInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.dnsMethod != null && message.hasOwnProperty("dnsMethod")) - switch (message.dnsMethod) { + if (message.advertiserName != null && message.hasOwnProperty("advertiserName")) + if (!$util.isString(message.advertiserName)) + return "advertiserName: string expected"; + if (message.mediaType != null && message.hasOwnProperty("mediaType")) + switch (message.mediaType) { default: - return "dnsMethod: enum value expected"; + return "mediaType: enum value expected"; case 0: case 1: case 2: - case 3: - case 4: break; } - if (message.appCached != null && message.hasOwnProperty("appCached")) - if (typeof message.appCached !== "boolean") - return "appCached: boolean expected"; + if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail")) + if (!(message.jpegThumbnail && typeof message.jpegThumbnail.length === "number" || $util.isString(message.jpegThumbnail))) + return "jpegThumbnail: buffer expected"; + if (message.caption != null && message.hasOwnProperty("caption")) + if (!$util.isString(message.caption)) + return "caption: string expected"; return null; }; /** - * Creates a DNSSource message from a plain object. Also converts values to their respective internal types. + * Creates an AdReplyInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof proto.ClientPayload.DNSSource + * @memberof proto.ContextInfo.AdReplyInfo * @static * @param {Object.} object Plain object - * @returns {proto.ClientPayload.DNSSource} DNSSource + * @returns {proto.ContextInfo.AdReplyInfo} AdReplyInfo */ - DNSSource.fromObject = function fromObject(object) { - if (object instanceof $root.proto.ClientPayload.DNSSource) + AdReplyInfo.fromObject = function fromObject(object) { + if (object instanceof $root.proto.ContextInfo.AdReplyInfo) return object; - var message = new $root.proto.ClientPayload.DNSSource(); - switch (object.dnsMethod) { - case "SYSTEM": + var message = new $root.proto.ContextInfo.AdReplyInfo(); + if (object.advertiserName != null) + message.advertiserName = String(object.advertiserName); + switch (object.mediaType) { + case "NONE": case 0: - message.dnsMethod = 0; + message.mediaType = 0; break; - case "GOOGLE": + case "IMAGE": case 1: - message.dnsMethod = 1; + message.mediaType = 1; break; - case "HARDCODED": + case "VIDEO": case 2: - message.dnsMethod = 2; - break; - case "OVERRIDE": - case 3: - message.dnsMethod = 3; - break; - case "FALLBACK": - case 4: - message.dnsMethod = 4; + message.mediaType = 2; break; } - if (object.appCached != null) - message.appCached = Boolean(object.appCached); + if (object.jpegThumbnail != null) + if (typeof object.jpegThumbnail === "string") + $util.base64.decode(object.jpegThumbnail, message.jpegThumbnail = $util.newBuffer($util.base64.length(object.jpegThumbnail)), 0); + else if (object.jpegThumbnail.length) + message.jpegThumbnail = object.jpegThumbnail; + if (object.caption != null) + message.caption = String(object.caption); return message; }; /** - * Creates a plain object from a DNSSource message. Also converts values to other types if specified. + * Creates a plain object from an AdReplyInfo message. Also converts values to other types if specified. * @function toObject - * @memberof proto.ClientPayload.DNSSource + * @memberof proto.ContextInfo.AdReplyInfo * @static - * @param {proto.ClientPayload.DNSSource} message DNSSource + * @param {proto.ContextInfo.AdReplyInfo} message AdReplyInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DNSSource.toObject = function toObject(message, options) { + AdReplyInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.dnsMethod = options.enums === String ? "SYSTEM" : 0; - object.appCached = false; + object.advertiserName = ""; + object.mediaType = options.enums === String ? "NONE" : 0; + if (options.bytes === String) + object.jpegThumbnail = ""; + else { + object.jpegThumbnail = []; + if (options.bytes !== Array) + object.jpegThumbnail = $util.newBuffer(object.jpegThumbnail); + } + object.caption = ""; } - if (message.dnsMethod != null && message.hasOwnProperty("dnsMethod")) - object.dnsMethod = options.enums === String ? $root.proto.ClientPayload.DNSSource.DNSResolutionMethod[message.dnsMethod] : message.dnsMethod; - if (message.appCached != null && message.hasOwnProperty("appCached")) - object.appCached = message.appCached; + if (message.advertiserName != null && message.hasOwnProperty("advertiserName")) + object.advertiserName = message.advertiserName; + if (message.mediaType != null && message.hasOwnProperty("mediaType")) + object.mediaType = options.enums === String ? $root.proto.ContextInfo.AdReplyInfo.MediaType[message.mediaType] : message.mediaType; + if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail")) + object.jpegThumbnail = options.bytes === String ? $util.base64.encode(message.jpegThumbnail, 0, message.jpegThumbnail.length) : options.bytes === Array ? Array.prototype.slice.call(message.jpegThumbnail) : message.jpegThumbnail; + if (message.caption != null && message.hasOwnProperty("caption")) + object.caption = message.caption; return object; }; /** - * Converts this DNSSource to JSON. + * Converts this AdReplyInfo to JSON. * @function toJSON - * @memberof proto.ClientPayload.DNSSource + * @memberof proto.ContextInfo.AdReplyInfo * @instance * @returns {Object.} JSON object */ - DNSSource.prototype.toJSON = function toJSON() { + AdReplyInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * DNSResolutionMethod enum. - * @name proto.ClientPayload.DNSSource.DNSResolutionMethod + * MediaType enum. + * @name proto.ContextInfo.AdReplyInfo.MediaType * @enum {number} - * @property {number} SYSTEM=0 SYSTEM value - * @property {number} GOOGLE=1 GOOGLE value - * @property {number} HARDCODED=2 HARDCODED value - * @property {number} OVERRIDE=3 OVERRIDE value - * @property {number} FALLBACK=4 FALLBACK value + * @property {number} NONE=0 NONE value + * @property {number} IMAGE=1 IMAGE value + * @property {number} VIDEO=2 VIDEO value */ - DNSSource.DNSResolutionMethod = (function() { + AdReplyInfo.MediaType = (function() { var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SYSTEM"] = 0; - values[valuesById[1] = "GOOGLE"] = 1; - values[valuesById[2] = "HARDCODED"] = 2; - values[valuesById[3] = "OVERRIDE"] = 3; - values[valuesById[4] = "FALLBACK"] = 4; + values[valuesById[0] = "NONE"] = 0; + values[valuesById[1] = "IMAGE"] = 1; + values[valuesById[2] = "VIDEO"] = 2; return values; })(); - return DNSSource; + return AdReplyInfo; })(); - ClientPayload.DevicePairingRegistrationData = (function() { + ContextInfo.BusinessMessageForwardInfo = (function() { /** - * Properties of a DevicePairingRegistrationData. - * @memberof proto.ClientPayload - * @interface IDevicePairingRegistrationData - * @property {Uint8Array|null} [eRegid] DevicePairingRegistrationData eRegid - * @property {Uint8Array|null} [eKeytype] DevicePairingRegistrationData eKeytype - * @property {Uint8Array|null} [eIdent] DevicePairingRegistrationData eIdent - * @property {Uint8Array|null} [eSkeyId] DevicePairingRegistrationData eSkeyId - * @property {Uint8Array|null} [eSkeyVal] DevicePairingRegistrationData eSkeyVal - * @property {Uint8Array|null} [eSkeySig] DevicePairingRegistrationData eSkeySig - * @property {Uint8Array|null} [buildHash] DevicePairingRegistrationData buildHash - * @property {Uint8Array|null} [deviceProps] DevicePairingRegistrationData deviceProps + * Properties of a BusinessMessageForwardInfo. + * @memberof proto.ContextInfo + * @interface IBusinessMessageForwardInfo + * @property {string|null} [businessOwnerJid] BusinessMessageForwardInfo businessOwnerJid */ /** - * Constructs a new DevicePairingRegistrationData. - * @memberof proto.ClientPayload - * @classdesc Represents a DevicePairingRegistrationData. - * @implements IDevicePairingRegistrationData + * Constructs a new BusinessMessageForwardInfo. + * @memberof proto.ContextInfo + * @classdesc Represents a BusinessMessageForwardInfo. + * @implements IBusinessMessageForwardInfo * @constructor - * @param {proto.ClientPayload.IDevicePairingRegistrationData=} [properties] Properties to set + * @param {proto.ContextInfo.IBusinessMessageForwardInfo=} [properties] Properties to set */ - function DevicePairingRegistrationData(properties) { + function BusinessMessageForwardInfo(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6890,166 +12781,75 @@ $root.proto = (function() { } /** - * DevicePairingRegistrationData eRegid. - * @member {Uint8Array} eRegid - * @memberof proto.ClientPayload.DevicePairingRegistrationData - * @instance - */ - DevicePairingRegistrationData.prototype.eRegid = $util.newBuffer([]); - - /** - * DevicePairingRegistrationData eKeytype. - * @member {Uint8Array} eKeytype - * @memberof proto.ClientPayload.DevicePairingRegistrationData - * @instance - */ - DevicePairingRegistrationData.prototype.eKeytype = $util.newBuffer([]); - - /** - * DevicePairingRegistrationData eIdent. - * @member {Uint8Array} eIdent - * @memberof proto.ClientPayload.DevicePairingRegistrationData - * @instance - */ - DevicePairingRegistrationData.prototype.eIdent = $util.newBuffer([]); - - /** - * DevicePairingRegistrationData eSkeyId. - * @member {Uint8Array} eSkeyId - * @memberof proto.ClientPayload.DevicePairingRegistrationData - * @instance - */ - DevicePairingRegistrationData.prototype.eSkeyId = $util.newBuffer([]); - - /** - * DevicePairingRegistrationData eSkeyVal. - * @member {Uint8Array} eSkeyVal - * @memberof proto.ClientPayload.DevicePairingRegistrationData - * @instance - */ - DevicePairingRegistrationData.prototype.eSkeyVal = $util.newBuffer([]); - - /** - * DevicePairingRegistrationData eSkeySig. - * @member {Uint8Array} eSkeySig - * @memberof proto.ClientPayload.DevicePairingRegistrationData - * @instance - */ - DevicePairingRegistrationData.prototype.eSkeySig = $util.newBuffer([]); - - /** - * DevicePairingRegistrationData buildHash. - * @member {Uint8Array} buildHash - * @memberof proto.ClientPayload.DevicePairingRegistrationData - * @instance - */ - DevicePairingRegistrationData.prototype.buildHash = $util.newBuffer([]); - - /** - * DevicePairingRegistrationData deviceProps. - * @member {Uint8Array} deviceProps - * @memberof proto.ClientPayload.DevicePairingRegistrationData + * BusinessMessageForwardInfo businessOwnerJid. + * @member {string} businessOwnerJid + * @memberof proto.ContextInfo.BusinessMessageForwardInfo * @instance */ - DevicePairingRegistrationData.prototype.deviceProps = $util.newBuffer([]); + BusinessMessageForwardInfo.prototype.businessOwnerJid = ""; /** - * Creates a new DevicePairingRegistrationData instance using the specified properties. + * Creates a new BusinessMessageForwardInfo instance using the specified properties. * @function create - * @memberof proto.ClientPayload.DevicePairingRegistrationData + * @memberof proto.ContextInfo.BusinessMessageForwardInfo * @static - * @param {proto.ClientPayload.IDevicePairingRegistrationData=} [properties] Properties to set - * @returns {proto.ClientPayload.DevicePairingRegistrationData} DevicePairingRegistrationData instance + * @param {proto.ContextInfo.IBusinessMessageForwardInfo=} [properties] Properties to set + * @returns {proto.ContextInfo.BusinessMessageForwardInfo} BusinessMessageForwardInfo instance */ - DevicePairingRegistrationData.create = function create(properties) { - return new DevicePairingRegistrationData(properties); + BusinessMessageForwardInfo.create = function create(properties) { + return new BusinessMessageForwardInfo(properties); }; /** - * Encodes the specified DevicePairingRegistrationData message. Does not implicitly {@link proto.ClientPayload.DevicePairingRegistrationData.verify|verify} messages. + * Encodes the specified BusinessMessageForwardInfo message. Does not implicitly {@link proto.ContextInfo.BusinessMessageForwardInfo.verify|verify} messages. * @function encode - * @memberof proto.ClientPayload.DevicePairingRegistrationData + * @memberof proto.ContextInfo.BusinessMessageForwardInfo * @static - * @param {proto.ClientPayload.IDevicePairingRegistrationData} message DevicePairingRegistrationData message or plain object to encode + * @param {proto.ContextInfo.IBusinessMessageForwardInfo} message BusinessMessageForwardInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DevicePairingRegistrationData.encode = function encode(message, writer) { + BusinessMessageForwardInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.eRegid != null && Object.hasOwnProperty.call(message, "eRegid")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.eRegid); - if (message.eKeytype != null && Object.hasOwnProperty.call(message, "eKeytype")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.eKeytype); - if (message.eIdent != null && Object.hasOwnProperty.call(message, "eIdent")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.eIdent); - if (message.eSkeyId != null && Object.hasOwnProperty.call(message, "eSkeyId")) - writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.eSkeyId); - if (message.eSkeyVal != null && Object.hasOwnProperty.call(message, "eSkeyVal")) - writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.eSkeyVal); - if (message.eSkeySig != null && Object.hasOwnProperty.call(message, "eSkeySig")) - writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.eSkeySig); - if (message.buildHash != null && Object.hasOwnProperty.call(message, "buildHash")) - writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.buildHash); - if (message.deviceProps != null && Object.hasOwnProperty.call(message, "deviceProps")) - writer.uint32(/* id 8, wireType 2 =*/66).bytes(message.deviceProps); + if (message.businessOwnerJid != null && Object.hasOwnProperty.call(message, "businessOwnerJid")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.businessOwnerJid); return writer; }; /** - * Encodes the specified DevicePairingRegistrationData message, length delimited. Does not implicitly {@link proto.ClientPayload.DevicePairingRegistrationData.verify|verify} messages. + * Encodes the specified BusinessMessageForwardInfo message, length delimited. Does not implicitly {@link proto.ContextInfo.BusinessMessageForwardInfo.verify|verify} messages. * @function encodeDelimited - * @memberof proto.ClientPayload.DevicePairingRegistrationData + * @memberof proto.ContextInfo.BusinessMessageForwardInfo * @static - * @param {proto.ClientPayload.IDevicePairingRegistrationData} message DevicePairingRegistrationData message or plain object to encode + * @param {proto.ContextInfo.IBusinessMessageForwardInfo} message BusinessMessageForwardInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DevicePairingRegistrationData.encodeDelimited = function encodeDelimited(message, writer) { + BusinessMessageForwardInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DevicePairingRegistrationData message from the specified reader or buffer. + * Decodes a BusinessMessageForwardInfo message from the specified reader or buffer. * @function decode - * @memberof proto.ClientPayload.DevicePairingRegistrationData + * @memberof proto.ContextInfo.BusinessMessageForwardInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {proto.ClientPayload.DevicePairingRegistrationData} DevicePairingRegistrationData + * @returns {proto.ContextInfo.BusinessMessageForwardInfo} BusinessMessageForwardInfo * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DevicePairingRegistrationData.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.ClientPayload.DevicePairingRegistrationData(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.eRegid = reader.bytes(); - break; - case 2: - message.eKeytype = reader.bytes(); - break; - case 3: - message.eIdent = reader.bytes(); - break; - case 4: - message.eSkeyId = reader.bytes(); - break; - case 5: - message.eSkeyVal = reader.bytes(); - break; - case 6: - message.eSkeySig = reader.bytes(); - break; - case 7: - message.buildHash = reader.bytes(); - break; - case 8: - message.deviceProps = reader.bytes(); + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BusinessMessageForwardInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.ContextInfo.BusinessMessageForwardInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.businessOwnerJid = reader.string(); break; default: reader.skipType(tag & 7); @@ -7060,254 +12860,107 @@ $root.proto = (function() { }; /** - * Decodes a DevicePairingRegistrationData message from the specified reader or buffer, length delimited. + * Decodes a BusinessMessageForwardInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof proto.ClientPayload.DevicePairingRegistrationData + * @memberof proto.ContextInfo.BusinessMessageForwardInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.ClientPayload.DevicePairingRegistrationData} DevicePairingRegistrationData + * @returns {proto.ContextInfo.BusinessMessageForwardInfo} BusinessMessageForwardInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DevicePairingRegistrationData.decodeDelimited = function decodeDelimited(reader) { + BusinessMessageForwardInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DevicePairingRegistrationData message. + * Verifies a BusinessMessageForwardInfo message. * @function verify - * @memberof proto.ClientPayload.DevicePairingRegistrationData + * @memberof proto.ContextInfo.BusinessMessageForwardInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DevicePairingRegistrationData.verify = function verify(message) { + BusinessMessageForwardInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.eRegid != null && message.hasOwnProperty("eRegid")) - if (!(message.eRegid && typeof message.eRegid.length === "number" || $util.isString(message.eRegid))) - return "eRegid: buffer expected"; - if (message.eKeytype != null && message.hasOwnProperty("eKeytype")) - if (!(message.eKeytype && typeof message.eKeytype.length === "number" || $util.isString(message.eKeytype))) - return "eKeytype: buffer expected"; - if (message.eIdent != null && message.hasOwnProperty("eIdent")) - if (!(message.eIdent && typeof message.eIdent.length === "number" || $util.isString(message.eIdent))) - return "eIdent: buffer expected"; - if (message.eSkeyId != null && message.hasOwnProperty("eSkeyId")) - if (!(message.eSkeyId && typeof message.eSkeyId.length === "number" || $util.isString(message.eSkeyId))) - return "eSkeyId: buffer expected"; - if (message.eSkeyVal != null && message.hasOwnProperty("eSkeyVal")) - if (!(message.eSkeyVal && typeof message.eSkeyVal.length === "number" || $util.isString(message.eSkeyVal))) - return "eSkeyVal: buffer expected"; - if (message.eSkeySig != null && message.hasOwnProperty("eSkeySig")) - if (!(message.eSkeySig && typeof message.eSkeySig.length === "number" || $util.isString(message.eSkeySig))) - return "eSkeySig: buffer expected"; - if (message.buildHash != null && message.hasOwnProperty("buildHash")) - if (!(message.buildHash && typeof message.buildHash.length === "number" || $util.isString(message.buildHash))) - return "buildHash: buffer expected"; - if (message.deviceProps != null && message.hasOwnProperty("deviceProps")) - if (!(message.deviceProps && typeof message.deviceProps.length === "number" || $util.isString(message.deviceProps))) - return "deviceProps: buffer expected"; + if (message.businessOwnerJid != null && message.hasOwnProperty("businessOwnerJid")) + if (!$util.isString(message.businessOwnerJid)) + return "businessOwnerJid: string expected"; return null; }; /** - * Creates a DevicePairingRegistrationData message from a plain object. Also converts values to their respective internal types. + * Creates a BusinessMessageForwardInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof proto.ClientPayload.DevicePairingRegistrationData + * @memberof proto.ContextInfo.BusinessMessageForwardInfo * @static * @param {Object.} object Plain object - * @returns {proto.ClientPayload.DevicePairingRegistrationData} DevicePairingRegistrationData + * @returns {proto.ContextInfo.BusinessMessageForwardInfo} BusinessMessageForwardInfo */ - DevicePairingRegistrationData.fromObject = function fromObject(object) { - if (object instanceof $root.proto.ClientPayload.DevicePairingRegistrationData) + BusinessMessageForwardInfo.fromObject = function fromObject(object) { + if (object instanceof $root.proto.ContextInfo.BusinessMessageForwardInfo) return object; - var message = new $root.proto.ClientPayload.DevicePairingRegistrationData(); - if (object.eRegid != null) - if (typeof object.eRegid === "string") - $util.base64.decode(object.eRegid, message.eRegid = $util.newBuffer($util.base64.length(object.eRegid)), 0); - else if (object.eRegid.length) - message.eRegid = object.eRegid; - if (object.eKeytype != null) - if (typeof object.eKeytype === "string") - $util.base64.decode(object.eKeytype, message.eKeytype = $util.newBuffer($util.base64.length(object.eKeytype)), 0); - else if (object.eKeytype.length) - message.eKeytype = object.eKeytype; - if (object.eIdent != null) - if (typeof object.eIdent === "string") - $util.base64.decode(object.eIdent, message.eIdent = $util.newBuffer($util.base64.length(object.eIdent)), 0); - else if (object.eIdent.length) - message.eIdent = object.eIdent; - if (object.eSkeyId != null) - if (typeof object.eSkeyId === "string") - $util.base64.decode(object.eSkeyId, message.eSkeyId = $util.newBuffer($util.base64.length(object.eSkeyId)), 0); - else if (object.eSkeyId.length) - message.eSkeyId = object.eSkeyId; - if (object.eSkeyVal != null) - if (typeof object.eSkeyVal === "string") - $util.base64.decode(object.eSkeyVal, message.eSkeyVal = $util.newBuffer($util.base64.length(object.eSkeyVal)), 0); - else if (object.eSkeyVal.length) - message.eSkeyVal = object.eSkeyVal; - if (object.eSkeySig != null) - if (typeof object.eSkeySig === "string") - $util.base64.decode(object.eSkeySig, message.eSkeySig = $util.newBuffer($util.base64.length(object.eSkeySig)), 0); - else if (object.eSkeySig.length) - message.eSkeySig = object.eSkeySig; - if (object.buildHash != null) - if (typeof object.buildHash === "string") - $util.base64.decode(object.buildHash, message.buildHash = $util.newBuffer($util.base64.length(object.buildHash)), 0); - else if (object.buildHash.length) - message.buildHash = object.buildHash; - if (object.deviceProps != null) - if (typeof object.deviceProps === "string") - $util.base64.decode(object.deviceProps, message.deviceProps = $util.newBuffer($util.base64.length(object.deviceProps)), 0); - else if (object.deviceProps.length) - message.deviceProps = object.deviceProps; + var message = new $root.proto.ContextInfo.BusinessMessageForwardInfo(); + if (object.businessOwnerJid != null) + message.businessOwnerJid = String(object.businessOwnerJid); return message; }; /** - * Creates a plain object from a DevicePairingRegistrationData message. Also converts values to other types if specified. + * Creates a plain object from a BusinessMessageForwardInfo message. Also converts values to other types if specified. * @function toObject - * @memberof proto.ClientPayload.DevicePairingRegistrationData + * @memberof proto.ContextInfo.BusinessMessageForwardInfo * @static - * @param {proto.ClientPayload.DevicePairingRegistrationData} message DevicePairingRegistrationData + * @param {proto.ContextInfo.BusinessMessageForwardInfo} message BusinessMessageForwardInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DevicePairingRegistrationData.toObject = function toObject(message, options) { + BusinessMessageForwardInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.eRegid = ""; - else { - object.eRegid = []; - if (options.bytes !== Array) - object.eRegid = $util.newBuffer(object.eRegid); - } - if (options.bytes === String) - object.eKeytype = ""; - else { - object.eKeytype = []; - if (options.bytes !== Array) - object.eKeytype = $util.newBuffer(object.eKeytype); - } - if (options.bytes === String) - object.eIdent = ""; - else { - object.eIdent = []; - if (options.bytes !== Array) - object.eIdent = $util.newBuffer(object.eIdent); - } - if (options.bytes === String) - object.eSkeyId = ""; - else { - object.eSkeyId = []; - if (options.bytes !== Array) - object.eSkeyId = $util.newBuffer(object.eSkeyId); - } - if (options.bytes === String) - object.eSkeyVal = ""; - else { - object.eSkeyVal = []; - if (options.bytes !== Array) - object.eSkeyVal = $util.newBuffer(object.eSkeyVal); - } - if (options.bytes === String) - object.eSkeySig = ""; - else { - object.eSkeySig = []; - if (options.bytes !== Array) - object.eSkeySig = $util.newBuffer(object.eSkeySig); - } - if (options.bytes === String) - object.buildHash = ""; - else { - object.buildHash = []; - if (options.bytes !== Array) - object.buildHash = $util.newBuffer(object.buildHash); - } - if (options.bytes === String) - object.deviceProps = ""; - else { - object.deviceProps = []; - if (options.bytes !== Array) - object.deviceProps = $util.newBuffer(object.deviceProps); - } - } - if (message.eRegid != null && message.hasOwnProperty("eRegid")) - object.eRegid = options.bytes === String ? $util.base64.encode(message.eRegid, 0, message.eRegid.length) : options.bytes === Array ? Array.prototype.slice.call(message.eRegid) : message.eRegid; - if (message.eKeytype != null && message.hasOwnProperty("eKeytype")) - object.eKeytype = options.bytes === String ? $util.base64.encode(message.eKeytype, 0, message.eKeytype.length) : options.bytes === Array ? Array.prototype.slice.call(message.eKeytype) : message.eKeytype; - if (message.eIdent != null && message.hasOwnProperty("eIdent")) - object.eIdent = options.bytes === String ? $util.base64.encode(message.eIdent, 0, message.eIdent.length) : options.bytes === Array ? Array.prototype.slice.call(message.eIdent) : message.eIdent; - if (message.eSkeyId != null && message.hasOwnProperty("eSkeyId")) - object.eSkeyId = options.bytes === String ? $util.base64.encode(message.eSkeyId, 0, message.eSkeyId.length) : options.bytes === Array ? Array.prototype.slice.call(message.eSkeyId) : message.eSkeyId; - if (message.eSkeyVal != null && message.hasOwnProperty("eSkeyVal")) - object.eSkeyVal = options.bytes === String ? $util.base64.encode(message.eSkeyVal, 0, message.eSkeyVal.length) : options.bytes === Array ? Array.prototype.slice.call(message.eSkeyVal) : message.eSkeyVal; - if (message.eSkeySig != null && message.hasOwnProperty("eSkeySig")) - object.eSkeySig = options.bytes === String ? $util.base64.encode(message.eSkeySig, 0, message.eSkeySig.length) : options.bytes === Array ? Array.prototype.slice.call(message.eSkeySig) : message.eSkeySig; - if (message.buildHash != null && message.hasOwnProperty("buildHash")) - object.buildHash = options.bytes === String ? $util.base64.encode(message.buildHash, 0, message.buildHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.buildHash) : message.buildHash; - if (message.deviceProps != null && message.hasOwnProperty("deviceProps")) - object.deviceProps = options.bytes === String ? $util.base64.encode(message.deviceProps, 0, message.deviceProps.length) : options.bytes === Array ? Array.prototype.slice.call(message.deviceProps) : message.deviceProps; + if (options.defaults) + object.businessOwnerJid = ""; + if (message.businessOwnerJid != null && message.hasOwnProperty("businessOwnerJid")) + object.businessOwnerJid = message.businessOwnerJid; return object; }; /** - * Converts this DevicePairingRegistrationData to JSON. + * Converts this BusinessMessageForwardInfo to JSON. * @function toJSON - * @memberof proto.ClientPayload.DevicePairingRegistrationData + * @memberof proto.ContextInfo.BusinessMessageForwardInfo * @instance * @returns {Object.} JSON object */ - DevicePairingRegistrationData.prototype.toJSON = function toJSON() { + BusinessMessageForwardInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DevicePairingRegistrationData; - })(); - - /** - * IOSAppExtension enum. - * @name proto.ClientPayload.IOSAppExtension - * @enum {number} - * @property {number} SHARE_EXTENSION=0 SHARE_EXTENSION value - * @property {number} SERVICE_EXTENSION=1 SERVICE_EXTENSION value - * @property {number} INTENTS_EXTENSION=2 INTENTS_EXTENSION value - */ - ClientPayload.IOSAppExtension = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SHARE_EXTENSION"] = 0; - values[valuesById[1] = "SERVICE_EXTENSION"] = 1; - values[valuesById[2] = "INTENTS_EXTENSION"] = 2; - return values; + return BusinessMessageForwardInfo; })(); - ClientPayload.InteropData = (function() { + ContextInfo.DataSharingContext = (function() { /** - * Properties of an InteropData. - * @memberof proto.ClientPayload - * @interface IInteropData - * @property {number|Long|null} [accountId] InteropData accountId - * @property {number|null} [integratorId] InteropData integratorId - * @property {Uint8Array|null} [token] InteropData token + * Properties of a DataSharingContext. + * @memberof proto.ContextInfo + * @interface IDataSharingContext + * @property {boolean|null} [showMmDisclosure] DataSharingContext showMmDisclosure */ /** - * Constructs a new InteropData. - * @memberof proto.ClientPayload - * @classdesc Represents an InteropData. - * @implements IInteropData + * Constructs a new DataSharingContext. + * @memberof proto.ContextInfo + * @classdesc Represents a DataSharingContext. + * @implements IDataSharingContext * @constructor - * @param {proto.ClientPayload.IInteropData=} [properties] Properties to set + * @param {proto.ContextInfo.IDataSharingContext=} [properties] Properties to set */ - function InteropData(properties) { + function DataSharingContext(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7315,101 +12968,75 @@ $root.proto = (function() { } /** - * InteropData accountId. - * @member {number|Long} accountId - * @memberof proto.ClientPayload.InteropData - * @instance - */ - InteropData.prototype.accountId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * InteropData integratorId. - * @member {number} integratorId - * @memberof proto.ClientPayload.InteropData - * @instance - */ - InteropData.prototype.integratorId = 0; - - /** - * InteropData token. - * @member {Uint8Array} token - * @memberof proto.ClientPayload.InteropData + * DataSharingContext showMmDisclosure. + * @member {boolean} showMmDisclosure + * @memberof proto.ContextInfo.DataSharingContext * @instance */ - InteropData.prototype.token = $util.newBuffer([]); + DataSharingContext.prototype.showMmDisclosure = false; /** - * Creates a new InteropData instance using the specified properties. + * Creates a new DataSharingContext instance using the specified properties. * @function create - * @memberof proto.ClientPayload.InteropData + * @memberof proto.ContextInfo.DataSharingContext * @static - * @param {proto.ClientPayload.IInteropData=} [properties] Properties to set - * @returns {proto.ClientPayload.InteropData} InteropData instance + * @param {proto.ContextInfo.IDataSharingContext=} [properties] Properties to set + * @returns {proto.ContextInfo.DataSharingContext} DataSharingContext instance */ - InteropData.create = function create(properties) { - return new InteropData(properties); + DataSharingContext.create = function create(properties) { + return new DataSharingContext(properties); }; /** - * Encodes the specified InteropData message. Does not implicitly {@link proto.ClientPayload.InteropData.verify|verify} messages. + * Encodes the specified DataSharingContext message. Does not implicitly {@link proto.ContextInfo.DataSharingContext.verify|verify} messages. * @function encode - * @memberof proto.ClientPayload.InteropData + * @memberof proto.ContextInfo.DataSharingContext * @static - * @param {proto.ClientPayload.IInteropData} message InteropData message or plain object to encode + * @param {proto.ContextInfo.IDataSharingContext} message DataSharingContext message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - InteropData.encode = function encode(message, writer) { + DataSharingContext.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.accountId != null && Object.hasOwnProperty.call(message, "accountId")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.accountId); - if (message.integratorId != null && Object.hasOwnProperty.call(message, "integratorId")) - writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.integratorId); - if (message.token != null && Object.hasOwnProperty.call(message, "token")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.token); + if (message.showMmDisclosure != null && Object.hasOwnProperty.call(message, "showMmDisclosure")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.showMmDisclosure); return writer; }; /** - * Encodes the specified InteropData message, length delimited. Does not implicitly {@link proto.ClientPayload.InteropData.verify|verify} messages. + * Encodes the specified DataSharingContext message, length delimited. Does not implicitly {@link proto.ContextInfo.DataSharingContext.verify|verify} messages. * @function encodeDelimited - * @memberof proto.ClientPayload.InteropData + * @memberof proto.ContextInfo.DataSharingContext * @static - * @param {proto.ClientPayload.IInteropData} message InteropData message or plain object to encode + * @param {proto.ContextInfo.IDataSharingContext} message DataSharingContext message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - InteropData.encodeDelimited = function encodeDelimited(message, writer) { + DataSharingContext.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an InteropData message from the specified reader or buffer. + * Decodes a DataSharingContext message from the specified reader or buffer. * @function decode - * @memberof proto.ClientPayload.InteropData + * @memberof proto.ContextInfo.DataSharingContext * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {proto.ClientPayload.InteropData} InteropData + * @returns {proto.ContextInfo.DataSharingContext} DataSharingContext * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - InteropData.decode = function decode(reader, length) { + DataSharingContext.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.ClientPayload.InteropData(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.ContextInfo.DataSharingContext(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.accountId = reader.uint64(); - break; - case 2: - message.integratorId = reader.uint32(); - break; - case 3: - message.token = reader.bytes(); + message.showMmDisclosure = reader.bool(); break; default: reader.skipType(tag & 7); @@ -7420,177 +13047,120 @@ $root.proto = (function() { }; /** - * Decodes an InteropData message from the specified reader or buffer, length delimited. + * Decodes a DataSharingContext message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof proto.ClientPayload.InteropData + * @memberof proto.ContextInfo.DataSharingContext * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.ClientPayload.InteropData} InteropData + * @returns {proto.ContextInfo.DataSharingContext} DataSharingContext * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - InteropData.decodeDelimited = function decodeDelimited(reader) { + DataSharingContext.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an InteropData message. + * Verifies a DataSharingContext message. * @function verify - * @memberof proto.ClientPayload.InteropData + * @memberof proto.ContextInfo.DataSharingContext * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - InteropData.verify = function verify(message) { + DataSharingContext.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.accountId != null && message.hasOwnProperty("accountId")) - if (!$util.isInteger(message.accountId) && !(message.accountId && $util.isInteger(message.accountId.low) && $util.isInteger(message.accountId.high))) - return "accountId: integer|Long expected"; - if (message.integratorId != null && message.hasOwnProperty("integratorId")) - if (!$util.isInteger(message.integratorId)) - return "integratorId: integer expected"; - if (message.token != null && message.hasOwnProperty("token")) - if (!(message.token && typeof message.token.length === "number" || $util.isString(message.token))) - return "token: buffer expected"; + if (message.showMmDisclosure != null && message.hasOwnProperty("showMmDisclosure")) + if (typeof message.showMmDisclosure !== "boolean") + return "showMmDisclosure: boolean expected"; return null; }; /** - * Creates an InteropData message from a plain object. Also converts values to their respective internal types. + * Creates a DataSharingContext message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof proto.ClientPayload.InteropData + * @memberof proto.ContextInfo.DataSharingContext * @static * @param {Object.} object Plain object - * @returns {proto.ClientPayload.InteropData} InteropData + * @returns {proto.ContextInfo.DataSharingContext} DataSharingContext */ - InteropData.fromObject = function fromObject(object) { - if (object instanceof $root.proto.ClientPayload.InteropData) + DataSharingContext.fromObject = function fromObject(object) { + if (object instanceof $root.proto.ContextInfo.DataSharingContext) return object; - var message = new $root.proto.ClientPayload.InteropData(); - if (object.accountId != null) - if ($util.Long) - (message.accountId = $util.Long.fromValue(object.accountId)).unsigned = true; - else if (typeof object.accountId === "string") - message.accountId = parseInt(object.accountId, 10); - else if (typeof object.accountId === "number") - message.accountId = object.accountId; - else if (typeof object.accountId === "object") - message.accountId = new $util.LongBits(object.accountId.low >>> 0, object.accountId.high >>> 0).toNumber(true); - if (object.integratorId != null) - message.integratorId = object.integratorId >>> 0; - if (object.token != null) - if (typeof object.token === "string") - $util.base64.decode(object.token, message.token = $util.newBuffer($util.base64.length(object.token)), 0); - else if (object.token.length) - message.token = object.token; + var message = new $root.proto.ContextInfo.DataSharingContext(); + if (object.showMmDisclosure != null) + message.showMmDisclosure = Boolean(object.showMmDisclosure); return message; }; /** - * Creates a plain object from an InteropData message. Also converts values to other types if specified. + * Creates a plain object from a DataSharingContext message. Also converts values to other types if specified. * @function toObject - * @memberof proto.ClientPayload.InteropData + * @memberof proto.ContextInfo.DataSharingContext * @static - * @param {proto.ClientPayload.InteropData} message InteropData + * @param {proto.ContextInfo.DataSharingContext} message DataSharingContext * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - InteropData.toObject = function toObject(message, options) { + DataSharingContext.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.accountId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.accountId = options.longs === String ? "0" : 0; - object.integratorId = 0; - if (options.bytes === String) - object.token = ""; - else { - object.token = []; - if (options.bytes !== Array) - object.token = $util.newBuffer(object.token); - } - } - if (message.accountId != null && message.hasOwnProperty("accountId")) - if (typeof message.accountId === "number") - object.accountId = options.longs === String ? String(message.accountId) : message.accountId; - else - object.accountId = options.longs === String ? $util.Long.prototype.toString.call(message.accountId) : options.longs === Number ? new $util.LongBits(message.accountId.low >>> 0, message.accountId.high >>> 0).toNumber(true) : message.accountId; - if (message.integratorId != null && message.hasOwnProperty("integratorId")) - object.integratorId = message.integratorId; - if (message.token != null && message.hasOwnProperty("token")) - object.token = options.bytes === String ? $util.base64.encode(message.token, 0, message.token.length) : options.bytes === Array ? Array.prototype.slice.call(message.token) : message.token; + if (options.defaults) + object.showMmDisclosure = false; + if (message.showMmDisclosure != null && message.hasOwnProperty("showMmDisclosure")) + object.showMmDisclosure = message.showMmDisclosure; return object; }; /** - * Converts this InteropData to JSON. + * Converts this DataSharingContext to JSON. * @function toJSON - * @memberof proto.ClientPayload.InteropData + * @memberof proto.ContextInfo.DataSharingContext * @instance * @returns {Object.} JSON object */ - InteropData.prototype.toJSON = function toJSON() { + DataSharingContext.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return InteropData; - })(); - - /** - * Product enum. - * @name proto.ClientPayload.Product - * @enum {number} - * @property {number} WHATSAPP=0 WHATSAPP value - * @property {number} MESSENGER=1 MESSENGER value - * @property {number} INTEROP=2 INTEROP value - */ - ClientPayload.Product = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "WHATSAPP"] = 0; - values[valuesById[1] = "MESSENGER"] = 1; - values[valuesById[2] = "INTEROP"] = 2; - return values; + return DataSharingContext; })(); - ClientPayload.UserAgent = (function() { + ContextInfo.ExternalAdReplyInfo = (function() { /** - * Properties of a UserAgent. - * @memberof proto.ClientPayload - * @interface IUserAgent - * @property {proto.ClientPayload.UserAgent.Platform|null} [platform] UserAgent platform - * @property {proto.ClientPayload.UserAgent.IAppVersion|null} [appVersion] UserAgent appVersion - * @property {string|null} [mcc] UserAgent mcc - * @property {string|null} [mnc] UserAgent mnc - * @property {string|null} [osVersion] UserAgent osVersion - * @property {string|null} [manufacturer] UserAgent manufacturer - * @property {string|null} [device] UserAgent device - * @property {string|null} [osBuildNumber] UserAgent osBuildNumber - * @property {string|null} [phoneId] UserAgent phoneId - * @property {proto.ClientPayload.UserAgent.ReleaseChannel|null} [releaseChannel] UserAgent releaseChannel - * @property {string|null} [localeLanguageIso6391] UserAgent localeLanguageIso6391 - * @property {string|null} [localeCountryIso31661Alpha2] UserAgent localeCountryIso31661Alpha2 - * @property {string|null} [deviceBoard] UserAgent deviceBoard - * @property {string|null} [deviceExpId] UserAgent deviceExpId - * @property {proto.ClientPayload.UserAgent.DeviceType|null} [deviceType] UserAgent deviceType + * Properties of an ExternalAdReplyInfo. + * @memberof proto.ContextInfo + * @interface IExternalAdReplyInfo + * @property {string|null} [title] ExternalAdReplyInfo title + * @property {string|null} [body] ExternalAdReplyInfo body + * @property {proto.ContextInfo.ExternalAdReplyInfo.MediaType|null} [mediaType] ExternalAdReplyInfo mediaType + * @property {string|null} [thumbnailUrl] ExternalAdReplyInfo thumbnailUrl + * @property {string|null} [mediaUrl] ExternalAdReplyInfo mediaUrl + * @property {Uint8Array|null} [thumbnail] ExternalAdReplyInfo thumbnail + * @property {string|null} [sourceType] ExternalAdReplyInfo sourceType + * @property {string|null} [sourceId] ExternalAdReplyInfo sourceId + * @property {string|null} [sourceUrl] ExternalAdReplyInfo sourceUrl + * @property {boolean|null} [containsAutoReply] ExternalAdReplyInfo containsAutoReply + * @property {boolean|null} [renderLargerThumbnail] ExternalAdReplyInfo renderLargerThumbnail + * @property {boolean|null} [showAdAttribution] ExternalAdReplyInfo showAdAttribution + * @property {string|null} [ctwaClid] ExternalAdReplyInfo ctwaClid + * @property {string|null} [ref] ExternalAdReplyInfo ref */ /** - * Constructs a new UserAgent. - * @memberof proto.ClientPayload - * @classdesc Represents a UserAgent. - * @implements IUserAgent + * Constructs a new ExternalAdReplyInfo. + * @memberof proto.ContextInfo + * @classdesc Represents an ExternalAdReplyInfo. + * @implements IExternalAdReplyInfo * @constructor - * @param {proto.ClientPayload.IUserAgent=} [properties] Properties to set + * @param {proto.ContextInfo.IExternalAdReplyInfo=} [properties] Properties to set */ - function UserAgent(properties) { + function ExternalAdReplyInfo(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7598,257 +13168,244 @@ $root.proto = (function() { } /** - * UserAgent platform. - * @member {proto.ClientPayload.UserAgent.Platform} platform - * @memberof proto.ClientPayload.UserAgent - * @instance - */ - UserAgent.prototype.platform = 0; - - /** - * UserAgent appVersion. - * @member {proto.ClientPayload.UserAgent.IAppVersion|null|undefined} appVersion - * @memberof proto.ClientPayload.UserAgent + * ExternalAdReplyInfo title. + * @member {string} title + * @memberof proto.ContextInfo.ExternalAdReplyInfo * @instance */ - UserAgent.prototype.appVersion = null; + ExternalAdReplyInfo.prototype.title = ""; /** - * UserAgent mcc. - * @member {string} mcc - * @memberof proto.ClientPayload.UserAgent + * ExternalAdReplyInfo body. + * @member {string} body + * @memberof proto.ContextInfo.ExternalAdReplyInfo * @instance */ - UserAgent.prototype.mcc = ""; + ExternalAdReplyInfo.prototype.body = ""; /** - * UserAgent mnc. - * @member {string} mnc - * @memberof proto.ClientPayload.UserAgent + * ExternalAdReplyInfo mediaType. + * @member {proto.ContextInfo.ExternalAdReplyInfo.MediaType} mediaType + * @memberof proto.ContextInfo.ExternalAdReplyInfo * @instance */ - UserAgent.prototype.mnc = ""; + ExternalAdReplyInfo.prototype.mediaType = 0; /** - * UserAgent osVersion. - * @member {string} osVersion - * @memberof proto.ClientPayload.UserAgent + * ExternalAdReplyInfo thumbnailUrl. + * @member {string} thumbnailUrl + * @memberof proto.ContextInfo.ExternalAdReplyInfo * @instance */ - UserAgent.prototype.osVersion = ""; + ExternalAdReplyInfo.prototype.thumbnailUrl = ""; /** - * UserAgent manufacturer. - * @member {string} manufacturer - * @memberof proto.ClientPayload.UserAgent + * ExternalAdReplyInfo mediaUrl. + * @member {string} mediaUrl + * @memberof proto.ContextInfo.ExternalAdReplyInfo * @instance */ - UserAgent.prototype.manufacturer = ""; + ExternalAdReplyInfo.prototype.mediaUrl = ""; /** - * UserAgent device. - * @member {string} device - * @memberof proto.ClientPayload.UserAgent + * ExternalAdReplyInfo thumbnail. + * @member {Uint8Array} thumbnail + * @memberof proto.ContextInfo.ExternalAdReplyInfo * @instance */ - UserAgent.prototype.device = ""; + ExternalAdReplyInfo.prototype.thumbnail = $util.newBuffer([]); /** - * UserAgent osBuildNumber. - * @member {string} osBuildNumber - * @memberof proto.ClientPayload.UserAgent + * ExternalAdReplyInfo sourceType. + * @member {string} sourceType + * @memberof proto.ContextInfo.ExternalAdReplyInfo * @instance */ - UserAgent.prototype.osBuildNumber = ""; + ExternalAdReplyInfo.prototype.sourceType = ""; /** - * UserAgent phoneId. - * @member {string} phoneId - * @memberof proto.ClientPayload.UserAgent + * ExternalAdReplyInfo sourceId. + * @member {string} sourceId + * @memberof proto.ContextInfo.ExternalAdReplyInfo * @instance */ - UserAgent.prototype.phoneId = ""; + ExternalAdReplyInfo.prototype.sourceId = ""; /** - * UserAgent releaseChannel. - * @member {proto.ClientPayload.UserAgent.ReleaseChannel} releaseChannel - * @memberof proto.ClientPayload.UserAgent + * ExternalAdReplyInfo sourceUrl. + * @member {string} sourceUrl + * @memberof proto.ContextInfo.ExternalAdReplyInfo * @instance */ - UserAgent.prototype.releaseChannel = 0; + ExternalAdReplyInfo.prototype.sourceUrl = ""; /** - * UserAgent localeLanguageIso6391. - * @member {string} localeLanguageIso6391 - * @memberof proto.ClientPayload.UserAgent + * ExternalAdReplyInfo containsAutoReply. + * @member {boolean} containsAutoReply + * @memberof proto.ContextInfo.ExternalAdReplyInfo * @instance */ - UserAgent.prototype.localeLanguageIso6391 = ""; + ExternalAdReplyInfo.prototype.containsAutoReply = false; /** - * UserAgent localeCountryIso31661Alpha2. - * @member {string} localeCountryIso31661Alpha2 - * @memberof proto.ClientPayload.UserAgent + * ExternalAdReplyInfo renderLargerThumbnail. + * @member {boolean} renderLargerThumbnail + * @memberof proto.ContextInfo.ExternalAdReplyInfo * @instance */ - UserAgent.prototype.localeCountryIso31661Alpha2 = ""; + ExternalAdReplyInfo.prototype.renderLargerThumbnail = false; /** - * UserAgent deviceBoard. - * @member {string} deviceBoard - * @memberof proto.ClientPayload.UserAgent + * ExternalAdReplyInfo showAdAttribution. + * @member {boolean} showAdAttribution + * @memberof proto.ContextInfo.ExternalAdReplyInfo * @instance */ - UserAgent.prototype.deviceBoard = ""; - - /** - * UserAgent deviceExpId. - * @member {string} deviceExpId - * @memberof proto.ClientPayload.UserAgent + ExternalAdReplyInfo.prototype.showAdAttribution = false; + + /** + * ExternalAdReplyInfo ctwaClid. + * @member {string} ctwaClid + * @memberof proto.ContextInfo.ExternalAdReplyInfo * @instance */ - UserAgent.prototype.deviceExpId = ""; + ExternalAdReplyInfo.prototype.ctwaClid = ""; /** - * UserAgent deviceType. - * @member {proto.ClientPayload.UserAgent.DeviceType} deviceType - * @memberof proto.ClientPayload.UserAgent + * ExternalAdReplyInfo ref. + * @member {string} ref + * @memberof proto.ContextInfo.ExternalAdReplyInfo * @instance */ - UserAgent.prototype.deviceType = 0; + ExternalAdReplyInfo.prototype.ref = ""; /** - * Creates a new UserAgent instance using the specified properties. + * Creates a new ExternalAdReplyInfo instance using the specified properties. * @function create - * @memberof proto.ClientPayload.UserAgent + * @memberof proto.ContextInfo.ExternalAdReplyInfo * @static - * @param {proto.ClientPayload.IUserAgent=} [properties] Properties to set - * @returns {proto.ClientPayload.UserAgent} UserAgent instance + * @param {proto.ContextInfo.IExternalAdReplyInfo=} [properties] Properties to set + * @returns {proto.ContextInfo.ExternalAdReplyInfo} ExternalAdReplyInfo instance */ - UserAgent.create = function create(properties) { - return new UserAgent(properties); + ExternalAdReplyInfo.create = function create(properties) { + return new ExternalAdReplyInfo(properties); }; /** - * Encodes the specified UserAgent message. Does not implicitly {@link proto.ClientPayload.UserAgent.verify|verify} messages. + * Encodes the specified ExternalAdReplyInfo message. Does not implicitly {@link proto.ContextInfo.ExternalAdReplyInfo.verify|verify} messages. * @function encode - * @memberof proto.ClientPayload.UserAgent + * @memberof proto.ContextInfo.ExternalAdReplyInfo * @static - * @param {proto.ClientPayload.IUserAgent} message UserAgent message or plain object to encode + * @param {proto.ContextInfo.IExternalAdReplyInfo} message ExternalAdReplyInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UserAgent.encode = function encode(message, writer) { + ExternalAdReplyInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.platform != null && Object.hasOwnProperty.call(message, "platform")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.platform); - if (message.appVersion != null && Object.hasOwnProperty.call(message, "appVersion")) - $root.proto.ClientPayload.UserAgent.AppVersion.encode(message.appVersion, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.mcc != null && Object.hasOwnProperty.call(message, "mcc")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.mcc); - if (message.mnc != null && Object.hasOwnProperty.call(message, "mnc")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.mnc); - if (message.osVersion != null && Object.hasOwnProperty.call(message, "osVersion")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.osVersion); - if (message.manufacturer != null && Object.hasOwnProperty.call(message, "manufacturer")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.manufacturer); - if (message.device != null && Object.hasOwnProperty.call(message, "device")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.device); - if (message.osBuildNumber != null && Object.hasOwnProperty.call(message, "osBuildNumber")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.osBuildNumber); - if (message.phoneId != null && Object.hasOwnProperty.call(message, "phoneId")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.phoneId); - if (message.releaseChannel != null && Object.hasOwnProperty.call(message, "releaseChannel")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.releaseChannel); - if (message.localeLanguageIso6391 != null && Object.hasOwnProperty.call(message, "localeLanguageIso6391")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.localeLanguageIso6391); - if (message.localeCountryIso31661Alpha2 != null && Object.hasOwnProperty.call(message, "localeCountryIso31661Alpha2")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.localeCountryIso31661Alpha2); - if (message.deviceBoard != null && Object.hasOwnProperty.call(message, "deviceBoard")) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.deviceBoard); - if (message.deviceExpId != null && Object.hasOwnProperty.call(message, "deviceExpId")) - writer.uint32(/* id 14, wireType 2 =*/114).string(message.deviceExpId); - if (message.deviceType != null && Object.hasOwnProperty.call(message, "deviceType")) - writer.uint32(/* id 15, wireType 0 =*/120).int32(message.deviceType); + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.title); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.body); + if (message.mediaType != null && Object.hasOwnProperty.call(message, "mediaType")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.mediaType); + if (message.thumbnailUrl != null && Object.hasOwnProperty.call(message, "thumbnailUrl")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.thumbnailUrl); + if (message.mediaUrl != null && Object.hasOwnProperty.call(message, "mediaUrl")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.mediaUrl); + if (message.thumbnail != null && Object.hasOwnProperty.call(message, "thumbnail")) + writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.thumbnail); + if (message.sourceType != null && Object.hasOwnProperty.call(message, "sourceType")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.sourceType); + if (message.sourceId != null && Object.hasOwnProperty.call(message, "sourceId")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.sourceId); + if (message.sourceUrl != null && Object.hasOwnProperty.call(message, "sourceUrl")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.sourceUrl); + if (message.containsAutoReply != null && Object.hasOwnProperty.call(message, "containsAutoReply")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.containsAutoReply); + if (message.renderLargerThumbnail != null && Object.hasOwnProperty.call(message, "renderLargerThumbnail")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.renderLargerThumbnail); + if (message.showAdAttribution != null && Object.hasOwnProperty.call(message, "showAdAttribution")) + writer.uint32(/* id 12, wireType 0 =*/96).bool(message.showAdAttribution); + if (message.ctwaClid != null && Object.hasOwnProperty.call(message, "ctwaClid")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.ctwaClid); + if (message.ref != null && Object.hasOwnProperty.call(message, "ref")) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.ref); return writer; }; /** - * Encodes the specified UserAgent message, length delimited. Does not implicitly {@link proto.ClientPayload.UserAgent.verify|verify} messages. + * Encodes the specified ExternalAdReplyInfo message, length delimited. Does not implicitly {@link proto.ContextInfo.ExternalAdReplyInfo.verify|verify} messages. * @function encodeDelimited - * @memberof proto.ClientPayload.UserAgent + * @memberof proto.ContextInfo.ExternalAdReplyInfo * @static - * @param {proto.ClientPayload.IUserAgent} message UserAgent message or plain object to encode + * @param {proto.ContextInfo.IExternalAdReplyInfo} message ExternalAdReplyInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UserAgent.encodeDelimited = function encodeDelimited(message, writer) { + ExternalAdReplyInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a UserAgent message from the specified reader or buffer. + * Decodes an ExternalAdReplyInfo message from the specified reader or buffer. * @function decode - * @memberof proto.ClientPayload.UserAgent + * @memberof proto.ContextInfo.ExternalAdReplyInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {proto.ClientPayload.UserAgent} UserAgent + * @returns {proto.ContextInfo.ExternalAdReplyInfo} ExternalAdReplyInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UserAgent.decode = function decode(reader, length) { + ExternalAdReplyInfo.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.ClientPayload.UserAgent(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.ContextInfo.ExternalAdReplyInfo(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.platform = reader.int32(); + message.title = reader.string(); break; case 2: - message.appVersion = $root.proto.ClientPayload.UserAgent.AppVersion.decode(reader, reader.uint32()); + message.body = reader.string(); break; case 3: - message.mcc = reader.string(); + message.mediaType = reader.int32(); break; case 4: - message.mnc = reader.string(); + message.thumbnailUrl = reader.string(); break; case 5: - message.osVersion = reader.string(); + message.mediaUrl = reader.string(); break; case 6: - message.manufacturer = reader.string(); + message.thumbnail = reader.bytes(); break; case 7: - message.device = reader.string(); + message.sourceType = reader.string(); break; case 8: - message.osBuildNumber = reader.string(); + message.sourceId = reader.string(); break; case 9: - message.phoneId = reader.string(); + message.sourceUrl = reader.string(); break; case 10: - message.releaseChannel = reader.int32(); + message.containsAutoReply = reader.bool(); break; case 11: - message.localeLanguageIso6391 = reader.string(); + message.renderLargerThumbnail = reader.bool(); break; case 12: - message.localeCountryIso31661Alpha2 = reader.string(); + message.showAdAttribution = reader.bool(); break; case 13: - message.deviceBoard = reader.string(); + message.ctwaClid = reader.string(); break; case 14: - message.deviceExpId = reader.string(); - break; - case 15: - message.deviceType = reader.int32(); + message.ref = reader.string(); break; default: reader.skipType(tag & 7); @@ -7859,844 +13416,259 @@ $root.proto = (function() { }; /** - * Decodes a UserAgent message from the specified reader or buffer, length delimited. + * Decodes an ExternalAdReplyInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof proto.ClientPayload.UserAgent + * @memberof proto.ContextInfo.ExternalAdReplyInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.ClientPayload.UserAgent} UserAgent + * @returns {proto.ContextInfo.ExternalAdReplyInfo} ExternalAdReplyInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UserAgent.decodeDelimited = function decodeDelimited(reader) { + ExternalAdReplyInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a UserAgent message. + * Verifies an ExternalAdReplyInfo message. * @function verify - * @memberof proto.ClientPayload.UserAgent + * @memberof proto.ContextInfo.ExternalAdReplyInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UserAgent.verify = function verify(message) { + ExternalAdReplyInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.platform != null && message.hasOwnProperty("platform")) - switch (message.platform) { - default: - return "platform: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - case 15: - case 16: - case 17: - case 18: - case 19: - case 20: - case 21: - case 22: - case 23: - case 24: - case 25: - case 26: - case 27: - case 28: - case 29: - case 30: - case 31: - case 32: - case 33: - break; - } - if (message.appVersion != null && message.hasOwnProperty("appVersion")) { - var error = $root.proto.ClientPayload.UserAgent.AppVersion.verify(message.appVersion); - if (error) - return "appVersion." + error; - } - if (message.mcc != null && message.hasOwnProperty("mcc")) - if (!$util.isString(message.mcc)) - return "mcc: string expected"; - if (message.mnc != null && message.hasOwnProperty("mnc")) - if (!$util.isString(message.mnc)) - return "mnc: string expected"; - if (message.osVersion != null && message.hasOwnProperty("osVersion")) - if (!$util.isString(message.osVersion)) - return "osVersion: string expected"; - if (message.manufacturer != null && message.hasOwnProperty("manufacturer")) - if (!$util.isString(message.manufacturer)) - return "manufacturer: string expected"; - if (message.device != null && message.hasOwnProperty("device")) - if (!$util.isString(message.device)) - return "device: string expected"; - if (message.osBuildNumber != null && message.hasOwnProperty("osBuildNumber")) - if (!$util.isString(message.osBuildNumber)) - return "osBuildNumber: string expected"; - if (message.phoneId != null && message.hasOwnProperty("phoneId")) - if (!$util.isString(message.phoneId)) - return "phoneId: string expected"; - if (message.releaseChannel != null && message.hasOwnProperty("releaseChannel")) - switch (message.releaseChannel) { - default: - return "releaseChannel: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.localeLanguageIso6391 != null && message.hasOwnProperty("localeLanguageIso6391")) - if (!$util.isString(message.localeLanguageIso6391)) - return "localeLanguageIso6391: string expected"; - if (message.localeCountryIso31661Alpha2 != null && message.hasOwnProperty("localeCountryIso31661Alpha2")) - if (!$util.isString(message.localeCountryIso31661Alpha2)) - return "localeCountryIso31661Alpha2: string expected"; - if (message.deviceBoard != null && message.hasOwnProperty("deviceBoard")) - if (!$util.isString(message.deviceBoard)) - return "deviceBoard: string expected"; - if (message.deviceExpId != null && message.hasOwnProperty("deviceExpId")) - if (!$util.isString(message.deviceExpId)) - return "deviceExpId: string expected"; - if (message.deviceType != null && message.hasOwnProperty("deviceType")) - switch (message.deviceType) { + if (message.title != null && message.hasOwnProperty("title")) + if (!$util.isString(message.title)) + return "title: string expected"; + if (message.body != null && message.hasOwnProperty("body")) + if (!$util.isString(message.body)) + return "body: string expected"; + if (message.mediaType != null && message.hasOwnProperty("mediaType")) + switch (message.mediaType) { default: - return "deviceType: enum value expected"; + return "mediaType: enum value expected"; case 0: case 1: case 2: - case 3: - case 4: break; } + if (message.thumbnailUrl != null && message.hasOwnProperty("thumbnailUrl")) + if (!$util.isString(message.thumbnailUrl)) + return "thumbnailUrl: string expected"; + if (message.mediaUrl != null && message.hasOwnProperty("mediaUrl")) + if (!$util.isString(message.mediaUrl)) + return "mediaUrl: string expected"; + if (message.thumbnail != null && message.hasOwnProperty("thumbnail")) + if (!(message.thumbnail && typeof message.thumbnail.length === "number" || $util.isString(message.thumbnail))) + return "thumbnail: buffer expected"; + if (message.sourceType != null && message.hasOwnProperty("sourceType")) + if (!$util.isString(message.sourceType)) + return "sourceType: string expected"; + if (message.sourceId != null && message.hasOwnProperty("sourceId")) + if (!$util.isString(message.sourceId)) + return "sourceId: string expected"; + if (message.sourceUrl != null && message.hasOwnProperty("sourceUrl")) + if (!$util.isString(message.sourceUrl)) + return "sourceUrl: string expected"; + if (message.containsAutoReply != null && message.hasOwnProperty("containsAutoReply")) + if (typeof message.containsAutoReply !== "boolean") + return "containsAutoReply: boolean expected"; + if (message.renderLargerThumbnail != null && message.hasOwnProperty("renderLargerThumbnail")) + if (typeof message.renderLargerThumbnail !== "boolean") + return "renderLargerThumbnail: boolean expected"; + if (message.showAdAttribution != null && message.hasOwnProperty("showAdAttribution")) + if (typeof message.showAdAttribution !== "boolean") + return "showAdAttribution: boolean expected"; + if (message.ctwaClid != null && message.hasOwnProperty("ctwaClid")) + if (!$util.isString(message.ctwaClid)) + return "ctwaClid: string expected"; + if (message.ref != null && message.hasOwnProperty("ref")) + if (!$util.isString(message.ref)) + return "ref: string expected"; return null; }; /** - * Creates a UserAgent message from a plain object. Also converts values to their respective internal types. + * Creates an ExternalAdReplyInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof proto.ClientPayload.UserAgent + * @memberof proto.ContextInfo.ExternalAdReplyInfo * @static * @param {Object.} object Plain object - * @returns {proto.ClientPayload.UserAgent} UserAgent + * @returns {proto.ContextInfo.ExternalAdReplyInfo} ExternalAdReplyInfo */ - UserAgent.fromObject = function fromObject(object) { - if (object instanceof $root.proto.ClientPayload.UserAgent) + ExternalAdReplyInfo.fromObject = function fromObject(object) { + if (object instanceof $root.proto.ContextInfo.ExternalAdReplyInfo) return object; - var message = new $root.proto.ClientPayload.UserAgent(); - switch (object.platform) { - case "ANDROID": - case 0: - message.platform = 0; - break; - case "IOS": - case 1: - message.platform = 1; - break; - case "WINDOWS_PHONE": - case 2: - message.platform = 2; - break; - case "BLACKBERRY": - case 3: - message.platform = 3; - break; - case "BLACKBERRYX": - case 4: - message.platform = 4; - break; - case "S40": - case 5: - message.platform = 5; - break; - case "S60": - case 6: - message.platform = 6; - break; - case "PYTHON_CLIENT": - case 7: - message.platform = 7; - break; - case "TIZEN": - case 8: - message.platform = 8; - break; - case "ENTERPRISE": - case 9: - message.platform = 9; - break; - case "SMB_ANDROID": - case 10: - message.platform = 10; - break; - case "KAIOS": - case 11: - message.platform = 11; - break; - case "SMB_IOS": - case 12: - message.platform = 12; - break; - case "WINDOWS": - case 13: - message.platform = 13; - break; - case "WEB": - case 14: - message.platform = 14; - break; - case "PORTAL": - case 15: - message.platform = 15; - break; - case "GREEN_ANDROID": - case 16: - message.platform = 16; - break; - case "GREEN_IPHONE": - case 17: - message.platform = 17; - break; - case "BLUE_ANDROID": - case 18: - message.platform = 18; - break; - case "BLUE_IPHONE": - case 19: - message.platform = 19; - break; - case "FBLITE_ANDROID": - case 20: - message.platform = 20; - break; - case "MLITE_ANDROID": - case 21: - message.platform = 21; - break; - case "IGLITE_ANDROID": - case 22: - message.platform = 22; - break; - case "PAGE": - case 23: - message.platform = 23; - break; - case "MACOS": - case 24: - message.platform = 24; - break; - case "OCULUS_MSG": - case 25: - message.platform = 25; - break; - case "OCULUS_CALL": - case 26: - message.platform = 26; - break; - case "MILAN": - case 27: - message.platform = 27; - break; - case "CAPI": - case 28: - message.platform = 28; - break; - case "WEAROS": - case 29: - message.platform = 29; - break; - case "ARDEVICE": - case 30: - message.platform = 30; - break; - case "VRDEVICE": - case 31: - message.platform = 31; - break; - case "BLUE_WEB": - case 32: - message.platform = 32; - break; - case "IPAD": - case 33: - message.platform = 33; - break; - } - if (object.appVersion != null) { - if (typeof object.appVersion !== "object") - throw TypeError(".proto.ClientPayload.UserAgent.appVersion: object expected"); - message.appVersion = $root.proto.ClientPayload.UserAgent.AppVersion.fromObject(object.appVersion); - } - if (object.mcc != null) - message.mcc = String(object.mcc); - if (object.mnc != null) - message.mnc = String(object.mnc); - if (object.osVersion != null) - message.osVersion = String(object.osVersion); - if (object.manufacturer != null) - message.manufacturer = String(object.manufacturer); - if (object.device != null) - message.device = String(object.device); - if (object.osBuildNumber != null) - message.osBuildNumber = String(object.osBuildNumber); - if (object.phoneId != null) - message.phoneId = String(object.phoneId); - switch (object.releaseChannel) { - case "RELEASE": - case 0: - message.releaseChannel = 0; - break; - case "BETA": - case 1: - message.releaseChannel = 1; - break; - case "ALPHA": - case 2: - message.releaseChannel = 2; - break; - case "DEBUG": - case 3: - message.releaseChannel = 3; - break; - } - if (object.localeLanguageIso6391 != null) - message.localeLanguageIso6391 = String(object.localeLanguageIso6391); - if (object.localeCountryIso31661Alpha2 != null) - message.localeCountryIso31661Alpha2 = String(object.localeCountryIso31661Alpha2); - if (object.deviceBoard != null) - message.deviceBoard = String(object.deviceBoard); - if (object.deviceExpId != null) - message.deviceExpId = String(object.deviceExpId); - switch (object.deviceType) { - case "PHONE": + var message = new $root.proto.ContextInfo.ExternalAdReplyInfo(); + if (object.title != null) + message.title = String(object.title); + if (object.body != null) + message.body = String(object.body); + switch (object.mediaType) { + case "NONE": case 0: - message.deviceType = 0; + message.mediaType = 0; break; - case "TABLET": + case "IMAGE": case 1: - message.deviceType = 1; + message.mediaType = 1; break; - case "DESKTOP": + case "VIDEO": case 2: - message.deviceType = 2; - break; - case "WEARABLE": - case 3: - message.deviceType = 3; - break; - case "VR": - case 4: - message.deviceType = 4; + message.mediaType = 2; break; } + if (object.thumbnailUrl != null) + message.thumbnailUrl = String(object.thumbnailUrl); + if (object.mediaUrl != null) + message.mediaUrl = String(object.mediaUrl); + if (object.thumbnail != null) + if (typeof object.thumbnail === "string") + $util.base64.decode(object.thumbnail, message.thumbnail = $util.newBuffer($util.base64.length(object.thumbnail)), 0); + else if (object.thumbnail.length) + message.thumbnail = object.thumbnail; + if (object.sourceType != null) + message.sourceType = String(object.sourceType); + if (object.sourceId != null) + message.sourceId = String(object.sourceId); + if (object.sourceUrl != null) + message.sourceUrl = String(object.sourceUrl); + if (object.containsAutoReply != null) + message.containsAutoReply = Boolean(object.containsAutoReply); + if (object.renderLargerThumbnail != null) + message.renderLargerThumbnail = Boolean(object.renderLargerThumbnail); + if (object.showAdAttribution != null) + message.showAdAttribution = Boolean(object.showAdAttribution); + if (object.ctwaClid != null) + message.ctwaClid = String(object.ctwaClid); + if (object.ref != null) + message.ref = String(object.ref); return message; }; /** - * Creates a plain object from a UserAgent message. Also converts values to other types if specified. + * Creates a plain object from an ExternalAdReplyInfo message. Also converts values to other types if specified. * @function toObject - * @memberof proto.ClientPayload.UserAgent + * @memberof proto.ContextInfo.ExternalAdReplyInfo * @static - * @param {proto.ClientPayload.UserAgent} message UserAgent + * @param {proto.ContextInfo.ExternalAdReplyInfo} message ExternalAdReplyInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UserAgent.toObject = function toObject(message, options) { + ExternalAdReplyInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.platform = options.enums === String ? "ANDROID" : 0; - object.appVersion = null; - object.mcc = ""; - object.mnc = ""; - object.osVersion = ""; - object.manufacturer = ""; - object.device = ""; - object.osBuildNumber = ""; - object.phoneId = ""; - object.releaseChannel = options.enums === String ? "RELEASE" : 0; - object.localeLanguageIso6391 = ""; - object.localeCountryIso31661Alpha2 = ""; - object.deviceBoard = ""; - object.deviceExpId = ""; - object.deviceType = options.enums === String ? "PHONE" : 0; + object.title = ""; + object.body = ""; + object.mediaType = options.enums === String ? "NONE" : 0; + object.thumbnailUrl = ""; + object.mediaUrl = ""; + if (options.bytes === String) + object.thumbnail = ""; + else { + object.thumbnail = []; + if (options.bytes !== Array) + object.thumbnail = $util.newBuffer(object.thumbnail); + } + object.sourceType = ""; + object.sourceId = ""; + object.sourceUrl = ""; + object.containsAutoReply = false; + object.renderLargerThumbnail = false; + object.showAdAttribution = false; + object.ctwaClid = ""; + object.ref = ""; } - if (message.platform != null && message.hasOwnProperty("platform")) - object.platform = options.enums === String ? $root.proto.ClientPayload.UserAgent.Platform[message.platform] : message.platform; - if (message.appVersion != null && message.hasOwnProperty("appVersion")) - object.appVersion = $root.proto.ClientPayload.UserAgent.AppVersion.toObject(message.appVersion, options); - if (message.mcc != null && message.hasOwnProperty("mcc")) - object.mcc = message.mcc; - if (message.mnc != null && message.hasOwnProperty("mnc")) - object.mnc = message.mnc; - if (message.osVersion != null && message.hasOwnProperty("osVersion")) - object.osVersion = message.osVersion; - if (message.manufacturer != null && message.hasOwnProperty("manufacturer")) - object.manufacturer = message.manufacturer; - if (message.device != null && message.hasOwnProperty("device")) - object.device = message.device; - if (message.osBuildNumber != null && message.hasOwnProperty("osBuildNumber")) - object.osBuildNumber = message.osBuildNumber; - if (message.phoneId != null && message.hasOwnProperty("phoneId")) - object.phoneId = message.phoneId; - if (message.releaseChannel != null && message.hasOwnProperty("releaseChannel")) - object.releaseChannel = options.enums === String ? $root.proto.ClientPayload.UserAgent.ReleaseChannel[message.releaseChannel] : message.releaseChannel; - if (message.localeLanguageIso6391 != null && message.hasOwnProperty("localeLanguageIso6391")) - object.localeLanguageIso6391 = message.localeLanguageIso6391; - if (message.localeCountryIso31661Alpha2 != null && message.hasOwnProperty("localeCountryIso31661Alpha2")) - object.localeCountryIso31661Alpha2 = message.localeCountryIso31661Alpha2; - if (message.deviceBoard != null && message.hasOwnProperty("deviceBoard")) - object.deviceBoard = message.deviceBoard; - if (message.deviceExpId != null && message.hasOwnProperty("deviceExpId")) - object.deviceExpId = message.deviceExpId; - if (message.deviceType != null && message.hasOwnProperty("deviceType")) - object.deviceType = options.enums === String ? $root.proto.ClientPayload.UserAgent.DeviceType[message.deviceType] : message.deviceType; + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.body != null && message.hasOwnProperty("body")) + object.body = message.body; + if (message.mediaType != null && message.hasOwnProperty("mediaType")) + object.mediaType = options.enums === String ? $root.proto.ContextInfo.ExternalAdReplyInfo.MediaType[message.mediaType] : message.mediaType; + if (message.thumbnailUrl != null && message.hasOwnProperty("thumbnailUrl")) + object.thumbnailUrl = message.thumbnailUrl; + if (message.mediaUrl != null && message.hasOwnProperty("mediaUrl")) + object.mediaUrl = message.mediaUrl; + if (message.thumbnail != null && message.hasOwnProperty("thumbnail")) + object.thumbnail = options.bytes === String ? $util.base64.encode(message.thumbnail, 0, message.thumbnail.length) : options.bytes === Array ? Array.prototype.slice.call(message.thumbnail) : message.thumbnail; + if (message.sourceType != null && message.hasOwnProperty("sourceType")) + object.sourceType = message.sourceType; + if (message.sourceId != null && message.hasOwnProperty("sourceId")) + object.sourceId = message.sourceId; + if (message.sourceUrl != null && message.hasOwnProperty("sourceUrl")) + object.sourceUrl = message.sourceUrl; + if (message.containsAutoReply != null && message.hasOwnProperty("containsAutoReply")) + object.containsAutoReply = message.containsAutoReply; + if (message.renderLargerThumbnail != null && message.hasOwnProperty("renderLargerThumbnail")) + object.renderLargerThumbnail = message.renderLargerThumbnail; + if (message.showAdAttribution != null && message.hasOwnProperty("showAdAttribution")) + object.showAdAttribution = message.showAdAttribution; + if (message.ctwaClid != null && message.hasOwnProperty("ctwaClid")) + object.ctwaClid = message.ctwaClid; + if (message.ref != null && message.hasOwnProperty("ref")) + object.ref = message.ref; return object; - }; - - /** - * Converts this UserAgent to JSON. - * @function toJSON - * @memberof proto.ClientPayload.UserAgent - * @instance - * @returns {Object.} JSON object - */ - UserAgent.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - UserAgent.AppVersion = (function() { - - /** - * Properties of an AppVersion. - * @memberof proto.ClientPayload.UserAgent - * @interface IAppVersion - * @property {number|null} [primary] AppVersion primary - * @property {number|null} [secondary] AppVersion secondary - * @property {number|null} [tertiary] AppVersion tertiary - * @property {number|null} [quaternary] AppVersion quaternary - * @property {number|null} [quinary] AppVersion quinary - */ - - /** - * Constructs a new AppVersion. - * @memberof proto.ClientPayload.UserAgent - * @classdesc Represents an AppVersion. - * @implements IAppVersion - * @constructor - * @param {proto.ClientPayload.UserAgent.IAppVersion=} [properties] Properties to set - */ - function AppVersion(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AppVersion primary. - * @member {number} primary - * @memberof proto.ClientPayload.UserAgent.AppVersion - * @instance - */ - AppVersion.prototype.primary = 0; - - /** - * AppVersion secondary. - * @member {number} secondary - * @memberof proto.ClientPayload.UserAgent.AppVersion - * @instance - */ - AppVersion.prototype.secondary = 0; - - /** - * AppVersion tertiary. - * @member {number} tertiary - * @memberof proto.ClientPayload.UserAgent.AppVersion - * @instance - */ - AppVersion.prototype.tertiary = 0; - - /** - * AppVersion quaternary. - * @member {number} quaternary - * @memberof proto.ClientPayload.UserAgent.AppVersion - * @instance - */ - AppVersion.prototype.quaternary = 0; - - /** - * AppVersion quinary. - * @member {number} quinary - * @memberof proto.ClientPayload.UserAgent.AppVersion - * @instance - */ - AppVersion.prototype.quinary = 0; - - /** - * Creates a new AppVersion instance using the specified properties. - * @function create - * @memberof proto.ClientPayload.UserAgent.AppVersion - * @static - * @param {proto.ClientPayload.UserAgent.IAppVersion=} [properties] Properties to set - * @returns {proto.ClientPayload.UserAgent.AppVersion} AppVersion instance - */ - AppVersion.create = function create(properties) { - return new AppVersion(properties); - }; - - /** - * Encodes the specified AppVersion message. Does not implicitly {@link proto.ClientPayload.UserAgent.AppVersion.verify|verify} messages. - * @function encode - * @memberof proto.ClientPayload.UserAgent.AppVersion - * @static - * @param {proto.ClientPayload.UserAgent.IAppVersion} message AppVersion message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AppVersion.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.primary != null && Object.hasOwnProperty.call(message, "primary")) - writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.primary); - if (message.secondary != null && Object.hasOwnProperty.call(message, "secondary")) - writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.secondary); - if (message.tertiary != null && Object.hasOwnProperty.call(message, "tertiary")) - writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.tertiary); - if (message.quaternary != null && Object.hasOwnProperty.call(message, "quaternary")) - writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.quaternary); - if (message.quinary != null && Object.hasOwnProperty.call(message, "quinary")) - writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.quinary); - return writer; - }; - - /** - * Encodes the specified AppVersion message, length delimited. Does not implicitly {@link proto.ClientPayload.UserAgent.AppVersion.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.ClientPayload.UserAgent.AppVersion - * @static - * @param {proto.ClientPayload.UserAgent.IAppVersion} message AppVersion message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AppVersion.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AppVersion message from the specified reader or buffer. - * @function decode - * @memberof proto.ClientPayload.UserAgent.AppVersion - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.ClientPayload.UserAgent.AppVersion} AppVersion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AppVersion.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.ClientPayload.UserAgent.AppVersion(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.primary = reader.uint32(); - break; - case 2: - message.secondary = reader.uint32(); - break; - case 3: - message.tertiary = reader.uint32(); - break; - case 4: - message.quaternary = reader.uint32(); - break; - case 5: - message.quinary = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AppVersion message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.ClientPayload.UserAgent.AppVersion - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.ClientPayload.UserAgent.AppVersion} AppVersion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AppVersion.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AppVersion message. - * @function verify - * @memberof proto.ClientPayload.UserAgent.AppVersion - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AppVersion.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.primary != null && message.hasOwnProperty("primary")) - if (!$util.isInteger(message.primary)) - return "primary: integer expected"; - if (message.secondary != null && message.hasOwnProperty("secondary")) - if (!$util.isInteger(message.secondary)) - return "secondary: integer expected"; - if (message.tertiary != null && message.hasOwnProperty("tertiary")) - if (!$util.isInteger(message.tertiary)) - return "tertiary: integer expected"; - if (message.quaternary != null && message.hasOwnProperty("quaternary")) - if (!$util.isInteger(message.quaternary)) - return "quaternary: integer expected"; - if (message.quinary != null && message.hasOwnProperty("quinary")) - if (!$util.isInteger(message.quinary)) - return "quinary: integer expected"; - return null; - }; - - /** - * Creates an AppVersion message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.ClientPayload.UserAgent.AppVersion - * @static - * @param {Object.} object Plain object - * @returns {proto.ClientPayload.UserAgent.AppVersion} AppVersion - */ - AppVersion.fromObject = function fromObject(object) { - if (object instanceof $root.proto.ClientPayload.UserAgent.AppVersion) - return object; - var message = new $root.proto.ClientPayload.UserAgent.AppVersion(); - if (object.primary != null) - message.primary = object.primary >>> 0; - if (object.secondary != null) - message.secondary = object.secondary >>> 0; - if (object.tertiary != null) - message.tertiary = object.tertiary >>> 0; - if (object.quaternary != null) - message.quaternary = object.quaternary >>> 0; - if (object.quinary != null) - message.quinary = object.quinary >>> 0; - return message; - }; - - /** - * Creates a plain object from an AppVersion message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.ClientPayload.UserAgent.AppVersion - * @static - * @param {proto.ClientPayload.UserAgent.AppVersion} message AppVersion - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AppVersion.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.primary = 0; - object.secondary = 0; - object.tertiary = 0; - object.quaternary = 0; - object.quinary = 0; - } - if (message.primary != null && message.hasOwnProperty("primary")) - object.primary = message.primary; - if (message.secondary != null && message.hasOwnProperty("secondary")) - object.secondary = message.secondary; - if (message.tertiary != null && message.hasOwnProperty("tertiary")) - object.tertiary = message.tertiary; - if (message.quaternary != null && message.hasOwnProperty("quaternary")) - object.quaternary = message.quaternary; - if (message.quinary != null && message.hasOwnProperty("quinary")) - object.quinary = message.quinary; - return object; - }; - - /** - * Converts this AppVersion to JSON. - * @function toJSON - * @memberof proto.ClientPayload.UserAgent.AppVersion - * @instance - * @returns {Object.} JSON object - */ - AppVersion.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return AppVersion; - })(); - - /** - * DeviceType enum. - * @name proto.ClientPayload.UserAgent.DeviceType - * @enum {number} - * @property {number} PHONE=0 PHONE value - * @property {number} TABLET=1 TABLET value - * @property {number} DESKTOP=2 DESKTOP value - * @property {number} WEARABLE=3 WEARABLE value - * @property {number} VR=4 VR value - */ - UserAgent.DeviceType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PHONE"] = 0; - values[valuesById[1] = "TABLET"] = 1; - values[valuesById[2] = "DESKTOP"] = 2; - values[valuesById[3] = "WEARABLE"] = 3; - values[valuesById[4] = "VR"] = 4; - return values; - })(); - - /** - * Platform enum. - * @name proto.ClientPayload.UserAgent.Platform - * @enum {number} - * @property {number} ANDROID=0 ANDROID value - * @property {number} IOS=1 IOS value - * @property {number} WINDOWS_PHONE=2 WINDOWS_PHONE value - * @property {number} BLACKBERRY=3 BLACKBERRY value - * @property {number} BLACKBERRYX=4 BLACKBERRYX value - * @property {number} S40=5 S40 value - * @property {number} S60=6 S60 value - * @property {number} PYTHON_CLIENT=7 PYTHON_CLIENT value - * @property {number} TIZEN=8 TIZEN value - * @property {number} ENTERPRISE=9 ENTERPRISE value - * @property {number} SMB_ANDROID=10 SMB_ANDROID value - * @property {number} KAIOS=11 KAIOS value - * @property {number} SMB_IOS=12 SMB_IOS value - * @property {number} WINDOWS=13 WINDOWS value - * @property {number} WEB=14 WEB value - * @property {number} PORTAL=15 PORTAL value - * @property {number} GREEN_ANDROID=16 GREEN_ANDROID value - * @property {number} GREEN_IPHONE=17 GREEN_IPHONE value - * @property {number} BLUE_ANDROID=18 BLUE_ANDROID value - * @property {number} BLUE_IPHONE=19 BLUE_IPHONE value - * @property {number} FBLITE_ANDROID=20 FBLITE_ANDROID value - * @property {number} MLITE_ANDROID=21 MLITE_ANDROID value - * @property {number} IGLITE_ANDROID=22 IGLITE_ANDROID value - * @property {number} PAGE=23 PAGE value - * @property {number} MACOS=24 MACOS value - * @property {number} OCULUS_MSG=25 OCULUS_MSG value - * @property {number} OCULUS_CALL=26 OCULUS_CALL value - * @property {number} MILAN=27 MILAN value - * @property {number} CAPI=28 CAPI value - * @property {number} WEAROS=29 WEAROS value - * @property {number} ARDEVICE=30 ARDEVICE value - * @property {number} VRDEVICE=31 VRDEVICE value - * @property {number} BLUE_WEB=32 BLUE_WEB value - * @property {number} IPAD=33 IPAD value - */ - UserAgent.Platform = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ANDROID"] = 0; - values[valuesById[1] = "IOS"] = 1; - values[valuesById[2] = "WINDOWS_PHONE"] = 2; - values[valuesById[3] = "BLACKBERRY"] = 3; - values[valuesById[4] = "BLACKBERRYX"] = 4; - values[valuesById[5] = "S40"] = 5; - values[valuesById[6] = "S60"] = 6; - values[valuesById[7] = "PYTHON_CLIENT"] = 7; - values[valuesById[8] = "TIZEN"] = 8; - values[valuesById[9] = "ENTERPRISE"] = 9; - values[valuesById[10] = "SMB_ANDROID"] = 10; - values[valuesById[11] = "KAIOS"] = 11; - values[valuesById[12] = "SMB_IOS"] = 12; - values[valuesById[13] = "WINDOWS"] = 13; - values[valuesById[14] = "WEB"] = 14; - values[valuesById[15] = "PORTAL"] = 15; - values[valuesById[16] = "GREEN_ANDROID"] = 16; - values[valuesById[17] = "GREEN_IPHONE"] = 17; - values[valuesById[18] = "BLUE_ANDROID"] = 18; - values[valuesById[19] = "BLUE_IPHONE"] = 19; - values[valuesById[20] = "FBLITE_ANDROID"] = 20; - values[valuesById[21] = "MLITE_ANDROID"] = 21; - values[valuesById[22] = "IGLITE_ANDROID"] = 22; - values[valuesById[23] = "PAGE"] = 23; - values[valuesById[24] = "MACOS"] = 24; - values[valuesById[25] = "OCULUS_MSG"] = 25; - values[valuesById[26] = "OCULUS_CALL"] = 26; - values[valuesById[27] = "MILAN"] = 27; - values[valuesById[28] = "CAPI"] = 28; - values[valuesById[29] = "WEAROS"] = 29; - values[valuesById[30] = "ARDEVICE"] = 30; - values[valuesById[31] = "VRDEVICE"] = 31; - values[valuesById[32] = "BLUE_WEB"] = 32; - values[valuesById[33] = "IPAD"] = 33; - return values; - })(); + }; /** - * ReleaseChannel enum. - * @name proto.ClientPayload.UserAgent.ReleaseChannel + * Converts this ExternalAdReplyInfo to JSON. + * @function toJSON + * @memberof proto.ContextInfo.ExternalAdReplyInfo + * @instance + * @returns {Object.} JSON object + */ + ExternalAdReplyInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * MediaType enum. + * @name proto.ContextInfo.ExternalAdReplyInfo.MediaType * @enum {number} - * @property {number} RELEASE=0 RELEASE value - * @property {number} BETA=1 BETA value - * @property {number} ALPHA=2 ALPHA value - * @property {number} DEBUG=3 DEBUG value + * @property {number} NONE=0 NONE value + * @property {number} IMAGE=1 IMAGE value + * @property {number} VIDEO=2 VIDEO value */ - UserAgent.ReleaseChannel = (function() { + ExternalAdReplyInfo.MediaType = (function() { var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RELEASE"] = 0; - values[valuesById[1] = "BETA"] = 1; - values[valuesById[2] = "ALPHA"] = 2; - values[valuesById[3] = "DEBUG"] = 3; + values[valuesById[0] = "NONE"] = 0; + values[valuesById[1] = "IMAGE"] = 1; + values[valuesById[2] = "VIDEO"] = 2; return values; })(); - return UserAgent; + return ExternalAdReplyInfo; })(); - ClientPayload.WebInfo = (function() { + ContextInfo.ForwardedNewsletterMessageInfo = (function() { /** - * Properties of a WebInfo. - * @memberof proto.ClientPayload - * @interface IWebInfo - * @property {string|null} [refToken] WebInfo refToken - * @property {string|null} [version] WebInfo version - * @property {proto.ClientPayload.WebInfo.IWebdPayload|null} [webdPayload] WebInfo webdPayload - * @property {proto.ClientPayload.WebInfo.WebSubPlatform|null} [webSubPlatform] WebInfo webSubPlatform + * Properties of a ForwardedNewsletterMessageInfo. + * @memberof proto.ContextInfo + * @interface IForwardedNewsletterMessageInfo + * @property {string|null} [newsletterJid] ForwardedNewsletterMessageInfo newsletterJid + * @property {number|null} [serverMessageId] ForwardedNewsletterMessageInfo serverMessageId + * @property {string|null} [newsletterName] ForwardedNewsletterMessageInfo newsletterName + * @property {proto.ContextInfo.ForwardedNewsletterMessageInfo.ContentType|null} [contentType] ForwardedNewsletterMessageInfo contentType + * @property {string|null} [accessibilityText] ForwardedNewsletterMessageInfo accessibilityText */ /** - * Constructs a new WebInfo. - * @memberof proto.ClientPayload - * @classdesc Represents a WebInfo. - * @implements IWebInfo + * Constructs a new ForwardedNewsletterMessageInfo. + * @memberof proto.ContextInfo + * @classdesc Represents a ForwardedNewsletterMessageInfo. + * @implements IForwardedNewsletterMessageInfo * @constructor - * @param {proto.ClientPayload.IWebInfo=} [properties] Properties to set + * @param {proto.ContextInfo.IForwardedNewsletterMessageInfo=} [properties] Properties to set */ - function WebInfo(properties) { + function ForwardedNewsletterMessageInfo(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8704,114 +13676,127 @@ $root.proto = (function() { } /** - * WebInfo refToken. - * @member {string} refToken - * @memberof proto.ClientPayload.WebInfo + * ForwardedNewsletterMessageInfo newsletterJid. + * @member {string} newsletterJid + * @memberof proto.ContextInfo.ForwardedNewsletterMessageInfo * @instance */ - WebInfo.prototype.refToken = ""; + ForwardedNewsletterMessageInfo.prototype.newsletterJid = ""; /** - * WebInfo version. - * @member {string} version - * @memberof proto.ClientPayload.WebInfo + * ForwardedNewsletterMessageInfo serverMessageId. + * @member {number} serverMessageId + * @memberof proto.ContextInfo.ForwardedNewsletterMessageInfo * @instance */ - WebInfo.prototype.version = ""; + ForwardedNewsletterMessageInfo.prototype.serverMessageId = 0; /** - * WebInfo webdPayload. - * @member {proto.ClientPayload.WebInfo.IWebdPayload|null|undefined} webdPayload - * @memberof proto.ClientPayload.WebInfo + * ForwardedNewsletterMessageInfo newsletterName. + * @member {string} newsletterName + * @memberof proto.ContextInfo.ForwardedNewsletterMessageInfo * @instance */ - WebInfo.prototype.webdPayload = null; + ForwardedNewsletterMessageInfo.prototype.newsletterName = ""; /** - * WebInfo webSubPlatform. - * @member {proto.ClientPayload.WebInfo.WebSubPlatform} webSubPlatform - * @memberof proto.ClientPayload.WebInfo + * ForwardedNewsletterMessageInfo contentType. + * @member {proto.ContextInfo.ForwardedNewsletterMessageInfo.ContentType} contentType + * @memberof proto.ContextInfo.ForwardedNewsletterMessageInfo * @instance */ - WebInfo.prototype.webSubPlatform = 0; + ForwardedNewsletterMessageInfo.prototype.contentType = 1; /** - * Creates a new WebInfo instance using the specified properties. + * ForwardedNewsletterMessageInfo accessibilityText. + * @member {string} accessibilityText + * @memberof proto.ContextInfo.ForwardedNewsletterMessageInfo + * @instance + */ + ForwardedNewsletterMessageInfo.prototype.accessibilityText = ""; + + /** + * Creates a new ForwardedNewsletterMessageInfo instance using the specified properties. * @function create - * @memberof proto.ClientPayload.WebInfo + * @memberof proto.ContextInfo.ForwardedNewsletterMessageInfo * @static - * @param {proto.ClientPayload.IWebInfo=} [properties] Properties to set - * @returns {proto.ClientPayload.WebInfo} WebInfo instance + * @param {proto.ContextInfo.IForwardedNewsletterMessageInfo=} [properties] Properties to set + * @returns {proto.ContextInfo.ForwardedNewsletterMessageInfo} ForwardedNewsletterMessageInfo instance */ - WebInfo.create = function create(properties) { - return new WebInfo(properties); + ForwardedNewsletterMessageInfo.create = function create(properties) { + return new ForwardedNewsletterMessageInfo(properties); }; /** - * Encodes the specified WebInfo message. Does not implicitly {@link proto.ClientPayload.WebInfo.verify|verify} messages. + * Encodes the specified ForwardedNewsletterMessageInfo message. Does not implicitly {@link proto.ContextInfo.ForwardedNewsletterMessageInfo.verify|verify} messages. * @function encode - * @memberof proto.ClientPayload.WebInfo + * @memberof proto.ContextInfo.ForwardedNewsletterMessageInfo * @static - * @param {proto.ClientPayload.IWebInfo} message WebInfo message or plain object to encode + * @param {proto.ContextInfo.IForwardedNewsletterMessageInfo} message ForwardedNewsletterMessageInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WebInfo.encode = function encode(message, writer) { + ForwardedNewsletterMessageInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.refToken != null && Object.hasOwnProperty.call(message, "refToken")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.refToken); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.version); - if (message.webdPayload != null && Object.hasOwnProperty.call(message, "webdPayload")) - $root.proto.ClientPayload.WebInfo.WebdPayload.encode(message.webdPayload, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.webSubPlatform != null && Object.hasOwnProperty.call(message, "webSubPlatform")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.webSubPlatform); + if (message.newsletterJid != null && Object.hasOwnProperty.call(message, "newsletterJid")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.newsletterJid); + if (message.serverMessageId != null && Object.hasOwnProperty.call(message, "serverMessageId")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.serverMessageId); + if (message.newsletterName != null && Object.hasOwnProperty.call(message, "newsletterName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.newsletterName); + if (message.contentType != null && Object.hasOwnProperty.call(message, "contentType")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.contentType); + if (message.accessibilityText != null && Object.hasOwnProperty.call(message, "accessibilityText")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.accessibilityText); return writer; }; /** - * Encodes the specified WebInfo message, length delimited. Does not implicitly {@link proto.ClientPayload.WebInfo.verify|verify} messages. + * Encodes the specified ForwardedNewsletterMessageInfo message, length delimited. Does not implicitly {@link proto.ContextInfo.ForwardedNewsletterMessageInfo.verify|verify} messages. * @function encodeDelimited - * @memberof proto.ClientPayload.WebInfo + * @memberof proto.ContextInfo.ForwardedNewsletterMessageInfo * @static - * @param {proto.ClientPayload.IWebInfo} message WebInfo message or plain object to encode + * @param {proto.ContextInfo.IForwardedNewsletterMessageInfo} message ForwardedNewsletterMessageInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WebInfo.encodeDelimited = function encodeDelimited(message, writer) { + ForwardedNewsletterMessageInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a WebInfo message from the specified reader or buffer. + * Decodes a ForwardedNewsletterMessageInfo message from the specified reader or buffer. * @function decode - * @memberof proto.ClientPayload.WebInfo + * @memberof proto.ContextInfo.ForwardedNewsletterMessageInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {proto.ClientPayload.WebInfo} WebInfo + * @returns {proto.ContextInfo.ForwardedNewsletterMessageInfo} ForwardedNewsletterMessageInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - WebInfo.decode = function decode(reader, length) { + ForwardedNewsletterMessageInfo.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.ClientPayload.WebInfo(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.ContextInfo.ForwardedNewsletterMessageInfo(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.refToken = reader.string(); + message.newsletterJid = reader.string(); break; case 2: - message.version = reader.string(); + message.serverMessageId = reader.int32(); break; case 3: - message.webdPayload = $root.proto.ClientPayload.WebInfo.WebdPayload.decode(reader, reader.uint32()); + message.newsletterName = reader.string(); break; case 4: - message.webSubPlatform = reader.int32(); + message.contentType = reader.int32(); + break; + case 5: + message.accessibilityText = reader.string(); break; default: reader.skipType(tag & 7); @@ -8822,1307 +13807,1334 @@ $root.proto = (function() { }; /** - * Decodes a WebInfo message from the specified reader or buffer, length delimited. + * Decodes a ForwardedNewsletterMessageInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof proto.ClientPayload.WebInfo + * @memberof proto.ContextInfo.ForwardedNewsletterMessageInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.ClientPayload.WebInfo} WebInfo + * @returns {proto.ContextInfo.ForwardedNewsletterMessageInfo} ForwardedNewsletterMessageInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - WebInfo.decodeDelimited = function decodeDelimited(reader) { + ForwardedNewsletterMessageInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a WebInfo message. + * Verifies a ForwardedNewsletterMessageInfo message. * @function verify - * @memberof proto.ClientPayload.WebInfo + * @memberof proto.ContextInfo.ForwardedNewsletterMessageInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - WebInfo.verify = function verify(message) { + ForwardedNewsletterMessageInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.refToken != null && message.hasOwnProperty("refToken")) - if (!$util.isString(message.refToken)) - return "refToken: string expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: string expected"; - if (message.webdPayload != null && message.hasOwnProperty("webdPayload")) { - var error = $root.proto.ClientPayload.WebInfo.WebdPayload.verify(message.webdPayload); - if (error) - return "webdPayload." + error; - } - if (message.webSubPlatform != null && message.hasOwnProperty("webSubPlatform")) - switch (message.webSubPlatform) { + if (message.newsletterJid != null && message.hasOwnProperty("newsletterJid")) + if (!$util.isString(message.newsletterJid)) + return "newsletterJid: string expected"; + if (message.serverMessageId != null && message.hasOwnProperty("serverMessageId")) + if (!$util.isInteger(message.serverMessageId)) + return "serverMessageId: integer expected"; + if (message.newsletterName != null && message.hasOwnProperty("newsletterName")) + if (!$util.isString(message.newsletterName)) + return "newsletterName: string expected"; + if (message.contentType != null && message.hasOwnProperty("contentType")) + switch (message.contentType) { default: - return "webSubPlatform: enum value expected"; - case 0: + return "contentType: enum value expected"; case 1: case 2: case 3: - case 4: break; } + if (message.accessibilityText != null && message.hasOwnProperty("accessibilityText")) + if (!$util.isString(message.accessibilityText)) + return "accessibilityText: string expected"; return null; }; /** - * Creates a WebInfo message from a plain object. Also converts values to their respective internal types. + * Creates a ForwardedNewsletterMessageInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof proto.ClientPayload.WebInfo + * @memberof proto.ContextInfo.ForwardedNewsletterMessageInfo * @static * @param {Object.} object Plain object - * @returns {proto.ClientPayload.WebInfo} WebInfo + * @returns {proto.ContextInfo.ForwardedNewsletterMessageInfo} ForwardedNewsletterMessageInfo */ - WebInfo.fromObject = function fromObject(object) { - if (object instanceof $root.proto.ClientPayload.WebInfo) + ForwardedNewsletterMessageInfo.fromObject = function fromObject(object) { + if (object instanceof $root.proto.ContextInfo.ForwardedNewsletterMessageInfo) return object; - var message = new $root.proto.ClientPayload.WebInfo(); - if (object.refToken != null) - message.refToken = String(object.refToken); - if (object.version != null) - message.version = String(object.version); - if (object.webdPayload != null) { - if (typeof object.webdPayload !== "object") - throw TypeError(".proto.ClientPayload.WebInfo.webdPayload: object expected"); - message.webdPayload = $root.proto.ClientPayload.WebInfo.WebdPayload.fromObject(object.webdPayload); - } - switch (object.webSubPlatform) { - case "WEB_BROWSER": - case 0: - message.webSubPlatform = 0; - break; - case "APP_STORE": + var message = new $root.proto.ContextInfo.ForwardedNewsletterMessageInfo(); + if (object.newsletterJid != null) + message.newsletterJid = String(object.newsletterJid); + if (object.serverMessageId != null) + message.serverMessageId = object.serverMessageId | 0; + if (object.newsletterName != null) + message.newsletterName = String(object.newsletterName); + switch (object.contentType) { + case "UPDATE": case 1: - message.webSubPlatform = 1; + message.contentType = 1; break; - case "WIN_STORE": + case "UPDATE_CARD": case 2: - message.webSubPlatform = 2; + message.contentType = 2; break; - case "DARWIN": + case "LINK_CARD": case 3: - message.webSubPlatform = 3; - break; - case "WIN32": - case 4: - message.webSubPlatform = 4; + message.contentType = 3; break; } + if (object.accessibilityText != null) + message.accessibilityText = String(object.accessibilityText); return message; }; /** - * Creates a plain object from a WebInfo message. Also converts values to other types if specified. + * Creates a plain object from a ForwardedNewsletterMessageInfo message. Also converts values to other types if specified. * @function toObject - * @memberof proto.ClientPayload.WebInfo + * @memberof proto.ContextInfo.ForwardedNewsletterMessageInfo * @static - * @param {proto.ClientPayload.WebInfo} message WebInfo + * @param {proto.ContextInfo.ForwardedNewsletterMessageInfo} message ForwardedNewsletterMessageInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - WebInfo.toObject = function toObject(message, options) { + ForwardedNewsletterMessageInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.refToken = ""; - object.version = ""; - object.webdPayload = null; - object.webSubPlatform = options.enums === String ? "WEB_BROWSER" : 0; + object.newsletterJid = ""; + object.serverMessageId = 0; + object.newsletterName = ""; + object.contentType = options.enums === String ? "UPDATE" : 1; + object.accessibilityText = ""; } - if (message.refToken != null && message.hasOwnProperty("refToken")) - object.refToken = message.refToken; - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - if (message.webdPayload != null && message.hasOwnProperty("webdPayload")) - object.webdPayload = $root.proto.ClientPayload.WebInfo.WebdPayload.toObject(message.webdPayload, options); - if (message.webSubPlatform != null && message.hasOwnProperty("webSubPlatform")) - object.webSubPlatform = options.enums === String ? $root.proto.ClientPayload.WebInfo.WebSubPlatform[message.webSubPlatform] : message.webSubPlatform; + if (message.newsletterJid != null && message.hasOwnProperty("newsletterJid")) + object.newsletterJid = message.newsletterJid; + if (message.serverMessageId != null && message.hasOwnProperty("serverMessageId")) + object.serverMessageId = message.serverMessageId; + if (message.newsletterName != null && message.hasOwnProperty("newsletterName")) + object.newsletterName = message.newsletterName; + if (message.contentType != null && message.hasOwnProperty("contentType")) + object.contentType = options.enums === String ? $root.proto.ContextInfo.ForwardedNewsletterMessageInfo.ContentType[message.contentType] : message.contentType; + if (message.accessibilityText != null && message.hasOwnProperty("accessibilityText")) + object.accessibilityText = message.accessibilityText; return object; }; /** - * Converts this WebInfo to JSON. + * Converts this ForwardedNewsletterMessageInfo to JSON. * @function toJSON - * @memberof proto.ClientPayload.WebInfo + * @memberof proto.ContextInfo.ForwardedNewsletterMessageInfo * @instance * @returns {Object.} JSON object */ - WebInfo.prototype.toJSON = function toJSON() { + ForwardedNewsletterMessageInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * WebSubPlatform enum. - * @name proto.ClientPayload.WebInfo.WebSubPlatform + * ContentType enum. + * @name proto.ContextInfo.ForwardedNewsletterMessageInfo.ContentType * @enum {number} - * @property {number} WEB_BROWSER=0 WEB_BROWSER value - * @property {number} APP_STORE=1 APP_STORE value - * @property {number} WIN_STORE=2 WIN_STORE value - * @property {number} DARWIN=3 DARWIN value - * @property {number} WIN32=4 WIN32 value + * @property {number} UPDATE=1 UPDATE value + * @property {number} UPDATE_CARD=2 UPDATE_CARD value + * @property {number} LINK_CARD=3 LINK_CARD value */ - WebInfo.WebSubPlatform = (function() { + ForwardedNewsletterMessageInfo.ContentType = (function() { var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "WEB_BROWSER"] = 0; - values[valuesById[1] = "APP_STORE"] = 1; - values[valuesById[2] = "WIN_STORE"] = 2; - values[valuesById[3] = "DARWIN"] = 3; - values[valuesById[4] = "WIN32"] = 4; + values[valuesById[1] = "UPDATE"] = 1; + values[valuesById[2] = "UPDATE_CARD"] = 2; + values[valuesById[3] = "LINK_CARD"] = 3; return values; })(); - WebInfo.WebdPayload = (function() { + return ForwardedNewsletterMessageInfo; + })(); - /** - * Properties of a WebdPayload. - * @memberof proto.ClientPayload.WebInfo - * @interface IWebdPayload - * @property {boolean|null} [usesParticipantInKey] WebdPayload usesParticipantInKey - * @property {boolean|null} [supportsStarredMessages] WebdPayload supportsStarredMessages - * @property {boolean|null} [supportsDocumentMessages] WebdPayload supportsDocumentMessages - * @property {boolean|null} [supportsUrlMessages] WebdPayload supportsUrlMessages - * @property {boolean|null} [supportsMediaRetry] WebdPayload supportsMediaRetry - * @property {boolean|null} [supportsE2EImage] WebdPayload supportsE2EImage - * @property {boolean|null} [supportsE2EVideo] WebdPayload supportsE2EVideo - * @property {boolean|null} [supportsE2EAudio] WebdPayload supportsE2EAudio - * @property {boolean|null} [supportsE2EDocument] WebdPayload supportsE2EDocument - * @property {string|null} [documentTypes] WebdPayload documentTypes - * @property {Uint8Array|null} [features] WebdPayload features - */ + ContextInfo.UTMInfo = (function() { - /** - * Constructs a new WebdPayload. - * @memberof proto.ClientPayload.WebInfo - * @classdesc Represents a WebdPayload. - * @implements IWebdPayload - * @constructor - * @param {proto.ClientPayload.WebInfo.IWebdPayload=} [properties] Properties to set - */ - function WebdPayload(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of a UTMInfo. + * @memberof proto.ContextInfo + * @interface IUTMInfo + * @property {string|null} [utmSource] UTMInfo utmSource + * @property {string|null} [utmCampaign] UTMInfo utmCampaign + */ - /** - * WebdPayload usesParticipantInKey. - * @member {boolean} usesParticipantInKey - * @memberof proto.ClientPayload.WebInfo.WebdPayload - * @instance - */ - WebdPayload.prototype.usesParticipantInKey = false; + /** + * Constructs a new UTMInfo. + * @memberof proto.ContextInfo + * @classdesc Represents a UTMInfo. + * @implements IUTMInfo + * @constructor + * @param {proto.ContextInfo.IUTMInfo=} [properties] Properties to set + */ + function UTMInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * WebdPayload supportsStarredMessages. - * @member {boolean} supportsStarredMessages - * @memberof proto.ClientPayload.WebInfo.WebdPayload - * @instance - */ - WebdPayload.prototype.supportsStarredMessages = false; + /** + * UTMInfo utmSource. + * @member {string} utmSource + * @memberof proto.ContextInfo.UTMInfo + * @instance + */ + UTMInfo.prototype.utmSource = ""; - /** - * WebdPayload supportsDocumentMessages. - * @member {boolean} supportsDocumentMessages - * @memberof proto.ClientPayload.WebInfo.WebdPayload - * @instance - */ - WebdPayload.prototype.supportsDocumentMessages = false; + /** + * UTMInfo utmCampaign. + * @member {string} utmCampaign + * @memberof proto.ContextInfo.UTMInfo + * @instance + */ + UTMInfo.prototype.utmCampaign = ""; - /** - * WebdPayload supportsUrlMessages. - * @member {boolean} supportsUrlMessages - * @memberof proto.ClientPayload.WebInfo.WebdPayload - * @instance - */ - WebdPayload.prototype.supportsUrlMessages = false; + /** + * Creates a new UTMInfo instance using the specified properties. + * @function create + * @memberof proto.ContextInfo.UTMInfo + * @static + * @param {proto.ContextInfo.IUTMInfo=} [properties] Properties to set + * @returns {proto.ContextInfo.UTMInfo} UTMInfo instance + */ + UTMInfo.create = function create(properties) { + return new UTMInfo(properties); + }; - /** - * WebdPayload supportsMediaRetry. - * @member {boolean} supportsMediaRetry - * @memberof proto.ClientPayload.WebInfo.WebdPayload - * @instance - */ - WebdPayload.prototype.supportsMediaRetry = false; + /** + * Encodes the specified UTMInfo message. Does not implicitly {@link proto.ContextInfo.UTMInfo.verify|verify} messages. + * @function encode + * @memberof proto.ContextInfo.UTMInfo + * @static + * @param {proto.ContextInfo.IUTMInfo} message UTMInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UTMInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.utmSource != null && Object.hasOwnProperty.call(message, "utmSource")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.utmSource); + if (message.utmCampaign != null && Object.hasOwnProperty.call(message, "utmCampaign")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.utmCampaign); + return writer; + }; + + /** + * Encodes the specified UTMInfo message, length delimited. Does not implicitly {@link proto.ContextInfo.UTMInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.ContextInfo.UTMInfo + * @static + * @param {proto.ContextInfo.IUTMInfo} message UTMInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UTMInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UTMInfo message from the specified reader or buffer. + * @function decode + * @memberof proto.ContextInfo.UTMInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.ContextInfo.UTMInfo} UTMInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UTMInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.ContextInfo.UTMInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.utmSource = reader.string(); + break; + case 2: + message.utmCampaign = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UTMInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.ContextInfo.UTMInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.ContextInfo.UTMInfo} UTMInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UTMInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UTMInfo message. + * @function verify + * @memberof proto.ContextInfo.UTMInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UTMInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.utmSource != null && message.hasOwnProperty("utmSource")) + if (!$util.isString(message.utmSource)) + return "utmSource: string expected"; + if (message.utmCampaign != null && message.hasOwnProperty("utmCampaign")) + if (!$util.isString(message.utmCampaign)) + return "utmCampaign: string expected"; + return null; + }; + + /** + * Creates a UTMInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.ContextInfo.UTMInfo + * @static + * @param {Object.} object Plain object + * @returns {proto.ContextInfo.UTMInfo} UTMInfo + */ + UTMInfo.fromObject = function fromObject(object) { + if (object instanceof $root.proto.ContextInfo.UTMInfo) + return object; + var message = new $root.proto.ContextInfo.UTMInfo(); + if (object.utmSource != null) + message.utmSource = String(object.utmSource); + if (object.utmCampaign != null) + message.utmCampaign = String(object.utmCampaign); + return message; + }; + + /** + * Creates a plain object from a UTMInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.ContextInfo.UTMInfo + * @static + * @param {proto.ContextInfo.UTMInfo} message UTMInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UTMInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.utmSource = ""; + object.utmCampaign = ""; + } + if (message.utmSource != null && message.hasOwnProperty("utmSource")) + object.utmSource = message.utmSource; + if (message.utmCampaign != null && message.hasOwnProperty("utmCampaign")) + object.utmCampaign = message.utmCampaign; + return object; + }; - /** - * WebdPayload supportsE2EImage. - * @member {boolean} supportsE2EImage - * @memberof proto.ClientPayload.WebInfo.WebdPayload - * @instance - */ - WebdPayload.prototype.supportsE2EImage = false; + /** + * Converts this UTMInfo to JSON. + * @function toJSON + * @memberof proto.ContextInfo.UTMInfo + * @instance + * @returns {Object.} JSON object + */ + UTMInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * WebdPayload supportsE2EVideo. - * @member {boolean} supportsE2EVideo - * @memberof proto.ClientPayload.WebInfo.WebdPayload - * @instance - */ - WebdPayload.prototype.supportsE2EVideo = false; + return UTMInfo; + })(); - /** - * WebdPayload supportsE2EAudio. - * @member {boolean} supportsE2EAudio - * @memberof proto.ClientPayload.WebInfo.WebdPayload - * @instance - */ - WebdPayload.prototype.supportsE2EAudio = false; + return ContextInfo; + })(); - /** - * WebdPayload supportsE2EDocument. - * @member {boolean} supportsE2EDocument - * @memberof proto.ClientPayload.WebInfo.WebdPayload - * @instance - */ - WebdPayload.prototype.supportsE2EDocument = false; + proto.Conversation = (function() { - /** - * WebdPayload documentTypes. - * @member {string} documentTypes - * @memberof proto.ClientPayload.WebInfo.WebdPayload - * @instance - */ - WebdPayload.prototype.documentTypes = ""; + /** + * Properties of a Conversation. + * @memberof proto + * @interface IConversation + * @property {string} id Conversation id + * @property {Array.|null} [messages] Conversation messages + * @property {string|null} [newJid] Conversation newJid + * @property {string|null} [oldJid] Conversation oldJid + * @property {number|Long|null} [lastMsgTimestamp] Conversation lastMsgTimestamp + * @property {number|null} [unreadCount] Conversation unreadCount + * @property {boolean|null} [readOnly] Conversation readOnly + * @property {boolean|null} [endOfHistoryTransfer] Conversation endOfHistoryTransfer + * @property {number|null} [ephemeralExpiration] Conversation ephemeralExpiration + * @property {number|Long|null} [ephemeralSettingTimestamp] Conversation ephemeralSettingTimestamp + * @property {proto.Conversation.EndOfHistoryTransferType|null} [endOfHistoryTransferType] Conversation endOfHistoryTransferType + * @property {number|Long|null} [conversationTimestamp] Conversation conversationTimestamp + * @property {string|null} [name] Conversation name + * @property {string|null} [pHash] Conversation pHash + * @property {boolean|null} [notSpam] Conversation notSpam + * @property {boolean|null} [archived] Conversation archived + * @property {proto.IDisappearingMode|null} [disappearingMode] Conversation disappearingMode + * @property {number|null} [unreadMentionCount] Conversation unreadMentionCount + * @property {boolean|null} [markedAsUnread] Conversation markedAsUnread + * @property {Array.|null} [participant] Conversation participant + * @property {Uint8Array|null} [tcToken] Conversation tcToken + * @property {number|Long|null} [tcTokenTimestamp] Conversation tcTokenTimestamp + * @property {Uint8Array|null} [contactPrimaryIdentityKey] Conversation contactPrimaryIdentityKey + * @property {number|null} [pinned] Conversation pinned + * @property {number|Long|null} [muteEndTime] Conversation muteEndTime + * @property {proto.IWallpaperSettings|null} [wallpaper] Conversation wallpaper + * @property {proto.MediaVisibility|null} [mediaVisibility] Conversation mediaVisibility + * @property {number|Long|null} [tcTokenSenderTimestamp] Conversation tcTokenSenderTimestamp + * @property {boolean|null} [suspended] Conversation suspended + * @property {boolean|null} [terminated] Conversation terminated + * @property {number|Long|null} [createdAt] Conversation createdAt + * @property {string|null} [createdBy] Conversation createdBy + * @property {string|null} [description] Conversation description + * @property {boolean|null} [support] Conversation support + * @property {boolean|null} [isParentGroup] Conversation isParentGroup + * @property {string|null} [parentGroupId] Conversation parentGroupId + * @property {boolean|null} [isDefaultSubgroup] Conversation isDefaultSubgroup + * @property {string|null} [displayName] Conversation displayName + * @property {string|null} [pnJid] Conversation pnJid + * @property {boolean|null} [shareOwnPn] Conversation shareOwnPn + * @property {boolean|null} [pnhDuplicateLidThread] Conversation pnhDuplicateLidThread + * @property {string|null} [lidJid] Conversation lidJid + * @property {string|null} [username] Conversation username + * @property {string|null} [lidOriginType] Conversation lidOriginType + * @property {number|null} [commentsCount] Conversation commentsCount + */ - /** - * WebdPayload features. - * @member {Uint8Array} features - * @memberof proto.ClientPayload.WebInfo.WebdPayload - * @instance - */ - WebdPayload.prototype.features = $util.newBuffer([]); + /** + * Constructs a new Conversation. + * @memberof proto + * @classdesc Represents a Conversation. + * @implements IConversation + * @constructor + * @param {proto.IConversation=} [properties] Properties to set + */ + function Conversation(properties) { + this.messages = []; + this.participant = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Creates a new WebdPayload instance using the specified properties. - * @function create - * @memberof proto.ClientPayload.WebInfo.WebdPayload - * @static - * @param {proto.ClientPayload.WebInfo.IWebdPayload=} [properties] Properties to set - * @returns {proto.ClientPayload.WebInfo.WebdPayload} WebdPayload instance - */ - WebdPayload.create = function create(properties) { - return new WebdPayload(properties); - }; + /** + * Conversation id. + * @member {string} id + * @memberof proto.Conversation + * @instance + */ + Conversation.prototype.id = ""; - /** - * Encodes the specified WebdPayload message. Does not implicitly {@link proto.ClientPayload.WebInfo.WebdPayload.verify|verify} messages. - * @function encode - * @memberof proto.ClientPayload.WebInfo.WebdPayload - * @static - * @param {proto.ClientPayload.WebInfo.IWebdPayload} message WebdPayload message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WebdPayload.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.usesParticipantInKey != null && Object.hasOwnProperty.call(message, "usesParticipantInKey")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.usesParticipantInKey); - if (message.supportsStarredMessages != null && Object.hasOwnProperty.call(message, "supportsStarredMessages")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.supportsStarredMessages); - if (message.supportsDocumentMessages != null && Object.hasOwnProperty.call(message, "supportsDocumentMessages")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.supportsDocumentMessages); - if (message.supportsUrlMessages != null && Object.hasOwnProperty.call(message, "supportsUrlMessages")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.supportsUrlMessages); - if (message.supportsMediaRetry != null && Object.hasOwnProperty.call(message, "supportsMediaRetry")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.supportsMediaRetry); - if (message.supportsE2EImage != null && Object.hasOwnProperty.call(message, "supportsE2EImage")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.supportsE2EImage); - if (message.supportsE2EVideo != null && Object.hasOwnProperty.call(message, "supportsE2EVideo")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.supportsE2EVideo); - if (message.supportsE2EAudio != null && Object.hasOwnProperty.call(message, "supportsE2EAudio")) - writer.uint32(/* id 8, wireType 0 =*/64).bool(message.supportsE2EAudio); - if (message.supportsE2EDocument != null && Object.hasOwnProperty.call(message, "supportsE2EDocument")) - writer.uint32(/* id 9, wireType 0 =*/72).bool(message.supportsE2EDocument); - if (message.documentTypes != null && Object.hasOwnProperty.call(message, "documentTypes")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.documentTypes); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - writer.uint32(/* id 11, wireType 2 =*/90).bytes(message.features); - return writer; - }; + /** + * Conversation messages. + * @member {Array.} messages + * @memberof proto.Conversation + * @instance + */ + Conversation.prototype.messages = $util.emptyArray; - /** - * Encodes the specified WebdPayload message, length delimited. Does not implicitly {@link proto.ClientPayload.WebInfo.WebdPayload.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.ClientPayload.WebInfo.WebdPayload - * @static - * @param {proto.ClientPayload.WebInfo.IWebdPayload} message WebdPayload message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WebdPayload.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Conversation newJid. + * @member {string} newJid + * @memberof proto.Conversation + * @instance + */ + Conversation.prototype.newJid = ""; - /** - * Decodes a WebdPayload message from the specified reader or buffer. - * @function decode - * @memberof proto.ClientPayload.WebInfo.WebdPayload - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.ClientPayload.WebInfo.WebdPayload} WebdPayload - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WebdPayload.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.ClientPayload.WebInfo.WebdPayload(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.usesParticipantInKey = reader.bool(); - break; - case 2: - message.supportsStarredMessages = reader.bool(); - break; - case 3: - message.supportsDocumentMessages = reader.bool(); - break; - case 4: - message.supportsUrlMessages = reader.bool(); - break; - case 5: - message.supportsMediaRetry = reader.bool(); - break; - case 6: - message.supportsE2EImage = reader.bool(); - break; - case 7: - message.supportsE2EVideo = reader.bool(); - break; - case 8: - message.supportsE2EAudio = reader.bool(); - break; - case 9: - message.supportsE2EDocument = reader.bool(); - break; - case 10: - message.documentTypes = reader.string(); - break; - case 11: - message.features = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Conversation oldJid. + * @member {string} oldJid + * @memberof proto.Conversation + * @instance + */ + Conversation.prototype.oldJid = ""; - /** - * Decodes a WebdPayload message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.ClientPayload.WebInfo.WebdPayload - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.ClientPayload.WebInfo.WebdPayload} WebdPayload - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WebdPayload.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Conversation lastMsgTimestamp. + * @member {number|Long} lastMsgTimestamp + * @memberof proto.Conversation + * @instance + */ + Conversation.prototype.lastMsgTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - /** - * Verifies a WebdPayload message. - * @function verify - * @memberof proto.ClientPayload.WebInfo.WebdPayload - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WebdPayload.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.usesParticipantInKey != null && message.hasOwnProperty("usesParticipantInKey")) - if (typeof message.usesParticipantInKey !== "boolean") - return "usesParticipantInKey: boolean expected"; - if (message.supportsStarredMessages != null && message.hasOwnProperty("supportsStarredMessages")) - if (typeof message.supportsStarredMessages !== "boolean") - return "supportsStarredMessages: boolean expected"; - if (message.supportsDocumentMessages != null && message.hasOwnProperty("supportsDocumentMessages")) - if (typeof message.supportsDocumentMessages !== "boolean") - return "supportsDocumentMessages: boolean expected"; - if (message.supportsUrlMessages != null && message.hasOwnProperty("supportsUrlMessages")) - if (typeof message.supportsUrlMessages !== "boolean") - return "supportsUrlMessages: boolean expected"; - if (message.supportsMediaRetry != null && message.hasOwnProperty("supportsMediaRetry")) - if (typeof message.supportsMediaRetry !== "boolean") - return "supportsMediaRetry: boolean expected"; - if (message.supportsE2EImage != null && message.hasOwnProperty("supportsE2EImage")) - if (typeof message.supportsE2EImage !== "boolean") - return "supportsE2EImage: boolean expected"; - if (message.supportsE2EVideo != null && message.hasOwnProperty("supportsE2EVideo")) - if (typeof message.supportsE2EVideo !== "boolean") - return "supportsE2EVideo: boolean expected"; - if (message.supportsE2EAudio != null && message.hasOwnProperty("supportsE2EAudio")) - if (typeof message.supportsE2EAudio !== "boolean") - return "supportsE2EAudio: boolean expected"; - if (message.supportsE2EDocument != null && message.hasOwnProperty("supportsE2EDocument")) - if (typeof message.supportsE2EDocument !== "boolean") - return "supportsE2EDocument: boolean expected"; - if (message.documentTypes != null && message.hasOwnProperty("documentTypes")) - if (!$util.isString(message.documentTypes)) - return "documentTypes: string expected"; - if (message.features != null && message.hasOwnProperty("features")) - if (!(message.features && typeof message.features.length === "number" || $util.isString(message.features))) - return "features: buffer expected"; - return null; - }; + /** + * Conversation unreadCount. + * @member {number} unreadCount + * @memberof proto.Conversation + * @instance + */ + Conversation.prototype.unreadCount = 0; - /** - * Creates a WebdPayload message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.ClientPayload.WebInfo.WebdPayload - * @static - * @param {Object.} object Plain object - * @returns {proto.ClientPayload.WebInfo.WebdPayload} WebdPayload - */ - WebdPayload.fromObject = function fromObject(object) { - if (object instanceof $root.proto.ClientPayload.WebInfo.WebdPayload) - return object; - var message = new $root.proto.ClientPayload.WebInfo.WebdPayload(); - if (object.usesParticipantInKey != null) - message.usesParticipantInKey = Boolean(object.usesParticipantInKey); - if (object.supportsStarredMessages != null) - message.supportsStarredMessages = Boolean(object.supportsStarredMessages); - if (object.supportsDocumentMessages != null) - message.supportsDocumentMessages = Boolean(object.supportsDocumentMessages); - if (object.supportsUrlMessages != null) - message.supportsUrlMessages = Boolean(object.supportsUrlMessages); - if (object.supportsMediaRetry != null) - message.supportsMediaRetry = Boolean(object.supportsMediaRetry); - if (object.supportsE2EImage != null) - message.supportsE2EImage = Boolean(object.supportsE2EImage); - if (object.supportsE2EVideo != null) - message.supportsE2EVideo = Boolean(object.supportsE2EVideo); - if (object.supportsE2EAudio != null) - message.supportsE2EAudio = Boolean(object.supportsE2EAudio); - if (object.supportsE2EDocument != null) - message.supportsE2EDocument = Boolean(object.supportsE2EDocument); - if (object.documentTypes != null) - message.documentTypes = String(object.documentTypes); - if (object.features != null) - if (typeof object.features === "string") - $util.base64.decode(object.features, message.features = $util.newBuffer($util.base64.length(object.features)), 0); - else if (object.features.length) - message.features = object.features; - return message; - }; + /** + * Conversation readOnly. + * @member {boolean} readOnly + * @memberof proto.Conversation + * @instance + */ + Conversation.prototype.readOnly = false; - /** - * Creates a plain object from a WebdPayload message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.ClientPayload.WebInfo.WebdPayload - * @static - * @param {proto.ClientPayload.WebInfo.WebdPayload} message WebdPayload - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WebdPayload.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.usesParticipantInKey = false; - object.supportsStarredMessages = false; - object.supportsDocumentMessages = false; - object.supportsUrlMessages = false; - object.supportsMediaRetry = false; - object.supportsE2EImage = false; - object.supportsE2EVideo = false; - object.supportsE2EAudio = false; - object.supportsE2EDocument = false; - object.documentTypes = ""; - if (options.bytes === String) - object.features = ""; - else { - object.features = []; - if (options.bytes !== Array) - object.features = $util.newBuffer(object.features); - } - } - if (message.usesParticipantInKey != null && message.hasOwnProperty("usesParticipantInKey")) - object.usesParticipantInKey = message.usesParticipantInKey; - if (message.supportsStarredMessages != null && message.hasOwnProperty("supportsStarredMessages")) - object.supportsStarredMessages = message.supportsStarredMessages; - if (message.supportsDocumentMessages != null && message.hasOwnProperty("supportsDocumentMessages")) - object.supportsDocumentMessages = message.supportsDocumentMessages; - if (message.supportsUrlMessages != null && message.hasOwnProperty("supportsUrlMessages")) - object.supportsUrlMessages = message.supportsUrlMessages; - if (message.supportsMediaRetry != null && message.hasOwnProperty("supportsMediaRetry")) - object.supportsMediaRetry = message.supportsMediaRetry; - if (message.supportsE2EImage != null && message.hasOwnProperty("supportsE2EImage")) - object.supportsE2EImage = message.supportsE2EImage; - if (message.supportsE2EVideo != null && message.hasOwnProperty("supportsE2EVideo")) - object.supportsE2EVideo = message.supportsE2EVideo; - if (message.supportsE2EAudio != null && message.hasOwnProperty("supportsE2EAudio")) - object.supportsE2EAudio = message.supportsE2EAudio; - if (message.supportsE2EDocument != null && message.hasOwnProperty("supportsE2EDocument")) - object.supportsE2EDocument = message.supportsE2EDocument; - if (message.documentTypes != null && message.hasOwnProperty("documentTypes")) - object.documentTypes = message.documentTypes; - if (message.features != null && message.hasOwnProperty("features")) - object.features = options.bytes === String ? $util.base64.encode(message.features, 0, message.features.length) : options.bytes === Array ? Array.prototype.slice.call(message.features) : message.features; - return object; - }; + /** + * Conversation endOfHistoryTransfer. + * @member {boolean} endOfHistoryTransfer + * @memberof proto.Conversation + * @instance + */ + Conversation.prototype.endOfHistoryTransfer = false; - /** - * Converts this WebdPayload to JSON. - * @function toJSON - * @memberof proto.ClientPayload.WebInfo.WebdPayload - * @instance - * @returns {Object.} JSON object - */ - WebdPayload.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Conversation ephemeralExpiration. + * @member {number} ephemeralExpiration + * @memberof proto.Conversation + * @instance + */ + Conversation.prototype.ephemeralExpiration = 0; - return WebdPayload; - })(); + /** + * Conversation ephemeralSettingTimestamp. + * @member {number|Long} ephemeralSettingTimestamp + * @memberof proto.Conversation + * @instance + */ + Conversation.prototype.ephemeralSettingTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - return WebInfo; - })(); + /** + * Conversation endOfHistoryTransferType. + * @member {proto.Conversation.EndOfHistoryTransferType} endOfHistoryTransferType + * @memberof proto.Conversation + * @instance + */ + Conversation.prototype.endOfHistoryTransferType = 0; - return ClientPayload; - })(); + /** + * Conversation conversationTimestamp. + * @member {number|Long} conversationTimestamp + * @memberof proto.Conversation + * @instance + */ + Conversation.prototype.conversationTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - proto.ContextInfo = (function() { + /** + * Conversation name. + * @member {string} name + * @memberof proto.Conversation + * @instance + */ + Conversation.prototype.name = ""; /** - * Properties of a ContextInfo. - * @memberof proto - * @interface IContextInfo - * @property {string|null} [stanzaId] ContextInfo stanzaId - * @property {string|null} [participant] ContextInfo participant - * @property {proto.IMessage|null} [quotedMessage] ContextInfo quotedMessage - * @property {string|null} [remoteJid] ContextInfo remoteJid - * @property {Array.|null} [mentionedJid] ContextInfo mentionedJid - * @property {string|null} [conversionSource] ContextInfo conversionSource - * @property {Uint8Array|null} [conversionData] ContextInfo conversionData - * @property {number|null} [conversionDelaySeconds] ContextInfo conversionDelaySeconds - * @property {number|null} [forwardingScore] ContextInfo forwardingScore - * @property {boolean|null} [isForwarded] ContextInfo isForwarded - * @property {proto.ContextInfo.IAdReplyInfo|null} [quotedAd] ContextInfo quotedAd - * @property {proto.IMessageKey|null} [placeholderKey] ContextInfo placeholderKey - * @property {number|null} [expiration] ContextInfo expiration - * @property {number|Long|null} [ephemeralSettingTimestamp] ContextInfo ephemeralSettingTimestamp - * @property {Uint8Array|null} [ephemeralSharedSecret] ContextInfo ephemeralSharedSecret - * @property {proto.ContextInfo.IExternalAdReplyInfo|null} [externalAdReply] ContextInfo externalAdReply - * @property {string|null} [entryPointConversionSource] ContextInfo entryPointConversionSource - * @property {string|null} [entryPointConversionApp] ContextInfo entryPointConversionApp - * @property {number|null} [entryPointConversionDelaySeconds] ContextInfo entryPointConversionDelaySeconds - * @property {proto.IDisappearingMode|null} [disappearingMode] ContextInfo disappearingMode - * @property {proto.IActionLink|null} [actionLink] ContextInfo actionLink - * @property {string|null} [groupSubject] ContextInfo groupSubject - * @property {string|null} [parentGroupJid] ContextInfo parentGroupJid - * @property {string|null} [trustBannerType] ContextInfo trustBannerType - * @property {number|null} [trustBannerAction] ContextInfo trustBannerAction - * @property {boolean|null} [isSampled] ContextInfo isSampled - * @property {Array.|null} [groupMentions] ContextInfo groupMentions - * @property {proto.ContextInfo.IUTMInfo|null} [utm] ContextInfo utm - * @property {proto.ContextInfo.IForwardedNewsletterMessageInfo|null} [forwardedNewsletterMessageInfo] ContextInfo forwardedNewsletterMessageInfo - * @property {proto.ContextInfo.IBusinessMessageForwardInfo|null} [businessMessageForwardInfo] ContextInfo businessMessageForwardInfo + * Conversation pHash. + * @member {string} pHash + * @memberof proto.Conversation + * @instance */ + Conversation.prototype.pHash = ""; /** - * Constructs a new ContextInfo. - * @memberof proto - * @classdesc Represents a ContextInfo. - * @implements IContextInfo - * @constructor - * @param {proto.IContextInfo=} [properties] Properties to set + * Conversation notSpam. + * @member {boolean} notSpam + * @memberof proto.Conversation + * @instance */ - function ContextInfo(properties) { - this.mentionedJid = []; - this.groupMentions = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + Conversation.prototype.notSpam = false; /** - * ContextInfo stanzaId. - * @member {string} stanzaId - * @memberof proto.ContextInfo + * Conversation archived. + * @member {boolean} archived + * @memberof proto.Conversation * @instance */ - ContextInfo.prototype.stanzaId = ""; + Conversation.prototype.archived = false; /** - * ContextInfo participant. - * @member {string} participant - * @memberof proto.ContextInfo + * Conversation disappearingMode. + * @member {proto.IDisappearingMode|null|undefined} disappearingMode + * @memberof proto.Conversation * @instance */ - ContextInfo.prototype.participant = ""; + Conversation.prototype.disappearingMode = null; /** - * ContextInfo quotedMessage. - * @member {proto.IMessage|null|undefined} quotedMessage - * @memberof proto.ContextInfo + * Conversation unreadMentionCount. + * @member {number} unreadMentionCount + * @memberof proto.Conversation * @instance */ - ContextInfo.prototype.quotedMessage = null; + Conversation.prototype.unreadMentionCount = 0; /** - * ContextInfo remoteJid. - * @member {string} remoteJid - * @memberof proto.ContextInfo + * Conversation markedAsUnread. + * @member {boolean} markedAsUnread + * @memberof proto.Conversation * @instance */ - ContextInfo.prototype.remoteJid = ""; + Conversation.prototype.markedAsUnread = false; /** - * ContextInfo mentionedJid. - * @member {Array.} mentionedJid - * @memberof proto.ContextInfo + * Conversation participant. + * @member {Array.} participant + * @memberof proto.Conversation * @instance */ - ContextInfo.prototype.mentionedJid = $util.emptyArray; + Conversation.prototype.participant = $util.emptyArray; /** - * ContextInfo conversionSource. - * @member {string} conversionSource - * @memberof proto.ContextInfo + * Conversation tcToken. + * @member {Uint8Array} tcToken + * @memberof proto.Conversation * @instance */ - ContextInfo.prototype.conversionSource = ""; + Conversation.prototype.tcToken = $util.newBuffer([]); /** - * ContextInfo conversionData. - * @member {Uint8Array} conversionData - * @memberof proto.ContextInfo + * Conversation tcTokenTimestamp. + * @member {number|Long} tcTokenTimestamp + * @memberof proto.Conversation * @instance */ - ContextInfo.prototype.conversionData = $util.newBuffer([]); + Conversation.prototype.tcTokenTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** - * ContextInfo conversionDelaySeconds. - * @member {number} conversionDelaySeconds - * @memberof proto.ContextInfo + * Conversation contactPrimaryIdentityKey. + * @member {Uint8Array} contactPrimaryIdentityKey + * @memberof proto.Conversation * @instance */ - ContextInfo.prototype.conversionDelaySeconds = 0; + Conversation.prototype.contactPrimaryIdentityKey = $util.newBuffer([]); /** - * ContextInfo forwardingScore. - * @member {number} forwardingScore - * @memberof proto.ContextInfo + * Conversation pinned. + * @member {number} pinned + * @memberof proto.Conversation * @instance */ - ContextInfo.prototype.forwardingScore = 0; + Conversation.prototype.pinned = 0; /** - * ContextInfo isForwarded. - * @member {boolean} isForwarded - * @memberof proto.ContextInfo + * Conversation muteEndTime. + * @member {number|Long} muteEndTime + * @memberof proto.Conversation * @instance */ - ContextInfo.prototype.isForwarded = false; + Conversation.prototype.muteEndTime = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** - * ContextInfo quotedAd. - * @member {proto.ContextInfo.IAdReplyInfo|null|undefined} quotedAd - * @memberof proto.ContextInfo + * Conversation wallpaper. + * @member {proto.IWallpaperSettings|null|undefined} wallpaper + * @memberof proto.Conversation * @instance */ - ContextInfo.prototype.quotedAd = null; + Conversation.prototype.wallpaper = null; /** - * ContextInfo placeholderKey. - * @member {proto.IMessageKey|null|undefined} placeholderKey - * @memberof proto.ContextInfo + * Conversation mediaVisibility. + * @member {proto.MediaVisibility} mediaVisibility + * @memberof proto.Conversation * @instance */ - ContextInfo.prototype.placeholderKey = null; + Conversation.prototype.mediaVisibility = 0; /** - * ContextInfo expiration. - * @member {number} expiration - * @memberof proto.ContextInfo + * Conversation tcTokenSenderTimestamp. + * @member {number|Long} tcTokenSenderTimestamp + * @memberof proto.Conversation * @instance */ - ContextInfo.prototype.expiration = 0; + Conversation.prototype.tcTokenSenderTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** - * ContextInfo ephemeralSettingTimestamp. - * @member {number|Long} ephemeralSettingTimestamp - * @memberof proto.ContextInfo + * Conversation suspended. + * @member {boolean} suspended + * @memberof proto.Conversation * @instance */ - ContextInfo.prototype.ephemeralSettingTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + Conversation.prototype.suspended = false; /** - * ContextInfo ephemeralSharedSecret. - * @member {Uint8Array} ephemeralSharedSecret - * @memberof proto.ContextInfo + * Conversation terminated. + * @member {boolean} terminated + * @memberof proto.Conversation * @instance */ - ContextInfo.prototype.ephemeralSharedSecret = $util.newBuffer([]); + Conversation.prototype.terminated = false; /** - * ContextInfo externalAdReply. - * @member {proto.ContextInfo.IExternalAdReplyInfo|null|undefined} externalAdReply - * @memberof proto.ContextInfo + * Conversation createdAt. + * @member {number|Long} createdAt + * @memberof proto.Conversation * @instance */ - ContextInfo.prototype.externalAdReply = null; + Conversation.prototype.createdAt = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** - * ContextInfo entryPointConversionSource. - * @member {string} entryPointConversionSource - * @memberof proto.ContextInfo + * Conversation createdBy. + * @member {string} createdBy + * @memberof proto.Conversation * @instance */ - ContextInfo.prototype.entryPointConversionSource = ""; + Conversation.prototype.createdBy = ""; /** - * ContextInfo entryPointConversionApp. - * @member {string} entryPointConversionApp - * @memberof proto.ContextInfo + * Conversation description. + * @member {string} description + * @memberof proto.Conversation * @instance */ - ContextInfo.prototype.entryPointConversionApp = ""; + Conversation.prototype.description = ""; /** - * ContextInfo entryPointConversionDelaySeconds. - * @member {number} entryPointConversionDelaySeconds - * @memberof proto.ContextInfo + * Conversation support. + * @member {boolean} support + * @memberof proto.Conversation * @instance */ - ContextInfo.prototype.entryPointConversionDelaySeconds = 0; + Conversation.prototype.support = false; /** - * ContextInfo disappearingMode. - * @member {proto.IDisappearingMode|null|undefined} disappearingMode - * @memberof proto.ContextInfo + * Conversation isParentGroup. + * @member {boolean} isParentGroup + * @memberof proto.Conversation * @instance */ - ContextInfo.prototype.disappearingMode = null; + Conversation.prototype.isParentGroup = false; /** - * ContextInfo actionLink. - * @member {proto.IActionLink|null|undefined} actionLink - * @memberof proto.ContextInfo + * Conversation parentGroupId. + * @member {string} parentGroupId + * @memberof proto.Conversation * @instance */ - ContextInfo.prototype.actionLink = null; + Conversation.prototype.parentGroupId = ""; /** - * ContextInfo groupSubject. - * @member {string} groupSubject - * @memberof proto.ContextInfo + * Conversation isDefaultSubgroup. + * @member {boolean} isDefaultSubgroup + * @memberof proto.Conversation * @instance */ - ContextInfo.prototype.groupSubject = ""; + Conversation.prototype.isDefaultSubgroup = false; /** - * ContextInfo parentGroupJid. - * @member {string} parentGroupJid - * @memberof proto.ContextInfo + * Conversation displayName. + * @member {string} displayName + * @memberof proto.Conversation * @instance */ - ContextInfo.prototype.parentGroupJid = ""; + Conversation.prototype.displayName = ""; /** - * ContextInfo trustBannerType. - * @member {string} trustBannerType - * @memberof proto.ContextInfo + * Conversation pnJid. + * @member {string} pnJid + * @memberof proto.Conversation * @instance */ - ContextInfo.prototype.trustBannerType = ""; + Conversation.prototype.pnJid = ""; /** - * ContextInfo trustBannerAction. - * @member {number} trustBannerAction - * @memberof proto.ContextInfo + * Conversation shareOwnPn. + * @member {boolean} shareOwnPn + * @memberof proto.Conversation * @instance */ - ContextInfo.prototype.trustBannerAction = 0; + Conversation.prototype.shareOwnPn = false; /** - * ContextInfo isSampled. - * @member {boolean} isSampled - * @memberof proto.ContextInfo + * Conversation pnhDuplicateLidThread. + * @member {boolean} pnhDuplicateLidThread + * @memberof proto.Conversation * @instance */ - ContextInfo.prototype.isSampled = false; + Conversation.prototype.pnhDuplicateLidThread = false; /** - * ContextInfo groupMentions. - * @member {Array.} groupMentions - * @memberof proto.ContextInfo + * Conversation lidJid. + * @member {string} lidJid + * @memberof proto.Conversation * @instance */ - ContextInfo.prototype.groupMentions = $util.emptyArray; + Conversation.prototype.lidJid = ""; /** - * ContextInfo utm. - * @member {proto.ContextInfo.IUTMInfo|null|undefined} utm - * @memberof proto.ContextInfo + * Conversation username. + * @member {string} username + * @memberof proto.Conversation * @instance */ - ContextInfo.prototype.utm = null; + Conversation.prototype.username = ""; /** - * ContextInfo forwardedNewsletterMessageInfo. - * @member {proto.ContextInfo.IForwardedNewsletterMessageInfo|null|undefined} forwardedNewsletterMessageInfo - * @memberof proto.ContextInfo + * Conversation lidOriginType. + * @member {string} lidOriginType + * @memberof proto.Conversation * @instance */ - ContextInfo.prototype.forwardedNewsletterMessageInfo = null; + Conversation.prototype.lidOriginType = ""; /** - * ContextInfo businessMessageForwardInfo. - * @member {proto.ContextInfo.IBusinessMessageForwardInfo|null|undefined} businessMessageForwardInfo - * @memberof proto.ContextInfo + * Conversation commentsCount. + * @member {number} commentsCount + * @memberof proto.Conversation * @instance */ - ContextInfo.prototype.businessMessageForwardInfo = null; + Conversation.prototype.commentsCount = 0; /** - * Creates a new ContextInfo instance using the specified properties. + * Creates a new Conversation instance using the specified properties. * @function create - * @memberof proto.ContextInfo + * @memberof proto.Conversation * @static - * @param {proto.IContextInfo=} [properties] Properties to set - * @returns {proto.ContextInfo} ContextInfo instance + * @param {proto.IConversation=} [properties] Properties to set + * @returns {proto.Conversation} Conversation instance */ - ContextInfo.create = function create(properties) { - return new ContextInfo(properties); + Conversation.create = function create(properties) { + return new Conversation(properties); }; /** - * Encodes the specified ContextInfo message. Does not implicitly {@link proto.ContextInfo.verify|verify} messages. + * Encodes the specified Conversation message. Does not implicitly {@link proto.Conversation.verify|verify} messages. * @function encode - * @memberof proto.ContextInfo + * @memberof proto.Conversation * @static - * @param {proto.IContextInfo} message ContextInfo message or plain object to encode + * @param {proto.IConversation} message Conversation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ContextInfo.encode = function encode(message, writer) { + Conversation.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.stanzaId != null && Object.hasOwnProperty.call(message, "stanzaId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.stanzaId); - if (message.participant != null && Object.hasOwnProperty.call(message, "participant")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.participant); - if (message.quotedMessage != null && Object.hasOwnProperty.call(message, "quotedMessage")) - $root.proto.Message.encode(message.quotedMessage, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.remoteJid != null && Object.hasOwnProperty.call(message, "remoteJid")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.remoteJid); - if (message.mentionedJid != null && message.mentionedJid.length) - for (var i = 0; i < message.mentionedJid.length; ++i) - writer.uint32(/* id 15, wireType 2 =*/122).string(message.mentionedJid[i]); - if (message.conversionSource != null && Object.hasOwnProperty.call(message, "conversionSource")) - writer.uint32(/* id 18, wireType 2 =*/146).string(message.conversionSource); - if (message.conversionData != null && Object.hasOwnProperty.call(message, "conversionData")) - writer.uint32(/* id 19, wireType 2 =*/154).bytes(message.conversionData); - if (message.conversionDelaySeconds != null && Object.hasOwnProperty.call(message, "conversionDelaySeconds")) - writer.uint32(/* id 20, wireType 0 =*/160).uint32(message.conversionDelaySeconds); - if (message.forwardingScore != null && Object.hasOwnProperty.call(message, "forwardingScore")) - writer.uint32(/* id 21, wireType 0 =*/168).uint32(message.forwardingScore); - if (message.isForwarded != null && Object.hasOwnProperty.call(message, "isForwarded")) - writer.uint32(/* id 22, wireType 0 =*/176).bool(message.isForwarded); - if (message.quotedAd != null && Object.hasOwnProperty.call(message, "quotedAd")) - $root.proto.ContextInfo.AdReplyInfo.encode(message.quotedAd, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); - if (message.placeholderKey != null && Object.hasOwnProperty.call(message, "placeholderKey")) - $root.proto.MessageKey.encode(message.placeholderKey, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); - if (message.expiration != null && Object.hasOwnProperty.call(message, "expiration")) - writer.uint32(/* id 25, wireType 0 =*/200).uint32(message.expiration); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.messages != null && message.messages.length) + for (var i = 0; i < message.messages.length; ++i) + $root.proto.HistorySyncMsg.encode(message.messages[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.newJid != null && Object.hasOwnProperty.call(message, "newJid")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.newJid); + if (message.oldJid != null && Object.hasOwnProperty.call(message, "oldJid")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.oldJid); + if (message.lastMsgTimestamp != null && Object.hasOwnProperty.call(message, "lastMsgTimestamp")) + writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.lastMsgTimestamp); + if (message.unreadCount != null && Object.hasOwnProperty.call(message, "unreadCount")) + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.unreadCount); + if (message.readOnly != null && Object.hasOwnProperty.call(message, "readOnly")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.readOnly); + if (message.endOfHistoryTransfer != null && Object.hasOwnProperty.call(message, "endOfHistoryTransfer")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.endOfHistoryTransfer); + if (message.ephemeralExpiration != null && Object.hasOwnProperty.call(message, "ephemeralExpiration")) + writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.ephemeralExpiration); if (message.ephemeralSettingTimestamp != null && Object.hasOwnProperty.call(message, "ephemeralSettingTimestamp")) - writer.uint32(/* id 26, wireType 0 =*/208).int64(message.ephemeralSettingTimestamp); - if (message.ephemeralSharedSecret != null && Object.hasOwnProperty.call(message, "ephemeralSharedSecret")) - writer.uint32(/* id 27, wireType 2 =*/218).bytes(message.ephemeralSharedSecret); - if (message.externalAdReply != null && Object.hasOwnProperty.call(message, "externalAdReply")) - $root.proto.ContextInfo.ExternalAdReplyInfo.encode(message.externalAdReply, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); - if (message.entryPointConversionSource != null && Object.hasOwnProperty.call(message, "entryPointConversionSource")) - writer.uint32(/* id 29, wireType 2 =*/234).string(message.entryPointConversionSource); - if (message.entryPointConversionApp != null && Object.hasOwnProperty.call(message, "entryPointConversionApp")) - writer.uint32(/* id 30, wireType 2 =*/242).string(message.entryPointConversionApp); - if (message.entryPointConversionDelaySeconds != null && Object.hasOwnProperty.call(message, "entryPointConversionDelaySeconds")) - writer.uint32(/* id 31, wireType 0 =*/248).uint32(message.entryPointConversionDelaySeconds); + writer.uint32(/* id 10, wireType 0 =*/80).int64(message.ephemeralSettingTimestamp); + if (message.endOfHistoryTransferType != null && Object.hasOwnProperty.call(message, "endOfHistoryTransferType")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.endOfHistoryTransferType); + if (message.conversationTimestamp != null && Object.hasOwnProperty.call(message, "conversationTimestamp")) + writer.uint32(/* id 12, wireType 0 =*/96).uint64(message.conversationTimestamp); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.name); + if (message.pHash != null && Object.hasOwnProperty.call(message, "pHash")) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.pHash); + if (message.notSpam != null && Object.hasOwnProperty.call(message, "notSpam")) + writer.uint32(/* id 15, wireType 0 =*/120).bool(message.notSpam); + if (message.archived != null && Object.hasOwnProperty.call(message, "archived")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.archived); if (message.disappearingMode != null && Object.hasOwnProperty.call(message, "disappearingMode")) - $root.proto.DisappearingMode.encode(message.disappearingMode, writer.uint32(/* id 32, wireType 2 =*/258).fork()).ldelim(); - if (message.actionLink != null && Object.hasOwnProperty.call(message, "actionLink")) - $root.proto.ActionLink.encode(message.actionLink, writer.uint32(/* id 33, wireType 2 =*/266).fork()).ldelim(); - if (message.groupSubject != null && Object.hasOwnProperty.call(message, "groupSubject")) - writer.uint32(/* id 34, wireType 2 =*/274).string(message.groupSubject); - if (message.parentGroupJid != null && Object.hasOwnProperty.call(message, "parentGroupJid")) - writer.uint32(/* id 35, wireType 2 =*/282).string(message.parentGroupJid); - if (message.trustBannerType != null && Object.hasOwnProperty.call(message, "trustBannerType")) - writer.uint32(/* id 37, wireType 2 =*/298).string(message.trustBannerType); - if (message.trustBannerAction != null && Object.hasOwnProperty.call(message, "trustBannerAction")) - writer.uint32(/* id 38, wireType 0 =*/304).uint32(message.trustBannerAction); - if (message.isSampled != null && Object.hasOwnProperty.call(message, "isSampled")) - writer.uint32(/* id 39, wireType 0 =*/312).bool(message.isSampled); - if (message.groupMentions != null && message.groupMentions.length) - for (var i = 0; i < message.groupMentions.length; ++i) - $root.proto.GroupMention.encode(message.groupMentions[i], writer.uint32(/* id 40, wireType 2 =*/322).fork()).ldelim(); - if (message.utm != null && Object.hasOwnProperty.call(message, "utm")) - $root.proto.ContextInfo.UTMInfo.encode(message.utm, writer.uint32(/* id 41, wireType 2 =*/330).fork()).ldelim(); - if (message.forwardedNewsletterMessageInfo != null && Object.hasOwnProperty.call(message, "forwardedNewsletterMessageInfo")) - $root.proto.ContextInfo.ForwardedNewsletterMessageInfo.encode(message.forwardedNewsletterMessageInfo, writer.uint32(/* id 43, wireType 2 =*/346).fork()).ldelim(); - if (message.businessMessageForwardInfo != null && Object.hasOwnProperty.call(message, "businessMessageForwardInfo")) - $root.proto.ContextInfo.BusinessMessageForwardInfo.encode(message.businessMessageForwardInfo, writer.uint32(/* id 44, wireType 2 =*/354).fork()).ldelim(); + $root.proto.DisappearingMode.encode(message.disappearingMode, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.unreadMentionCount != null && Object.hasOwnProperty.call(message, "unreadMentionCount")) + writer.uint32(/* id 18, wireType 0 =*/144).uint32(message.unreadMentionCount); + if (message.markedAsUnread != null && Object.hasOwnProperty.call(message, "markedAsUnread")) + writer.uint32(/* id 19, wireType 0 =*/152).bool(message.markedAsUnread); + if (message.participant != null && message.participant.length) + for (var i = 0; i < message.participant.length; ++i) + $root.proto.GroupParticipant.encode(message.participant[i], writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.tcToken != null && Object.hasOwnProperty.call(message, "tcToken")) + writer.uint32(/* id 21, wireType 2 =*/170).bytes(message.tcToken); + if (message.tcTokenTimestamp != null && Object.hasOwnProperty.call(message, "tcTokenTimestamp")) + writer.uint32(/* id 22, wireType 0 =*/176).uint64(message.tcTokenTimestamp); + if (message.contactPrimaryIdentityKey != null && Object.hasOwnProperty.call(message, "contactPrimaryIdentityKey")) + writer.uint32(/* id 23, wireType 2 =*/186).bytes(message.contactPrimaryIdentityKey); + if (message.pinned != null && Object.hasOwnProperty.call(message, "pinned")) + writer.uint32(/* id 24, wireType 0 =*/192).uint32(message.pinned); + if (message.muteEndTime != null && Object.hasOwnProperty.call(message, "muteEndTime")) + writer.uint32(/* id 25, wireType 0 =*/200).uint64(message.muteEndTime); + if (message.wallpaper != null && Object.hasOwnProperty.call(message, "wallpaper")) + $root.proto.WallpaperSettings.encode(message.wallpaper, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); + if (message.mediaVisibility != null && Object.hasOwnProperty.call(message, "mediaVisibility")) + writer.uint32(/* id 27, wireType 0 =*/216).int32(message.mediaVisibility); + if (message.tcTokenSenderTimestamp != null && Object.hasOwnProperty.call(message, "tcTokenSenderTimestamp")) + writer.uint32(/* id 28, wireType 0 =*/224).uint64(message.tcTokenSenderTimestamp); + if (message.suspended != null && Object.hasOwnProperty.call(message, "suspended")) + writer.uint32(/* id 29, wireType 0 =*/232).bool(message.suspended); + if (message.terminated != null && Object.hasOwnProperty.call(message, "terminated")) + writer.uint32(/* id 30, wireType 0 =*/240).bool(message.terminated); + if (message.createdAt != null && Object.hasOwnProperty.call(message, "createdAt")) + writer.uint32(/* id 31, wireType 0 =*/248).uint64(message.createdAt); + if (message.createdBy != null && Object.hasOwnProperty.call(message, "createdBy")) + writer.uint32(/* id 32, wireType 2 =*/258).string(message.createdBy); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 33, wireType 2 =*/266).string(message.description); + if (message.support != null && Object.hasOwnProperty.call(message, "support")) + writer.uint32(/* id 34, wireType 0 =*/272).bool(message.support); + if (message.isParentGroup != null && Object.hasOwnProperty.call(message, "isParentGroup")) + writer.uint32(/* id 35, wireType 0 =*/280).bool(message.isParentGroup); + if (message.isDefaultSubgroup != null && Object.hasOwnProperty.call(message, "isDefaultSubgroup")) + writer.uint32(/* id 36, wireType 0 =*/288).bool(message.isDefaultSubgroup); + if (message.parentGroupId != null && Object.hasOwnProperty.call(message, "parentGroupId")) + writer.uint32(/* id 37, wireType 2 =*/298).string(message.parentGroupId); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 38, wireType 2 =*/306).string(message.displayName); + if (message.pnJid != null && Object.hasOwnProperty.call(message, "pnJid")) + writer.uint32(/* id 39, wireType 2 =*/314).string(message.pnJid); + if (message.shareOwnPn != null && Object.hasOwnProperty.call(message, "shareOwnPn")) + writer.uint32(/* id 40, wireType 0 =*/320).bool(message.shareOwnPn); + if (message.pnhDuplicateLidThread != null && Object.hasOwnProperty.call(message, "pnhDuplicateLidThread")) + writer.uint32(/* id 41, wireType 0 =*/328).bool(message.pnhDuplicateLidThread); + if (message.lidJid != null && Object.hasOwnProperty.call(message, "lidJid")) + writer.uint32(/* id 42, wireType 2 =*/338).string(message.lidJid); + if (message.username != null && Object.hasOwnProperty.call(message, "username")) + writer.uint32(/* id 43, wireType 2 =*/346).string(message.username); + if (message.lidOriginType != null && Object.hasOwnProperty.call(message, "lidOriginType")) + writer.uint32(/* id 44, wireType 2 =*/354).string(message.lidOriginType); + if (message.commentsCount != null && Object.hasOwnProperty.call(message, "commentsCount")) + writer.uint32(/* id 45, wireType 0 =*/360).uint32(message.commentsCount); return writer; }; /** - * Encodes the specified ContextInfo message, length delimited. Does not implicitly {@link proto.ContextInfo.verify|verify} messages. + * Encodes the specified Conversation message, length delimited. Does not implicitly {@link proto.Conversation.verify|verify} messages. * @function encodeDelimited - * @memberof proto.ContextInfo + * @memberof proto.Conversation * @static - * @param {proto.IContextInfo} message ContextInfo message or plain object to encode + * @param {proto.IConversation} message Conversation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ContextInfo.encodeDelimited = function encodeDelimited(message, writer) { + Conversation.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ContextInfo message from the specified reader or buffer. + * Decodes a Conversation message from the specified reader or buffer. * @function decode - * @memberof proto.ContextInfo + * @memberof proto.Conversation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {proto.ContextInfo} ContextInfo + * @returns {proto.Conversation} Conversation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ContextInfo.decode = function decode(reader, length) { + Conversation.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.ContextInfo(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Conversation(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.stanzaId = reader.string(); + message.id = reader.string(); break; case 2: - message.participant = reader.string(); + if (!(message.messages && message.messages.length)) + message.messages = []; + message.messages.push($root.proto.HistorySyncMsg.decode(reader, reader.uint32())); break; case 3: - message.quotedMessage = $root.proto.Message.decode(reader, reader.uint32()); + message.newJid = reader.string(); + break; + case 4: + message.oldJid = reader.string(); + break; + case 5: + message.lastMsgTimestamp = reader.uint64(); + break; + case 6: + message.unreadCount = reader.uint32(); + break; + case 7: + message.readOnly = reader.bool(); + break; + case 8: + message.endOfHistoryTransfer = reader.bool(); + break; + case 9: + message.ephemeralExpiration = reader.uint32(); + break; + case 10: + message.ephemeralSettingTimestamp = reader.int64(); + break; + case 11: + message.endOfHistoryTransferType = reader.int32(); + break; + case 12: + message.conversationTimestamp = reader.uint64(); + break; + case 13: + message.name = reader.string(); break; - case 4: - message.remoteJid = reader.string(); + case 14: + message.pHash = reader.string(); break; case 15: - if (!(message.mentionedJid && message.mentionedJid.length)) - message.mentionedJid = []; - message.mentionedJid.push(reader.string()); + message.notSpam = reader.bool(); + break; + case 16: + message.archived = reader.bool(); + break; + case 17: + message.disappearingMode = $root.proto.DisappearingMode.decode(reader, reader.uint32()); break; case 18: - message.conversionSource = reader.string(); + message.unreadMentionCount = reader.uint32(); break; case 19: - message.conversionData = reader.bytes(); + message.markedAsUnread = reader.bool(); break; case 20: - message.conversionDelaySeconds = reader.uint32(); + if (!(message.participant && message.participant.length)) + message.participant = []; + message.participant.push($root.proto.GroupParticipant.decode(reader, reader.uint32())); break; case 21: - message.forwardingScore = reader.uint32(); + message.tcToken = reader.bytes(); break; case 22: - message.isForwarded = reader.bool(); + message.tcTokenTimestamp = reader.uint64(); break; case 23: - message.quotedAd = $root.proto.ContextInfo.AdReplyInfo.decode(reader, reader.uint32()); + message.contactPrimaryIdentityKey = reader.bytes(); break; case 24: - message.placeholderKey = $root.proto.MessageKey.decode(reader, reader.uint32()); + message.pinned = reader.uint32(); break; case 25: - message.expiration = reader.uint32(); + message.muteEndTime = reader.uint64(); break; case 26: - message.ephemeralSettingTimestamp = reader.int64(); + message.wallpaper = $root.proto.WallpaperSettings.decode(reader, reader.uint32()); break; case 27: - message.ephemeralSharedSecret = reader.bytes(); + message.mediaVisibility = reader.int32(); break; case 28: - message.externalAdReply = $root.proto.ContextInfo.ExternalAdReplyInfo.decode(reader, reader.uint32()); + message.tcTokenSenderTimestamp = reader.uint64(); break; case 29: - message.entryPointConversionSource = reader.string(); + message.suspended = reader.bool(); break; case 30: - message.entryPointConversionApp = reader.string(); + message.terminated = reader.bool(); break; case 31: - message.entryPointConversionDelaySeconds = reader.uint32(); + message.createdAt = reader.uint64(); break; case 32: - message.disappearingMode = $root.proto.DisappearingMode.decode(reader, reader.uint32()); + message.createdBy = reader.string(); break; case 33: - message.actionLink = $root.proto.ActionLink.decode(reader, reader.uint32()); + message.description = reader.string(); break; case 34: - message.groupSubject = reader.string(); + message.support = reader.bool(); break; case 35: - message.parentGroupJid = reader.string(); + message.isParentGroup = reader.bool(); break; case 37: - message.trustBannerType = reader.string(); + message.parentGroupId = reader.string(); + break; + case 36: + message.isDefaultSubgroup = reader.bool(); break; case 38: - message.trustBannerAction = reader.uint32(); + message.displayName = reader.string(); break; case 39: - message.isSampled = reader.bool(); + message.pnJid = reader.string(); break; case 40: - if (!(message.groupMentions && message.groupMentions.length)) - message.groupMentions = []; - message.groupMentions.push($root.proto.GroupMention.decode(reader, reader.uint32())); + message.shareOwnPn = reader.bool(); break; case 41: - message.utm = $root.proto.ContextInfo.UTMInfo.decode(reader, reader.uint32()); + message.pnhDuplicateLidThread = reader.bool(); + break; + case 42: + message.lidJid = reader.string(); break; case 43: - message.forwardedNewsletterMessageInfo = $root.proto.ContextInfo.ForwardedNewsletterMessageInfo.decode(reader, reader.uint32()); + message.username = reader.string(); break; case 44: - message.businessMessageForwardInfo = $root.proto.ContextInfo.BusinessMessageForwardInfo.decode(reader, reader.uint32()); + message.lidOriginType = reader.string(); + break; + case 45: + message.commentsCount = reader.uint32(); break; default: reader.skipType(tag & 7); break; } } + if (!message.hasOwnProperty("id")) + throw $util.ProtocolError("missing required 'id'", { instance: message }); return message; }; /** - * Decodes a ContextInfo message from the specified reader or buffer, length delimited. + * Decodes a Conversation message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof proto.ContextInfo + * @memberof proto.Conversation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.ContextInfo} ContextInfo + * @returns {proto.Conversation} Conversation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ContextInfo.decodeDelimited = function decodeDelimited(reader) { + Conversation.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ContextInfo message. + * Verifies a Conversation message. * @function verify - * @memberof proto.ContextInfo + * @memberof proto.Conversation * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ContextInfo.verify = function verify(message) { + Conversation.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.stanzaId != null && message.hasOwnProperty("stanzaId")) - if (!$util.isString(message.stanzaId)) - return "stanzaId: string expected"; - if (message.participant != null && message.hasOwnProperty("participant")) - if (!$util.isString(message.participant)) - return "participant: string expected"; - if (message.quotedMessage != null && message.hasOwnProperty("quotedMessage")) { - var error = $root.proto.Message.verify(message.quotedMessage); - if (error) - return "quotedMessage." + error; - } - if (message.remoteJid != null && message.hasOwnProperty("remoteJid")) - if (!$util.isString(message.remoteJid)) - return "remoteJid: string expected"; - if (message.mentionedJid != null && message.hasOwnProperty("mentionedJid")) { - if (!Array.isArray(message.mentionedJid)) - return "mentionedJid: array expected"; - for (var i = 0; i < message.mentionedJid.length; ++i) - if (!$util.isString(message.mentionedJid[i])) - return "mentionedJid: string[] expected"; - } - if (message.conversionSource != null && message.hasOwnProperty("conversionSource")) - if (!$util.isString(message.conversionSource)) - return "conversionSource: string expected"; - if (message.conversionData != null && message.hasOwnProperty("conversionData")) - if (!(message.conversionData && typeof message.conversionData.length === "number" || $util.isString(message.conversionData))) - return "conversionData: buffer expected"; - if (message.conversionDelaySeconds != null && message.hasOwnProperty("conversionDelaySeconds")) - if (!$util.isInteger(message.conversionDelaySeconds)) - return "conversionDelaySeconds: integer expected"; - if (message.forwardingScore != null && message.hasOwnProperty("forwardingScore")) - if (!$util.isInteger(message.forwardingScore)) - return "forwardingScore: integer expected"; - if (message.isForwarded != null && message.hasOwnProperty("isForwarded")) - if (typeof message.isForwarded !== "boolean") - return "isForwarded: boolean expected"; - if (message.quotedAd != null && message.hasOwnProperty("quotedAd")) { - var error = $root.proto.ContextInfo.AdReplyInfo.verify(message.quotedAd); - if (error) - return "quotedAd." + error; - } - if (message.placeholderKey != null && message.hasOwnProperty("placeholderKey")) { - var error = $root.proto.MessageKey.verify(message.placeholderKey); - if (error) - return "placeholderKey." + error; + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.messages != null && message.hasOwnProperty("messages")) { + if (!Array.isArray(message.messages)) + return "messages: array expected"; + for (var i = 0; i < message.messages.length; ++i) { + var error = $root.proto.HistorySyncMsg.verify(message.messages[i]); + if (error) + return "messages." + error; + } } - if (message.expiration != null && message.hasOwnProperty("expiration")) - if (!$util.isInteger(message.expiration)) - return "expiration: integer expected"; + if (message.newJid != null && message.hasOwnProperty("newJid")) + if (!$util.isString(message.newJid)) + return "newJid: string expected"; + if (message.oldJid != null && message.hasOwnProperty("oldJid")) + if (!$util.isString(message.oldJid)) + return "oldJid: string expected"; + if (message.lastMsgTimestamp != null && message.hasOwnProperty("lastMsgTimestamp")) + if (!$util.isInteger(message.lastMsgTimestamp) && !(message.lastMsgTimestamp && $util.isInteger(message.lastMsgTimestamp.low) && $util.isInteger(message.lastMsgTimestamp.high))) + return "lastMsgTimestamp: integer|Long expected"; + if (message.unreadCount != null && message.hasOwnProperty("unreadCount")) + if (!$util.isInteger(message.unreadCount)) + return "unreadCount: integer expected"; + if (message.readOnly != null && message.hasOwnProperty("readOnly")) + if (typeof message.readOnly !== "boolean") + return "readOnly: boolean expected"; + if (message.endOfHistoryTransfer != null && message.hasOwnProperty("endOfHistoryTransfer")) + if (typeof message.endOfHistoryTransfer !== "boolean") + return "endOfHistoryTransfer: boolean expected"; + if (message.ephemeralExpiration != null && message.hasOwnProperty("ephemeralExpiration")) + if (!$util.isInteger(message.ephemeralExpiration)) + return "ephemeralExpiration: integer expected"; if (message.ephemeralSettingTimestamp != null && message.hasOwnProperty("ephemeralSettingTimestamp")) if (!$util.isInteger(message.ephemeralSettingTimestamp) && !(message.ephemeralSettingTimestamp && $util.isInteger(message.ephemeralSettingTimestamp.low) && $util.isInteger(message.ephemeralSettingTimestamp.high))) return "ephemeralSettingTimestamp: integer|Long expected"; - if (message.ephemeralSharedSecret != null && message.hasOwnProperty("ephemeralSharedSecret")) - if (!(message.ephemeralSharedSecret && typeof message.ephemeralSharedSecret.length === "number" || $util.isString(message.ephemeralSharedSecret))) - return "ephemeralSharedSecret: buffer expected"; - if (message.externalAdReply != null && message.hasOwnProperty("externalAdReply")) { - var error = $root.proto.ContextInfo.ExternalAdReplyInfo.verify(message.externalAdReply); - if (error) - return "externalAdReply." + error; - } - if (message.entryPointConversionSource != null && message.hasOwnProperty("entryPointConversionSource")) - if (!$util.isString(message.entryPointConversionSource)) - return "entryPointConversionSource: string expected"; - if (message.entryPointConversionApp != null && message.hasOwnProperty("entryPointConversionApp")) - if (!$util.isString(message.entryPointConversionApp)) - return "entryPointConversionApp: string expected"; - if (message.entryPointConversionDelaySeconds != null && message.hasOwnProperty("entryPointConversionDelaySeconds")) - if (!$util.isInteger(message.entryPointConversionDelaySeconds)) - return "entryPointConversionDelaySeconds: integer expected"; + if (message.endOfHistoryTransferType != null && message.hasOwnProperty("endOfHistoryTransferType")) + switch (message.endOfHistoryTransferType) { + default: + return "endOfHistoryTransferType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.conversationTimestamp != null && message.hasOwnProperty("conversationTimestamp")) + if (!$util.isInteger(message.conversationTimestamp) && !(message.conversationTimestamp && $util.isInteger(message.conversationTimestamp.low) && $util.isInteger(message.conversationTimestamp.high))) + return "conversationTimestamp: integer|Long expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.pHash != null && message.hasOwnProperty("pHash")) + if (!$util.isString(message.pHash)) + return "pHash: string expected"; + if (message.notSpam != null && message.hasOwnProperty("notSpam")) + if (typeof message.notSpam !== "boolean") + return "notSpam: boolean expected"; + if (message.archived != null && message.hasOwnProperty("archived")) + if (typeof message.archived !== "boolean") + return "archived: boolean expected"; if (message.disappearingMode != null && message.hasOwnProperty("disappearingMode")) { var error = $root.proto.DisappearingMode.verify(message.disappearingMode); if (error) return "disappearingMode." + error; } - if (message.actionLink != null && message.hasOwnProperty("actionLink")) { - var error = $root.proto.ActionLink.verify(message.actionLink); - if (error) - return "actionLink." + error; - } - if (message.groupSubject != null && message.hasOwnProperty("groupSubject")) - if (!$util.isString(message.groupSubject)) - return "groupSubject: string expected"; - if (message.parentGroupJid != null && message.hasOwnProperty("parentGroupJid")) - if (!$util.isString(message.parentGroupJid)) - return "parentGroupJid: string expected"; - if (message.trustBannerType != null && message.hasOwnProperty("trustBannerType")) - if (!$util.isString(message.trustBannerType)) - return "trustBannerType: string expected"; - if (message.trustBannerAction != null && message.hasOwnProperty("trustBannerAction")) - if (!$util.isInteger(message.trustBannerAction)) - return "trustBannerAction: integer expected"; - if (message.isSampled != null && message.hasOwnProperty("isSampled")) - if (typeof message.isSampled !== "boolean") - return "isSampled: boolean expected"; - if (message.groupMentions != null && message.hasOwnProperty("groupMentions")) { - if (!Array.isArray(message.groupMentions)) - return "groupMentions: array expected"; - for (var i = 0; i < message.groupMentions.length; ++i) { - var error = $root.proto.GroupMention.verify(message.groupMentions[i]); + if (message.unreadMentionCount != null && message.hasOwnProperty("unreadMentionCount")) + if (!$util.isInteger(message.unreadMentionCount)) + return "unreadMentionCount: integer expected"; + if (message.markedAsUnread != null && message.hasOwnProperty("markedAsUnread")) + if (typeof message.markedAsUnread !== "boolean") + return "markedAsUnread: boolean expected"; + if (message.participant != null && message.hasOwnProperty("participant")) { + if (!Array.isArray(message.participant)) + return "participant: array expected"; + for (var i = 0; i < message.participant.length; ++i) { + var error = $root.proto.GroupParticipant.verify(message.participant[i]); if (error) - return "groupMentions." + error; + return "participant." + error; } } - if (message.utm != null && message.hasOwnProperty("utm")) { - var error = $root.proto.ContextInfo.UTMInfo.verify(message.utm); - if (error) - return "utm." + error; - } - if (message.forwardedNewsletterMessageInfo != null && message.hasOwnProperty("forwardedNewsletterMessageInfo")) { - var error = $root.proto.ContextInfo.ForwardedNewsletterMessageInfo.verify(message.forwardedNewsletterMessageInfo); - if (error) - return "forwardedNewsletterMessageInfo." + error; - } - if (message.businessMessageForwardInfo != null && message.hasOwnProperty("businessMessageForwardInfo")) { - var error = $root.proto.ContextInfo.BusinessMessageForwardInfo.verify(message.businessMessageForwardInfo); + if (message.tcToken != null && message.hasOwnProperty("tcToken")) + if (!(message.tcToken && typeof message.tcToken.length === "number" || $util.isString(message.tcToken))) + return "tcToken: buffer expected"; + if (message.tcTokenTimestamp != null && message.hasOwnProperty("tcTokenTimestamp")) + if (!$util.isInteger(message.tcTokenTimestamp) && !(message.tcTokenTimestamp && $util.isInteger(message.tcTokenTimestamp.low) && $util.isInteger(message.tcTokenTimestamp.high))) + return "tcTokenTimestamp: integer|Long expected"; + if (message.contactPrimaryIdentityKey != null && message.hasOwnProperty("contactPrimaryIdentityKey")) + if (!(message.contactPrimaryIdentityKey && typeof message.contactPrimaryIdentityKey.length === "number" || $util.isString(message.contactPrimaryIdentityKey))) + return "contactPrimaryIdentityKey: buffer expected"; + if (message.pinned != null && message.hasOwnProperty("pinned")) + if (!$util.isInteger(message.pinned)) + return "pinned: integer expected"; + if (message.muteEndTime != null && message.hasOwnProperty("muteEndTime")) + if (!$util.isInteger(message.muteEndTime) && !(message.muteEndTime && $util.isInteger(message.muteEndTime.low) && $util.isInteger(message.muteEndTime.high))) + return "muteEndTime: integer|Long expected"; + if (message.wallpaper != null && message.hasOwnProperty("wallpaper")) { + var error = $root.proto.WallpaperSettings.verify(message.wallpaper); if (error) - return "businessMessageForwardInfo." + error; + return "wallpaper." + error; } + if (message.mediaVisibility != null && message.hasOwnProperty("mediaVisibility")) + switch (message.mediaVisibility) { + default: + return "mediaVisibility: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.tcTokenSenderTimestamp != null && message.hasOwnProperty("tcTokenSenderTimestamp")) + if (!$util.isInteger(message.tcTokenSenderTimestamp) && !(message.tcTokenSenderTimestamp && $util.isInteger(message.tcTokenSenderTimestamp.low) && $util.isInteger(message.tcTokenSenderTimestamp.high))) + return "tcTokenSenderTimestamp: integer|Long expected"; + if (message.suspended != null && message.hasOwnProperty("suspended")) + if (typeof message.suspended !== "boolean") + return "suspended: boolean expected"; + if (message.terminated != null && message.hasOwnProperty("terminated")) + if (typeof message.terminated !== "boolean") + return "terminated: boolean expected"; + if (message.createdAt != null && message.hasOwnProperty("createdAt")) + if (!$util.isInteger(message.createdAt) && !(message.createdAt && $util.isInteger(message.createdAt.low) && $util.isInteger(message.createdAt.high))) + return "createdAt: integer|Long expected"; + if (message.createdBy != null && message.hasOwnProperty("createdBy")) + if (!$util.isString(message.createdBy)) + return "createdBy: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.support != null && message.hasOwnProperty("support")) + if (typeof message.support !== "boolean") + return "support: boolean expected"; + if (message.isParentGroup != null && message.hasOwnProperty("isParentGroup")) + if (typeof message.isParentGroup !== "boolean") + return "isParentGroup: boolean expected"; + if (message.parentGroupId != null && message.hasOwnProperty("parentGroupId")) + if (!$util.isString(message.parentGroupId)) + return "parentGroupId: string expected"; + if (message.isDefaultSubgroup != null && message.hasOwnProperty("isDefaultSubgroup")) + if (typeof message.isDefaultSubgroup !== "boolean") + return "isDefaultSubgroup: boolean expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.pnJid != null && message.hasOwnProperty("pnJid")) + if (!$util.isString(message.pnJid)) + return "pnJid: string expected"; + if (message.shareOwnPn != null && message.hasOwnProperty("shareOwnPn")) + if (typeof message.shareOwnPn !== "boolean") + return "shareOwnPn: boolean expected"; + if (message.pnhDuplicateLidThread != null && message.hasOwnProperty("pnhDuplicateLidThread")) + if (typeof message.pnhDuplicateLidThread !== "boolean") + return "pnhDuplicateLidThread: boolean expected"; + if (message.lidJid != null && message.hasOwnProperty("lidJid")) + if (!$util.isString(message.lidJid)) + return "lidJid: string expected"; + if (message.username != null && message.hasOwnProperty("username")) + if (!$util.isString(message.username)) + return "username: string expected"; + if (message.lidOriginType != null && message.hasOwnProperty("lidOriginType")) + if (!$util.isString(message.lidOriginType)) + return "lidOriginType: string expected"; + if (message.commentsCount != null && message.hasOwnProperty("commentsCount")) + if (!$util.isInteger(message.commentsCount)) + return "commentsCount: integer expected"; return null; }; /** - * Creates a ContextInfo message from a plain object. Also converts values to their respective internal types. + * Creates a Conversation message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof proto.ContextInfo + * @memberof proto.Conversation * @static * @param {Object.} object Plain object - * @returns {proto.ContextInfo} ContextInfo + * @returns {proto.Conversation} Conversation */ - ContextInfo.fromObject = function fromObject(object) { - if (object instanceof $root.proto.ContextInfo) + Conversation.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Conversation) return object; - var message = new $root.proto.ContextInfo(); - if (object.stanzaId != null) - message.stanzaId = String(object.stanzaId); - if (object.participant != null) - message.participant = String(object.participant); - if (object.quotedMessage != null) { - if (typeof object.quotedMessage !== "object") - throw TypeError(".proto.ContextInfo.quotedMessage: object expected"); - message.quotedMessage = $root.proto.Message.fromObject(object.quotedMessage); - } - if (object.remoteJid != null) - message.remoteJid = String(object.remoteJid); - if (object.mentionedJid) { - if (!Array.isArray(object.mentionedJid)) - throw TypeError(".proto.ContextInfo.mentionedJid: array expected"); - message.mentionedJid = []; - for (var i = 0; i < object.mentionedJid.length; ++i) - message.mentionedJid[i] = String(object.mentionedJid[i]); - } - if (object.conversionSource != null) - message.conversionSource = String(object.conversionSource); - if (object.conversionData != null) - if (typeof object.conversionData === "string") - $util.base64.decode(object.conversionData, message.conversionData = $util.newBuffer($util.base64.length(object.conversionData)), 0); - else if (object.conversionData.length) - message.conversionData = object.conversionData; - if (object.conversionDelaySeconds != null) - message.conversionDelaySeconds = object.conversionDelaySeconds >>> 0; - if (object.forwardingScore != null) - message.forwardingScore = object.forwardingScore >>> 0; - if (object.isForwarded != null) - message.isForwarded = Boolean(object.isForwarded); - if (object.quotedAd != null) { - if (typeof object.quotedAd !== "object") - throw TypeError(".proto.ContextInfo.quotedAd: object expected"); - message.quotedAd = $root.proto.ContextInfo.AdReplyInfo.fromObject(object.quotedAd); - } - if (object.placeholderKey != null) { - if (typeof object.placeholderKey !== "object") - throw TypeError(".proto.ContextInfo.placeholderKey: object expected"); - message.placeholderKey = $root.proto.MessageKey.fromObject(object.placeholderKey); + var message = new $root.proto.Conversation(); + if (object.id != null) + message.id = String(object.id); + if (object.messages) { + if (!Array.isArray(object.messages)) + throw TypeError(".proto.Conversation.messages: array expected"); + message.messages = []; + for (var i = 0; i < object.messages.length; ++i) { + if (typeof object.messages[i] !== "object") + throw TypeError(".proto.Conversation.messages: object expected"); + message.messages[i] = $root.proto.HistorySyncMsg.fromObject(object.messages[i]); + } } - if (object.expiration != null) - message.expiration = object.expiration >>> 0; + if (object.newJid != null) + message.newJid = String(object.newJid); + if (object.oldJid != null) + message.oldJid = String(object.oldJid); + if (object.lastMsgTimestamp != null) + if ($util.Long) + (message.lastMsgTimestamp = $util.Long.fromValue(object.lastMsgTimestamp)).unsigned = true; + else if (typeof object.lastMsgTimestamp === "string") + message.lastMsgTimestamp = parseInt(object.lastMsgTimestamp, 10); + else if (typeof object.lastMsgTimestamp === "number") + message.lastMsgTimestamp = object.lastMsgTimestamp; + else if (typeof object.lastMsgTimestamp === "object") + message.lastMsgTimestamp = new $util.LongBits(object.lastMsgTimestamp.low >>> 0, object.lastMsgTimestamp.high >>> 0).toNumber(true); + if (object.unreadCount != null) + message.unreadCount = object.unreadCount >>> 0; + if (object.readOnly != null) + message.readOnly = Boolean(object.readOnly); + if (object.endOfHistoryTransfer != null) + message.endOfHistoryTransfer = Boolean(object.endOfHistoryTransfer); + if (object.ephemeralExpiration != null) + message.ephemeralExpiration = object.ephemeralExpiration >>> 0; if (object.ephemeralSettingTimestamp != null) if ($util.Long) (message.ephemeralSettingTimestamp = $util.Long.fromValue(object.ephemeralSettingTimestamp)).unsigned = false; @@ -10132,1236 +15144,1516 @@ $root.proto = (function() { message.ephemeralSettingTimestamp = object.ephemeralSettingTimestamp; else if (typeof object.ephemeralSettingTimestamp === "object") message.ephemeralSettingTimestamp = new $util.LongBits(object.ephemeralSettingTimestamp.low >>> 0, object.ephemeralSettingTimestamp.high >>> 0).toNumber(); - if (object.ephemeralSharedSecret != null) - if (typeof object.ephemeralSharedSecret === "string") - $util.base64.decode(object.ephemeralSharedSecret, message.ephemeralSharedSecret = $util.newBuffer($util.base64.length(object.ephemeralSharedSecret)), 0); - else if (object.ephemeralSharedSecret.length) - message.ephemeralSharedSecret = object.ephemeralSharedSecret; - if (object.externalAdReply != null) { - if (typeof object.externalAdReply !== "object") - throw TypeError(".proto.ContextInfo.externalAdReply: object expected"); - message.externalAdReply = $root.proto.ContextInfo.ExternalAdReplyInfo.fromObject(object.externalAdReply); + switch (object.endOfHistoryTransferType) { + case "COMPLETE_BUT_MORE_MESSAGES_REMAIN_ON_PRIMARY": + case 0: + message.endOfHistoryTransferType = 0; + break; + case "COMPLETE_AND_NO_MORE_MESSAGE_REMAIN_ON_PRIMARY": + case 1: + message.endOfHistoryTransferType = 1; + break; + case "COMPLETE_ON_DEMAND_SYNC_BUT_MORE_MSG_REMAIN_ON_PRIMARY": + case 2: + message.endOfHistoryTransferType = 2; + break; } - if (object.entryPointConversionSource != null) - message.entryPointConversionSource = String(object.entryPointConversionSource); - if (object.entryPointConversionApp != null) - message.entryPointConversionApp = String(object.entryPointConversionApp); - if (object.entryPointConversionDelaySeconds != null) - message.entryPointConversionDelaySeconds = object.entryPointConversionDelaySeconds >>> 0; + if (object.conversationTimestamp != null) + if ($util.Long) + (message.conversationTimestamp = $util.Long.fromValue(object.conversationTimestamp)).unsigned = true; + else if (typeof object.conversationTimestamp === "string") + message.conversationTimestamp = parseInt(object.conversationTimestamp, 10); + else if (typeof object.conversationTimestamp === "number") + message.conversationTimestamp = object.conversationTimestamp; + else if (typeof object.conversationTimestamp === "object") + message.conversationTimestamp = new $util.LongBits(object.conversationTimestamp.low >>> 0, object.conversationTimestamp.high >>> 0).toNumber(true); + if (object.name != null) + message.name = String(object.name); + if (object.pHash != null) + message.pHash = String(object.pHash); + if (object.notSpam != null) + message.notSpam = Boolean(object.notSpam); + if (object.archived != null) + message.archived = Boolean(object.archived); if (object.disappearingMode != null) { if (typeof object.disappearingMode !== "object") - throw TypeError(".proto.ContextInfo.disappearingMode: object expected"); + throw TypeError(".proto.Conversation.disappearingMode: object expected"); message.disappearingMode = $root.proto.DisappearingMode.fromObject(object.disappearingMode); } - if (object.actionLink != null) { - if (typeof object.actionLink !== "object") - throw TypeError(".proto.ContextInfo.actionLink: object expected"); - message.actionLink = $root.proto.ActionLink.fromObject(object.actionLink); - } - if (object.groupSubject != null) - message.groupSubject = String(object.groupSubject); - if (object.parentGroupJid != null) - message.parentGroupJid = String(object.parentGroupJid); - if (object.trustBannerType != null) - message.trustBannerType = String(object.trustBannerType); - if (object.trustBannerAction != null) - message.trustBannerAction = object.trustBannerAction >>> 0; - if (object.isSampled != null) - message.isSampled = Boolean(object.isSampled); - if (object.groupMentions) { - if (!Array.isArray(object.groupMentions)) - throw TypeError(".proto.ContextInfo.groupMentions: array expected"); - message.groupMentions = []; - for (var i = 0; i < object.groupMentions.length; ++i) { - if (typeof object.groupMentions[i] !== "object") - throw TypeError(".proto.ContextInfo.groupMentions: object expected"); - message.groupMentions[i] = $root.proto.GroupMention.fromObject(object.groupMentions[i]); + if (object.unreadMentionCount != null) + message.unreadMentionCount = object.unreadMentionCount >>> 0; + if (object.markedAsUnread != null) + message.markedAsUnread = Boolean(object.markedAsUnread); + if (object.participant) { + if (!Array.isArray(object.participant)) + throw TypeError(".proto.Conversation.participant: array expected"); + message.participant = []; + for (var i = 0; i < object.participant.length; ++i) { + if (typeof object.participant[i] !== "object") + throw TypeError(".proto.Conversation.participant: object expected"); + message.participant[i] = $root.proto.GroupParticipant.fromObject(object.participant[i]); } } - if (object.utm != null) { - if (typeof object.utm !== "object") - throw TypeError(".proto.ContextInfo.utm: object expected"); - message.utm = $root.proto.ContextInfo.UTMInfo.fromObject(object.utm); - } - if (object.forwardedNewsletterMessageInfo != null) { - if (typeof object.forwardedNewsletterMessageInfo !== "object") - throw TypeError(".proto.ContextInfo.forwardedNewsletterMessageInfo: object expected"); - message.forwardedNewsletterMessageInfo = $root.proto.ContextInfo.ForwardedNewsletterMessageInfo.fromObject(object.forwardedNewsletterMessageInfo); + if (object.tcToken != null) + if (typeof object.tcToken === "string") + $util.base64.decode(object.tcToken, message.tcToken = $util.newBuffer($util.base64.length(object.tcToken)), 0); + else if (object.tcToken.length) + message.tcToken = object.tcToken; + if (object.tcTokenTimestamp != null) + if ($util.Long) + (message.tcTokenTimestamp = $util.Long.fromValue(object.tcTokenTimestamp)).unsigned = true; + else if (typeof object.tcTokenTimestamp === "string") + message.tcTokenTimestamp = parseInt(object.tcTokenTimestamp, 10); + else if (typeof object.tcTokenTimestamp === "number") + message.tcTokenTimestamp = object.tcTokenTimestamp; + else if (typeof object.tcTokenTimestamp === "object") + message.tcTokenTimestamp = new $util.LongBits(object.tcTokenTimestamp.low >>> 0, object.tcTokenTimestamp.high >>> 0).toNumber(true); + if (object.contactPrimaryIdentityKey != null) + if (typeof object.contactPrimaryIdentityKey === "string") + $util.base64.decode(object.contactPrimaryIdentityKey, message.contactPrimaryIdentityKey = $util.newBuffer($util.base64.length(object.contactPrimaryIdentityKey)), 0); + else if (object.contactPrimaryIdentityKey.length) + message.contactPrimaryIdentityKey = object.contactPrimaryIdentityKey; + if (object.pinned != null) + message.pinned = object.pinned >>> 0; + if (object.muteEndTime != null) + if ($util.Long) + (message.muteEndTime = $util.Long.fromValue(object.muteEndTime)).unsigned = true; + else if (typeof object.muteEndTime === "string") + message.muteEndTime = parseInt(object.muteEndTime, 10); + else if (typeof object.muteEndTime === "number") + message.muteEndTime = object.muteEndTime; + else if (typeof object.muteEndTime === "object") + message.muteEndTime = new $util.LongBits(object.muteEndTime.low >>> 0, object.muteEndTime.high >>> 0).toNumber(true); + if (object.wallpaper != null) { + if (typeof object.wallpaper !== "object") + throw TypeError(".proto.Conversation.wallpaper: object expected"); + message.wallpaper = $root.proto.WallpaperSettings.fromObject(object.wallpaper); } - if (object.businessMessageForwardInfo != null) { - if (typeof object.businessMessageForwardInfo !== "object") - throw TypeError(".proto.ContextInfo.businessMessageForwardInfo: object expected"); - message.businessMessageForwardInfo = $root.proto.ContextInfo.BusinessMessageForwardInfo.fromObject(object.businessMessageForwardInfo); + switch (object.mediaVisibility) { + case "DEFAULT": + case 0: + message.mediaVisibility = 0; + break; + case "OFF": + case 1: + message.mediaVisibility = 1; + break; + case "ON": + case 2: + message.mediaVisibility = 2; + break; } + if (object.tcTokenSenderTimestamp != null) + if ($util.Long) + (message.tcTokenSenderTimestamp = $util.Long.fromValue(object.tcTokenSenderTimestamp)).unsigned = true; + else if (typeof object.tcTokenSenderTimestamp === "string") + message.tcTokenSenderTimestamp = parseInt(object.tcTokenSenderTimestamp, 10); + else if (typeof object.tcTokenSenderTimestamp === "number") + message.tcTokenSenderTimestamp = object.tcTokenSenderTimestamp; + else if (typeof object.tcTokenSenderTimestamp === "object") + message.tcTokenSenderTimestamp = new $util.LongBits(object.tcTokenSenderTimestamp.low >>> 0, object.tcTokenSenderTimestamp.high >>> 0).toNumber(true); + if (object.suspended != null) + message.suspended = Boolean(object.suspended); + if (object.terminated != null) + message.terminated = Boolean(object.terminated); + if (object.createdAt != null) + if ($util.Long) + (message.createdAt = $util.Long.fromValue(object.createdAt)).unsigned = true; + else if (typeof object.createdAt === "string") + message.createdAt = parseInt(object.createdAt, 10); + else if (typeof object.createdAt === "number") + message.createdAt = object.createdAt; + else if (typeof object.createdAt === "object") + message.createdAt = new $util.LongBits(object.createdAt.low >>> 0, object.createdAt.high >>> 0).toNumber(true); + if (object.createdBy != null) + message.createdBy = String(object.createdBy); + if (object.description != null) + message.description = String(object.description); + if (object.support != null) + message.support = Boolean(object.support); + if (object.isParentGroup != null) + message.isParentGroup = Boolean(object.isParentGroup); + if (object.parentGroupId != null) + message.parentGroupId = String(object.parentGroupId); + if (object.isDefaultSubgroup != null) + message.isDefaultSubgroup = Boolean(object.isDefaultSubgroup); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.pnJid != null) + message.pnJid = String(object.pnJid); + if (object.shareOwnPn != null) + message.shareOwnPn = Boolean(object.shareOwnPn); + if (object.pnhDuplicateLidThread != null) + message.pnhDuplicateLidThread = Boolean(object.pnhDuplicateLidThread); + if (object.lidJid != null) + message.lidJid = String(object.lidJid); + if (object.username != null) + message.username = String(object.username); + if (object.lidOriginType != null) + message.lidOriginType = String(object.lidOriginType); + if (object.commentsCount != null) + message.commentsCount = object.commentsCount >>> 0; return message; }; /** - * Creates a plain object from a ContextInfo message. Also converts values to other types if specified. + * Creates a plain object from a Conversation message. Also converts values to other types if specified. * @function toObject - * @memberof proto.ContextInfo + * @memberof proto.Conversation * @static - * @param {proto.ContextInfo} message ContextInfo + * @param {proto.Conversation} message Conversation * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ContextInfo.toObject = function toObject(message, options) { + Conversation.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) { - object.mentionedJid = []; - object.groupMentions = []; + object.messages = []; + object.participant = []; } if (options.defaults) { - object.stanzaId = ""; - object.participant = ""; - object.quotedMessage = null; - object.remoteJid = ""; - object.conversionSource = ""; + object.id = ""; + object.newJid = ""; + object.oldJid = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.lastMsgTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.lastMsgTimestamp = options.longs === String ? "0" : 0; + object.unreadCount = 0; + object.readOnly = false; + object.endOfHistoryTransfer = false; + object.ephemeralExpiration = 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.ephemeralSettingTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.ephemeralSettingTimestamp = options.longs === String ? "0" : 0; + object.endOfHistoryTransferType = options.enums === String ? "COMPLETE_BUT_MORE_MESSAGES_REMAIN_ON_PRIMARY" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.conversationTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.conversationTimestamp = options.longs === String ? "0" : 0; + object.name = ""; + object.pHash = ""; + object.notSpam = false; + object.archived = false; + object.disappearingMode = null; + object.unreadMentionCount = 0; + object.markedAsUnread = false; if (options.bytes === String) - object.conversionData = ""; + object.tcToken = ""; else { - object.conversionData = []; + object.tcToken = []; if (options.bytes !== Array) - object.conversionData = $util.newBuffer(object.conversionData); + object.tcToken = $util.newBuffer(object.tcToken); } - object.conversionDelaySeconds = 0; - object.forwardingScore = 0; - object.isForwarded = false; - object.quotedAd = null; - object.placeholderKey = null; - object.expiration = 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.ephemeralSettingTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.tcTokenTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else - object.ephemeralSettingTimestamp = options.longs === String ? "0" : 0; + object.tcTokenTimestamp = options.longs === String ? "0" : 0; if (options.bytes === String) - object.ephemeralSharedSecret = ""; + object.contactPrimaryIdentityKey = ""; else { - object.ephemeralSharedSecret = []; + object.contactPrimaryIdentityKey = []; if (options.bytes !== Array) - object.ephemeralSharedSecret = $util.newBuffer(object.ephemeralSharedSecret); + object.contactPrimaryIdentityKey = $util.newBuffer(object.contactPrimaryIdentityKey); } - object.externalAdReply = null; - object.entryPointConversionSource = ""; - object.entryPointConversionApp = ""; - object.entryPointConversionDelaySeconds = 0; - object.disappearingMode = null; - object.actionLink = null; - object.groupSubject = ""; - object.parentGroupJid = ""; - object.trustBannerType = ""; - object.trustBannerAction = 0; - object.isSampled = false; - object.utm = null; - object.forwardedNewsletterMessageInfo = null; - object.businessMessageForwardInfo = null; + object.pinned = 0; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.muteEndTime = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.muteEndTime = options.longs === String ? "0" : 0; + object.wallpaper = null; + object.mediaVisibility = options.enums === String ? "DEFAULT" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.tcTokenSenderTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.tcTokenSenderTimestamp = options.longs === String ? "0" : 0; + object.suspended = false; + object.terminated = false; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.createdAt = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.createdAt = options.longs === String ? "0" : 0; + object.createdBy = ""; + object.description = ""; + object.support = false; + object.isParentGroup = false; + object.isDefaultSubgroup = false; + object.parentGroupId = ""; + object.displayName = ""; + object.pnJid = ""; + object.shareOwnPn = false; + object.pnhDuplicateLidThread = false; + object.lidJid = ""; + object.username = ""; + object.lidOriginType = ""; + object.commentsCount = 0; } - if (message.stanzaId != null && message.hasOwnProperty("stanzaId")) - object.stanzaId = message.stanzaId; - if (message.participant != null && message.hasOwnProperty("participant")) - object.participant = message.participant; - if (message.quotedMessage != null && message.hasOwnProperty("quotedMessage")) - object.quotedMessage = $root.proto.Message.toObject(message.quotedMessage, options); - if (message.remoteJid != null && message.hasOwnProperty("remoteJid")) - object.remoteJid = message.remoteJid; - if (message.mentionedJid && message.mentionedJid.length) { - object.mentionedJid = []; - for (var j = 0; j < message.mentionedJid.length; ++j) - object.mentionedJid[j] = message.mentionedJid[j]; + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.messages && message.messages.length) { + object.messages = []; + for (var j = 0; j < message.messages.length; ++j) + object.messages[j] = $root.proto.HistorySyncMsg.toObject(message.messages[j], options); } - if (message.conversionSource != null && message.hasOwnProperty("conversionSource")) - object.conversionSource = message.conversionSource; - if (message.conversionData != null && message.hasOwnProperty("conversionData")) - object.conversionData = options.bytes === String ? $util.base64.encode(message.conversionData, 0, message.conversionData.length) : options.bytes === Array ? Array.prototype.slice.call(message.conversionData) : message.conversionData; - if (message.conversionDelaySeconds != null && message.hasOwnProperty("conversionDelaySeconds")) - object.conversionDelaySeconds = message.conversionDelaySeconds; - if (message.forwardingScore != null && message.hasOwnProperty("forwardingScore")) - object.forwardingScore = message.forwardingScore; - if (message.isForwarded != null && message.hasOwnProperty("isForwarded")) - object.isForwarded = message.isForwarded; - if (message.quotedAd != null && message.hasOwnProperty("quotedAd")) - object.quotedAd = $root.proto.ContextInfo.AdReplyInfo.toObject(message.quotedAd, options); - if (message.placeholderKey != null && message.hasOwnProperty("placeholderKey")) - object.placeholderKey = $root.proto.MessageKey.toObject(message.placeholderKey, options); - if (message.expiration != null && message.hasOwnProperty("expiration")) - object.expiration = message.expiration; + if (message.newJid != null && message.hasOwnProperty("newJid")) + object.newJid = message.newJid; + if (message.oldJid != null && message.hasOwnProperty("oldJid")) + object.oldJid = message.oldJid; + if (message.lastMsgTimestamp != null && message.hasOwnProperty("lastMsgTimestamp")) + if (typeof message.lastMsgTimestamp === "number") + object.lastMsgTimestamp = options.longs === String ? String(message.lastMsgTimestamp) : message.lastMsgTimestamp; + else + object.lastMsgTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.lastMsgTimestamp) : options.longs === Number ? new $util.LongBits(message.lastMsgTimestamp.low >>> 0, message.lastMsgTimestamp.high >>> 0).toNumber(true) : message.lastMsgTimestamp; + if (message.unreadCount != null && message.hasOwnProperty("unreadCount")) + object.unreadCount = message.unreadCount; + if (message.readOnly != null && message.hasOwnProperty("readOnly")) + object.readOnly = message.readOnly; + if (message.endOfHistoryTransfer != null && message.hasOwnProperty("endOfHistoryTransfer")) + object.endOfHistoryTransfer = message.endOfHistoryTransfer; + if (message.ephemeralExpiration != null && message.hasOwnProperty("ephemeralExpiration")) + object.ephemeralExpiration = message.ephemeralExpiration; if (message.ephemeralSettingTimestamp != null && message.hasOwnProperty("ephemeralSettingTimestamp")) if (typeof message.ephemeralSettingTimestamp === "number") object.ephemeralSettingTimestamp = options.longs === String ? String(message.ephemeralSettingTimestamp) : message.ephemeralSettingTimestamp; else object.ephemeralSettingTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.ephemeralSettingTimestamp) : options.longs === Number ? new $util.LongBits(message.ephemeralSettingTimestamp.low >>> 0, message.ephemeralSettingTimestamp.high >>> 0).toNumber() : message.ephemeralSettingTimestamp; - if (message.ephemeralSharedSecret != null && message.hasOwnProperty("ephemeralSharedSecret")) - object.ephemeralSharedSecret = options.bytes === String ? $util.base64.encode(message.ephemeralSharedSecret, 0, message.ephemeralSharedSecret.length) : options.bytes === Array ? Array.prototype.slice.call(message.ephemeralSharedSecret) : message.ephemeralSharedSecret; - if (message.externalAdReply != null && message.hasOwnProperty("externalAdReply")) - object.externalAdReply = $root.proto.ContextInfo.ExternalAdReplyInfo.toObject(message.externalAdReply, options); - if (message.entryPointConversionSource != null && message.hasOwnProperty("entryPointConversionSource")) - object.entryPointConversionSource = message.entryPointConversionSource; - if (message.entryPointConversionApp != null && message.hasOwnProperty("entryPointConversionApp")) - object.entryPointConversionApp = message.entryPointConversionApp; - if (message.entryPointConversionDelaySeconds != null && message.hasOwnProperty("entryPointConversionDelaySeconds")) - object.entryPointConversionDelaySeconds = message.entryPointConversionDelaySeconds; + if (message.endOfHistoryTransferType != null && message.hasOwnProperty("endOfHistoryTransferType")) + object.endOfHistoryTransferType = options.enums === String ? $root.proto.Conversation.EndOfHistoryTransferType[message.endOfHistoryTransferType] : message.endOfHistoryTransferType; + if (message.conversationTimestamp != null && message.hasOwnProperty("conversationTimestamp")) + if (typeof message.conversationTimestamp === "number") + object.conversationTimestamp = options.longs === String ? String(message.conversationTimestamp) : message.conversationTimestamp; + else + object.conversationTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.conversationTimestamp) : options.longs === Number ? new $util.LongBits(message.conversationTimestamp.low >>> 0, message.conversationTimestamp.high >>> 0).toNumber(true) : message.conversationTimestamp; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.pHash != null && message.hasOwnProperty("pHash")) + object.pHash = message.pHash; + if (message.notSpam != null && message.hasOwnProperty("notSpam")) + object.notSpam = message.notSpam; + if (message.archived != null && message.hasOwnProperty("archived")) + object.archived = message.archived; if (message.disappearingMode != null && message.hasOwnProperty("disappearingMode")) object.disappearingMode = $root.proto.DisappearingMode.toObject(message.disappearingMode, options); - if (message.actionLink != null && message.hasOwnProperty("actionLink")) - object.actionLink = $root.proto.ActionLink.toObject(message.actionLink, options); - if (message.groupSubject != null && message.hasOwnProperty("groupSubject")) - object.groupSubject = message.groupSubject; - if (message.parentGroupJid != null && message.hasOwnProperty("parentGroupJid")) - object.parentGroupJid = message.parentGroupJid; - if (message.trustBannerType != null && message.hasOwnProperty("trustBannerType")) - object.trustBannerType = message.trustBannerType; - if (message.trustBannerAction != null && message.hasOwnProperty("trustBannerAction")) - object.trustBannerAction = message.trustBannerAction; - if (message.isSampled != null && message.hasOwnProperty("isSampled")) - object.isSampled = message.isSampled; - if (message.groupMentions && message.groupMentions.length) { - object.groupMentions = []; - for (var j = 0; j < message.groupMentions.length; ++j) - object.groupMentions[j] = $root.proto.GroupMention.toObject(message.groupMentions[j], options); + if (message.unreadMentionCount != null && message.hasOwnProperty("unreadMentionCount")) + object.unreadMentionCount = message.unreadMentionCount; + if (message.markedAsUnread != null && message.hasOwnProperty("markedAsUnread")) + object.markedAsUnread = message.markedAsUnread; + if (message.participant && message.participant.length) { + object.participant = []; + for (var j = 0; j < message.participant.length; ++j) + object.participant[j] = $root.proto.GroupParticipant.toObject(message.participant[j], options); } - if (message.utm != null && message.hasOwnProperty("utm")) - object.utm = $root.proto.ContextInfo.UTMInfo.toObject(message.utm, options); - if (message.forwardedNewsletterMessageInfo != null && message.hasOwnProperty("forwardedNewsletterMessageInfo")) - object.forwardedNewsletterMessageInfo = $root.proto.ContextInfo.ForwardedNewsletterMessageInfo.toObject(message.forwardedNewsletterMessageInfo, options); - if (message.businessMessageForwardInfo != null && message.hasOwnProperty("businessMessageForwardInfo")) - object.businessMessageForwardInfo = $root.proto.ContextInfo.BusinessMessageForwardInfo.toObject(message.businessMessageForwardInfo, options); + if (message.tcToken != null && message.hasOwnProperty("tcToken")) + object.tcToken = options.bytes === String ? $util.base64.encode(message.tcToken, 0, message.tcToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.tcToken) : message.tcToken; + if (message.tcTokenTimestamp != null && message.hasOwnProperty("tcTokenTimestamp")) + if (typeof message.tcTokenTimestamp === "number") + object.tcTokenTimestamp = options.longs === String ? String(message.tcTokenTimestamp) : message.tcTokenTimestamp; + else + object.tcTokenTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.tcTokenTimestamp) : options.longs === Number ? new $util.LongBits(message.tcTokenTimestamp.low >>> 0, message.tcTokenTimestamp.high >>> 0).toNumber(true) : message.tcTokenTimestamp; + if (message.contactPrimaryIdentityKey != null && message.hasOwnProperty("contactPrimaryIdentityKey")) + object.contactPrimaryIdentityKey = options.bytes === String ? $util.base64.encode(message.contactPrimaryIdentityKey, 0, message.contactPrimaryIdentityKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.contactPrimaryIdentityKey) : message.contactPrimaryIdentityKey; + if (message.pinned != null && message.hasOwnProperty("pinned")) + object.pinned = message.pinned; + if (message.muteEndTime != null && message.hasOwnProperty("muteEndTime")) + if (typeof message.muteEndTime === "number") + object.muteEndTime = options.longs === String ? String(message.muteEndTime) : message.muteEndTime; + else + object.muteEndTime = options.longs === String ? $util.Long.prototype.toString.call(message.muteEndTime) : options.longs === Number ? new $util.LongBits(message.muteEndTime.low >>> 0, message.muteEndTime.high >>> 0).toNumber(true) : message.muteEndTime; + if (message.wallpaper != null && message.hasOwnProperty("wallpaper")) + object.wallpaper = $root.proto.WallpaperSettings.toObject(message.wallpaper, options); + if (message.mediaVisibility != null && message.hasOwnProperty("mediaVisibility")) + object.mediaVisibility = options.enums === String ? $root.proto.MediaVisibility[message.mediaVisibility] : message.mediaVisibility; + if (message.tcTokenSenderTimestamp != null && message.hasOwnProperty("tcTokenSenderTimestamp")) + if (typeof message.tcTokenSenderTimestamp === "number") + object.tcTokenSenderTimestamp = options.longs === String ? String(message.tcTokenSenderTimestamp) : message.tcTokenSenderTimestamp; + else + object.tcTokenSenderTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.tcTokenSenderTimestamp) : options.longs === Number ? new $util.LongBits(message.tcTokenSenderTimestamp.low >>> 0, message.tcTokenSenderTimestamp.high >>> 0).toNumber(true) : message.tcTokenSenderTimestamp; + if (message.suspended != null && message.hasOwnProperty("suspended")) + object.suspended = message.suspended; + if (message.terminated != null && message.hasOwnProperty("terminated")) + object.terminated = message.terminated; + if (message.createdAt != null && message.hasOwnProperty("createdAt")) + if (typeof message.createdAt === "number") + object.createdAt = options.longs === String ? String(message.createdAt) : message.createdAt; + else + object.createdAt = options.longs === String ? $util.Long.prototype.toString.call(message.createdAt) : options.longs === Number ? new $util.LongBits(message.createdAt.low >>> 0, message.createdAt.high >>> 0).toNumber(true) : message.createdAt; + if (message.createdBy != null && message.hasOwnProperty("createdBy")) + object.createdBy = message.createdBy; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.support != null && message.hasOwnProperty("support")) + object.support = message.support; + if (message.isParentGroup != null && message.hasOwnProperty("isParentGroup")) + object.isParentGroup = message.isParentGroup; + if (message.isDefaultSubgroup != null && message.hasOwnProperty("isDefaultSubgroup")) + object.isDefaultSubgroup = message.isDefaultSubgroup; + if (message.parentGroupId != null && message.hasOwnProperty("parentGroupId")) + object.parentGroupId = message.parentGroupId; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.pnJid != null && message.hasOwnProperty("pnJid")) + object.pnJid = message.pnJid; + if (message.shareOwnPn != null && message.hasOwnProperty("shareOwnPn")) + object.shareOwnPn = message.shareOwnPn; + if (message.pnhDuplicateLidThread != null && message.hasOwnProperty("pnhDuplicateLidThread")) + object.pnhDuplicateLidThread = message.pnhDuplicateLidThread; + if (message.lidJid != null && message.hasOwnProperty("lidJid")) + object.lidJid = message.lidJid; + if (message.username != null && message.hasOwnProperty("username")) + object.username = message.username; + if (message.lidOriginType != null && message.hasOwnProperty("lidOriginType")) + object.lidOriginType = message.lidOriginType; + if (message.commentsCount != null && message.hasOwnProperty("commentsCount")) + object.commentsCount = message.commentsCount; return object; }; /** - * Converts this ContextInfo to JSON. + * Converts this Conversation to JSON. * @function toJSON - * @memberof proto.ContextInfo + * @memberof proto.Conversation * @instance * @returns {Object.} JSON object */ - ContextInfo.prototype.toJSON = function toJSON() { + Conversation.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - ContextInfo.AdReplyInfo = (function() { - - /** - * Properties of an AdReplyInfo. - * @memberof proto.ContextInfo - * @interface IAdReplyInfo - * @property {string|null} [advertiserName] AdReplyInfo advertiserName - * @property {proto.ContextInfo.AdReplyInfo.MediaType|null} [mediaType] AdReplyInfo mediaType - * @property {Uint8Array|null} [jpegThumbnail] AdReplyInfo jpegThumbnail - * @property {string|null} [caption] AdReplyInfo caption - */ - - /** - * Constructs a new AdReplyInfo. - * @memberof proto.ContextInfo - * @classdesc Represents an AdReplyInfo. - * @implements IAdReplyInfo - * @constructor - * @param {proto.ContextInfo.IAdReplyInfo=} [properties] Properties to set - */ - function AdReplyInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AdReplyInfo advertiserName. - * @member {string} advertiserName - * @memberof proto.ContextInfo.AdReplyInfo - * @instance - */ - AdReplyInfo.prototype.advertiserName = ""; + /** + * EndOfHistoryTransferType enum. + * @name proto.Conversation.EndOfHistoryTransferType + * @enum {number} + * @property {number} COMPLETE_BUT_MORE_MESSAGES_REMAIN_ON_PRIMARY=0 COMPLETE_BUT_MORE_MESSAGES_REMAIN_ON_PRIMARY value + * @property {number} COMPLETE_AND_NO_MORE_MESSAGE_REMAIN_ON_PRIMARY=1 COMPLETE_AND_NO_MORE_MESSAGE_REMAIN_ON_PRIMARY value + * @property {number} COMPLETE_ON_DEMAND_SYNC_BUT_MORE_MSG_REMAIN_ON_PRIMARY=2 COMPLETE_ON_DEMAND_SYNC_BUT_MORE_MSG_REMAIN_ON_PRIMARY value + */ + Conversation.EndOfHistoryTransferType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "COMPLETE_BUT_MORE_MESSAGES_REMAIN_ON_PRIMARY"] = 0; + values[valuesById[1] = "COMPLETE_AND_NO_MORE_MESSAGE_REMAIN_ON_PRIMARY"] = 1; + values[valuesById[2] = "COMPLETE_ON_DEMAND_SYNC_BUT_MORE_MSG_REMAIN_ON_PRIMARY"] = 2; + return values; + })(); - /** - * AdReplyInfo mediaType. - * @member {proto.ContextInfo.AdReplyInfo.MediaType} mediaType - * @memberof proto.ContextInfo.AdReplyInfo - * @instance - */ - AdReplyInfo.prototype.mediaType = 0; + return Conversation; + })(); - /** - * AdReplyInfo jpegThumbnail. - * @member {Uint8Array} jpegThumbnail - * @memberof proto.ContextInfo.AdReplyInfo - * @instance - */ - AdReplyInfo.prototype.jpegThumbnail = $util.newBuffer([]); + proto.DeviceConsistencyCodeMessage = (function() { - /** - * AdReplyInfo caption. - * @member {string} caption - * @memberof proto.ContextInfo.AdReplyInfo - * @instance - */ - AdReplyInfo.prototype.caption = ""; + /** + * Properties of a DeviceConsistencyCodeMessage. + * @memberof proto + * @interface IDeviceConsistencyCodeMessage + * @property {number|null} [generation] DeviceConsistencyCodeMessage generation + * @property {Uint8Array|null} [signature] DeviceConsistencyCodeMessage signature + */ - /** - * Creates a new AdReplyInfo instance using the specified properties. - * @function create - * @memberof proto.ContextInfo.AdReplyInfo - * @static - * @param {proto.ContextInfo.IAdReplyInfo=} [properties] Properties to set - * @returns {proto.ContextInfo.AdReplyInfo} AdReplyInfo instance - */ - AdReplyInfo.create = function create(properties) { - return new AdReplyInfo(properties); - }; + /** + * Constructs a new DeviceConsistencyCodeMessage. + * @memberof proto + * @classdesc Represents a DeviceConsistencyCodeMessage. + * @implements IDeviceConsistencyCodeMessage + * @constructor + * @param {proto.IDeviceConsistencyCodeMessage=} [properties] Properties to set + */ + function DeviceConsistencyCodeMessage(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Encodes the specified AdReplyInfo message. Does not implicitly {@link proto.ContextInfo.AdReplyInfo.verify|verify} messages. - * @function encode - * @memberof proto.ContextInfo.AdReplyInfo - * @static - * @param {proto.ContextInfo.IAdReplyInfo} message AdReplyInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AdReplyInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.advertiserName != null && Object.hasOwnProperty.call(message, "advertiserName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.advertiserName); - if (message.mediaType != null && Object.hasOwnProperty.call(message, "mediaType")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.mediaType); - if (message.jpegThumbnail != null && Object.hasOwnProperty.call(message, "jpegThumbnail")) - writer.uint32(/* id 16, wireType 2 =*/130).bytes(message.jpegThumbnail); - if (message.caption != null && Object.hasOwnProperty.call(message, "caption")) - writer.uint32(/* id 17, wireType 2 =*/138).string(message.caption); - return writer; - }; + /** + * DeviceConsistencyCodeMessage generation. + * @member {number} generation + * @memberof proto.DeviceConsistencyCodeMessage + * @instance + */ + DeviceConsistencyCodeMessage.prototype.generation = 0; - /** - * Encodes the specified AdReplyInfo message, length delimited. Does not implicitly {@link proto.ContextInfo.AdReplyInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.ContextInfo.AdReplyInfo - * @static - * @param {proto.ContextInfo.IAdReplyInfo} message AdReplyInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AdReplyInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * DeviceConsistencyCodeMessage signature. + * @member {Uint8Array} signature + * @memberof proto.DeviceConsistencyCodeMessage + * @instance + */ + DeviceConsistencyCodeMessage.prototype.signature = $util.newBuffer([]); - /** - * Decodes an AdReplyInfo message from the specified reader or buffer. - * @function decode - * @memberof proto.ContextInfo.AdReplyInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.ContextInfo.AdReplyInfo} AdReplyInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AdReplyInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.ContextInfo.AdReplyInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.advertiserName = reader.string(); - break; - case 2: - message.mediaType = reader.int32(); - break; - case 16: - message.jpegThumbnail = reader.bytes(); - break; - case 17: - message.caption = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Creates a new DeviceConsistencyCodeMessage instance using the specified properties. + * @function create + * @memberof proto.DeviceConsistencyCodeMessage + * @static + * @param {proto.IDeviceConsistencyCodeMessage=} [properties] Properties to set + * @returns {proto.DeviceConsistencyCodeMessage} DeviceConsistencyCodeMessage instance + */ + DeviceConsistencyCodeMessage.create = function create(properties) { + return new DeviceConsistencyCodeMessage(properties); + }; - /** - * Decodes an AdReplyInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.ContextInfo.AdReplyInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.ContextInfo.AdReplyInfo} AdReplyInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AdReplyInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encodes the specified DeviceConsistencyCodeMessage message. Does not implicitly {@link proto.DeviceConsistencyCodeMessage.verify|verify} messages. + * @function encode + * @memberof proto.DeviceConsistencyCodeMessage + * @static + * @param {proto.IDeviceConsistencyCodeMessage} message DeviceConsistencyCodeMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeviceConsistencyCodeMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.generation != null && Object.hasOwnProperty.call(message, "generation")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.generation); + if (message.signature != null && Object.hasOwnProperty.call(message, "signature")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.signature); + return writer; + }; - /** - * Verifies an AdReplyInfo message. - * @function verify - * @memberof proto.ContextInfo.AdReplyInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AdReplyInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.advertiserName != null && message.hasOwnProperty("advertiserName")) - if (!$util.isString(message.advertiserName)) - return "advertiserName: string expected"; - if (message.mediaType != null && message.hasOwnProperty("mediaType")) - switch (message.mediaType) { - default: - return "mediaType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail")) - if (!(message.jpegThumbnail && typeof message.jpegThumbnail.length === "number" || $util.isString(message.jpegThumbnail))) - return "jpegThumbnail: buffer expected"; - if (message.caption != null && message.hasOwnProperty("caption")) - if (!$util.isString(message.caption)) - return "caption: string expected"; - return null; - }; + /** + * Encodes the specified DeviceConsistencyCodeMessage message, length delimited. Does not implicitly {@link proto.DeviceConsistencyCodeMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.DeviceConsistencyCodeMessage + * @static + * @param {proto.IDeviceConsistencyCodeMessage} message DeviceConsistencyCodeMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeviceConsistencyCodeMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates an AdReplyInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.ContextInfo.AdReplyInfo - * @static - * @param {Object.} object Plain object - * @returns {proto.ContextInfo.AdReplyInfo} AdReplyInfo - */ - AdReplyInfo.fromObject = function fromObject(object) { - if (object instanceof $root.proto.ContextInfo.AdReplyInfo) - return object; - var message = new $root.proto.ContextInfo.AdReplyInfo(); - if (object.advertiserName != null) - message.advertiserName = String(object.advertiserName); - switch (object.mediaType) { - case "NONE": - case 0: - message.mediaType = 0; - break; - case "IMAGE": + /** + * Decodes a DeviceConsistencyCodeMessage message from the specified reader or buffer. + * @function decode + * @memberof proto.DeviceConsistencyCodeMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.DeviceConsistencyCodeMessage} DeviceConsistencyCodeMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeviceConsistencyCodeMessage.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.DeviceConsistencyCodeMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { case 1: - message.mediaType = 1; + message.generation = reader.uint32(); break; - case "VIDEO": case 2: - message.mediaType = 2; + message.signature = reader.bytes(); + break; + default: + reader.skipType(tag & 7); break; } - if (object.jpegThumbnail != null) - if (typeof object.jpegThumbnail === "string") - $util.base64.decode(object.jpegThumbnail, message.jpegThumbnail = $util.newBuffer($util.base64.length(object.jpegThumbnail)), 0); - else if (object.jpegThumbnail.length) - message.jpegThumbnail = object.jpegThumbnail; - if (object.caption != null) - message.caption = String(object.caption); - return message; - }; - - /** - * Creates a plain object from an AdReplyInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.ContextInfo.AdReplyInfo - * @static - * @param {proto.ContextInfo.AdReplyInfo} message AdReplyInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AdReplyInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.advertiserName = ""; - object.mediaType = options.enums === String ? "NONE" : 0; - if (options.bytes === String) - object.jpegThumbnail = ""; - else { - object.jpegThumbnail = []; - if (options.bytes !== Array) - object.jpegThumbnail = $util.newBuffer(object.jpegThumbnail); - } - object.caption = ""; - } - if (message.advertiserName != null && message.hasOwnProperty("advertiserName")) - object.advertiserName = message.advertiserName; - if (message.mediaType != null && message.hasOwnProperty("mediaType")) - object.mediaType = options.enums === String ? $root.proto.ContextInfo.AdReplyInfo.MediaType[message.mediaType] : message.mediaType; - if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail")) - object.jpegThumbnail = options.bytes === String ? $util.base64.encode(message.jpegThumbnail, 0, message.jpegThumbnail.length) : options.bytes === Array ? Array.prototype.slice.call(message.jpegThumbnail) : message.jpegThumbnail; - if (message.caption != null && message.hasOwnProperty("caption")) - object.caption = message.caption; - return object; - }; - - /** - * Converts this AdReplyInfo to JSON. - * @function toJSON - * @memberof proto.ContextInfo.AdReplyInfo - * @instance - * @returns {Object.} JSON object - */ - AdReplyInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * MediaType enum. - * @name proto.ContextInfo.AdReplyInfo.MediaType - * @enum {number} - * @property {number} NONE=0 NONE value - * @property {number} IMAGE=1 IMAGE value - * @property {number} VIDEO=2 VIDEO value - */ - AdReplyInfo.MediaType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NONE"] = 0; - values[valuesById[1] = "IMAGE"] = 1; - values[valuesById[2] = "VIDEO"] = 2; - return values; - })(); + } + return message; + }; - return AdReplyInfo; - })(); + /** + * Decodes a DeviceConsistencyCodeMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.DeviceConsistencyCodeMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.DeviceConsistencyCodeMessage} DeviceConsistencyCodeMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeviceConsistencyCodeMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - ContextInfo.BusinessMessageForwardInfo = (function() { + /** + * Verifies a DeviceConsistencyCodeMessage message. + * @function verify + * @memberof proto.DeviceConsistencyCodeMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeviceConsistencyCodeMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.generation != null && message.hasOwnProperty("generation")) + if (!$util.isInteger(message.generation)) + return "generation: integer expected"; + if (message.signature != null && message.hasOwnProperty("signature")) + if (!(message.signature && typeof message.signature.length === "number" || $util.isString(message.signature))) + return "signature: buffer expected"; + return null; + }; - /** - * Properties of a BusinessMessageForwardInfo. - * @memberof proto.ContextInfo - * @interface IBusinessMessageForwardInfo - * @property {string|null} [businessOwnerJid] BusinessMessageForwardInfo businessOwnerJid - */ + /** + * Creates a DeviceConsistencyCodeMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.DeviceConsistencyCodeMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.DeviceConsistencyCodeMessage} DeviceConsistencyCodeMessage + */ + DeviceConsistencyCodeMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.DeviceConsistencyCodeMessage) + return object; + var message = new $root.proto.DeviceConsistencyCodeMessage(); + if (object.generation != null) + message.generation = object.generation >>> 0; + if (object.signature != null) + if (typeof object.signature === "string") + $util.base64.decode(object.signature, message.signature = $util.newBuffer($util.base64.length(object.signature)), 0); + else if (object.signature.length) + message.signature = object.signature; + return message; + }; - /** - * Constructs a new BusinessMessageForwardInfo. - * @memberof proto.ContextInfo - * @classdesc Represents a BusinessMessageForwardInfo. - * @implements IBusinessMessageForwardInfo - * @constructor - * @param {proto.ContextInfo.IBusinessMessageForwardInfo=} [properties] Properties to set - */ - function BusinessMessageForwardInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Creates a plain object from a DeviceConsistencyCodeMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.DeviceConsistencyCodeMessage + * @static + * @param {proto.DeviceConsistencyCodeMessage} message DeviceConsistencyCodeMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeviceConsistencyCodeMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.generation = 0; + if (options.bytes === String) + object.signature = ""; + else { + object.signature = []; + if (options.bytes !== Array) + object.signature = $util.newBuffer(object.signature); + } } + if (message.generation != null && message.hasOwnProperty("generation")) + object.generation = message.generation; + if (message.signature != null && message.hasOwnProperty("signature")) + object.signature = options.bytes === String ? $util.base64.encode(message.signature, 0, message.signature.length) : options.bytes === Array ? Array.prototype.slice.call(message.signature) : message.signature; + return object; + }; - /** - * BusinessMessageForwardInfo businessOwnerJid. - * @member {string} businessOwnerJid - * @memberof proto.ContextInfo.BusinessMessageForwardInfo - * @instance - */ - BusinessMessageForwardInfo.prototype.businessOwnerJid = ""; - - /** - * Creates a new BusinessMessageForwardInfo instance using the specified properties. - * @function create - * @memberof proto.ContextInfo.BusinessMessageForwardInfo - * @static - * @param {proto.ContextInfo.IBusinessMessageForwardInfo=} [properties] Properties to set - * @returns {proto.ContextInfo.BusinessMessageForwardInfo} BusinessMessageForwardInfo instance - */ - BusinessMessageForwardInfo.create = function create(properties) { - return new BusinessMessageForwardInfo(properties); - }; - - /** - * Encodes the specified BusinessMessageForwardInfo message. Does not implicitly {@link proto.ContextInfo.BusinessMessageForwardInfo.verify|verify} messages. - * @function encode - * @memberof proto.ContextInfo.BusinessMessageForwardInfo - * @static - * @param {proto.ContextInfo.IBusinessMessageForwardInfo} message BusinessMessageForwardInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BusinessMessageForwardInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.businessOwnerJid != null && Object.hasOwnProperty.call(message, "businessOwnerJid")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.businessOwnerJid); - return writer; - }; + /** + * Converts this DeviceConsistencyCodeMessage to JSON. + * @function toJSON + * @memberof proto.DeviceConsistencyCodeMessage + * @instance + * @returns {Object.} JSON object + */ + DeviceConsistencyCodeMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Encodes the specified BusinessMessageForwardInfo message, length delimited. Does not implicitly {@link proto.ContextInfo.BusinessMessageForwardInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.ContextInfo.BusinessMessageForwardInfo - * @static - * @param {proto.ContextInfo.IBusinessMessageForwardInfo} message BusinessMessageForwardInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BusinessMessageForwardInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + return DeviceConsistencyCodeMessage; + })(); - /** - * Decodes a BusinessMessageForwardInfo message from the specified reader or buffer. - * @function decode - * @memberof proto.ContextInfo.BusinessMessageForwardInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.ContextInfo.BusinessMessageForwardInfo} BusinessMessageForwardInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BusinessMessageForwardInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.ContextInfo.BusinessMessageForwardInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.businessOwnerJid = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + proto.DeviceListMetadata = (function() { - /** - * Decodes a BusinessMessageForwardInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.ContextInfo.BusinessMessageForwardInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.ContextInfo.BusinessMessageForwardInfo} BusinessMessageForwardInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BusinessMessageForwardInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Properties of a DeviceListMetadata. + * @memberof proto + * @interface IDeviceListMetadata + * @property {Uint8Array|null} [senderKeyHash] DeviceListMetadata senderKeyHash + * @property {number|Long|null} [senderTimestamp] DeviceListMetadata senderTimestamp + * @property {Array.|null} [senderKeyIndexes] DeviceListMetadata senderKeyIndexes + * @property {proto.ADVEncryptionType|null} [senderAccountType] DeviceListMetadata senderAccountType + * @property {proto.ADVEncryptionType|null} [receiverAccountType] DeviceListMetadata receiverAccountType + * @property {Uint8Array|null} [recipientKeyHash] DeviceListMetadata recipientKeyHash + * @property {number|Long|null} [recipientTimestamp] DeviceListMetadata recipientTimestamp + * @property {Array.|null} [recipientKeyIndexes] DeviceListMetadata recipientKeyIndexes + */ - /** - * Verifies a BusinessMessageForwardInfo message. - * @function verify - * @memberof proto.ContextInfo.BusinessMessageForwardInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BusinessMessageForwardInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.businessOwnerJid != null && message.hasOwnProperty("businessOwnerJid")) - if (!$util.isString(message.businessOwnerJid)) - return "businessOwnerJid: string expected"; - return null; - }; + /** + * Constructs a new DeviceListMetadata. + * @memberof proto + * @classdesc Represents a DeviceListMetadata. + * @implements IDeviceListMetadata + * @constructor + * @param {proto.IDeviceListMetadata=} [properties] Properties to set + */ + function DeviceListMetadata(properties) { + this.senderKeyIndexes = []; + this.recipientKeyIndexes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Creates a BusinessMessageForwardInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.ContextInfo.BusinessMessageForwardInfo - * @static - * @param {Object.} object Plain object - * @returns {proto.ContextInfo.BusinessMessageForwardInfo} BusinessMessageForwardInfo - */ - BusinessMessageForwardInfo.fromObject = function fromObject(object) { - if (object instanceof $root.proto.ContextInfo.BusinessMessageForwardInfo) - return object; - var message = new $root.proto.ContextInfo.BusinessMessageForwardInfo(); - if (object.businessOwnerJid != null) - message.businessOwnerJid = String(object.businessOwnerJid); - return message; - }; + /** + * DeviceListMetadata senderKeyHash. + * @member {Uint8Array} senderKeyHash + * @memberof proto.DeviceListMetadata + * @instance + */ + DeviceListMetadata.prototype.senderKeyHash = $util.newBuffer([]); - /** - * Creates a plain object from a BusinessMessageForwardInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.ContextInfo.BusinessMessageForwardInfo - * @static - * @param {proto.ContextInfo.BusinessMessageForwardInfo} message BusinessMessageForwardInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BusinessMessageForwardInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.businessOwnerJid = ""; - if (message.businessOwnerJid != null && message.hasOwnProperty("businessOwnerJid")) - object.businessOwnerJid = message.businessOwnerJid; - return object; - }; + /** + * DeviceListMetadata senderTimestamp. + * @member {number|Long} senderTimestamp + * @memberof proto.DeviceListMetadata + * @instance + */ + DeviceListMetadata.prototype.senderTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - /** - * Converts this BusinessMessageForwardInfo to JSON. - * @function toJSON - * @memberof proto.ContextInfo.BusinessMessageForwardInfo - * @instance - * @returns {Object.} JSON object - */ - BusinessMessageForwardInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * DeviceListMetadata senderKeyIndexes. + * @member {Array.} senderKeyIndexes + * @memberof proto.DeviceListMetadata + * @instance + */ + DeviceListMetadata.prototype.senderKeyIndexes = $util.emptyArray; - return BusinessMessageForwardInfo; - })(); + /** + * DeviceListMetadata senderAccountType. + * @member {proto.ADVEncryptionType} senderAccountType + * @memberof proto.DeviceListMetadata + * @instance + */ + DeviceListMetadata.prototype.senderAccountType = 0; - ContextInfo.ExternalAdReplyInfo = (function() { + /** + * DeviceListMetadata receiverAccountType. + * @member {proto.ADVEncryptionType} receiverAccountType + * @memberof proto.DeviceListMetadata + * @instance + */ + DeviceListMetadata.prototype.receiverAccountType = 0; - /** - * Properties of an ExternalAdReplyInfo. - * @memberof proto.ContextInfo - * @interface IExternalAdReplyInfo - * @property {string|null} [title] ExternalAdReplyInfo title - * @property {string|null} [body] ExternalAdReplyInfo body - * @property {proto.ContextInfo.ExternalAdReplyInfo.MediaType|null} [mediaType] ExternalAdReplyInfo mediaType - * @property {string|null} [thumbnailUrl] ExternalAdReplyInfo thumbnailUrl - * @property {string|null} [mediaUrl] ExternalAdReplyInfo mediaUrl - * @property {Uint8Array|null} [thumbnail] ExternalAdReplyInfo thumbnail - * @property {string|null} [sourceType] ExternalAdReplyInfo sourceType - * @property {string|null} [sourceId] ExternalAdReplyInfo sourceId - * @property {string|null} [sourceUrl] ExternalAdReplyInfo sourceUrl - * @property {boolean|null} [containsAutoReply] ExternalAdReplyInfo containsAutoReply - * @property {boolean|null} [renderLargerThumbnail] ExternalAdReplyInfo renderLargerThumbnail - * @property {boolean|null} [showAdAttribution] ExternalAdReplyInfo showAdAttribution - * @property {string|null} [ctwaClid] ExternalAdReplyInfo ctwaClid - * @property {string|null} [ref] ExternalAdReplyInfo ref - */ + /** + * DeviceListMetadata recipientKeyHash. + * @member {Uint8Array} recipientKeyHash + * @memberof proto.DeviceListMetadata + * @instance + */ + DeviceListMetadata.prototype.recipientKeyHash = $util.newBuffer([]); - /** - * Constructs a new ExternalAdReplyInfo. - * @memberof proto.ContextInfo - * @classdesc Represents an ExternalAdReplyInfo. - * @implements IExternalAdReplyInfo - * @constructor - * @param {proto.ContextInfo.IExternalAdReplyInfo=} [properties] Properties to set - */ - function ExternalAdReplyInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * DeviceListMetadata recipientTimestamp. + * @member {number|Long} recipientTimestamp + * @memberof proto.DeviceListMetadata + * @instance + */ + DeviceListMetadata.prototype.recipientTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - /** - * ExternalAdReplyInfo title. - * @member {string} title - * @memberof proto.ContextInfo.ExternalAdReplyInfo - * @instance - */ - ExternalAdReplyInfo.prototype.title = ""; + /** + * DeviceListMetadata recipientKeyIndexes. + * @member {Array.} recipientKeyIndexes + * @memberof proto.DeviceListMetadata + * @instance + */ + DeviceListMetadata.prototype.recipientKeyIndexes = $util.emptyArray; - /** - * ExternalAdReplyInfo body. - * @member {string} body - * @memberof proto.ContextInfo.ExternalAdReplyInfo - * @instance - */ - ExternalAdReplyInfo.prototype.body = ""; + /** + * Creates a new DeviceListMetadata instance using the specified properties. + * @function create + * @memberof proto.DeviceListMetadata + * @static + * @param {proto.IDeviceListMetadata=} [properties] Properties to set + * @returns {proto.DeviceListMetadata} DeviceListMetadata instance + */ + DeviceListMetadata.create = function create(properties) { + return new DeviceListMetadata(properties); + }; - /** - * ExternalAdReplyInfo mediaType. - * @member {proto.ContextInfo.ExternalAdReplyInfo.MediaType} mediaType - * @memberof proto.ContextInfo.ExternalAdReplyInfo - * @instance - */ - ExternalAdReplyInfo.prototype.mediaType = 0; + /** + * Encodes the specified DeviceListMetadata message. Does not implicitly {@link proto.DeviceListMetadata.verify|verify} messages. + * @function encode + * @memberof proto.DeviceListMetadata + * @static + * @param {proto.IDeviceListMetadata} message DeviceListMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeviceListMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.senderKeyHash != null && Object.hasOwnProperty.call(message, "senderKeyHash")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.senderKeyHash); + if (message.senderTimestamp != null && Object.hasOwnProperty.call(message, "senderTimestamp")) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.senderTimestamp); + if (message.senderKeyIndexes != null && message.senderKeyIndexes.length) { + writer.uint32(/* id 3, wireType 2 =*/26).fork(); + for (var i = 0; i < message.senderKeyIndexes.length; ++i) + writer.uint32(message.senderKeyIndexes[i]); + writer.ldelim(); + } + if (message.senderAccountType != null && Object.hasOwnProperty.call(message, "senderAccountType")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.senderAccountType); + if (message.receiverAccountType != null && Object.hasOwnProperty.call(message, "receiverAccountType")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.receiverAccountType); + if (message.recipientKeyHash != null && Object.hasOwnProperty.call(message, "recipientKeyHash")) + writer.uint32(/* id 8, wireType 2 =*/66).bytes(message.recipientKeyHash); + if (message.recipientTimestamp != null && Object.hasOwnProperty.call(message, "recipientTimestamp")) + writer.uint32(/* id 9, wireType 0 =*/72).uint64(message.recipientTimestamp); + if (message.recipientKeyIndexes != null && message.recipientKeyIndexes.length) { + writer.uint32(/* id 10, wireType 2 =*/82).fork(); + for (var i = 0; i < message.recipientKeyIndexes.length; ++i) + writer.uint32(message.recipientKeyIndexes[i]); + writer.ldelim(); + } + return writer; + }; - /** - * ExternalAdReplyInfo thumbnailUrl. - * @member {string} thumbnailUrl - * @memberof proto.ContextInfo.ExternalAdReplyInfo - * @instance - */ - ExternalAdReplyInfo.prototype.thumbnailUrl = ""; + /** + * Encodes the specified DeviceListMetadata message, length delimited. Does not implicitly {@link proto.DeviceListMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.DeviceListMetadata + * @static + * @param {proto.IDeviceListMetadata} message DeviceListMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeviceListMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * ExternalAdReplyInfo mediaUrl. - * @member {string} mediaUrl - * @memberof proto.ContextInfo.ExternalAdReplyInfo - * @instance - */ - ExternalAdReplyInfo.prototype.mediaUrl = ""; + /** + * Decodes a DeviceListMetadata message from the specified reader or buffer. + * @function decode + * @memberof proto.DeviceListMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.DeviceListMetadata} DeviceListMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeviceListMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.DeviceListMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.senderKeyHash = reader.bytes(); + break; + case 2: + message.senderTimestamp = reader.uint64(); + break; + case 3: + if (!(message.senderKeyIndexes && message.senderKeyIndexes.length)) + message.senderKeyIndexes = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.senderKeyIndexes.push(reader.uint32()); + } else + message.senderKeyIndexes.push(reader.uint32()); + break; + case 4: + message.senderAccountType = reader.int32(); + break; + case 5: + message.receiverAccountType = reader.int32(); + break; + case 8: + message.recipientKeyHash = reader.bytes(); + break; + case 9: + message.recipientTimestamp = reader.uint64(); + break; + case 10: + if (!(message.recipientKeyIndexes && message.recipientKeyIndexes.length)) + message.recipientKeyIndexes = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.recipientKeyIndexes.push(reader.uint32()); + } else + message.recipientKeyIndexes.push(reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * ExternalAdReplyInfo thumbnail. - * @member {Uint8Array} thumbnail - * @memberof proto.ContextInfo.ExternalAdReplyInfo - * @instance - */ - ExternalAdReplyInfo.prototype.thumbnail = $util.newBuffer([]); + /** + * Decodes a DeviceListMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.DeviceListMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.DeviceListMetadata} DeviceListMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeviceListMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * ExternalAdReplyInfo sourceType. - * @member {string} sourceType - * @memberof proto.ContextInfo.ExternalAdReplyInfo - * @instance - */ - ExternalAdReplyInfo.prototype.sourceType = ""; + /** + * Verifies a DeviceListMetadata message. + * @function verify + * @memberof proto.DeviceListMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeviceListMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.senderKeyHash != null && message.hasOwnProperty("senderKeyHash")) + if (!(message.senderKeyHash && typeof message.senderKeyHash.length === "number" || $util.isString(message.senderKeyHash))) + return "senderKeyHash: buffer expected"; + if (message.senderTimestamp != null && message.hasOwnProperty("senderTimestamp")) + if (!$util.isInteger(message.senderTimestamp) && !(message.senderTimestamp && $util.isInteger(message.senderTimestamp.low) && $util.isInteger(message.senderTimestamp.high))) + return "senderTimestamp: integer|Long expected"; + if (message.senderKeyIndexes != null && message.hasOwnProperty("senderKeyIndexes")) { + if (!Array.isArray(message.senderKeyIndexes)) + return "senderKeyIndexes: array expected"; + for (var i = 0; i < message.senderKeyIndexes.length; ++i) + if (!$util.isInteger(message.senderKeyIndexes[i])) + return "senderKeyIndexes: integer[] expected"; + } + if (message.senderAccountType != null && message.hasOwnProperty("senderAccountType")) + switch (message.senderAccountType) { + default: + return "senderAccountType: enum value expected"; + case 0: + case 1: + break; + } + if (message.receiverAccountType != null && message.hasOwnProperty("receiverAccountType")) + switch (message.receiverAccountType) { + default: + return "receiverAccountType: enum value expected"; + case 0: + case 1: + break; + } + if (message.recipientKeyHash != null && message.hasOwnProperty("recipientKeyHash")) + if (!(message.recipientKeyHash && typeof message.recipientKeyHash.length === "number" || $util.isString(message.recipientKeyHash))) + return "recipientKeyHash: buffer expected"; + if (message.recipientTimestamp != null && message.hasOwnProperty("recipientTimestamp")) + if (!$util.isInteger(message.recipientTimestamp) && !(message.recipientTimestamp && $util.isInteger(message.recipientTimestamp.low) && $util.isInteger(message.recipientTimestamp.high))) + return "recipientTimestamp: integer|Long expected"; + if (message.recipientKeyIndexes != null && message.hasOwnProperty("recipientKeyIndexes")) { + if (!Array.isArray(message.recipientKeyIndexes)) + return "recipientKeyIndexes: array expected"; + for (var i = 0; i < message.recipientKeyIndexes.length; ++i) + if (!$util.isInteger(message.recipientKeyIndexes[i])) + return "recipientKeyIndexes: integer[] expected"; + } + return null; + }; - /** - * ExternalAdReplyInfo sourceId. - * @member {string} sourceId - * @memberof proto.ContextInfo.ExternalAdReplyInfo - * @instance - */ - ExternalAdReplyInfo.prototype.sourceId = ""; + /** + * Creates a DeviceListMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.DeviceListMetadata + * @static + * @param {Object.} object Plain object + * @returns {proto.DeviceListMetadata} DeviceListMetadata + */ + DeviceListMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.proto.DeviceListMetadata) + return object; + var message = new $root.proto.DeviceListMetadata(); + if (object.senderKeyHash != null) + if (typeof object.senderKeyHash === "string") + $util.base64.decode(object.senderKeyHash, message.senderKeyHash = $util.newBuffer($util.base64.length(object.senderKeyHash)), 0); + else if (object.senderKeyHash.length) + message.senderKeyHash = object.senderKeyHash; + if (object.senderTimestamp != null) + if ($util.Long) + (message.senderTimestamp = $util.Long.fromValue(object.senderTimestamp)).unsigned = true; + else if (typeof object.senderTimestamp === "string") + message.senderTimestamp = parseInt(object.senderTimestamp, 10); + else if (typeof object.senderTimestamp === "number") + message.senderTimestamp = object.senderTimestamp; + else if (typeof object.senderTimestamp === "object") + message.senderTimestamp = new $util.LongBits(object.senderTimestamp.low >>> 0, object.senderTimestamp.high >>> 0).toNumber(true); + if (object.senderKeyIndexes) { + if (!Array.isArray(object.senderKeyIndexes)) + throw TypeError(".proto.DeviceListMetadata.senderKeyIndexes: array expected"); + message.senderKeyIndexes = []; + for (var i = 0; i < object.senderKeyIndexes.length; ++i) + message.senderKeyIndexes[i] = object.senderKeyIndexes[i] >>> 0; + } + switch (object.senderAccountType) { + case "E2EE": + case 0: + message.senderAccountType = 0; + break; + case "HOSTED": + case 1: + message.senderAccountType = 1; + break; + } + switch (object.receiverAccountType) { + case "E2EE": + case 0: + message.receiverAccountType = 0; + break; + case "HOSTED": + case 1: + message.receiverAccountType = 1; + break; + } + if (object.recipientKeyHash != null) + if (typeof object.recipientKeyHash === "string") + $util.base64.decode(object.recipientKeyHash, message.recipientKeyHash = $util.newBuffer($util.base64.length(object.recipientKeyHash)), 0); + else if (object.recipientKeyHash.length) + message.recipientKeyHash = object.recipientKeyHash; + if (object.recipientTimestamp != null) + if ($util.Long) + (message.recipientTimestamp = $util.Long.fromValue(object.recipientTimestamp)).unsigned = true; + else if (typeof object.recipientTimestamp === "string") + message.recipientTimestamp = parseInt(object.recipientTimestamp, 10); + else if (typeof object.recipientTimestamp === "number") + message.recipientTimestamp = object.recipientTimestamp; + else if (typeof object.recipientTimestamp === "object") + message.recipientTimestamp = new $util.LongBits(object.recipientTimestamp.low >>> 0, object.recipientTimestamp.high >>> 0).toNumber(true); + if (object.recipientKeyIndexes) { + if (!Array.isArray(object.recipientKeyIndexes)) + throw TypeError(".proto.DeviceListMetadata.recipientKeyIndexes: array expected"); + message.recipientKeyIndexes = []; + for (var i = 0; i < object.recipientKeyIndexes.length; ++i) + message.recipientKeyIndexes[i] = object.recipientKeyIndexes[i] >>> 0; + } + return message; + }; + + /** + * Creates a plain object from a DeviceListMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.DeviceListMetadata + * @static + * @param {proto.DeviceListMetadata} message DeviceListMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeviceListMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.senderKeyIndexes = []; + object.recipientKeyIndexes = []; + } + if (options.defaults) { + if (options.bytes === String) + object.senderKeyHash = ""; + else { + object.senderKeyHash = []; + if (options.bytes !== Array) + object.senderKeyHash = $util.newBuffer(object.senderKeyHash); + } + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.senderTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.senderTimestamp = options.longs === String ? "0" : 0; + object.senderAccountType = options.enums === String ? "E2EE" : 0; + object.receiverAccountType = options.enums === String ? "E2EE" : 0; + if (options.bytes === String) + object.recipientKeyHash = ""; + else { + object.recipientKeyHash = []; + if (options.bytes !== Array) + object.recipientKeyHash = $util.newBuffer(object.recipientKeyHash); + } + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.recipientTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.recipientTimestamp = options.longs === String ? "0" : 0; + } + if (message.senderKeyHash != null && message.hasOwnProperty("senderKeyHash")) + object.senderKeyHash = options.bytes === String ? $util.base64.encode(message.senderKeyHash, 0, message.senderKeyHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.senderKeyHash) : message.senderKeyHash; + if (message.senderTimestamp != null && message.hasOwnProperty("senderTimestamp")) + if (typeof message.senderTimestamp === "number") + object.senderTimestamp = options.longs === String ? String(message.senderTimestamp) : message.senderTimestamp; + else + object.senderTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.senderTimestamp) : options.longs === Number ? new $util.LongBits(message.senderTimestamp.low >>> 0, message.senderTimestamp.high >>> 0).toNumber(true) : message.senderTimestamp; + if (message.senderKeyIndexes && message.senderKeyIndexes.length) { + object.senderKeyIndexes = []; + for (var j = 0; j < message.senderKeyIndexes.length; ++j) + object.senderKeyIndexes[j] = message.senderKeyIndexes[j]; + } + if (message.senderAccountType != null && message.hasOwnProperty("senderAccountType")) + object.senderAccountType = options.enums === String ? $root.proto.ADVEncryptionType[message.senderAccountType] : message.senderAccountType; + if (message.receiverAccountType != null && message.hasOwnProperty("receiverAccountType")) + object.receiverAccountType = options.enums === String ? $root.proto.ADVEncryptionType[message.receiverAccountType] : message.receiverAccountType; + if (message.recipientKeyHash != null && message.hasOwnProperty("recipientKeyHash")) + object.recipientKeyHash = options.bytes === String ? $util.base64.encode(message.recipientKeyHash, 0, message.recipientKeyHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.recipientKeyHash) : message.recipientKeyHash; + if (message.recipientTimestamp != null && message.hasOwnProperty("recipientTimestamp")) + if (typeof message.recipientTimestamp === "number") + object.recipientTimestamp = options.longs === String ? String(message.recipientTimestamp) : message.recipientTimestamp; + else + object.recipientTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.recipientTimestamp) : options.longs === Number ? new $util.LongBits(message.recipientTimestamp.low >>> 0, message.recipientTimestamp.high >>> 0).toNumber(true) : message.recipientTimestamp; + if (message.recipientKeyIndexes && message.recipientKeyIndexes.length) { + object.recipientKeyIndexes = []; + for (var j = 0; j < message.recipientKeyIndexes.length; ++j) + object.recipientKeyIndexes[j] = message.recipientKeyIndexes[j]; + } + return object; + }; - /** - * ExternalAdReplyInfo sourceUrl. - * @member {string} sourceUrl - * @memberof proto.ContextInfo.ExternalAdReplyInfo - * @instance - */ - ExternalAdReplyInfo.prototype.sourceUrl = ""; + /** + * Converts this DeviceListMetadata to JSON. + * @function toJSON + * @memberof proto.DeviceListMetadata + * @instance + * @returns {Object.} JSON object + */ + DeviceListMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * ExternalAdReplyInfo containsAutoReply. - * @member {boolean} containsAutoReply - * @memberof proto.ContextInfo.ExternalAdReplyInfo - * @instance - */ - ExternalAdReplyInfo.prototype.containsAutoReply = false; + return DeviceListMetadata; + })(); - /** - * ExternalAdReplyInfo renderLargerThumbnail. - * @member {boolean} renderLargerThumbnail - * @memberof proto.ContextInfo.ExternalAdReplyInfo - * @instance - */ - ExternalAdReplyInfo.prototype.renderLargerThumbnail = false; + proto.DeviceProps = (function() { - /** - * ExternalAdReplyInfo showAdAttribution. - * @member {boolean} showAdAttribution - * @memberof proto.ContextInfo.ExternalAdReplyInfo - * @instance - */ - ExternalAdReplyInfo.prototype.showAdAttribution = false; + /** + * Properties of a DeviceProps. + * @memberof proto + * @interface IDeviceProps + * @property {string|null} [os] DeviceProps os + * @property {proto.DeviceProps.IAppVersion|null} [version] DeviceProps version + * @property {proto.DeviceProps.PlatformType|null} [platformType] DeviceProps platformType + * @property {boolean|null} [requireFullSync] DeviceProps requireFullSync + * @property {proto.DeviceProps.IHistorySyncConfig|null} [historySyncConfig] DeviceProps historySyncConfig + */ - /** - * ExternalAdReplyInfo ctwaClid. - * @member {string} ctwaClid - * @memberof proto.ContextInfo.ExternalAdReplyInfo - * @instance - */ - ExternalAdReplyInfo.prototype.ctwaClid = ""; + /** + * Constructs a new DeviceProps. + * @memberof proto + * @classdesc Represents a DeviceProps. + * @implements IDeviceProps + * @constructor + * @param {proto.IDeviceProps=} [properties] Properties to set + */ + function DeviceProps(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * ExternalAdReplyInfo ref. - * @member {string} ref - * @memberof proto.ContextInfo.ExternalAdReplyInfo - * @instance - */ - ExternalAdReplyInfo.prototype.ref = ""; + /** + * DeviceProps os. + * @member {string} os + * @memberof proto.DeviceProps + * @instance + */ + DeviceProps.prototype.os = ""; - /** - * Creates a new ExternalAdReplyInfo instance using the specified properties. - * @function create - * @memberof proto.ContextInfo.ExternalAdReplyInfo - * @static - * @param {proto.ContextInfo.IExternalAdReplyInfo=} [properties] Properties to set - * @returns {proto.ContextInfo.ExternalAdReplyInfo} ExternalAdReplyInfo instance - */ - ExternalAdReplyInfo.create = function create(properties) { - return new ExternalAdReplyInfo(properties); - }; + /** + * DeviceProps version. + * @member {proto.DeviceProps.IAppVersion|null|undefined} version + * @memberof proto.DeviceProps + * @instance + */ + DeviceProps.prototype.version = null; - /** - * Encodes the specified ExternalAdReplyInfo message. Does not implicitly {@link proto.ContextInfo.ExternalAdReplyInfo.verify|verify} messages. - * @function encode - * @memberof proto.ContextInfo.ExternalAdReplyInfo - * @static - * @param {proto.ContextInfo.IExternalAdReplyInfo} message ExternalAdReplyInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExternalAdReplyInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.title != null && Object.hasOwnProperty.call(message, "title")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.title); - if (message.body != null && Object.hasOwnProperty.call(message, "body")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.body); - if (message.mediaType != null && Object.hasOwnProperty.call(message, "mediaType")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.mediaType); - if (message.thumbnailUrl != null && Object.hasOwnProperty.call(message, "thumbnailUrl")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.thumbnailUrl); - if (message.mediaUrl != null && Object.hasOwnProperty.call(message, "mediaUrl")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.mediaUrl); - if (message.thumbnail != null && Object.hasOwnProperty.call(message, "thumbnail")) - writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.thumbnail); - if (message.sourceType != null && Object.hasOwnProperty.call(message, "sourceType")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.sourceType); - if (message.sourceId != null && Object.hasOwnProperty.call(message, "sourceId")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.sourceId); - if (message.sourceUrl != null && Object.hasOwnProperty.call(message, "sourceUrl")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.sourceUrl); - if (message.containsAutoReply != null && Object.hasOwnProperty.call(message, "containsAutoReply")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.containsAutoReply); - if (message.renderLargerThumbnail != null && Object.hasOwnProperty.call(message, "renderLargerThumbnail")) - writer.uint32(/* id 11, wireType 0 =*/88).bool(message.renderLargerThumbnail); - if (message.showAdAttribution != null && Object.hasOwnProperty.call(message, "showAdAttribution")) - writer.uint32(/* id 12, wireType 0 =*/96).bool(message.showAdAttribution); - if (message.ctwaClid != null && Object.hasOwnProperty.call(message, "ctwaClid")) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.ctwaClid); - if (message.ref != null && Object.hasOwnProperty.call(message, "ref")) - writer.uint32(/* id 14, wireType 2 =*/114).string(message.ref); - return writer; - }; + /** + * DeviceProps platformType. + * @member {proto.DeviceProps.PlatformType} platformType + * @memberof proto.DeviceProps + * @instance + */ + DeviceProps.prototype.platformType = 0; - /** - * Encodes the specified ExternalAdReplyInfo message, length delimited. Does not implicitly {@link proto.ContextInfo.ExternalAdReplyInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.ContextInfo.ExternalAdReplyInfo - * @static - * @param {proto.ContextInfo.IExternalAdReplyInfo} message ExternalAdReplyInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExternalAdReplyInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * DeviceProps requireFullSync. + * @member {boolean} requireFullSync + * @memberof proto.DeviceProps + * @instance + */ + DeviceProps.prototype.requireFullSync = false; - /** - * Decodes an ExternalAdReplyInfo message from the specified reader or buffer. - * @function decode - * @memberof proto.ContextInfo.ExternalAdReplyInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.ContextInfo.ExternalAdReplyInfo} ExternalAdReplyInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExternalAdReplyInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.ContextInfo.ExternalAdReplyInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.body = reader.string(); - break; - case 3: - message.mediaType = reader.int32(); - break; - case 4: - message.thumbnailUrl = reader.string(); - break; - case 5: - message.mediaUrl = reader.string(); - break; - case 6: - message.thumbnail = reader.bytes(); - break; - case 7: - message.sourceType = reader.string(); - break; - case 8: - message.sourceId = reader.string(); - break; - case 9: - message.sourceUrl = reader.string(); - break; - case 10: - message.containsAutoReply = reader.bool(); - break; - case 11: - message.renderLargerThumbnail = reader.bool(); - break; - case 12: - message.showAdAttribution = reader.bool(); - break; - case 13: - message.ctwaClid = reader.string(); - break; - case 14: - message.ref = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * DeviceProps historySyncConfig. + * @member {proto.DeviceProps.IHistorySyncConfig|null|undefined} historySyncConfig + * @memberof proto.DeviceProps + * @instance + */ + DeviceProps.prototype.historySyncConfig = null; - /** - * Decodes an ExternalAdReplyInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.ContextInfo.ExternalAdReplyInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.ContextInfo.ExternalAdReplyInfo} ExternalAdReplyInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExternalAdReplyInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a new DeviceProps instance using the specified properties. + * @function create + * @memberof proto.DeviceProps + * @static + * @param {proto.IDeviceProps=} [properties] Properties to set + * @returns {proto.DeviceProps} DeviceProps instance + */ + DeviceProps.create = function create(properties) { + return new DeviceProps(properties); + }; - /** - * Verifies an ExternalAdReplyInfo message. - * @function verify - * @memberof proto.ContextInfo.ExternalAdReplyInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExternalAdReplyInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.title != null && message.hasOwnProperty("title")) - if (!$util.isString(message.title)) - return "title: string expected"; - if (message.body != null && message.hasOwnProperty("body")) - if (!$util.isString(message.body)) - return "body: string expected"; - if (message.mediaType != null && message.hasOwnProperty("mediaType")) - switch (message.mediaType) { - default: - return "mediaType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.thumbnailUrl != null && message.hasOwnProperty("thumbnailUrl")) - if (!$util.isString(message.thumbnailUrl)) - return "thumbnailUrl: string expected"; - if (message.mediaUrl != null && message.hasOwnProperty("mediaUrl")) - if (!$util.isString(message.mediaUrl)) - return "mediaUrl: string expected"; - if (message.thumbnail != null && message.hasOwnProperty("thumbnail")) - if (!(message.thumbnail && typeof message.thumbnail.length === "number" || $util.isString(message.thumbnail))) - return "thumbnail: buffer expected"; - if (message.sourceType != null && message.hasOwnProperty("sourceType")) - if (!$util.isString(message.sourceType)) - return "sourceType: string expected"; - if (message.sourceId != null && message.hasOwnProperty("sourceId")) - if (!$util.isString(message.sourceId)) - return "sourceId: string expected"; - if (message.sourceUrl != null && message.hasOwnProperty("sourceUrl")) - if (!$util.isString(message.sourceUrl)) - return "sourceUrl: string expected"; - if (message.containsAutoReply != null && message.hasOwnProperty("containsAutoReply")) - if (typeof message.containsAutoReply !== "boolean") - return "containsAutoReply: boolean expected"; - if (message.renderLargerThumbnail != null && message.hasOwnProperty("renderLargerThumbnail")) - if (typeof message.renderLargerThumbnail !== "boolean") - return "renderLargerThumbnail: boolean expected"; - if (message.showAdAttribution != null && message.hasOwnProperty("showAdAttribution")) - if (typeof message.showAdAttribution !== "boolean") - return "showAdAttribution: boolean expected"; - if (message.ctwaClid != null && message.hasOwnProperty("ctwaClid")) - if (!$util.isString(message.ctwaClid)) - return "ctwaClid: string expected"; - if (message.ref != null && message.hasOwnProperty("ref")) - if (!$util.isString(message.ref)) - return "ref: string expected"; - return null; - }; + /** + * Encodes the specified DeviceProps message. Does not implicitly {@link proto.DeviceProps.verify|verify} messages. + * @function encode + * @memberof proto.DeviceProps + * @static + * @param {proto.IDeviceProps} message DeviceProps message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeviceProps.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.os != null && Object.hasOwnProperty.call(message, "os")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.os); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + $root.proto.DeviceProps.AppVersion.encode(message.version, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.platformType != null && Object.hasOwnProperty.call(message, "platformType")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.platformType); + if (message.requireFullSync != null && Object.hasOwnProperty.call(message, "requireFullSync")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.requireFullSync); + if (message.historySyncConfig != null && Object.hasOwnProperty.call(message, "historySyncConfig")) + $root.proto.DeviceProps.HistorySyncConfig.encode(message.historySyncConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; - /** - * Creates an ExternalAdReplyInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.ContextInfo.ExternalAdReplyInfo - * @static - * @param {Object.} object Plain object - * @returns {proto.ContextInfo.ExternalAdReplyInfo} ExternalAdReplyInfo - */ - ExternalAdReplyInfo.fromObject = function fromObject(object) { - if (object instanceof $root.proto.ContextInfo.ExternalAdReplyInfo) - return object; - var message = new $root.proto.ContextInfo.ExternalAdReplyInfo(); - if (object.title != null) - message.title = String(object.title); - if (object.body != null) - message.body = String(object.body); - switch (object.mediaType) { - case "NONE": - case 0: - message.mediaType = 0; - break; - case "IMAGE": + /** + * Encodes the specified DeviceProps message, length delimited. Does not implicitly {@link proto.DeviceProps.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.DeviceProps + * @static + * @param {proto.IDeviceProps} message DeviceProps message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeviceProps.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeviceProps message from the specified reader or buffer. + * @function decode + * @memberof proto.DeviceProps + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.DeviceProps} DeviceProps + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeviceProps.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.DeviceProps(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { case 1: - message.mediaType = 1; + message.os = reader.string(); break; - case "VIDEO": case 2: - message.mediaType = 2; + message.version = $root.proto.DeviceProps.AppVersion.decode(reader, reader.uint32()); + break; + case 3: + message.platformType = reader.int32(); + break; + case 4: + message.requireFullSync = reader.bool(); + break; + case 5: + message.historySyncConfig = $root.proto.DeviceProps.HistorySyncConfig.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); break; } - if (object.thumbnailUrl != null) - message.thumbnailUrl = String(object.thumbnailUrl); - if (object.mediaUrl != null) - message.mediaUrl = String(object.mediaUrl); - if (object.thumbnail != null) - if (typeof object.thumbnail === "string") - $util.base64.decode(object.thumbnail, message.thumbnail = $util.newBuffer($util.base64.length(object.thumbnail)), 0); - else if (object.thumbnail.length) - message.thumbnail = object.thumbnail; - if (object.sourceType != null) - message.sourceType = String(object.sourceType); - if (object.sourceId != null) - message.sourceId = String(object.sourceId); - if (object.sourceUrl != null) - message.sourceUrl = String(object.sourceUrl); - if (object.containsAutoReply != null) - message.containsAutoReply = Boolean(object.containsAutoReply); - if (object.renderLargerThumbnail != null) - message.renderLargerThumbnail = Boolean(object.renderLargerThumbnail); - if (object.showAdAttribution != null) - message.showAdAttribution = Boolean(object.showAdAttribution); - if (object.ctwaClid != null) - message.ctwaClid = String(object.ctwaClid); - if (object.ref != null) - message.ref = String(object.ref); - return message; - }; + } + return message; + }; - /** - * Creates a plain object from an ExternalAdReplyInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.ContextInfo.ExternalAdReplyInfo - * @static - * @param {proto.ContextInfo.ExternalAdReplyInfo} message ExternalAdReplyInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExternalAdReplyInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.title = ""; - object.body = ""; - object.mediaType = options.enums === String ? "NONE" : 0; - object.thumbnailUrl = ""; - object.mediaUrl = ""; - if (options.bytes === String) - object.thumbnail = ""; - else { - object.thumbnail = []; - if (options.bytes !== Array) - object.thumbnail = $util.newBuffer(object.thumbnail); - } - object.sourceType = ""; - object.sourceId = ""; - object.sourceUrl = ""; - object.containsAutoReply = false; - object.renderLargerThumbnail = false; - object.showAdAttribution = false; - object.ctwaClid = ""; - object.ref = ""; + /** + * Decodes a DeviceProps message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.DeviceProps + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.DeviceProps} DeviceProps + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeviceProps.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeviceProps message. + * @function verify + * @memberof proto.DeviceProps + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeviceProps.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.os != null && message.hasOwnProperty("os")) + if (!$util.isString(message.os)) + return "os: string expected"; + if (message.version != null && message.hasOwnProperty("version")) { + var error = $root.proto.DeviceProps.AppVersion.verify(message.version); + if (error) + return "version." + error; + } + if (message.platformType != null && message.hasOwnProperty("platformType")) + switch (message.platformType) { + default: + return "platformType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + case 20: + case 21: + case 22: + break; } - if (message.title != null && message.hasOwnProperty("title")) - object.title = message.title; - if (message.body != null && message.hasOwnProperty("body")) - object.body = message.body; - if (message.mediaType != null && message.hasOwnProperty("mediaType")) - object.mediaType = options.enums === String ? $root.proto.ContextInfo.ExternalAdReplyInfo.MediaType[message.mediaType] : message.mediaType; - if (message.thumbnailUrl != null && message.hasOwnProperty("thumbnailUrl")) - object.thumbnailUrl = message.thumbnailUrl; - if (message.mediaUrl != null && message.hasOwnProperty("mediaUrl")) - object.mediaUrl = message.mediaUrl; - if (message.thumbnail != null && message.hasOwnProperty("thumbnail")) - object.thumbnail = options.bytes === String ? $util.base64.encode(message.thumbnail, 0, message.thumbnail.length) : options.bytes === Array ? Array.prototype.slice.call(message.thumbnail) : message.thumbnail; - if (message.sourceType != null && message.hasOwnProperty("sourceType")) - object.sourceType = message.sourceType; - if (message.sourceId != null && message.hasOwnProperty("sourceId")) - object.sourceId = message.sourceId; - if (message.sourceUrl != null && message.hasOwnProperty("sourceUrl")) - object.sourceUrl = message.sourceUrl; - if (message.containsAutoReply != null && message.hasOwnProperty("containsAutoReply")) - object.containsAutoReply = message.containsAutoReply; - if (message.renderLargerThumbnail != null && message.hasOwnProperty("renderLargerThumbnail")) - object.renderLargerThumbnail = message.renderLargerThumbnail; - if (message.showAdAttribution != null && message.hasOwnProperty("showAdAttribution")) - object.showAdAttribution = message.showAdAttribution; - if (message.ctwaClid != null && message.hasOwnProperty("ctwaClid")) - object.ctwaClid = message.ctwaClid; - if (message.ref != null && message.hasOwnProperty("ref")) - object.ref = message.ref; - return object; - }; + if (message.requireFullSync != null && message.hasOwnProperty("requireFullSync")) + if (typeof message.requireFullSync !== "boolean") + return "requireFullSync: boolean expected"; + if (message.historySyncConfig != null && message.hasOwnProperty("historySyncConfig")) { + var error = $root.proto.DeviceProps.HistorySyncConfig.verify(message.historySyncConfig); + if (error) + return "historySyncConfig." + error; + } + return null; + }; - /** - * Converts this ExternalAdReplyInfo to JSON. - * @function toJSON - * @memberof proto.ContextInfo.ExternalAdReplyInfo - * @instance - * @returns {Object.} JSON object - */ - ExternalAdReplyInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a DeviceProps message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.DeviceProps + * @static + * @param {Object.} object Plain object + * @returns {proto.DeviceProps} DeviceProps + */ + DeviceProps.fromObject = function fromObject(object) { + if (object instanceof $root.proto.DeviceProps) + return object; + var message = new $root.proto.DeviceProps(); + if (object.os != null) + message.os = String(object.os); + if (object.version != null) { + if (typeof object.version !== "object") + throw TypeError(".proto.DeviceProps.version: object expected"); + message.version = $root.proto.DeviceProps.AppVersion.fromObject(object.version); + } + switch (object.platformType) { + case "UNKNOWN": + case 0: + message.platformType = 0; + break; + case "CHROME": + case 1: + message.platformType = 1; + break; + case "FIREFOX": + case 2: + message.platformType = 2; + break; + case "IE": + case 3: + message.platformType = 3; + break; + case "OPERA": + case 4: + message.platformType = 4; + break; + case "SAFARI": + case 5: + message.platformType = 5; + break; + case "EDGE": + case 6: + message.platformType = 6; + break; + case "DESKTOP": + case 7: + message.platformType = 7; + break; + case "IPAD": + case 8: + message.platformType = 8; + break; + case "ANDROID_TABLET": + case 9: + message.platformType = 9; + break; + case "OHANA": + case 10: + message.platformType = 10; + break; + case "ALOHA": + case 11: + message.platformType = 11; + break; + case "CATALINA": + case 12: + message.platformType = 12; + break; + case "TCL_TV": + case 13: + message.platformType = 13; + break; + case "IOS_PHONE": + case 14: + message.platformType = 14; + break; + case "IOS_CATALYST": + case 15: + message.platformType = 15; + break; + case "ANDROID_PHONE": + case 16: + message.platformType = 16; + break; + case "ANDROID_AMBIGUOUS": + case 17: + message.platformType = 17; + break; + case "WEAR_OS": + case 18: + message.platformType = 18; + break; + case "AR_WRIST": + case 19: + message.platformType = 19; + break; + case "AR_DEVICE": + case 20: + message.platformType = 20; + break; + case "UWP": + case 21: + message.platformType = 21; + break; + case "VR": + case 22: + message.platformType = 22; + break; + } + if (object.requireFullSync != null) + message.requireFullSync = Boolean(object.requireFullSync); + if (object.historySyncConfig != null) { + if (typeof object.historySyncConfig !== "object") + throw TypeError(".proto.DeviceProps.historySyncConfig: object expected"); + message.historySyncConfig = $root.proto.DeviceProps.HistorySyncConfig.fromObject(object.historySyncConfig); + } + return message; + }; - /** - * MediaType enum. - * @name proto.ContextInfo.ExternalAdReplyInfo.MediaType - * @enum {number} - * @property {number} NONE=0 NONE value - * @property {number} IMAGE=1 IMAGE value - * @property {number} VIDEO=2 VIDEO value - */ - ExternalAdReplyInfo.MediaType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NONE"] = 0; - values[valuesById[1] = "IMAGE"] = 1; - values[valuesById[2] = "VIDEO"] = 2; - return values; - })(); + /** + * Creates a plain object from a DeviceProps message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.DeviceProps + * @static + * @param {proto.DeviceProps} message DeviceProps + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeviceProps.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.os = ""; + object.version = null; + object.platformType = options.enums === String ? "UNKNOWN" : 0; + object.requireFullSync = false; + object.historySyncConfig = null; + } + if (message.os != null && message.hasOwnProperty("os")) + object.os = message.os; + if (message.version != null && message.hasOwnProperty("version")) + object.version = $root.proto.DeviceProps.AppVersion.toObject(message.version, options); + if (message.platformType != null && message.hasOwnProperty("platformType")) + object.platformType = options.enums === String ? $root.proto.DeviceProps.PlatformType[message.platformType] : message.platformType; + if (message.requireFullSync != null && message.hasOwnProperty("requireFullSync")) + object.requireFullSync = message.requireFullSync; + if (message.historySyncConfig != null && message.hasOwnProperty("historySyncConfig")) + object.historySyncConfig = $root.proto.DeviceProps.HistorySyncConfig.toObject(message.historySyncConfig, options); + return object; + }; - return ExternalAdReplyInfo; - })(); + /** + * Converts this DeviceProps to JSON. + * @function toJSON + * @memberof proto.DeviceProps + * @instance + * @returns {Object.} JSON object + */ + DeviceProps.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - ContextInfo.ForwardedNewsletterMessageInfo = (function() { + DeviceProps.AppVersion = (function() { /** - * Properties of a ForwardedNewsletterMessageInfo. - * @memberof proto.ContextInfo - * @interface IForwardedNewsletterMessageInfo - * @property {string|null} [newsletterJid] ForwardedNewsletterMessageInfo newsletterJid - * @property {number|null} [serverMessageId] ForwardedNewsletterMessageInfo serverMessageId + * Properties of an AppVersion. + * @memberof proto.DeviceProps + * @interface IAppVersion + * @property {number|null} [primary] AppVersion primary + * @property {number|null} [secondary] AppVersion secondary + * @property {number|null} [tertiary] AppVersion tertiary + * @property {number|null} [quaternary] AppVersion quaternary + * @property {number|null} [quinary] AppVersion quinary */ /** - * Constructs a new ForwardedNewsletterMessageInfo. - * @memberof proto.ContextInfo - * @classdesc Represents a ForwardedNewsletterMessageInfo. - * @implements IForwardedNewsletterMessageInfo + * Constructs a new AppVersion. + * @memberof proto.DeviceProps + * @classdesc Represents an AppVersion. + * @implements IAppVersion * @constructor - * @param {proto.ContextInfo.IForwardedNewsletterMessageInfo=} [properties] Properties to set + * @param {proto.DeviceProps.IAppVersion=} [properties] Properties to set */ - function ForwardedNewsletterMessageInfo(properties) { + function AppVersion(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11369,298 +16661,127 @@ $root.proto = (function() { } /** - * ForwardedNewsletterMessageInfo newsletterJid. - * @member {string} newsletterJid - * @memberof proto.ContextInfo.ForwardedNewsletterMessageInfo + * AppVersion primary. + * @member {number} primary + * @memberof proto.DeviceProps.AppVersion * @instance */ - ForwardedNewsletterMessageInfo.prototype.newsletterJid = ""; + AppVersion.prototype.primary = 0; /** - * ForwardedNewsletterMessageInfo serverMessageId. - * @member {number} serverMessageId - * @memberof proto.ContextInfo.ForwardedNewsletterMessageInfo + * AppVersion secondary. + * @member {number} secondary + * @memberof proto.DeviceProps.AppVersion * @instance */ - ForwardedNewsletterMessageInfo.prototype.serverMessageId = 0; - - /** - * Creates a new ForwardedNewsletterMessageInfo instance using the specified properties. - * @function create - * @memberof proto.ContextInfo.ForwardedNewsletterMessageInfo - * @static - * @param {proto.ContextInfo.IForwardedNewsletterMessageInfo=} [properties] Properties to set - * @returns {proto.ContextInfo.ForwardedNewsletterMessageInfo} ForwardedNewsletterMessageInfo instance - */ - ForwardedNewsletterMessageInfo.create = function create(properties) { - return new ForwardedNewsletterMessageInfo(properties); - }; - - /** - * Encodes the specified ForwardedNewsletterMessageInfo message. Does not implicitly {@link proto.ContextInfo.ForwardedNewsletterMessageInfo.verify|verify} messages. - * @function encode - * @memberof proto.ContextInfo.ForwardedNewsletterMessageInfo - * @static - * @param {proto.ContextInfo.IForwardedNewsletterMessageInfo} message ForwardedNewsletterMessageInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ForwardedNewsletterMessageInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.newsletterJid != null && Object.hasOwnProperty.call(message, "newsletterJid")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.newsletterJid); - if (message.serverMessageId != null && Object.hasOwnProperty.call(message, "serverMessageId")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.serverMessageId); - return writer; - }; - - /** - * Encodes the specified ForwardedNewsletterMessageInfo message, length delimited. Does not implicitly {@link proto.ContextInfo.ForwardedNewsletterMessageInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.ContextInfo.ForwardedNewsletterMessageInfo - * @static - * @param {proto.ContextInfo.IForwardedNewsletterMessageInfo} message ForwardedNewsletterMessageInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ForwardedNewsletterMessageInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ForwardedNewsletterMessageInfo message from the specified reader or buffer. - * @function decode - * @memberof proto.ContextInfo.ForwardedNewsletterMessageInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.ContextInfo.ForwardedNewsletterMessageInfo} ForwardedNewsletterMessageInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ForwardedNewsletterMessageInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.ContextInfo.ForwardedNewsletterMessageInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.newsletterJid = reader.string(); - break; - case 2: - message.serverMessageId = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ForwardedNewsletterMessageInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.ContextInfo.ForwardedNewsletterMessageInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.ContextInfo.ForwardedNewsletterMessageInfo} ForwardedNewsletterMessageInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ForwardedNewsletterMessageInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ForwardedNewsletterMessageInfo message. - * @function verify - * @memberof proto.ContextInfo.ForwardedNewsletterMessageInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ForwardedNewsletterMessageInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.newsletterJid != null && message.hasOwnProperty("newsletterJid")) - if (!$util.isString(message.newsletterJid)) - return "newsletterJid: string expected"; - if (message.serverMessageId != null && message.hasOwnProperty("serverMessageId")) - if (!$util.isInteger(message.serverMessageId)) - return "serverMessageId: integer expected"; - return null; - }; - - /** - * Creates a ForwardedNewsletterMessageInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.ContextInfo.ForwardedNewsletterMessageInfo - * @static - * @param {Object.} object Plain object - * @returns {proto.ContextInfo.ForwardedNewsletterMessageInfo} ForwardedNewsletterMessageInfo - */ - ForwardedNewsletterMessageInfo.fromObject = function fromObject(object) { - if (object instanceof $root.proto.ContextInfo.ForwardedNewsletterMessageInfo) - return object; - var message = new $root.proto.ContextInfo.ForwardedNewsletterMessageInfo(); - if (object.newsletterJid != null) - message.newsletterJid = String(object.newsletterJid); - if (object.serverMessageId != null) - message.serverMessageId = object.serverMessageId | 0; - return message; - }; - - /** - * Creates a plain object from a ForwardedNewsletterMessageInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.ContextInfo.ForwardedNewsletterMessageInfo - * @static - * @param {proto.ContextInfo.ForwardedNewsletterMessageInfo} message ForwardedNewsletterMessageInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ForwardedNewsletterMessageInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.newsletterJid = ""; - object.serverMessageId = 0; - } - if (message.newsletterJid != null && message.hasOwnProperty("newsletterJid")) - object.newsletterJid = message.newsletterJid; - if (message.serverMessageId != null && message.hasOwnProperty("serverMessageId")) - object.serverMessageId = message.serverMessageId; - return object; - }; + AppVersion.prototype.secondary = 0; /** - * Converts this ForwardedNewsletterMessageInfo to JSON. - * @function toJSON - * @memberof proto.ContextInfo.ForwardedNewsletterMessageInfo + * AppVersion tertiary. + * @member {number} tertiary + * @memberof proto.DeviceProps.AppVersion * @instance - * @returns {Object.} JSON object - */ - ForwardedNewsletterMessageInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ForwardedNewsletterMessageInfo; - })(); - - ContextInfo.UTMInfo = (function() { - - /** - * Properties of a UTMInfo. - * @memberof proto.ContextInfo - * @interface IUTMInfo - * @property {string|null} [utmSource] UTMInfo utmSource - * @property {string|null} [utmCampaign] UTMInfo utmCampaign - */ - - /** - * Constructs a new UTMInfo. - * @memberof proto.ContextInfo - * @classdesc Represents a UTMInfo. - * @implements IUTMInfo - * @constructor - * @param {proto.ContextInfo.IUTMInfo=} [properties] Properties to set */ - function UTMInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + AppVersion.prototype.tertiary = 0; /** - * UTMInfo utmSource. - * @member {string} utmSource - * @memberof proto.ContextInfo.UTMInfo + * AppVersion quaternary. + * @member {number} quaternary + * @memberof proto.DeviceProps.AppVersion * @instance */ - UTMInfo.prototype.utmSource = ""; + AppVersion.prototype.quaternary = 0; /** - * UTMInfo utmCampaign. - * @member {string} utmCampaign - * @memberof proto.ContextInfo.UTMInfo + * AppVersion quinary. + * @member {number} quinary + * @memberof proto.DeviceProps.AppVersion * @instance */ - UTMInfo.prototype.utmCampaign = ""; + AppVersion.prototype.quinary = 0; /** - * Creates a new UTMInfo instance using the specified properties. + * Creates a new AppVersion instance using the specified properties. * @function create - * @memberof proto.ContextInfo.UTMInfo + * @memberof proto.DeviceProps.AppVersion * @static - * @param {proto.ContextInfo.IUTMInfo=} [properties] Properties to set - * @returns {proto.ContextInfo.UTMInfo} UTMInfo instance + * @param {proto.DeviceProps.IAppVersion=} [properties] Properties to set + * @returns {proto.DeviceProps.AppVersion} AppVersion instance */ - UTMInfo.create = function create(properties) { - return new UTMInfo(properties); + AppVersion.create = function create(properties) { + return new AppVersion(properties); }; /** - * Encodes the specified UTMInfo message. Does not implicitly {@link proto.ContextInfo.UTMInfo.verify|verify} messages. + * Encodes the specified AppVersion message. Does not implicitly {@link proto.DeviceProps.AppVersion.verify|verify} messages. * @function encode - * @memberof proto.ContextInfo.UTMInfo + * @memberof proto.DeviceProps.AppVersion * @static - * @param {proto.ContextInfo.IUTMInfo} message UTMInfo message or plain object to encode + * @param {proto.DeviceProps.IAppVersion} message AppVersion message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UTMInfo.encode = function encode(message, writer) { + AppVersion.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.utmSource != null && Object.hasOwnProperty.call(message, "utmSource")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.utmSource); - if (message.utmCampaign != null && Object.hasOwnProperty.call(message, "utmCampaign")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.utmCampaign); + if (message.primary != null && Object.hasOwnProperty.call(message, "primary")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.primary); + if (message.secondary != null && Object.hasOwnProperty.call(message, "secondary")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.secondary); + if (message.tertiary != null && Object.hasOwnProperty.call(message, "tertiary")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.tertiary); + if (message.quaternary != null && Object.hasOwnProperty.call(message, "quaternary")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.quaternary); + if (message.quinary != null && Object.hasOwnProperty.call(message, "quinary")) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.quinary); return writer; }; /** - * Encodes the specified UTMInfo message, length delimited. Does not implicitly {@link proto.ContextInfo.UTMInfo.verify|verify} messages. + * Encodes the specified AppVersion message, length delimited. Does not implicitly {@link proto.DeviceProps.AppVersion.verify|verify} messages. * @function encodeDelimited - * @memberof proto.ContextInfo.UTMInfo + * @memberof proto.DeviceProps.AppVersion * @static - * @param {proto.ContextInfo.IUTMInfo} message UTMInfo message or plain object to encode + * @param {proto.DeviceProps.IAppVersion} message AppVersion message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UTMInfo.encodeDelimited = function encodeDelimited(message, writer) { + AppVersion.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a UTMInfo message from the specified reader or buffer. + * Decodes an AppVersion message from the specified reader or buffer. * @function decode - * @memberof proto.ContextInfo.UTMInfo + * @memberof proto.DeviceProps.AppVersion * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {proto.ContextInfo.UTMInfo} UTMInfo + * @returns {proto.DeviceProps.AppVersion} AppVersion * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UTMInfo.decode = function decode(reader, length) { + AppVersion.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.ContextInfo.UTMInfo(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.DeviceProps.AppVersion(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.utmSource = reader.string(); + message.primary = reader.uint32(); break; case 2: - message.utmCampaign = reader.string(); + message.secondary = reader.uint32(); + break; + case 3: + message.tertiary = reader.uint32(); + break; + case 4: + message.quaternary = reader.uint32(); + break; + case 5: + message.quinary = reader.uint32(); break; default: reader.skipType(tag & 7); @@ -11671,1432 +16792,1111 @@ $root.proto = (function() { }; /** - * Decodes a UTMInfo message from the specified reader or buffer, length delimited. + * Decodes an AppVersion message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof proto.ContextInfo.UTMInfo + * @memberof proto.DeviceProps.AppVersion * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.ContextInfo.UTMInfo} UTMInfo + * @returns {proto.DeviceProps.AppVersion} AppVersion * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UTMInfo.decodeDelimited = function decodeDelimited(reader) { + AppVersion.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a UTMInfo message. + * Verifies an AppVersion message. * @function verify - * @memberof proto.ContextInfo.UTMInfo + * @memberof proto.DeviceProps.AppVersion * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UTMInfo.verify = function verify(message) { + AppVersion.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.utmSource != null && message.hasOwnProperty("utmSource")) - if (!$util.isString(message.utmSource)) - return "utmSource: string expected"; - if (message.utmCampaign != null && message.hasOwnProperty("utmCampaign")) - if (!$util.isString(message.utmCampaign)) - return "utmCampaign: string expected"; + if (message.primary != null && message.hasOwnProperty("primary")) + if (!$util.isInteger(message.primary)) + return "primary: integer expected"; + if (message.secondary != null && message.hasOwnProperty("secondary")) + if (!$util.isInteger(message.secondary)) + return "secondary: integer expected"; + if (message.tertiary != null && message.hasOwnProperty("tertiary")) + if (!$util.isInteger(message.tertiary)) + return "tertiary: integer expected"; + if (message.quaternary != null && message.hasOwnProperty("quaternary")) + if (!$util.isInteger(message.quaternary)) + return "quaternary: integer expected"; + if (message.quinary != null && message.hasOwnProperty("quinary")) + if (!$util.isInteger(message.quinary)) + return "quinary: integer expected"; return null; }; /** - * Creates a UTMInfo message from a plain object. Also converts values to their respective internal types. + * Creates an AppVersion message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof proto.ContextInfo.UTMInfo + * @memberof proto.DeviceProps.AppVersion * @static * @param {Object.} object Plain object - * @returns {proto.ContextInfo.UTMInfo} UTMInfo + * @returns {proto.DeviceProps.AppVersion} AppVersion */ - UTMInfo.fromObject = function fromObject(object) { - if (object instanceof $root.proto.ContextInfo.UTMInfo) + AppVersion.fromObject = function fromObject(object) { + if (object instanceof $root.proto.DeviceProps.AppVersion) return object; - var message = new $root.proto.ContextInfo.UTMInfo(); - if (object.utmSource != null) - message.utmSource = String(object.utmSource); - if (object.utmCampaign != null) - message.utmCampaign = String(object.utmCampaign); + var message = new $root.proto.DeviceProps.AppVersion(); + if (object.primary != null) + message.primary = object.primary >>> 0; + if (object.secondary != null) + message.secondary = object.secondary >>> 0; + if (object.tertiary != null) + message.tertiary = object.tertiary >>> 0; + if (object.quaternary != null) + message.quaternary = object.quaternary >>> 0; + if (object.quinary != null) + message.quinary = object.quinary >>> 0; return message; }; /** - * Creates a plain object from a UTMInfo message. Also converts values to other types if specified. + * Creates a plain object from an AppVersion message. Also converts values to other types if specified. * @function toObject - * @memberof proto.ContextInfo.UTMInfo + * @memberof proto.DeviceProps.AppVersion * @static - * @param {proto.ContextInfo.UTMInfo} message UTMInfo + * @param {proto.DeviceProps.AppVersion} message AppVersion * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UTMInfo.toObject = function toObject(message, options) { + AppVersion.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.utmSource = ""; - object.utmCampaign = ""; + object.primary = 0; + object.secondary = 0; + object.tertiary = 0; + object.quaternary = 0; + object.quinary = 0; } - if (message.utmSource != null && message.hasOwnProperty("utmSource")) - object.utmSource = message.utmSource; - if (message.utmCampaign != null && message.hasOwnProperty("utmCampaign")) - object.utmCampaign = message.utmCampaign; + if (message.primary != null && message.hasOwnProperty("primary")) + object.primary = message.primary; + if (message.secondary != null && message.hasOwnProperty("secondary")) + object.secondary = message.secondary; + if (message.tertiary != null && message.hasOwnProperty("tertiary")) + object.tertiary = message.tertiary; + if (message.quaternary != null && message.hasOwnProperty("quaternary")) + object.quaternary = message.quaternary; + if (message.quinary != null && message.hasOwnProperty("quinary")) + object.quinary = message.quinary; return object; }; /** - * Converts this UTMInfo to JSON. + * Converts this AppVersion to JSON. * @function toJSON - * @memberof proto.ContextInfo.UTMInfo + * @memberof proto.DeviceProps.AppVersion * @instance * @returns {Object.} JSON object */ - UTMInfo.prototype.toJSON = function toJSON() { + AppVersion.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UTMInfo; + return AppVersion; })(); - return ContextInfo; - })(); - - proto.Conversation = (function() { - - /** - * Properties of a Conversation. - * @memberof proto - * @interface IConversation - * @property {string} id Conversation id - * @property {Array.|null} [messages] Conversation messages - * @property {string|null} [newJid] Conversation newJid - * @property {string|null} [oldJid] Conversation oldJid - * @property {number|Long|null} [lastMsgTimestamp] Conversation lastMsgTimestamp - * @property {number|null} [unreadCount] Conversation unreadCount - * @property {boolean|null} [readOnly] Conversation readOnly - * @property {boolean|null} [endOfHistoryTransfer] Conversation endOfHistoryTransfer - * @property {number|null} [ephemeralExpiration] Conversation ephemeralExpiration - * @property {number|Long|null} [ephemeralSettingTimestamp] Conversation ephemeralSettingTimestamp - * @property {proto.Conversation.EndOfHistoryTransferType|null} [endOfHistoryTransferType] Conversation endOfHistoryTransferType - * @property {number|Long|null} [conversationTimestamp] Conversation conversationTimestamp - * @property {string|null} [name] Conversation name - * @property {string|null} [pHash] Conversation pHash - * @property {boolean|null} [notSpam] Conversation notSpam - * @property {boolean|null} [archived] Conversation archived - * @property {proto.IDisappearingMode|null} [disappearingMode] Conversation disappearingMode - * @property {number|null} [unreadMentionCount] Conversation unreadMentionCount - * @property {boolean|null} [markedAsUnread] Conversation markedAsUnread - * @property {Array.|null} [participant] Conversation participant - * @property {Uint8Array|null} [tcToken] Conversation tcToken - * @property {number|Long|null} [tcTokenTimestamp] Conversation tcTokenTimestamp - * @property {Uint8Array|null} [contactPrimaryIdentityKey] Conversation contactPrimaryIdentityKey - * @property {number|null} [pinned] Conversation pinned - * @property {number|Long|null} [muteEndTime] Conversation muteEndTime - * @property {proto.IWallpaperSettings|null} [wallpaper] Conversation wallpaper - * @property {proto.MediaVisibility|null} [mediaVisibility] Conversation mediaVisibility - * @property {number|Long|null} [tcTokenSenderTimestamp] Conversation tcTokenSenderTimestamp - * @property {boolean|null} [suspended] Conversation suspended - * @property {boolean|null} [terminated] Conversation terminated - * @property {number|Long|null} [createdAt] Conversation createdAt - * @property {string|null} [createdBy] Conversation createdBy - * @property {string|null} [description] Conversation description - * @property {boolean|null} [support] Conversation support - * @property {boolean|null} [isParentGroup] Conversation isParentGroup - * @property {string|null} [parentGroupId] Conversation parentGroupId - * @property {boolean|null} [isDefaultSubgroup] Conversation isDefaultSubgroup - * @property {string|null} [displayName] Conversation displayName - * @property {string|null} [pnJid] Conversation pnJid - * @property {boolean|null} [shareOwnPn] Conversation shareOwnPn - * @property {boolean|null} [pnhDuplicateLidThread] Conversation pnhDuplicateLidThread - * @property {string|null} [lidJid] Conversation lidJid - */ - - /** - * Constructs a new Conversation. - * @memberof proto - * @classdesc Represents a Conversation. - * @implements IConversation - * @constructor - * @param {proto.IConversation=} [properties] Properties to set - */ - function Conversation(properties) { - this.messages = []; - this.participant = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Conversation id. - * @member {string} id - * @memberof proto.Conversation - * @instance - */ - Conversation.prototype.id = ""; - - /** - * Conversation messages. - * @member {Array.} messages - * @memberof proto.Conversation - * @instance - */ - Conversation.prototype.messages = $util.emptyArray; - - /** - * Conversation newJid. - * @member {string} newJid - * @memberof proto.Conversation - * @instance - */ - Conversation.prototype.newJid = ""; - - /** - * Conversation oldJid. - * @member {string} oldJid - * @memberof proto.Conversation - * @instance - */ - Conversation.prototype.oldJid = ""; - - /** - * Conversation lastMsgTimestamp. - * @member {number|Long} lastMsgTimestamp - * @memberof proto.Conversation - * @instance - */ - Conversation.prototype.lastMsgTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Conversation unreadCount. - * @member {number} unreadCount - * @memberof proto.Conversation - * @instance - */ - Conversation.prototype.unreadCount = 0; - - /** - * Conversation readOnly. - * @member {boolean} readOnly - * @memberof proto.Conversation - * @instance - */ - Conversation.prototype.readOnly = false; - - /** - * Conversation endOfHistoryTransfer. - * @member {boolean} endOfHistoryTransfer - * @memberof proto.Conversation - * @instance - */ - Conversation.prototype.endOfHistoryTransfer = false; - - /** - * Conversation ephemeralExpiration. - * @member {number} ephemeralExpiration - * @memberof proto.Conversation - * @instance - */ - Conversation.prototype.ephemeralExpiration = 0; - - /** - * Conversation ephemeralSettingTimestamp. - * @member {number|Long} ephemeralSettingTimestamp - * @memberof proto.Conversation - * @instance - */ - Conversation.prototype.ephemeralSettingTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Conversation endOfHistoryTransferType. - * @member {proto.Conversation.EndOfHistoryTransferType} endOfHistoryTransferType - * @memberof proto.Conversation - * @instance - */ - Conversation.prototype.endOfHistoryTransferType = 0; - - /** - * Conversation conversationTimestamp. - * @member {number|Long} conversationTimestamp - * @memberof proto.Conversation - * @instance - */ - Conversation.prototype.conversationTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Conversation name. - * @member {string} name - * @memberof proto.Conversation - * @instance - */ - Conversation.prototype.name = ""; + DeviceProps.HistorySyncConfig = (function() { - /** - * Conversation pHash. - * @member {string} pHash - * @memberof proto.Conversation - * @instance - */ - Conversation.prototype.pHash = ""; + /** + * Properties of a HistorySyncConfig. + * @memberof proto.DeviceProps + * @interface IHistorySyncConfig + * @property {number|null} [fullSyncDaysLimit] HistorySyncConfig fullSyncDaysLimit + * @property {number|null} [fullSyncSizeMbLimit] HistorySyncConfig fullSyncSizeMbLimit + * @property {number|null} [storageQuotaMb] HistorySyncConfig storageQuotaMb + * @property {boolean|null} [inlineInitialPayloadInE2EeMsg] HistorySyncConfig inlineInitialPayloadInE2EeMsg + * @property {number|null} [recentSyncDaysLimit] HistorySyncConfig recentSyncDaysLimit + * @property {boolean|null} [supportCallLogHistory] HistorySyncConfig supportCallLogHistory + * @property {boolean|null} [supportBotUserAgentChatHistory] HistorySyncConfig supportBotUserAgentChatHistory + * @property {boolean|null} [supportCagReactionsAndPolls] HistorySyncConfig supportCagReactionsAndPolls + */ - /** - * Conversation notSpam. - * @member {boolean} notSpam - * @memberof proto.Conversation - * @instance - */ - Conversation.prototype.notSpam = false; + /** + * Constructs a new HistorySyncConfig. + * @memberof proto.DeviceProps + * @classdesc Represents a HistorySyncConfig. + * @implements IHistorySyncConfig + * @constructor + * @param {proto.DeviceProps.IHistorySyncConfig=} [properties] Properties to set + */ + function HistorySyncConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Conversation archived. - * @member {boolean} archived - * @memberof proto.Conversation - * @instance - */ - Conversation.prototype.archived = false; + /** + * HistorySyncConfig fullSyncDaysLimit. + * @member {number} fullSyncDaysLimit + * @memberof proto.DeviceProps.HistorySyncConfig + * @instance + */ + HistorySyncConfig.prototype.fullSyncDaysLimit = 0; - /** - * Conversation disappearingMode. - * @member {proto.IDisappearingMode|null|undefined} disappearingMode - * @memberof proto.Conversation - * @instance - */ - Conversation.prototype.disappearingMode = null; + /** + * HistorySyncConfig fullSyncSizeMbLimit. + * @member {number} fullSyncSizeMbLimit + * @memberof proto.DeviceProps.HistorySyncConfig + * @instance + */ + HistorySyncConfig.prototype.fullSyncSizeMbLimit = 0; - /** - * Conversation unreadMentionCount. - * @member {number} unreadMentionCount - * @memberof proto.Conversation - * @instance - */ - Conversation.prototype.unreadMentionCount = 0; + /** + * HistorySyncConfig storageQuotaMb. + * @member {number} storageQuotaMb + * @memberof proto.DeviceProps.HistorySyncConfig + * @instance + */ + HistorySyncConfig.prototype.storageQuotaMb = 0; - /** - * Conversation markedAsUnread. - * @member {boolean} markedAsUnread - * @memberof proto.Conversation - * @instance - */ - Conversation.prototype.markedAsUnread = false; + /** + * HistorySyncConfig inlineInitialPayloadInE2EeMsg. + * @member {boolean} inlineInitialPayloadInE2EeMsg + * @memberof proto.DeviceProps.HistorySyncConfig + * @instance + */ + HistorySyncConfig.prototype.inlineInitialPayloadInE2EeMsg = false; - /** - * Conversation participant. - * @member {Array.} participant - * @memberof proto.Conversation - * @instance - */ - Conversation.prototype.participant = $util.emptyArray; + /** + * HistorySyncConfig recentSyncDaysLimit. + * @member {number} recentSyncDaysLimit + * @memberof proto.DeviceProps.HistorySyncConfig + * @instance + */ + HistorySyncConfig.prototype.recentSyncDaysLimit = 0; - /** - * Conversation tcToken. - * @member {Uint8Array} tcToken - * @memberof proto.Conversation - * @instance - */ - Conversation.prototype.tcToken = $util.newBuffer([]); + /** + * HistorySyncConfig supportCallLogHistory. + * @member {boolean} supportCallLogHistory + * @memberof proto.DeviceProps.HistorySyncConfig + * @instance + */ + HistorySyncConfig.prototype.supportCallLogHistory = false; - /** - * Conversation tcTokenTimestamp. - * @member {number|Long} tcTokenTimestamp - * @memberof proto.Conversation - * @instance - */ - Conversation.prototype.tcTokenTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + /** + * HistorySyncConfig supportBotUserAgentChatHistory. + * @member {boolean} supportBotUserAgentChatHistory + * @memberof proto.DeviceProps.HistorySyncConfig + * @instance + */ + HistorySyncConfig.prototype.supportBotUserAgentChatHistory = false; - /** - * Conversation contactPrimaryIdentityKey. - * @member {Uint8Array} contactPrimaryIdentityKey - * @memberof proto.Conversation - * @instance - */ - Conversation.prototype.contactPrimaryIdentityKey = $util.newBuffer([]); + /** + * HistorySyncConfig supportCagReactionsAndPolls. + * @member {boolean} supportCagReactionsAndPolls + * @memberof proto.DeviceProps.HistorySyncConfig + * @instance + */ + HistorySyncConfig.prototype.supportCagReactionsAndPolls = false; - /** - * Conversation pinned. - * @member {number} pinned - * @memberof proto.Conversation - * @instance - */ - Conversation.prototype.pinned = 0; + /** + * Creates a new HistorySyncConfig instance using the specified properties. + * @function create + * @memberof proto.DeviceProps.HistorySyncConfig + * @static + * @param {proto.DeviceProps.IHistorySyncConfig=} [properties] Properties to set + * @returns {proto.DeviceProps.HistorySyncConfig} HistorySyncConfig instance + */ + HistorySyncConfig.create = function create(properties) { + return new HistorySyncConfig(properties); + }; - /** - * Conversation muteEndTime. - * @member {number|Long} muteEndTime - * @memberof proto.Conversation - * @instance - */ - Conversation.prototype.muteEndTime = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + /** + * Encodes the specified HistorySyncConfig message. Does not implicitly {@link proto.DeviceProps.HistorySyncConfig.verify|verify} messages. + * @function encode + * @memberof proto.DeviceProps.HistorySyncConfig + * @static + * @param {proto.DeviceProps.IHistorySyncConfig} message HistorySyncConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HistorySyncConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fullSyncDaysLimit != null && Object.hasOwnProperty.call(message, "fullSyncDaysLimit")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.fullSyncDaysLimit); + if (message.fullSyncSizeMbLimit != null && Object.hasOwnProperty.call(message, "fullSyncSizeMbLimit")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.fullSyncSizeMbLimit); + if (message.storageQuotaMb != null && Object.hasOwnProperty.call(message, "storageQuotaMb")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.storageQuotaMb); + if (message.inlineInitialPayloadInE2EeMsg != null && Object.hasOwnProperty.call(message, "inlineInitialPayloadInE2EeMsg")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.inlineInitialPayloadInE2EeMsg); + if (message.recentSyncDaysLimit != null && Object.hasOwnProperty.call(message, "recentSyncDaysLimit")) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.recentSyncDaysLimit); + if (message.supportCallLogHistory != null && Object.hasOwnProperty.call(message, "supportCallLogHistory")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.supportCallLogHistory); + if (message.supportBotUserAgentChatHistory != null && Object.hasOwnProperty.call(message, "supportBotUserAgentChatHistory")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.supportBotUserAgentChatHistory); + if (message.supportCagReactionsAndPolls != null && Object.hasOwnProperty.call(message, "supportCagReactionsAndPolls")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.supportCagReactionsAndPolls); + return writer; + }; - /** - * Conversation wallpaper. - * @member {proto.IWallpaperSettings|null|undefined} wallpaper - * @memberof proto.Conversation - * @instance - */ - Conversation.prototype.wallpaper = null; + /** + * Encodes the specified HistorySyncConfig message, length delimited. Does not implicitly {@link proto.DeviceProps.HistorySyncConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.DeviceProps.HistorySyncConfig + * @static + * @param {proto.DeviceProps.IHistorySyncConfig} message HistorySyncConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HistorySyncConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Conversation mediaVisibility. - * @member {proto.MediaVisibility} mediaVisibility - * @memberof proto.Conversation - * @instance - */ - Conversation.prototype.mediaVisibility = 0; + /** + * Decodes a HistorySyncConfig message from the specified reader or buffer. + * @function decode + * @memberof proto.DeviceProps.HistorySyncConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.DeviceProps.HistorySyncConfig} HistorySyncConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HistorySyncConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.DeviceProps.HistorySyncConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.fullSyncDaysLimit = reader.uint32(); + break; + case 2: + message.fullSyncSizeMbLimit = reader.uint32(); + break; + case 3: + message.storageQuotaMb = reader.uint32(); + break; + case 4: + message.inlineInitialPayloadInE2EeMsg = reader.bool(); + break; + case 5: + message.recentSyncDaysLimit = reader.uint32(); + break; + case 6: + message.supportCallLogHistory = reader.bool(); + break; + case 7: + message.supportBotUserAgentChatHistory = reader.bool(); + break; + case 8: + message.supportCagReactionsAndPolls = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Conversation tcTokenSenderTimestamp. - * @member {number|Long} tcTokenSenderTimestamp - * @memberof proto.Conversation - * @instance - */ - Conversation.prototype.tcTokenSenderTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + /** + * Decodes a HistorySyncConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.DeviceProps.HistorySyncConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.DeviceProps.HistorySyncConfig} HistorySyncConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HistorySyncConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Conversation suspended. - * @member {boolean} suspended - * @memberof proto.Conversation - * @instance - */ - Conversation.prototype.suspended = false; + /** + * Verifies a HistorySyncConfig message. + * @function verify + * @memberof proto.DeviceProps.HistorySyncConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HistorySyncConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fullSyncDaysLimit != null && message.hasOwnProperty("fullSyncDaysLimit")) + if (!$util.isInteger(message.fullSyncDaysLimit)) + return "fullSyncDaysLimit: integer expected"; + if (message.fullSyncSizeMbLimit != null && message.hasOwnProperty("fullSyncSizeMbLimit")) + if (!$util.isInteger(message.fullSyncSizeMbLimit)) + return "fullSyncSizeMbLimit: integer expected"; + if (message.storageQuotaMb != null && message.hasOwnProperty("storageQuotaMb")) + if (!$util.isInteger(message.storageQuotaMb)) + return "storageQuotaMb: integer expected"; + if (message.inlineInitialPayloadInE2EeMsg != null && message.hasOwnProperty("inlineInitialPayloadInE2EeMsg")) + if (typeof message.inlineInitialPayloadInE2EeMsg !== "boolean") + return "inlineInitialPayloadInE2EeMsg: boolean expected"; + if (message.recentSyncDaysLimit != null && message.hasOwnProperty("recentSyncDaysLimit")) + if (!$util.isInteger(message.recentSyncDaysLimit)) + return "recentSyncDaysLimit: integer expected"; + if (message.supportCallLogHistory != null && message.hasOwnProperty("supportCallLogHistory")) + if (typeof message.supportCallLogHistory !== "boolean") + return "supportCallLogHistory: boolean expected"; + if (message.supportBotUserAgentChatHistory != null && message.hasOwnProperty("supportBotUserAgentChatHistory")) + if (typeof message.supportBotUserAgentChatHistory !== "boolean") + return "supportBotUserAgentChatHistory: boolean expected"; + if (message.supportCagReactionsAndPolls != null && message.hasOwnProperty("supportCagReactionsAndPolls")) + if (typeof message.supportCagReactionsAndPolls !== "boolean") + return "supportCagReactionsAndPolls: boolean expected"; + return null; + }; - /** - * Conversation terminated. - * @member {boolean} terminated - * @memberof proto.Conversation - * @instance - */ - Conversation.prototype.terminated = false; + /** + * Creates a HistorySyncConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.DeviceProps.HistorySyncConfig + * @static + * @param {Object.} object Plain object + * @returns {proto.DeviceProps.HistorySyncConfig} HistorySyncConfig + */ + HistorySyncConfig.fromObject = function fromObject(object) { + if (object instanceof $root.proto.DeviceProps.HistorySyncConfig) + return object; + var message = new $root.proto.DeviceProps.HistorySyncConfig(); + if (object.fullSyncDaysLimit != null) + message.fullSyncDaysLimit = object.fullSyncDaysLimit >>> 0; + if (object.fullSyncSizeMbLimit != null) + message.fullSyncSizeMbLimit = object.fullSyncSizeMbLimit >>> 0; + if (object.storageQuotaMb != null) + message.storageQuotaMb = object.storageQuotaMb >>> 0; + if (object.inlineInitialPayloadInE2EeMsg != null) + message.inlineInitialPayloadInE2EeMsg = Boolean(object.inlineInitialPayloadInE2EeMsg); + if (object.recentSyncDaysLimit != null) + message.recentSyncDaysLimit = object.recentSyncDaysLimit >>> 0; + if (object.supportCallLogHistory != null) + message.supportCallLogHistory = Boolean(object.supportCallLogHistory); + if (object.supportBotUserAgentChatHistory != null) + message.supportBotUserAgentChatHistory = Boolean(object.supportBotUserAgentChatHistory); + if (object.supportCagReactionsAndPolls != null) + message.supportCagReactionsAndPolls = Boolean(object.supportCagReactionsAndPolls); + return message; + }; - /** - * Conversation createdAt. - * @member {number|Long} createdAt - * @memberof proto.Conversation - * @instance - */ - Conversation.prototype.createdAt = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + /** + * Creates a plain object from a HistorySyncConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.DeviceProps.HistorySyncConfig + * @static + * @param {proto.DeviceProps.HistorySyncConfig} message HistorySyncConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HistorySyncConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.fullSyncDaysLimit = 0; + object.fullSyncSizeMbLimit = 0; + object.storageQuotaMb = 0; + object.inlineInitialPayloadInE2EeMsg = false; + object.recentSyncDaysLimit = 0; + object.supportCallLogHistory = false; + object.supportBotUserAgentChatHistory = false; + object.supportCagReactionsAndPolls = false; + } + if (message.fullSyncDaysLimit != null && message.hasOwnProperty("fullSyncDaysLimit")) + object.fullSyncDaysLimit = message.fullSyncDaysLimit; + if (message.fullSyncSizeMbLimit != null && message.hasOwnProperty("fullSyncSizeMbLimit")) + object.fullSyncSizeMbLimit = message.fullSyncSizeMbLimit; + if (message.storageQuotaMb != null && message.hasOwnProperty("storageQuotaMb")) + object.storageQuotaMb = message.storageQuotaMb; + if (message.inlineInitialPayloadInE2EeMsg != null && message.hasOwnProperty("inlineInitialPayloadInE2EeMsg")) + object.inlineInitialPayloadInE2EeMsg = message.inlineInitialPayloadInE2EeMsg; + if (message.recentSyncDaysLimit != null && message.hasOwnProperty("recentSyncDaysLimit")) + object.recentSyncDaysLimit = message.recentSyncDaysLimit; + if (message.supportCallLogHistory != null && message.hasOwnProperty("supportCallLogHistory")) + object.supportCallLogHistory = message.supportCallLogHistory; + if (message.supportBotUserAgentChatHistory != null && message.hasOwnProperty("supportBotUserAgentChatHistory")) + object.supportBotUserAgentChatHistory = message.supportBotUserAgentChatHistory; + if (message.supportCagReactionsAndPolls != null && message.hasOwnProperty("supportCagReactionsAndPolls")) + object.supportCagReactionsAndPolls = message.supportCagReactionsAndPolls; + return object; + }; - /** - * Conversation createdBy. - * @member {string} createdBy - * @memberof proto.Conversation - * @instance - */ - Conversation.prototype.createdBy = ""; + /** + * Converts this HistorySyncConfig to JSON. + * @function toJSON + * @memberof proto.DeviceProps.HistorySyncConfig + * @instance + * @returns {Object.} JSON object + */ + HistorySyncConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Conversation description. - * @member {string} description - * @memberof proto.Conversation - * @instance - */ - Conversation.prototype.description = ""; + return HistorySyncConfig; + })(); /** - * Conversation support. - * @member {boolean} support - * @memberof proto.Conversation - * @instance + * PlatformType enum. + * @name proto.DeviceProps.PlatformType + * @enum {number} + * @property {number} UNKNOWN=0 UNKNOWN value + * @property {number} CHROME=1 CHROME value + * @property {number} FIREFOX=2 FIREFOX value + * @property {number} IE=3 IE value + * @property {number} OPERA=4 OPERA value + * @property {number} SAFARI=5 SAFARI value + * @property {number} EDGE=6 EDGE value + * @property {number} DESKTOP=7 DESKTOP value + * @property {number} IPAD=8 IPAD value + * @property {number} ANDROID_TABLET=9 ANDROID_TABLET value + * @property {number} OHANA=10 OHANA value + * @property {number} ALOHA=11 ALOHA value + * @property {number} CATALINA=12 CATALINA value + * @property {number} TCL_TV=13 TCL_TV value + * @property {number} IOS_PHONE=14 IOS_PHONE value + * @property {number} IOS_CATALYST=15 IOS_CATALYST value + * @property {number} ANDROID_PHONE=16 ANDROID_PHONE value + * @property {number} ANDROID_AMBIGUOUS=17 ANDROID_AMBIGUOUS value + * @property {number} WEAR_OS=18 WEAR_OS value + * @property {number} AR_WRIST=19 AR_WRIST value + * @property {number} AR_DEVICE=20 AR_DEVICE value + * @property {number} UWP=21 UWP value + * @property {number} VR=22 VR value */ - Conversation.prototype.support = false; + DeviceProps.PlatformType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN"] = 0; + values[valuesById[1] = "CHROME"] = 1; + values[valuesById[2] = "FIREFOX"] = 2; + values[valuesById[3] = "IE"] = 3; + values[valuesById[4] = "OPERA"] = 4; + values[valuesById[5] = "SAFARI"] = 5; + values[valuesById[6] = "EDGE"] = 6; + values[valuesById[7] = "DESKTOP"] = 7; + values[valuesById[8] = "IPAD"] = 8; + values[valuesById[9] = "ANDROID_TABLET"] = 9; + values[valuesById[10] = "OHANA"] = 10; + values[valuesById[11] = "ALOHA"] = 11; + values[valuesById[12] = "CATALINA"] = 12; + values[valuesById[13] = "TCL_TV"] = 13; + values[valuesById[14] = "IOS_PHONE"] = 14; + values[valuesById[15] = "IOS_CATALYST"] = 15; + values[valuesById[16] = "ANDROID_PHONE"] = 16; + values[valuesById[17] = "ANDROID_AMBIGUOUS"] = 17; + values[valuesById[18] = "WEAR_OS"] = 18; + values[valuesById[19] = "AR_WRIST"] = 19; + values[valuesById[20] = "AR_DEVICE"] = 20; + values[valuesById[21] = "UWP"] = 21; + values[valuesById[22] = "VR"] = 22; + return values; + })(); - /** - * Conversation isParentGroup. - * @member {boolean} isParentGroup - * @memberof proto.Conversation - * @instance - */ - Conversation.prototype.isParentGroup = false; + return DeviceProps; + })(); - /** - * Conversation parentGroupId. - * @member {string} parentGroupId - * @memberof proto.Conversation - * @instance - */ - Conversation.prototype.parentGroupId = ""; + proto.DisappearingMode = (function() { /** - * Conversation isDefaultSubgroup. - * @member {boolean} isDefaultSubgroup - * @memberof proto.Conversation - * @instance + * Properties of a DisappearingMode. + * @memberof proto + * @interface IDisappearingMode + * @property {proto.DisappearingMode.Initiator|null} [initiator] DisappearingMode initiator + * @property {proto.DisappearingMode.Trigger|null} [trigger] DisappearingMode trigger + * @property {string|null} [initiatorDeviceJid] DisappearingMode initiatorDeviceJid + * @property {boolean|null} [initiatedByMe] DisappearingMode initiatedByMe */ - Conversation.prototype.isDefaultSubgroup = false; /** - * Conversation displayName. - * @member {string} displayName - * @memberof proto.Conversation - * @instance + * Constructs a new DisappearingMode. + * @memberof proto + * @classdesc Represents a DisappearingMode. + * @implements IDisappearingMode + * @constructor + * @param {proto.IDisappearingMode=} [properties] Properties to set */ - Conversation.prototype.displayName = ""; + function DisappearingMode(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Conversation pnJid. - * @member {string} pnJid - * @memberof proto.Conversation + * DisappearingMode initiator. + * @member {proto.DisappearingMode.Initiator} initiator + * @memberof proto.DisappearingMode * @instance */ - Conversation.prototype.pnJid = ""; + DisappearingMode.prototype.initiator = 0; /** - * Conversation shareOwnPn. - * @member {boolean} shareOwnPn - * @memberof proto.Conversation + * DisappearingMode trigger. + * @member {proto.DisappearingMode.Trigger} trigger + * @memberof proto.DisappearingMode * @instance */ - Conversation.prototype.shareOwnPn = false; + DisappearingMode.prototype.trigger = 0; /** - * Conversation pnhDuplicateLidThread. - * @member {boolean} pnhDuplicateLidThread - * @memberof proto.Conversation + * DisappearingMode initiatorDeviceJid. + * @member {string} initiatorDeviceJid + * @memberof proto.DisappearingMode * @instance */ - Conversation.prototype.pnhDuplicateLidThread = false; + DisappearingMode.prototype.initiatorDeviceJid = ""; /** - * Conversation lidJid. - * @member {string} lidJid - * @memberof proto.Conversation + * DisappearingMode initiatedByMe. + * @member {boolean} initiatedByMe + * @memberof proto.DisappearingMode * @instance */ - Conversation.prototype.lidJid = ""; + DisappearingMode.prototype.initiatedByMe = false; /** - * Creates a new Conversation instance using the specified properties. + * Creates a new DisappearingMode instance using the specified properties. * @function create - * @memberof proto.Conversation + * @memberof proto.DisappearingMode * @static - * @param {proto.IConversation=} [properties] Properties to set - * @returns {proto.Conversation} Conversation instance + * @param {proto.IDisappearingMode=} [properties] Properties to set + * @returns {proto.DisappearingMode} DisappearingMode instance */ - Conversation.create = function create(properties) { - return new Conversation(properties); + DisappearingMode.create = function create(properties) { + return new DisappearingMode(properties); }; /** - * Encodes the specified Conversation message. Does not implicitly {@link proto.Conversation.verify|verify} messages. + * Encodes the specified DisappearingMode message. Does not implicitly {@link proto.DisappearingMode.verify|verify} messages. * @function encode - * @memberof proto.Conversation + * @memberof proto.DisappearingMode * @static - * @param {proto.IConversation} message Conversation message or plain object to encode + * @param {proto.IDisappearingMode} message DisappearingMode message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Conversation.encode = function encode(message, writer) { + DisappearingMode.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); - if (message.messages != null && message.messages.length) - for (var i = 0; i < message.messages.length; ++i) - $root.proto.HistorySyncMsg.encode(message.messages[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.newJid != null && Object.hasOwnProperty.call(message, "newJid")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.newJid); - if (message.oldJid != null && Object.hasOwnProperty.call(message, "oldJid")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.oldJid); - if (message.lastMsgTimestamp != null && Object.hasOwnProperty.call(message, "lastMsgTimestamp")) - writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.lastMsgTimestamp); - if (message.unreadCount != null && Object.hasOwnProperty.call(message, "unreadCount")) - writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.unreadCount); - if (message.readOnly != null && Object.hasOwnProperty.call(message, "readOnly")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.readOnly); - if (message.endOfHistoryTransfer != null && Object.hasOwnProperty.call(message, "endOfHistoryTransfer")) - writer.uint32(/* id 8, wireType 0 =*/64).bool(message.endOfHistoryTransfer); - if (message.ephemeralExpiration != null && Object.hasOwnProperty.call(message, "ephemeralExpiration")) - writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.ephemeralExpiration); - if (message.ephemeralSettingTimestamp != null && Object.hasOwnProperty.call(message, "ephemeralSettingTimestamp")) - writer.uint32(/* id 10, wireType 0 =*/80).int64(message.ephemeralSettingTimestamp); - if (message.endOfHistoryTransferType != null && Object.hasOwnProperty.call(message, "endOfHistoryTransferType")) - writer.uint32(/* id 11, wireType 0 =*/88).int32(message.endOfHistoryTransferType); - if (message.conversationTimestamp != null && Object.hasOwnProperty.call(message, "conversationTimestamp")) - writer.uint32(/* id 12, wireType 0 =*/96).uint64(message.conversationTimestamp); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.name); - if (message.pHash != null && Object.hasOwnProperty.call(message, "pHash")) - writer.uint32(/* id 14, wireType 2 =*/114).string(message.pHash); - if (message.notSpam != null && Object.hasOwnProperty.call(message, "notSpam")) - writer.uint32(/* id 15, wireType 0 =*/120).bool(message.notSpam); - if (message.archived != null && Object.hasOwnProperty.call(message, "archived")) - writer.uint32(/* id 16, wireType 0 =*/128).bool(message.archived); - if (message.disappearingMode != null && Object.hasOwnProperty.call(message, "disappearingMode")) - $root.proto.DisappearingMode.encode(message.disappearingMode, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); - if (message.unreadMentionCount != null && Object.hasOwnProperty.call(message, "unreadMentionCount")) - writer.uint32(/* id 18, wireType 0 =*/144).uint32(message.unreadMentionCount); - if (message.markedAsUnread != null && Object.hasOwnProperty.call(message, "markedAsUnread")) - writer.uint32(/* id 19, wireType 0 =*/152).bool(message.markedAsUnread); - if (message.participant != null && message.participant.length) - for (var i = 0; i < message.participant.length; ++i) - $root.proto.GroupParticipant.encode(message.participant[i], writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); - if (message.tcToken != null && Object.hasOwnProperty.call(message, "tcToken")) - writer.uint32(/* id 21, wireType 2 =*/170).bytes(message.tcToken); - if (message.tcTokenTimestamp != null && Object.hasOwnProperty.call(message, "tcTokenTimestamp")) - writer.uint32(/* id 22, wireType 0 =*/176).uint64(message.tcTokenTimestamp); - if (message.contactPrimaryIdentityKey != null && Object.hasOwnProperty.call(message, "contactPrimaryIdentityKey")) - writer.uint32(/* id 23, wireType 2 =*/186).bytes(message.contactPrimaryIdentityKey); - if (message.pinned != null && Object.hasOwnProperty.call(message, "pinned")) - writer.uint32(/* id 24, wireType 0 =*/192).uint32(message.pinned); - if (message.muteEndTime != null && Object.hasOwnProperty.call(message, "muteEndTime")) - writer.uint32(/* id 25, wireType 0 =*/200).uint64(message.muteEndTime); - if (message.wallpaper != null && Object.hasOwnProperty.call(message, "wallpaper")) - $root.proto.WallpaperSettings.encode(message.wallpaper, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); - if (message.mediaVisibility != null && Object.hasOwnProperty.call(message, "mediaVisibility")) - writer.uint32(/* id 27, wireType 0 =*/216).int32(message.mediaVisibility); - if (message.tcTokenSenderTimestamp != null && Object.hasOwnProperty.call(message, "tcTokenSenderTimestamp")) - writer.uint32(/* id 28, wireType 0 =*/224).uint64(message.tcTokenSenderTimestamp); - if (message.suspended != null && Object.hasOwnProperty.call(message, "suspended")) - writer.uint32(/* id 29, wireType 0 =*/232).bool(message.suspended); - if (message.terminated != null && Object.hasOwnProperty.call(message, "terminated")) - writer.uint32(/* id 30, wireType 0 =*/240).bool(message.terminated); - if (message.createdAt != null && Object.hasOwnProperty.call(message, "createdAt")) - writer.uint32(/* id 31, wireType 0 =*/248).uint64(message.createdAt); - if (message.createdBy != null && Object.hasOwnProperty.call(message, "createdBy")) - writer.uint32(/* id 32, wireType 2 =*/258).string(message.createdBy); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 33, wireType 2 =*/266).string(message.description); - if (message.support != null && Object.hasOwnProperty.call(message, "support")) - writer.uint32(/* id 34, wireType 0 =*/272).bool(message.support); - if (message.isParentGroup != null && Object.hasOwnProperty.call(message, "isParentGroup")) - writer.uint32(/* id 35, wireType 0 =*/280).bool(message.isParentGroup); - if (message.isDefaultSubgroup != null && Object.hasOwnProperty.call(message, "isDefaultSubgroup")) - writer.uint32(/* id 36, wireType 0 =*/288).bool(message.isDefaultSubgroup); - if (message.parentGroupId != null && Object.hasOwnProperty.call(message, "parentGroupId")) - writer.uint32(/* id 37, wireType 2 =*/298).string(message.parentGroupId); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 38, wireType 2 =*/306).string(message.displayName); - if (message.pnJid != null && Object.hasOwnProperty.call(message, "pnJid")) - writer.uint32(/* id 39, wireType 2 =*/314).string(message.pnJid); - if (message.shareOwnPn != null && Object.hasOwnProperty.call(message, "shareOwnPn")) - writer.uint32(/* id 40, wireType 0 =*/320).bool(message.shareOwnPn); - if (message.pnhDuplicateLidThread != null && Object.hasOwnProperty.call(message, "pnhDuplicateLidThread")) - writer.uint32(/* id 41, wireType 0 =*/328).bool(message.pnhDuplicateLidThread); - if (message.lidJid != null && Object.hasOwnProperty.call(message, "lidJid")) - writer.uint32(/* id 42, wireType 2 =*/338).string(message.lidJid); + if (message.initiator != null && Object.hasOwnProperty.call(message, "initiator")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.initiator); + if (message.trigger != null && Object.hasOwnProperty.call(message, "trigger")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.trigger); + if (message.initiatorDeviceJid != null && Object.hasOwnProperty.call(message, "initiatorDeviceJid")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.initiatorDeviceJid); + if (message.initiatedByMe != null && Object.hasOwnProperty.call(message, "initiatedByMe")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.initiatedByMe); return writer; }; /** - * Encodes the specified Conversation message, length delimited. Does not implicitly {@link proto.Conversation.verify|verify} messages. + * Encodes the specified DisappearingMode message, length delimited. Does not implicitly {@link proto.DisappearingMode.verify|verify} messages. * @function encodeDelimited - * @memberof proto.Conversation + * @memberof proto.DisappearingMode * @static - * @param {proto.IConversation} message Conversation message or plain object to encode + * @param {proto.IDisappearingMode} message DisappearingMode message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Conversation.encodeDelimited = function encodeDelimited(message, writer) { + DisappearingMode.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Conversation message from the specified reader or buffer. + * Decodes a DisappearingMode message from the specified reader or buffer. * @function decode - * @memberof proto.Conversation + * @memberof proto.DisappearingMode * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {proto.Conversation} Conversation + * @returns {proto.DisappearingMode} DisappearingMode * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Conversation.decode = function decode(reader, length) { + DisappearingMode.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Conversation(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.DisappearingMode(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.id = reader.string(); + message.initiator = reader.int32(); break; case 2: - if (!(message.messages && message.messages.length)) - message.messages = []; - message.messages.push($root.proto.HistorySyncMsg.decode(reader, reader.uint32())); + message.trigger = reader.int32(); break; case 3: - message.newJid = reader.string(); + message.initiatorDeviceJid = reader.string(); break; case 4: - message.oldJid = reader.string(); - break; - case 5: - message.lastMsgTimestamp = reader.uint64(); - break; - case 6: - message.unreadCount = reader.uint32(); - break; - case 7: - message.readOnly = reader.bool(); - break; - case 8: - message.endOfHistoryTransfer = reader.bool(); - break; - case 9: - message.ephemeralExpiration = reader.uint32(); - break; - case 10: - message.ephemeralSettingTimestamp = reader.int64(); - break; - case 11: - message.endOfHistoryTransferType = reader.int32(); - break; - case 12: - message.conversationTimestamp = reader.uint64(); - break; - case 13: - message.name = reader.string(); - break; - case 14: - message.pHash = reader.string(); - break; - case 15: - message.notSpam = reader.bool(); - break; - case 16: - message.archived = reader.bool(); - break; - case 17: - message.disappearingMode = $root.proto.DisappearingMode.decode(reader, reader.uint32()); - break; - case 18: - message.unreadMentionCount = reader.uint32(); - break; - case 19: - message.markedAsUnread = reader.bool(); - break; - case 20: - if (!(message.participant && message.participant.length)) - message.participant = []; - message.participant.push($root.proto.GroupParticipant.decode(reader, reader.uint32())); - break; - case 21: - message.tcToken = reader.bytes(); - break; - case 22: - message.tcTokenTimestamp = reader.uint64(); - break; - case 23: - message.contactPrimaryIdentityKey = reader.bytes(); - break; - case 24: - message.pinned = reader.uint32(); - break; - case 25: - message.muteEndTime = reader.uint64(); - break; - case 26: - message.wallpaper = $root.proto.WallpaperSettings.decode(reader, reader.uint32()); - break; - case 27: - message.mediaVisibility = reader.int32(); - break; - case 28: - message.tcTokenSenderTimestamp = reader.uint64(); - break; - case 29: - message.suspended = reader.bool(); - break; - case 30: - message.terminated = reader.bool(); - break; - case 31: - message.createdAt = reader.uint64(); - break; - case 32: - message.createdBy = reader.string(); - break; - case 33: - message.description = reader.string(); - break; - case 34: - message.support = reader.bool(); - break; - case 35: - message.isParentGroup = reader.bool(); - break; - case 37: - message.parentGroupId = reader.string(); - break; - case 36: - message.isDefaultSubgroup = reader.bool(); - break; - case 38: - message.displayName = reader.string(); - break; - case 39: - message.pnJid = reader.string(); - break; - case 40: - message.shareOwnPn = reader.bool(); - break; - case 41: - message.pnhDuplicateLidThread = reader.bool(); - break; - case 42: - message.lidJid = reader.string(); + message.initiatedByMe = reader.bool(); break; default: reader.skipType(tag & 7); break; } } - if (!message.hasOwnProperty("id")) - throw $util.ProtocolError("missing required 'id'", { instance: message }); return message; }; /** - * Decodes a Conversation message from the specified reader or buffer, length delimited. + * Decodes a DisappearingMode message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof proto.Conversation + * @memberof proto.DisappearingMode * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.Conversation} Conversation + * @returns {proto.DisappearingMode} DisappearingMode * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Conversation.decodeDelimited = function decodeDelimited(reader) { + DisappearingMode.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Conversation message. + * Verifies a DisappearingMode message. * @function verify - * @memberof proto.Conversation + * @memberof proto.DisappearingMode * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Conversation.verify = function verify(message) { + DisappearingMode.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (!$util.isString(message.id)) - return "id: string expected"; - if (message.messages != null && message.hasOwnProperty("messages")) { - if (!Array.isArray(message.messages)) - return "messages: array expected"; - for (var i = 0; i < message.messages.length; ++i) { - var error = $root.proto.HistorySyncMsg.verify(message.messages[i]); - if (error) - return "messages." + error; - } - } - if (message.newJid != null && message.hasOwnProperty("newJid")) - if (!$util.isString(message.newJid)) - return "newJid: string expected"; - if (message.oldJid != null && message.hasOwnProperty("oldJid")) - if (!$util.isString(message.oldJid)) - return "oldJid: string expected"; - if (message.lastMsgTimestamp != null && message.hasOwnProperty("lastMsgTimestamp")) - if (!$util.isInteger(message.lastMsgTimestamp) && !(message.lastMsgTimestamp && $util.isInteger(message.lastMsgTimestamp.low) && $util.isInteger(message.lastMsgTimestamp.high))) - return "lastMsgTimestamp: integer|Long expected"; - if (message.unreadCount != null && message.hasOwnProperty("unreadCount")) - if (!$util.isInteger(message.unreadCount)) - return "unreadCount: integer expected"; - if (message.readOnly != null && message.hasOwnProperty("readOnly")) - if (typeof message.readOnly !== "boolean") - return "readOnly: boolean expected"; - if (message.endOfHistoryTransfer != null && message.hasOwnProperty("endOfHistoryTransfer")) - if (typeof message.endOfHistoryTransfer !== "boolean") - return "endOfHistoryTransfer: boolean expected"; - if (message.ephemeralExpiration != null && message.hasOwnProperty("ephemeralExpiration")) - if (!$util.isInteger(message.ephemeralExpiration)) - return "ephemeralExpiration: integer expected"; - if (message.ephemeralSettingTimestamp != null && message.hasOwnProperty("ephemeralSettingTimestamp")) - if (!$util.isInteger(message.ephemeralSettingTimestamp) && !(message.ephemeralSettingTimestamp && $util.isInteger(message.ephemeralSettingTimestamp.low) && $util.isInteger(message.ephemeralSettingTimestamp.high))) - return "ephemeralSettingTimestamp: integer|Long expected"; - if (message.endOfHistoryTransferType != null && message.hasOwnProperty("endOfHistoryTransferType")) - switch (message.endOfHistoryTransferType) { + if (message.initiator != null && message.hasOwnProperty("initiator")) + switch (message.initiator) { default: - return "endOfHistoryTransferType: enum value expected"; + return "initiator: enum value expected"; case 0: case 1: case 2: + case 3: break; } - if (message.conversationTimestamp != null && message.hasOwnProperty("conversationTimestamp")) - if (!$util.isInteger(message.conversationTimestamp) && !(message.conversationTimestamp && $util.isInteger(message.conversationTimestamp.low) && $util.isInteger(message.conversationTimestamp.high))) - return "conversationTimestamp: integer|Long expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.pHash != null && message.hasOwnProperty("pHash")) - if (!$util.isString(message.pHash)) - return "pHash: string expected"; - if (message.notSpam != null && message.hasOwnProperty("notSpam")) - if (typeof message.notSpam !== "boolean") - return "notSpam: boolean expected"; - if (message.archived != null && message.hasOwnProperty("archived")) - if (typeof message.archived !== "boolean") - return "archived: boolean expected"; - if (message.disappearingMode != null && message.hasOwnProperty("disappearingMode")) { - var error = $root.proto.DisappearingMode.verify(message.disappearingMode); - if (error) - return "disappearingMode." + error; - } - if (message.unreadMentionCount != null && message.hasOwnProperty("unreadMentionCount")) - if (!$util.isInteger(message.unreadMentionCount)) - return "unreadMentionCount: integer expected"; - if (message.markedAsUnread != null && message.hasOwnProperty("markedAsUnread")) - if (typeof message.markedAsUnread !== "boolean") - return "markedAsUnread: boolean expected"; - if (message.participant != null && message.hasOwnProperty("participant")) { - if (!Array.isArray(message.participant)) - return "participant: array expected"; - for (var i = 0; i < message.participant.length; ++i) { - var error = $root.proto.GroupParticipant.verify(message.participant[i]); - if (error) - return "participant." + error; - } - } - if (message.tcToken != null && message.hasOwnProperty("tcToken")) - if (!(message.tcToken && typeof message.tcToken.length === "number" || $util.isString(message.tcToken))) - return "tcToken: buffer expected"; - if (message.tcTokenTimestamp != null && message.hasOwnProperty("tcTokenTimestamp")) - if (!$util.isInteger(message.tcTokenTimestamp) && !(message.tcTokenTimestamp && $util.isInteger(message.tcTokenTimestamp.low) && $util.isInteger(message.tcTokenTimestamp.high))) - return "tcTokenTimestamp: integer|Long expected"; - if (message.contactPrimaryIdentityKey != null && message.hasOwnProperty("contactPrimaryIdentityKey")) - if (!(message.contactPrimaryIdentityKey && typeof message.contactPrimaryIdentityKey.length === "number" || $util.isString(message.contactPrimaryIdentityKey))) - return "contactPrimaryIdentityKey: buffer expected"; - if (message.pinned != null && message.hasOwnProperty("pinned")) - if (!$util.isInteger(message.pinned)) - return "pinned: integer expected"; - if (message.muteEndTime != null && message.hasOwnProperty("muteEndTime")) - if (!$util.isInteger(message.muteEndTime) && !(message.muteEndTime && $util.isInteger(message.muteEndTime.low) && $util.isInteger(message.muteEndTime.high))) - return "muteEndTime: integer|Long expected"; - if (message.wallpaper != null && message.hasOwnProperty("wallpaper")) { - var error = $root.proto.WallpaperSettings.verify(message.wallpaper); - if (error) - return "wallpaper." + error; - } - if (message.mediaVisibility != null && message.hasOwnProperty("mediaVisibility")) - switch (message.mediaVisibility) { + if (message.trigger != null && message.hasOwnProperty("trigger")) + switch (message.trigger) { default: - return "mediaVisibility: enum value expected"; + return "trigger: enum value expected"; case 0: case 1: case 2: + case 3: + case 4: break; } - if (message.tcTokenSenderTimestamp != null && message.hasOwnProperty("tcTokenSenderTimestamp")) - if (!$util.isInteger(message.tcTokenSenderTimestamp) && !(message.tcTokenSenderTimestamp && $util.isInteger(message.tcTokenSenderTimestamp.low) && $util.isInteger(message.tcTokenSenderTimestamp.high))) - return "tcTokenSenderTimestamp: integer|Long expected"; - if (message.suspended != null && message.hasOwnProperty("suspended")) - if (typeof message.suspended !== "boolean") - return "suspended: boolean expected"; - if (message.terminated != null && message.hasOwnProperty("terminated")) - if (typeof message.terminated !== "boolean") - return "terminated: boolean expected"; - if (message.createdAt != null && message.hasOwnProperty("createdAt")) - if (!$util.isInteger(message.createdAt) && !(message.createdAt && $util.isInteger(message.createdAt.low) && $util.isInteger(message.createdAt.high))) - return "createdAt: integer|Long expected"; - if (message.createdBy != null && message.hasOwnProperty("createdBy")) - if (!$util.isString(message.createdBy)) - return "createdBy: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.support != null && message.hasOwnProperty("support")) - if (typeof message.support !== "boolean") - return "support: boolean expected"; - if (message.isParentGroup != null && message.hasOwnProperty("isParentGroup")) - if (typeof message.isParentGroup !== "boolean") - return "isParentGroup: boolean expected"; - if (message.parentGroupId != null && message.hasOwnProperty("parentGroupId")) - if (!$util.isString(message.parentGroupId)) - return "parentGroupId: string expected"; - if (message.isDefaultSubgroup != null && message.hasOwnProperty("isDefaultSubgroup")) - if (typeof message.isDefaultSubgroup !== "boolean") - return "isDefaultSubgroup: boolean expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.pnJid != null && message.hasOwnProperty("pnJid")) - if (!$util.isString(message.pnJid)) - return "pnJid: string expected"; - if (message.shareOwnPn != null && message.hasOwnProperty("shareOwnPn")) - if (typeof message.shareOwnPn !== "boolean") - return "shareOwnPn: boolean expected"; - if (message.pnhDuplicateLidThread != null && message.hasOwnProperty("pnhDuplicateLidThread")) - if (typeof message.pnhDuplicateLidThread !== "boolean") - return "pnhDuplicateLidThread: boolean expected"; - if (message.lidJid != null && message.hasOwnProperty("lidJid")) - if (!$util.isString(message.lidJid)) - return "lidJid: string expected"; + if (message.initiatorDeviceJid != null && message.hasOwnProperty("initiatorDeviceJid")) + if (!$util.isString(message.initiatorDeviceJid)) + return "initiatorDeviceJid: string expected"; + if (message.initiatedByMe != null && message.hasOwnProperty("initiatedByMe")) + if (typeof message.initiatedByMe !== "boolean") + return "initiatedByMe: boolean expected"; + return null; + }; + + /** + * Creates a DisappearingMode message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.DisappearingMode + * @static + * @param {Object.} object Plain object + * @returns {proto.DisappearingMode} DisappearingMode + */ + DisappearingMode.fromObject = function fromObject(object) { + if (object instanceof $root.proto.DisappearingMode) + return object; + var message = new $root.proto.DisappearingMode(); + switch (object.initiator) { + case "CHANGED_IN_CHAT": + case 0: + message.initiator = 0; + break; + case "INITIATED_BY_ME": + case 1: + message.initiator = 1; + break; + case "INITIATED_BY_OTHER": + case 2: + message.initiator = 2; + break; + case "BIZ_UPGRADE_FB_HOSTING": + case 3: + message.initiator = 3; + break; + } + switch (object.trigger) { + case "UNKNOWN": + case 0: + message.trigger = 0; + break; + case "CHAT_SETTING": + case 1: + message.trigger = 1; + break; + case "ACCOUNT_SETTING": + case 2: + message.trigger = 2; + break; + case "BULK_CHANGE": + case 3: + message.trigger = 3; + break; + case "BIZ_SUPPORTS_FB_HOSTING": + case 4: + message.trigger = 4; + break; + } + if (object.initiatorDeviceJid != null) + message.initiatorDeviceJid = String(object.initiatorDeviceJid); + if (object.initiatedByMe != null) + message.initiatedByMe = Boolean(object.initiatedByMe); + return message; + }; + + /** + * Creates a plain object from a DisappearingMode message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.DisappearingMode + * @static + * @param {proto.DisappearingMode} message DisappearingMode + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DisappearingMode.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.initiator = options.enums === String ? "CHANGED_IN_CHAT" : 0; + object.trigger = options.enums === String ? "UNKNOWN" : 0; + object.initiatorDeviceJid = ""; + object.initiatedByMe = false; + } + if (message.initiator != null && message.hasOwnProperty("initiator")) + object.initiator = options.enums === String ? $root.proto.DisappearingMode.Initiator[message.initiator] : message.initiator; + if (message.trigger != null && message.hasOwnProperty("trigger")) + object.trigger = options.enums === String ? $root.proto.DisappearingMode.Trigger[message.trigger] : message.trigger; + if (message.initiatorDeviceJid != null && message.hasOwnProperty("initiatorDeviceJid")) + object.initiatorDeviceJid = message.initiatorDeviceJid; + if (message.initiatedByMe != null && message.hasOwnProperty("initiatedByMe")) + object.initiatedByMe = message.initiatedByMe; + return object; + }; + + /** + * Converts this DisappearingMode to JSON. + * @function toJSON + * @memberof proto.DisappearingMode + * @instance + * @returns {Object.} JSON object + */ + DisappearingMode.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Initiator enum. + * @name proto.DisappearingMode.Initiator + * @enum {number} + * @property {number} CHANGED_IN_CHAT=0 CHANGED_IN_CHAT value + * @property {number} INITIATED_BY_ME=1 INITIATED_BY_ME value + * @property {number} INITIATED_BY_OTHER=2 INITIATED_BY_OTHER value + * @property {number} BIZ_UPGRADE_FB_HOSTING=3 BIZ_UPGRADE_FB_HOSTING value + */ + DisappearingMode.Initiator = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CHANGED_IN_CHAT"] = 0; + values[valuesById[1] = "INITIATED_BY_ME"] = 1; + values[valuesById[2] = "INITIATED_BY_OTHER"] = 2; + values[valuesById[3] = "BIZ_UPGRADE_FB_HOSTING"] = 3; + return values; + })(); + + /** + * Trigger enum. + * @name proto.DisappearingMode.Trigger + * @enum {number} + * @property {number} UNKNOWN=0 UNKNOWN value + * @property {number} CHAT_SETTING=1 CHAT_SETTING value + * @property {number} ACCOUNT_SETTING=2 ACCOUNT_SETTING value + * @property {number} BULK_CHANGE=3 BULK_CHANGE value + * @property {number} BIZ_SUPPORTS_FB_HOSTING=4 BIZ_SUPPORTS_FB_HOSTING value + */ + DisappearingMode.Trigger = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN"] = 0; + values[valuesById[1] = "CHAT_SETTING"] = 1; + values[valuesById[2] = "ACCOUNT_SETTING"] = 2; + values[valuesById[3] = "BULK_CHANGE"] = 3; + values[valuesById[4] = "BIZ_SUPPORTS_FB_HOSTING"] = 4; + return values; + })(); + + return DisappearingMode; + })(); + + proto.EphemeralSetting = (function() { + + /** + * Properties of an EphemeralSetting. + * @memberof proto + * @interface IEphemeralSetting + * @property {number|null} [duration] EphemeralSetting duration + * @property {number|Long|null} [timestamp] EphemeralSetting timestamp + */ + + /** + * Constructs a new EphemeralSetting. + * @memberof proto + * @classdesc Represents an EphemeralSetting. + * @implements IEphemeralSetting + * @constructor + * @param {proto.IEphemeralSetting=} [properties] Properties to set + */ + function EphemeralSetting(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EphemeralSetting duration. + * @member {number} duration + * @memberof proto.EphemeralSetting + * @instance + */ + EphemeralSetting.prototype.duration = 0; + + /** + * EphemeralSetting timestamp. + * @member {number|Long} timestamp + * @memberof proto.EphemeralSetting + * @instance + */ + EphemeralSetting.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new EphemeralSetting instance using the specified properties. + * @function create + * @memberof proto.EphemeralSetting + * @static + * @param {proto.IEphemeralSetting=} [properties] Properties to set + * @returns {proto.EphemeralSetting} EphemeralSetting instance + */ + EphemeralSetting.create = function create(properties) { + return new EphemeralSetting(properties); + }; + + /** + * Encodes the specified EphemeralSetting message. Does not implicitly {@link proto.EphemeralSetting.verify|verify} messages. + * @function encode + * @memberof proto.EphemeralSetting + * @static + * @param {proto.IEphemeralSetting} message EphemeralSetting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EphemeralSetting.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.duration != null && Object.hasOwnProperty.call(message, "duration")) + writer.uint32(/* id 1, wireType 5 =*/13).sfixed32(message.duration); + if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) + writer.uint32(/* id 2, wireType 1 =*/17).sfixed64(message.timestamp); + return writer; + }; + + /** + * Encodes the specified EphemeralSetting message, length delimited. Does not implicitly {@link proto.EphemeralSetting.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.EphemeralSetting + * @static + * @param {proto.IEphemeralSetting} message EphemeralSetting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EphemeralSetting.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EphemeralSetting message from the specified reader or buffer. + * @function decode + * @memberof proto.EphemeralSetting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.EphemeralSetting} EphemeralSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EphemeralSetting.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.EphemeralSetting(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.duration = reader.sfixed32(); + break; + case 2: + message.timestamp = reader.sfixed64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EphemeralSetting message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.EphemeralSetting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.EphemeralSetting} EphemeralSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EphemeralSetting.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EphemeralSetting message. + * @function verify + * @memberof proto.EphemeralSetting + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EphemeralSetting.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.duration != null && message.hasOwnProperty("duration")) + if (!$util.isInteger(message.duration)) + return "duration: integer expected"; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high))) + return "timestamp: integer|Long expected"; return null; }; /** - * Creates a Conversation message from a plain object. Also converts values to their respective internal types. + * Creates an EphemeralSetting message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof proto.Conversation + * @memberof proto.EphemeralSetting * @static * @param {Object.} object Plain object - * @returns {proto.Conversation} Conversation + * @returns {proto.EphemeralSetting} EphemeralSetting */ - Conversation.fromObject = function fromObject(object) { - if (object instanceof $root.proto.Conversation) + EphemeralSetting.fromObject = function fromObject(object) { + if (object instanceof $root.proto.EphemeralSetting) return object; - var message = new $root.proto.Conversation(); - if (object.id != null) - message.id = String(object.id); - if (object.messages) { - if (!Array.isArray(object.messages)) - throw TypeError(".proto.Conversation.messages: array expected"); - message.messages = []; - for (var i = 0; i < object.messages.length; ++i) { - if (typeof object.messages[i] !== "object") - throw TypeError(".proto.Conversation.messages: object expected"); - message.messages[i] = $root.proto.HistorySyncMsg.fromObject(object.messages[i]); - } - } - if (object.newJid != null) - message.newJid = String(object.newJid); - if (object.oldJid != null) - message.oldJid = String(object.oldJid); - if (object.lastMsgTimestamp != null) - if ($util.Long) - (message.lastMsgTimestamp = $util.Long.fromValue(object.lastMsgTimestamp)).unsigned = true; - else if (typeof object.lastMsgTimestamp === "string") - message.lastMsgTimestamp = parseInt(object.lastMsgTimestamp, 10); - else if (typeof object.lastMsgTimestamp === "number") - message.lastMsgTimestamp = object.lastMsgTimestamp; - else if (typeof object.lastMsgTimestamp === "object") - message.lastMsgTimestamp = new $util.LongBits(object.lastMsgTimestamp.low >>> 0, object.lastMsgTimestamp.high >>> 0).toNumber(true); - if (object.unreadCount != null) - message.unreadCount = object.unreadCount >>> 0; - if (object.readOnly != null) - message.readOnly = Boolean(object.readOnly); - if (object.endOfHistoryTransfer != null) - message.endOfHistoryTransfer = Boolean(object.endOfHistoryTransfer); - if (object.ephemeralExpiration != null) - message.ephemeralExpiration = object.ephemeralExpiration >>> 0; - if (object.ephemeralSettingTimestamp != null) - if ($util.Long) - (message.ephemeralSettingTimestamp = $util.Long.fromValue(object.ephemeralSettingTimestamp)).unsigned = false; - else if (typeof object.ephemeralSettingTimestamp === "string") - message.ephemeralSettingTimestamp = parseInt(object.ephemeralSettingTimestamp, 10); - else if (typeof object.ephemeralSettingTimestamp === "number") - message.ephemeralSettingTimestamp = object.ephemeralSettingTimestamp; - else if (typeof object.ephemeralSettingTimestamp === "object") - message.ephemeralSettingTimestamp = new $util.LongBits(object.ephemeralSettingTimestamp.low >>> 0, object.ephemeralSettingTimestamp.high >>> 0).toNumber(); - switch (object.endOfHistoryTransferType) { - case "COMPLETE_BUT_MORE_MESSAGES_REMAIN_ON_PRIMARY": - case 0: - message.endOfHistoryTransferType = 0; - break; - case "COMPLETE_AND_NO_MORE_MESSAGE_REMAIN_ON_PRIMARY": - case 1: - message.endOfHistoryTransferType = 1; - break; - case "COMPLETE_ON_DEMAND_SYNC_BUT_MORE_MSG_REMAIN_ON_PRIMARY": - case 2: - message.endOfHistoryTransferType = 2; - break; - } - if (object.conversationTimestamp != null) - if ($util.Long) - (message.conversationTimestamp = $util.Long.fromValue(object.conversationTimestamp)).unsigned = true; - else if (typeof object.conversationTimestamp === "string") - message.conversationTimestamp = parseInt(object.conversationTimestamp, 10); - else if (typeof object.conversationTimestamp === "number") - message.conversationTimestamp = object.conversationTimestamp; - else if (typeof object.conversationTimestamp === "object") - message.conversationTimestamp = new $util.LongBits(object.conversationTimestamp.low >>> 0, object.conversationTimestamp.high >>> 0).toNumber(true); - if (object.name != null) - message.name = String(object.name); - if (object.pHash != null) - message.pHash = String(object.pHash); - if (object.notSpam != null) - message.notSpam = Boolean(object.notSpam); - if (object.archived != null) - message.archived = Boolean(object.archived); - if (object.disappearingMode != null) { - if (typeof object.disappearingMode !== "object") - throw TypeError(".proto.Conversation.disappearingMode: object expected"); - message.disappearingMode = $root.proto.DisappearingMode.fromObject(object.disappearingMode); - } - if (object.unreadMentionCount != null) - message.unreadMentionCount = object.unreadMentionCount >>> 0; - if (object.markedAsUnread != null) - message.markedAsUnread = Boolean(object.markedAsUnread); - if (object.participant) { - if (!Array.isArray(object.participant)) - throw TypeError(".proto.Conversation.participant: array expected"); - message.participant = []; - for (var i = 0; i < object.participant.length; ++i) { - if (typeof object.participant[i] !== "object") - throw TypeError(".proto.Conversation.participant: object expected"); - message.participant[i] = $root.proto.GroupParticipant.fromObject(object.participant[i]); - } - } - if (object.tcToken != null) - if (typeof object.tcToken === "string") - $util.base64.decode(object.tcToken, message.tcToken = $util.newBuffer($util.base64.length(object.tcToken)), 0); - else if (object.tcToken.length) - message.tcToken = object.tcToken; - if (object.tcTokenTimestamp != null) - if ($util.Long) - (message.tcTokenTimestamp = $util.Long.fromValue(object.tcTokenTimestamp)).unsigned = true; - else if (typeof object.tcTokenTimestamp === "string") - message.tcTokenTimestamp = parseInt(object.tcTokenTimestamp, 10); - else if (typeof object.tcTokenTimestamp === "number") - message.tcTokenTimestamp = object.tcTokenTimestamp; - else if (typeof object.tcTokenTimestamp === "object") - message.tcTokenTimestamp = new $util.LongBits(object.tcTokenTimestamp.low >>> 0, object.tcTokenTimestamp.high >>> 0).toNumber(true); - if (object.contactPrimaryIdentityKey != null) - if (typeof object.contactPrimaryIdentityKey === "string") - $util.base64.decode(object.contactPrimaryIdentityKey, message.contactPrimaryIdentityKey = $util.newBuffer($util.base64.length(object.contactPrimaryIdentityKey)), 0); - else if (object.contactPrimaryIdentityKey.length) - message.contactPrimaryIdentityKey = object.contactPrimaryIdentityKey; - if (object.pinned != null) - message.pinned = object.pinned >>> 0; - if (object.muteEndTime != null) - if ($util.Long) - (message.muteEndTime = $util.Long.fromValue(object.muteEndTime)).unsigned = true; - else if (typeof object.muteEndTime === "string") - message.muteEndTime = parseInt(object.muteEndTime, 10); - else if (typeof object.muteEndTime === "number") - message.muteEndTime = object.muteEndTime; - else if (typeof object.muteEndTime === "object") - message.muteEndTime = new $util.LongBits(object.muteEndTime.low >>> 0, object.muteEndTime.high >>> 0).toNumber(true); - if (object.wallpaper != null) { - if (typeof object.wallpaper !== "object") - throw TypeError(".proto.Conversation.wallpaper: object expected"); - message.wallpaper = $root.proto.WallpaperSettings.fromObject(object.wallpaper); - } - switch (object.mediaVisibility) { - case "DEFAULT": - case 0: - message.mediaVisibility = 0; - break; - case "OFF": - case 1: - message.mediaVisibility = 1; - break; - case "ON": - case 2: - message.mediaVisibility = 2; - break; - } - if (object.tcTokenSenderTimestamp != null) - if ($util.Long) - (message.tcTokenSenderTimestamp = $util.Long.fromValue(object.tcTokenSenderTimestamp)).unsigned = true; - else if (typeof object.tcTokenSenderTimestamp === "string") - message.tcTokenSenderTimestamp = parseInt(object.tcTokenSenderTimestamp, 10); - else if (typeof object.tcTokenSenderTimestamp === "number") - message.tcTokenSenderTimestamp = object.tcTokenSenderTimestamp; - else if (typeof object.tcTokenSenderTimestamp === "object") - message.tcTokenSenderTimestamp = new $util.LongBits(object.tcTokenSenderTimestamp.low >>> 0, object.tcTokenSenderTimestamp.high >>> 0).toNumber(true); - if (object.suspended != null) - message.suspended = Boolean(object.suspended); - if (object.terminated != null) - message.terminated = Boolean(object.terminated); - if (object.createdAt != null) + var message = new $root.proto.EphemeralSetting(); + if (object.duration != null) + message.duration = object.duration | 0; + if (object.timestamp != null) if ($util.Long) - (message.createdAt = $util.Long.fromValue(object.createdAt)).unsigned = true; - else if (typeof object.createdAt === "string") - message.createdAt = parseInt(object.createdAt, 10); - else if (typeof object.createdAt === "number") - message.createdAt = object.createdAt; - else if (typeof object.createdAt === "object") - message.createdAt = new $util.LongBits(object.createdAt.low >>> 0, object.createdAt.high >>> 0).toNumber(true); - if (object.createdBy != null) - message.createdBy = String(object.createdBy); - if (object.description != null) - message.description = String(object.description); - if (object.support != null) - message.support = Boolean(object.support); - if (object.isParentGroup != null) - message.isParentGroup = Boolean(object.isParentGroup); - if (object.parentGroupId != null) - message.parentGroupId = String(object.parentGroupId); - if (object.isDefaultSubgroup != null) - message.isDefaultSubgroup = Boolean(object.isDefaultSubgroup); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.pnJid != null) - message.pnJid = String(object.pnJid); - if (object.shareOwnPn != null) - message.shareOwnPn = Boolean(object.shareOwnPn); - if (object.pnhDuplicateLidThread != null) - message.pnhDuplicateLidThread = Boolean(object.pnhDuplicateLidThread); - if (object.lidJid != null) - message.lidJid = String(object.lidJid); + (message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = false; + else if (typeof object.timestamp === "string") + message.timestamp = parseInt(object.timestamp, 10); + else if (typeof object.timestamp === "number") + message.timestamp = object.timestamp; + else if (typeof object.timestamp === "object") + message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from a Conversation message. Also converts values to other types if specified. + * Creates a plain object from an EphemeralSetting message. Also converts values to other types if specified. * @function toObject - * @memberof proto.Conversation + * @memberof proto.EphemeralSetting * @static - * @param {proto.Conversation} message Conversation + * @param {proto.EphemeralSetting} message EphemeralSetting * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Conversation.toObject = function toObject(message, options) { + EphemeralSetting.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.messages = []; - object.participant = []; - } if (options.defaults) { - object.id = ""; - object.newJid = ""; - object.oldJid = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.lastMsgTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.lastMsgTimestamp = options.longs === String ? "0" : 0; - object.unreadCount = 0; - object.readOnly = false; - object.endOfHistoryTransfer = false; - object.ephemeralExpiration = 0; + object.duration = 0; if ($util.Long) { var long = new $util.Long(0, 0, false); - object.ephemeralSettingTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.ephemeralSettingTimestamp = options.longs === String ? "0" : 0; - object.endOfHistoryTransferType = options.enums === String ? "COMPLETE_BUT_MORE_MESSAGES_REMAIN_ON_PRIMARY" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.conversationTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.conversationTimestamp = options.longs === String ? "0" : 0; - object.name = ""; - object.pHash = ""; - object.notSpam = false; - object.archived = false; - object.disappearingMode = null; - object.unreadMentionCount = 0; - object.markedAsUnread = false; - if (options.bytes === String) - object.tcToken = ""; - else { - object.tcToken = []; - if (options.bytes !== Array) - object.tcToken = $util.newBuffer(object.tcToken); - } - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.tcTokenTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.tcTokenTimestamp = options.longs === String ? "0" : 0; - if (options.bytes === String) - object.contactPrimaryIdentityKey = ""; - else { - object.contactPrimaryIdentityKey = []; - if (options.bytes !== Array) - object.contactPrimaryIdentityKey = $util.newBuffer(object.contactPrimaryIdentityKey); - } - object.pinned = 0; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.muteEndTime = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.muteEndTime = options.longs === String ? "0" : 0; - object.wallpaper = null; - object.mediaVisibility = options.enums === String ? "DEFAULT" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.tcTokenSenderTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.tcTokenSenderTimestamp = options.longs === String ? "0" : 0; - object.suspended = false; - object.terminated = false; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.createdAt = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else - object.createdAt = options.longs === String ? "0" : 0; - object.createdBy = ""; - object.description = ""; - object.support = false; - object.isParentGroup = false; - object.isDefaultSubgroup = false; - object.parentGroupId = ""; - object.displayName = ""; - object.pnJid = ""; - object.shareOwnPn = false; - object.pnhDuplicateLidThread = false; - object.lidJid = ""; - } - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.messages && message.messages.length) { - object.messages = []; - for (var j = 0; j < message.messages.length; ++j) - object.messages[j] = $root.proto.HistorySyncMsg.toObject(message.messages[j], options); - } - if (message.newJid != null && message.hasOwnProperty("newJid")) - object.newJid = message.newJid; - if (message.oldJid != null && message.hasOwnProperty("oldJid")) - object.oldJid = message.oldJid; - if (message.lastMsgTimestamp != null && message.hasOwnProperty("lastMsgTimestamp")) - if (typeof message.lastMsgTimestamp === "number") - object.lastMsgTimestamp = options.longs === String ? String(message.lastMsgTimestamp) : message.lastMsgTimestamp; - else - object.lastMsgTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.lastMsgTimestamp) : options.longs === Number ? new $util.LongBits(message.lastMsgTimestamp.low >>> 0, message.lastMsgTimestamp.high >>> 0).toNumber(true) : message.lastMsgTimestamp; - if (message.unreadCount != null && message.hasOwnProperty("unreadCount")) - object.unreadCount = message.unreadCount; - if (message.readOnly != null && message.hasOwnProperty("readOnly")) - object.readOnly = message.readOnly; - if (message.endOfHistoryTransfer != null && message.hasOwnProperty("endOfHistoryTransfer")) - object.endOfHistoryTransfer = message.endOfHistoryTransfer; - if (message.ephemeralExpiration != null && message.hasOwnProperty("ephemeralExpiration")) - object.ephemeralExpiration = message.ephemeralExpiration; - if (message.ephemeralSettingTimestamp != null && message.hasOwnProperty("ephemeralSettingTimestamp")) - if (typeof message.ephemeralSettingTimestamp === "number") - object.ephemeralSettingTimestamp = options.longs === String ? String(message.ephemeralSettingTimestamp) : message.ephemeralSettingTimestamp; - else - object.ephemeralSettingTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.ephemeralSettingTimestamp) : options.longs === Number ? new $util.LongBits(message.ephemeralSettingTimestamp.low >>> 0, message.ephemeralSettingTimestamp.high >>> 0).toNumber() : message.ephemeralSettingTimestamp; - if (message.endOfHistoryTransferType != null && message.hasOwnProperty("endOfHistoryTransferType")) - object.endOfHistoryTransferType = options.enums === String ? $root.proto.Conversation.EndOfHistoryTransferType[message.endOfHistoryTransferType] : message.endOfHistoryTransferType; - if (message.conversationTimestamp != null && message.hasOwnProperty("conversationTimestamp")) - if (typeof message.conversationTimestamp === "number") - object.conversationTimestamp = options.longs === String ? String(message.conversationTimestamp) : message.conversationTimestamp; - else - object.conversationTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.conversationTimestamp) : options.longs === Number ? new $util.LongBits(message.conversationTimestamp.low >>> 0, message.conversationTimestamp.high >>> 0).toNumber(true) : message.conversationTimestamp; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.pHash != null && message.hasOwnProperty("pHash")) - object.pHash = message.pHash; - if (message.notSpam != null && message.hasOwnProperty("notSpam")) - object.notSpam = message.notSpam; - if (message.archived != null && message.hasOwnProperty("archived")) - object.archived = message.archived; - if (message.disappearingMode != null && message.hasOwnProperty("disappearingMode")) - object.disappearingMode = $root.proto.DisappearingMode.toObject(message.disappearingMode, options); - if (message.unreadMentionCount != null && message.hasOwnProperty("unreadMentionCount")) - object.unreadMentionCount = message.unreadMentionCount; - if (message.markedAsUnread != null && message.hasOwnProperty("markedAsUnread")) - object.markedAsUnread = message.markedAsUnread; - if (message.participant && message.participant.length) { - object.participant = []; - for (var j = 0; j < message.participant.length; ++j) - object.participant[j] = $root.proto.GroupParticipant.toObject(message.participant[j], options); + object.timestamp = options.longs === String ? "0" : 0; } - if (message.tcToken != null && message.hasOwnProperty("tcToken")) - object.tcToken = options.bytes === String ? $util.base64.encode(message.tcToken, 0, message.tcToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.tcToken) : message.tcToken; - if (message.tcTokenTimestamp != null && message.hasOwnProperty("tcTokenTimestamp")) - if (typeof message.tcTokenTimestamp === "number") - object.tcTokenTimestamp = options.longs === String ? String(message.tcTokenTimestamp) : message.tcTokenTimestamp; - else - object.tcTokenTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.tcTokenTimestamp) : options.longs === Number ? new $util.LongBits(message.tcTokenTimestamp.low >>> 0, message.tcTokenTimestamp.high >>> 0).toNumber(true) : message.tcTokenTimestamp; - if (message.contactPrimaryIdentityKey != null && message.hasOwnProperty("contactPrimaryIdentityKey")) - object.contactPrimaryIdentityKey = options.bytes === String ? $util.base64.encode(message.contactPrimaryIdentityKey, 0, message.contactPrimaryIdentityKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.contactPrimaryIdentityKey) : message.contactPrimaryIdentityKey; - if (message.pinned != null && message.hasOwnProperty("pinned")) - object.pinned = message.pinned; - if (message.muteEndTime != null && message.hasOwnProperty("muteEndTime")) - if (typeof message.muteEndTime === "number") - object.muteEndTime = options.longs === String ? String(message.muteEndTime) : message.muteEndTime; - else - object.muteEndTime = options.longs === String ? $util.Long.prototype.toString.call(message.muteEndTime) : options.longs === Number ? new $util.LongBits(message.muteEndTime.low >>> 0, message.muteEndTime.high >>> 0).toNumber(true) : message.muteEndTime; - if (message.wallpaper != null && message.hasOwnProperty("wallpaper")) - object.wallpaper = $root.proto.WallpaperSettings.toObject(message.wallpaper, options); - if (message.mediaVisibility != null && message.hasOwnProperty("mediaVisibility")) - object.mediaVisibility = options.enums === String ? $root.proto.MediaVisibility[message.mediaVisibility] : message.mediaVisibility; - if (message.tcTokenSenderTimestamp != null && message.hasOwnProperty("tcTokenSenderTimestamp")) - if (typeof message.tcTokenSenderTimestamp === "number") - object.tcTokenSenderTimestamp = options.longs === String ? String(message.tcTokenSenderTimestamp) : message.tcTokenSenderTimestamp; - else - object.tcTokenSenderTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.tcTokenSenderTimestamp) : options.longs === Number ? new $util.LongBits(message.tcTokenSenderTimestamp.low >>> 0, message.tcTokenSenderTimestamp.high >>> 0).toNumber(true) : message.tcTokenSenderTimestamp; - if (message.suspended != null && message.hasOwnProperty("suspended")) - object.suspended = message.suspended; - if (message.terminated != null && message.hasOwnProperty("terminated")) - object.terminated = message.terminated; - if (message.createdAt != null && message.hasOwnProperty("createdAt")) - if (typeof message.createdAt === "number") - object.createdAt = options.longs === String ? String(message.createdAt) : message.createdAt; + if (message.duration != null && message.hasOwnProperty("duration")) + object.duration = message.duration; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + if (typeof message.timestamp === "number") + object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp; else - object.createdAt = options.longs === String ? $util.Long.prototype.toString.call(message.createdAt) : options.longs === Number ? new $util.LongBits(message.createdAt.low >>> 0, message.createdAt.high >>> 0).toNumber(true) : message.createdAt; - if (message.createdBy != null && message.hasOwnProperty("createdBy")) - object.createdBy = message.createdBy; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.support != null && message.hasOwnProperty("support")) - object.support = message.support; - if (message.isParentGroup != null && message.hasOwnProperty("isParentGroup")) - object.isParentGroup = message.isParentGroup; - if (message.isDefaultSubgroup != null && message.hasOwnProperty("isDefaultSubgroup")) - object.isDefaultSubgroup = message.isDefaultSubgroup; - if (message.parentGroupId != null && message.hasOwnProperty("parentGroupId")) - object.parentGroupId = message.parentGroupId; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.pnJid != null && message.hasOwnProperty("pnJid")) - object.pnJid = message.pnJid; - if (message.shareOwnPn != null && message.hasOwnProperty("shareOwnPn")) - object.shareOwnPn = message.shareOwnPn; - if (message.pnhDuplicateLidThread != null && message.hasOwnProperty("pnhDuplicateLidThread")) - object.pnhDuplicateLidThread = message.pnhDuplicateLidThread; - if (message.lidJid != null && message.hasOwnProperty("lidJid")) - object.lidJid = message.lidJid; + object.timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber() : message.timestamp; return object; }; /** - * Converts this Conversation to JSON. + * Converts this EphemeralSetting to JSON. * @function toJSON - * @memberof proto.Conversation + * @memberof proto.EphemeralSetting * @instance * @returns {Object.} JSON object */ - Conversation.prototype.toJSON = function toJSON() { + EphemeralSetting.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * EndOfHistoryTransferType enum. - * @name proto.Conversation.EndOfHistoryTransferType - * @enum {number} - * @property {number} COMPLETE_BUT_MORE_MESSAGES_REMAIN_ON_PRIMARY=0 COMPLETE_BUT_MORE_MESSAGES_REMAIN_ON_PRIMARY value - * @property {number} COMPLETE_AND_NO_MORE_MESSAGE_REMAIN_ON_PRIMARY=1 COMPLETE_AND_NO_MORE_MESSAGE_REMAIN_ON_PRIMARY value - * @property {number} COMPLETE_ON_DEMAND_SYNC_BUT_MORE_MSG_REMAIN_ON_PRIMARY=2 COMPLETE_ON_DEMAND_SYNC_BUT_MORE_MSG_REMAIN_ON_PRIMARY value - */ - Conversation.EndOfHistoryTransferType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "COMPLETE_BUT_MORE_MESSAGES_REMAIN_ON_PRIMARY"] = 0; - values[valuesById[1] = "COMPLETE_AND_NO_MORE_MESSAGE_REMAIN_ON_PRIMARY"] = 1; - values[valuesById[2] = "COMPLETE_ON_DEMAND_SYNC_BUT_MORE_MSG_REMAIN_ON_PRIMARY"] = 2; - return values; - })(); - - return Conversation; + return EphemeralSetting; })(); - proto.DeviceConsistencyCodeMessage = (function() { + proto.EventResponse = (function() { /** - * Properties of a DeviceConsistencyCodeMessage. + * Properties of an EventResponse. * @memberof proto - * @interface IDeviceConsistencyCodeMessage - * @property {number|null} [generation] DeviceConsistencyCodeMessage generation - * @property {Uint8Array|null} [signature] DeviceConsistencyCodeMessage signature + * @interface IEventResponse + * @property {proto.IMessageKey|null} [eventResponseMessageKey] EventResponse eventResponseMessageKey + * @property {number|Long|null} [timestampMs] EventResponse timestampMs + * @property {proto.Message.IEventResponseMessage|null} [eventResponseMessage] EventResponse eventResponseMessage + * @property {boolean|null} [unread] EventResponse unread */ /** - * Constructs a new DeviceConsistencyCodeMessage. + * Constructs a new EventResponse. * @memberof proto - * @classdesc Represents a DeviceConsistencyCodeMessage. - * @implements IDeviceConsistencyCodeMessage + * @classdesc Represents an EventResponse. + * @implements IEventResponse * @constructor - * @param {proto.IDeviceConsistencyCodeMessage=} [properties] Properties to set + * @param {proto.IEventResponse=} [properties] Properties to set */ - function DeviceConsistencyCodeMessage(properties) { + function EventResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13104,88 +17904,114 @@ $root.proto = (function() { } /** - * DeviceConsistencyCodeMessage generation. - * @member {number} generation - * @memberof proto.DeviceConsistencyCodeMessage + * EventResponse eventResponseMessageKey. + * @member {proto.IMessageKey|null|undefined} eventResponseMessageKey + * @memberof proto.EventResponse * @instance */ - DeviceConsistencyCodeMessage.prototype.generation = 0; + EventResponse.prototype.eventResponseMessageKey = null; /** - * DeviceConsistencyCodeMessage signature. - * @member {Uint8Array} signature - * @memberof proto.DeviceConsistencyCodeMessage + * EventResponse timestampMs. + * @member {number|Long} timestampMs + * @memberof proto.EventResponse * @instance */ - DeviceConsistencyCodeMessage.prototype.signature = $util.newBuffer([]); + EventResponse.prototype.timestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new DeviceConsistencyCodeMessage instance using the specified properties. + * EventResponse eventResponseMessage. + * @member {proto.Message.IEventResponseMessage|null|undefined} eventResponseMessage + * @memberof proto.EventResponse + * @instance + */ + EventResponse.prototype.eventResponseMessage = null; + + /** + * EventResponse unread. + * @member {boolean} unread + * @memberof proto.EventResponse + * @instance + */ + EventResponse.prototype.unread = false; + + /** + * Creates a new EventResponse instance using the specified properties. * @function create - * @memberof proto.DeviceConsistencyCodeMessage + * @memberof proto.EventResponse * @static - * @param {proto.IDeviceConsistencyCodeMessage=} [properties] Properties to set - * @returns {proto.DeviceConsistencyCodeMessage} DeviceConsistencyCodeMessage instance + * @param {proto.IEventResponse=} [properties] Properties to set + * @returns {proto.EventResponse} EventResponse instance */ - DeviceConsistencyCodeMessage.create = function create(properties) { - return new DeviceConsistencyCodeMessage(properties); + EventResponse.create = function create(properties) { + return new EventResponse(properties); }; /** - * Encodes the specified DeviceConsistencyCodeMessage message. Does not implicitly {@link proto.DeviceConsistencyCodeMessage.verify|verify} messages. + * Encodes the specified EventResponse message. Does not implicitly {@link proto.EventResponse.verify|verify} messages. * @function encode - * @memberof proto.DeviceConsistencyCodeMessage + * @memberof proto.EventResponse * @static - * @param {proto.IDeviceConsistencyCodeMessage} message DeviceConsistencyCodeMessage message or plain object to encode + * @param {proto.IEventResponse} message EventResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeviceConsistencyCodeMessage.encode = function encode(message, writer) { + EventResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.generation != null && Object.hasOwnProperty.call(message, "generation")) - writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.generation); - if (message.signature != null && Object.hasOwnProperty.call(message, "signature")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.signature); + if (message.eventResponseMessageKey != null && Object.hasOwnProperty.call(message, "eventResponseMessageKey")) + $root.proto.MessageKey.encode(message.eventResponseMessageKey, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.timestampMs != null && Object.hasOwnProperty.call(message, "timestampMs")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.timestampMs); + if (message.eventResponseMessage != null && Object.hasOwnProperty.call(message, "eventResponseMessage")) + $root.proto.Message.EventResponseMessage.encode(message.eventResponseMessage, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.unread != null && Object.hasOwnProperty.call(message, "unread")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.unread); return writer; }; /** - * Encodes the specified DeviceConsistencyCodeMessage message, length delimited. Does not implicitly {@link proto.DeviceConsistencyCodeMessage.verify|verify} messages. + * Encodes the specified EventResponse message, length delimited. Does not implicitly {@link proto.EventResponse.verify|verify} messages. * @function encodeDelimited - * @memberof proto.DeviceConsistencyCodeMessage + * @memberof proto.EventResponse * @static - * @param {proto.IDeviceConsistencyCodeMessage} message DeviceConsistencyCodeMessage message or plain object to encode + * @param {proto.IEventResponse} message EventResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeviceConsistencyCodeMessage.encodeDelimited = function encodeDelimited(message, writer) { + EventResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeviceConsistencyCodeMessage message from the specified reader or buffer. + * Decodes an EventResponse message from the specified reader or buffer. * @function decode - * @memberof proto.DeviceConsistencyCodeMessage + * @memberof proto.EventResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {proto.DeviceConsistencyCodeMessage} DeviceConsistencyCodeMessage + * @returns {proto.EventResponse} EventResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeviceConsistencyCodeMessage.decode = function decode(reader, length) { + EventResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.DeviceConsistencyCodeMessage(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.EventResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.generation = reader.uint32(); + message.eventResponseMessageKey = $root.proto.MessageKey.decode(reader, reader.uint32()); break; case 2: - message.signature = reader.bytes(); + message.timestampMs = reader.int64(); + break; + case 3: + message.eventResponseMessage = $root.proto.Message.EventResponseMessage.decode(reader, reader.uint32()); + break; + case 4: + message.unread = reader.bool(); break; default: reader.skipType(tag & 7); @@ -13196,132 +18022,157 @@ $root.proto = (function() { }; /** - * Decodes a DeviceConsistencyCodeMessage message from the specified reader or buffer, length delimited. + * Decodes an EventResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof proto.DeviceConsistencyCodeMessage + * @memberof proto.EventResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.DeviceConsistencyCodeMessage} DeviceConsistencyCodeMessage + * @returns {proto.EventResponse} EventResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeviceConsistencyCodeMessage.decodeDelimited = function decodeDelimited(reader) { + EventResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeviceConsistencyCodeMessage message. + * Verifies an EventResponse message. * @function verify - * @memberof proto.DeviceConsistencyCodeMessage + * @memberof proto.EventResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeviceConsistencyCodeMessage.verify = function verify(message) { + EventResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.generation != null && message.hasOwnProperty("generation")) - if (!$util.isInteger(message.generation)) - return "generation: integer expected"; - if (message.signature != null && message.hasOwnProperty("signature")) - if (!(message.signature && typeof message.signature.length === "number" || $util.isString(message.signature))) - return "signature: buffer expected"; + if (message.eventResponseMessageKey != null && message.hasOwnProperty("eventResponseMessageKey")) { + var error = $root.proto.MessageKey.verify(message.eventResponseMessageKey); + if (error) + return "eventResponseMessageKey." + error; + } + if (message.timestampMs != null && message.hasOwnProperty("timestampMs")) + if (!$util.isInteger(message.timestampMs) && !(message.timestampMs && $util.isInteger(message.timestampMs.low) && $util.isInteger(message.timestampMs.high))) + return "timestampMs: integer|Long expected"; + if (message.eventResponseMessage != null && message.hasOwnProperty("eventResponseMessage")) { + var error = $root.proto.Message.EventResponseMessage.verify(message.eventResponseMessage); + if (error) + return "eventResponseMessage." + error; + } + if (message.unread != null && message.hasOwnProperty("unread")) + if (typeof message.unread !== "boolean") + return "unread: boolean expected"; return null; }; /** - * Creates a DeviceConsistencyCodeMessage message from a plain object. Also converts values to their respective internal types. + * Creates an EventResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof proto.DeviceConsistencyCodeMessage + * @memberof proto.EventResponse * @static * @param {Object.} object Plain object - * @returns {proto.DeviceConsistencyCodeMessage} DeviceConsistencyCodeMessage + * @returns {proto.EventResponse} EventResponse */ - DeviceConsistencyCodeMessage.fromObject = function fromObject(object) { - if (object instanceof $root.proto.DeviceConsistencyCodeMessage) + EventResponse.fromObject = function fromObject(object) { + if (object instanceof $root.proto.EventResponse) return object; - var message = new $root.proto.DeviceConsistencyCodeMessage(); - if (object.generation != null) - message.generation = object.generation >>> 0; - if (object.signature != null) - if (typeof object.signature === "string") - $util.base64.decode(object.signature, message.signature = $util.newBuffer($util.base64.length(object.signature)), 0); - else if (object.signature.length) - message.signature = object.signature; + var message = new $root.proto.EventResponse(); + if (object.eventResponseMessageKey != null) { + if (typeof object.eventResponseMessageKey !== "object") + throw TypeError(".proto.EventResponse.eventResponseMessageKey: object expected"); + message.eventResponseMessageKey = $root.proto.MessageKey.fromObject(object.eventResponseMessageKey); + } + if (object.timestampMs != null) + if ($util.Long) + (message.timestampMs = $util.Long.fromValue(object.timestampMs)).unsigned = false; + else if (typeof object.timestampMs === "string") + message.timestampMs = parseInt(object.timestampMs, 10); + else if (typeof object.timestampMs === "number") + message.timestampMs = object.timestampMs; + else if (typeof object.timestampMs === "object") + message.timestampMs = new $util.LongBits(object.timestampMs.low >>> 0, object.timestampMs.high >>> 0).toNumber(); + if (object.eventResponseMessage != null) { + if (typeof object.eventResponseMessage !== "object") + throw TypeError(".proto.EventResponse.eventResponseMessage: object expected"); + message.eventResponseMessage = $root.proto.Message.EventResponseMessage.fromObject(object.eventResponseMessage); + } + if (object.unread != null) + message.unread = Boolean(object.unread); return message; }; /** - * Creates a plain object from a DeviceConsistencyCodeMessage message. Also converts values to other types if specified. + * Creates a plain object from an EventResponse message. Also converts values to other types if specified. * @function toObject - * @memberof proto.DeviceConsistencyCodeMessage + * @memberof proto.EventResponse * @static - * @param {proto.DeviceConsistencyCodeMessage} message DeviceConsistencyCodeMessage + * @param {proto.EventResponse} message EventResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeviceConsistencyCodeMessage.toObject = function toObject(message, options) { + EventResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.generation = 0; - if (options.bytes === String) - object.signature = ""; - else { - object.signature = []; - if (options.bytes !== Array) - object.signature = $util.newBuffer(object.signature); - } + object.eventResponseMessageKey = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.timestampMs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.timestampMs = options.longs === String ? "0" : 0; + object.eventResponseMessage = null; + object.unread = false; } - if (message.generation != null && message.hasOwnProperty("generation")) - object.generation = message.generation; - if (message.signature != null && message.hasOwnProperty("signature")) - object.signature = options.bytes === String ? $util.base64.encode(message.signature, 0, message.signature.length) : options.bytes === Array ? Array.prototype.slice.call(message.signature) : message.signature; + if (message.eventResponseMessageKey != null && message.hasOwnProperty("eventResponseMessageKey")) + object.eventResponseMessageKey = $root.proto.MessageKey.toObject(message.eventResponseMessageKey, options); + if (message.timestampMs != null && message.hasOwnProperty("timestampMs")) + if (typeof message.timestampMs === "number") + object.timestampMs = options.longs === String ? String(message.timestampMs) : message.timestampMs; + else + object.timestampMs = options.longs === String ? $util.Long.prototype.toString.call(message.timestampMs) : options.longs === Number ? new $util.LongBits(message.timestampMs.low >>> 0, message.timestampMs.high >>> 0).toNumber() : message.timestampMs; + if (message.eventResponseMessage != null && message.hasOwnProperty("eventResponseMessage")) + object.eventResponseMessage = $root.proto.Message.EventResponseMessage.toObject(message.eventResponseMessage, options); + if (message.unread != null && message.hasOwnProperty("unread")) + object.unread = message.unread; return object; }; /** - * Converts this DeviceConsistencyCodeMessage to JSON. + * Converts this EventResponse to JSON. * @function toJSON - * @memberof proto.DeviceConsistencyCodeMessage + * @memberof proto.EventResponse * @instance * @returns {Object.} JSON object */ - DeviceConsistencyCodeMessage.prototype.toJSON = function toJSON() { + EventResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeviceConsistencyCodeMessage; + return EventResponse; })(); - proto.DeviceListMetadata = (function() { + proto.ExitCode = (function() { /** - * Properties of a DeviceListMetadata. + * Properties of an ExitCode. * @memberof proto - * @interface IDeviceListMetadata - * @property {Uint8Array|null} [senderKeyHash] DeviceListMetadata senderKeyHash - * @property {number|Long|null} [senderTimestamp] DeviceListMetadata senderTimestamp - * @property {Array.|null} [senderKeyIndexes] DeviceListMetadata senderKeyIndexes - * @property {Uint8Array|null} [recipientKeyHash] DeviceListMetadata recipientKeyHash - * @property {number|Long|null} [recipientTimestamp] DeviceListMetadata recipientTimestamp - * @property {Array.|null} [recipientKeyIndexes] DeviceListMetadata recipientKeyIndexes + * @interface IExitCode + * @property {number|Long|null} [code] ExitCode code + * @property {string|null} [text] ExitCode text */ /** - * Constructs a new DeviceListMetadata. + * Constructs a new ExitCode. * @memberof proto - * @classdesc Represents a DeviceListMetadata. - * @implements IDeviceListMetadata + * @classdesc Represents an ExitCode. + * @implements IExitCode * @constructor - * @param {proto.IDeviceListMetadata=} [properties] Properties to set + * @param {proto.IExitCode=} [properties] Properties to set */ - function DeviceListMetadata(properties) { - this.senderKeyIndexes = []; - this.recipientKeyIndexes = []; + function ExitCode(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13329,162 +18180,88 @@ $root.proto = (function() { } /** - * DeviceListMetadata senderKeyHash. - * @member {Uint8Array} senderKeyHash - * @memberof proto.DeviceListMetadata - * @instance - */ - DeviceListMetadata.prototype.senderKeyHash = $util.newBuffer([]); - - /** - * DeviceListMetadata senderTimestamp. - * @member {number|Long} senderTimestamp - * @memberof proto.DeviceListMetadata - * @instance - */ - DeviceListMetadata.prototype.senderTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * DeviceListMetadata senderKeyIndexes. - * @member {Array.} senderKeyIndexes - * @memberof proto.DeviceListMetadata - * @instance - */ - DeviceListMetadata.prototype.senderKeyIndexes = $util.emptyArray; - - /** - * DeviceListMetadata recipientKeyHash. - * @member {Uint8Array} recipientKeyHash - * @memberof proto.DeviceListMetadata - * @instance - */ - DeviceListMetadata.prototype.recipientKeyHash = $util.newBuffer([]); - - /** - * DeviceListMetadata recipientTimestamp. - * @member {number|Long} recipientTimestamp - * @memberof proto.DeviceListMetadata + * ExitCode code. + * @member {number|Long} code + * @memberof proto.ExitCode * @instance */ - DeviceListMetadata.prototype.recipientTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + ExitCode.prototype.code = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** - * DeviceListMetadata recipientKeyIndexes. - * @member {Array.} recipientKeyIndexes - * @memberof proto.DeviceListMetadata + * ExitCode text. + * @member {string} text + * @memberof proto.ExitCode * @instance */ - DeviceListMetadata.prototype.recipientKeyIndexes = $util.emptyArray; + ExitCode.prototype.text = ""; /** - * Creates a new DeviceListMetadata instance using the specified properties. + * Creates a new ExitCode instance using the specified properties. * @function create - * @memberof proto.DeviceListMetadata + * @memberof proto.ExitCode * @static - * @param {proto.IDeviceListMetadata=} [properties] Properties to set - * @returns {proto.DeviceListMetadata} DeviceListMetadata instance + * @param {proto.IExitCode=} [properties] Properties to set + * @returns {proto.ExitCode} ExitCode instance */ - DeviceListMetadata.create = function create(properties) { - return new DeviceListMetadata(properties); + ExitCode.create = function create(properties) { + return new ExitCode(properties); }; /** - * Encodes the specified DeviceListMetadata message. Does not implicitly {@link proto.DeviceListMetadata.verify|verify} messages. + * Encodes the specified ExitCode message. Does not implicitly {@link proto.ExitCode.verify|verify} messages. * @function encode - * @memberof proto.DeviceListMetadata + * @memberof proto.ExitCode * @static - * @param {proto.IDeviceListMetadata} message DeviceListMetadata message or plain object to encode + * @param {proto.IExitCode} message ExitCode message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeviceListMetadata.encode = function encode(message, writer) { + ExitCode.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.senderKeyHash != null && Object.hasOwnProperty.call(message, "senderKeyHash")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.senderKeyHash); - if (message.senderTimestamp != null && Object.hasOwnProperty.call(message, "senderTimestamp")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.senderTimestamp); - if (message.senderKeyIndexes != null && message.senderKeyIndexes.length) { - writer.uint32(/* id 3, wireType 2 =*/26).fork(); - for (var i = 0; i < message.senderKeyIndexes.length; ++i) - writer.uint32(message.senderKeyIndexes[i]); - writer.ldelim(); - } - if (message.recipientKeyHash != null && Object.hasOwnProperty.call(message, "recipientKeyHash")) - writer.uint32(/* id 8, wireType 2 =*/66).bytes(message.recipientKeyHash); - if (message.recipientTimestamp != null && Object.hasOwnProperty.call(message, "recipientTimestamp")) - writer.uint32(/* id 9, wireType 0 =*/72).uint64(message.recipientTimestamp); - if (message.recipientKeyIndexes != null && message.recipientKeyIndexes.length) { - writer.uint32(/* id 10, wireType 2 =*/82).fork(); - for (var i = 0; i < message.recipientKeyIndexes.length; ++i) - writer.uint32(message.recipientKeyIndexes[i]); - writer.ldelim(); - } + if (message.code != null && Object.hasOwnProperty.call(message, "code")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.code); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.text); return writer; }; /** - * Encodes the specified DeviceListMetadata message, length delimited. Does not implicitly {@link proto.DeviceListMetadata.verify|verify} messages. + * Encodes the specified ExitCode message, length delimited. Does not implicitly {@link proto.ExitCode.verify|verify} messages. * @function encodeDelimited - * @memberof proto.DeviceListMetadata + * @memberof proto.ExitCode * @static - * @param {proto.IDeviceListMetadata} message DeviceListMetadata message or plain object to encode + * @param {proto.IExitCode} message ExitCode message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeviceListMetadata.encodeDelimited = function encodeDelimited(message, writer) { + ExitCode.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeviceListMetadata message from the specified reader or buffer. + * Decodes an ExitCode message from the specified reader or buffer. * @function decode - * @memberof proto.DeviceListMetadata + * @memberof proto.ExitCode * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {proto.DeviceListMetadata} DeviceListMetadata + * @returns {proto.ExitCode} ExitCode * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeviceListMetadata.decode = function decode(reader, length) { + ExitCode.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.DeviceListMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.ExitCode(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.senderKeyHash = reader.bytes(); + message.code = reader.uint64(); break; case 2: - message.senderTimestamp = reader.uint64(); - break; - case 3: - if (!(message.senderKeyIndexes && message.senderKeyIndexes.length)) - message.senderKeyIndexes = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.senderKeyIndexes.push(reader.uint32()); - } else - message.senderKeyIndexes.push(reader.uint32()); - break; - case 8: - message.recipientKeyHash = reader.bytes(); - break; - case 9: - message.recipientTimestamp = reader.uint64(); - break; - case 10: - if (!(message.recipientKeyIndexes && message.recipientKeyIndexes.length)) - message.recipientKeyIndexes = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.recipientKeyIndexes.push(reader.uint32()); - } else - message.recipientKeyIndexes.push(reader.uint32()); + message.text = reader.string(); break; default: reader.skipType(tag & 7); @@ -13495,224 +18272,135 @@ $root.proto = (function() { }; /** - * Decodes a DeviceListMetadata message from the specified reader or buffer, length delimited. + * Decodes an ExitCode message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof proto.DeviceListMetadata + * @memberof proto.ExitCode * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.DeviceListMetadata} DeviceListMetadata + * @returns {proto.ExitCode} ExitCode * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeviceListMetadata.decodeDelimited = function decodeDelimited(reader) { + ExitCode.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeviceListMetadata message. + * Verifies an ExitCode message. * @function verify - * @memberof proto.DeviceListMetadata + * @memberof proto.ExitCode * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeviceListMetadata.verify = function verify(message) { + ExitCode.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.senderKeyHash != null && message.hasOwnProperty("senderKeyHash")) - if (!(message.senderKeyHash && typeof message.senderKeyHash.length === "number" || $util.isString(message.senderKeyHash))) - return "senderKeyHash: buffer expected"; - if (message.senderTimestamp != null && message.hasOwnProperty("senderTimestamp")) - if (!$util.isInteger(message.senderTimestamp) && !(message.senderTimestamp && $util.isInteger(message.senderTimestamp.low) && $util.isInteger(message.senderTimestamp.high))) - return "senderTimestamp: integer|Long expected"; - if (message.senderKeyIndexes != null && message.hasOwnProperty("senderKeyIndexes")) { - if (!Array.isArray(message.senderKeyIndexes)) - return "senderKeyIndexes: array expected"; - for (var i = 0; i < message.senderKeyIndexes.length; ++i) - if (!$util.isInteger(message.senderKeyIndexes[i])) - return "senderKeyIndexes: integer[] expected"; - } - if (message.recipientKeyHash != null && message.hasOwnProperty("recipientKeyHash")) - if (!(message.recipientKeyHash && typeof message.recipientKeyHash.length === "number" || $util.isString(message.recipientKeyHash))) - return "recipientKeyHash: buffer expected"; - if (message.recipientTimestamp != null && message.hasOwnProperty("recipientTimestamp")) - if (!$util.isInteger(message.recipientTimestamp) && !(message.recipientTimestamp && $util.isInteger(message.recipientTimestamp.low) && $util.isInteger(message.recipientTimestamp.high))) - return "recipientTimestamp: integer|Long expected"; - if (message.recipientKeyIndexes != null && message.hasOwnProperty("recipientKeyIndexes")) { - if (!Array.isArray(message.recipientKeyIndexes)) - return "recipientKeyIndexes: array expected"; - for (var i = 0; i < message.recipientKeyIndexes.length; ++i) - if (!$util.isInteger(message.recipientKeyIndexes[i])) - return "recipientKeyIndexes: integer[] expected"; - } + if (message.code != null && message.hasOwnProperty("code")) + if (!$util.isInteger(message.code) && !(message.code && $util.isInteger(message.code.low) && $util.isInteger(message.code.high))) + return "code: integer|Long expected"; + if (message.text != null && message.hasOwnProperty("text")) + if (!$util.isString(message.text)) + return "text: string expected"; return null; }; /** - * Creates a DeviceListMetadata message from a plain object. Also converts values to their respective internal types. + * Creates an ExitCode message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof proto.DeviceListMetadata + * @memberof proto.ExitCode * @static * @param {Object.} object Plain object - * @returns {proto.DeviceListMetadata} DeviceListMetadata + * @returns {proto.ExitCode} ExitCode */ - DeviceListMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.proto.DeviceListMetadata) + ExitCode.fromObject = function fromObject(object) { + if (object instanceof $root.proto.ExitCode) return object; - var message = new $root.proto.DeviceListMetadata(); - if (object.senderKeyHash != null) - if (typeof object.senderKeyHash === "string") - $util.base64.decode(object.senderKeyHash, message.senderKeyHash = $util.newBuffer($util.base64.length(object.senderKeyHash)), 0); - else if (object.senderKeyHash.length) - message.senderKeyHash = object.senderKeyHash; - if (object.senderTimestamp != null) - if ($util.Long) - (message.senderTimestamp = $util.Long.fromValue(object.senderTimestamp)).unsigned = true; - else if (typeof object.senderTimestamp === "string") - message.senderTimestamp = parseInt(object.senderTimestamp, 10); - else if (typeof object.senderTimestamp === "number") - message.senderTimestamp = object.senderTimestamp; - else if (typeof object.senderTimestamp === "object") - message.senderTimestamp = new $util.LongBits(object.senderTimestamp.low >>> 0, object.senderTimestamp.high >>> 0).toNumber(true); - if (object.senderKeyIndexes) { - if (!Array.isArray(object.senderKeyIndexes)) - throw TypeError(".proto.DeviceListMetadata.senderKeyIndexes: array expected"); - message.senderKeyIndexes = []; - for (var i = 0; i < object.senderKeyIndexes.length; ++i) - message.senderKeyIndexes[i] = object.senderKeyIndexes[i] >>> 0; - } - if (object.recipientKeyHash != null) - if (typeof object.recipientKeyHash === "string") - $util.base64.decode(object.recipientKeyHash, message.recipientKeyHash = $util.newBuffer($util.base64.length(object.recipientKeyHash)), 0); - else if (object.recipientKeyHash.length) - message.recipientKeyHash = object.recipientKeyHash; - if (object.recipientTimestamp != null) + var message = new $root.proto.ExitCode(); + if (object.code != null) if ($util.Long) - (message.recipientTimestamp = $util.Long.fromValue(object.recipientTimestamp)).unsigned = true; - else if (typeof object.recipientTimestamp === "string") - message.recipientTimestamp = parseInt(object.recipientTimestamp, 10); - else if (typeof object.recipientTimestamp === "number") - message.recipientTimestamp = object.recipientTimestamp; - else if (typeof object.recipientTimestamp === "object") - message.recipientTimestamp = new $util.LongBits(object.recipientTimestamp.low >>> 0, object.recipientTimestamp.high >>> 0).toNumber(true); - if (object.recipientKeyIndexes) { - if (!Array.isArray(object.recipientKeyIndexes)) - throw TypeError(".proto.DeviceListMetadata.recipientKeyIndexes: array expected"); - message.recipientKeyIndexes = []; - for (var i = 0; i < object.recipientKeyIndexes.length; ++i) - message.recipientKeyIndexes[i] = object.recipientKeyIndexes[i] >>> 0; - } + (message.code = $util.Long.fromValue(object.code)).unsigned = true; + else if (typeof object.code === "string") + message.code = parseInt(object.code, 10); + else if (typeof object.code === "number") + message.code = object.code; + else if (typeof object.code === "object") + message.code = new $util.LongBits(object.code.low >>> 0, object.code.high >>> 0).toNumber(true); + if (object.text != null) + message.text = String(object.text); return message; }; /** - * Creates a plain object from a DeviceListMetadata message. Also converts values to other types if specified. + * Creates a plain object from an ExitCode message. Also converts values to other types if specified. * @function toObject - * @memberof proto.DeviceListMetadata + * @memberof proto.ExitCode * @static - * @param {proto.DeviceListMetadata} message DeviceListMetadata + * @param {proto.ExitCode} message ExitCode * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeviceListMetadata.toObject = function toObject(message, options) { + ExitCode.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.senderKeyIndexes = []; - object.recipientKeyIndexes = []; - } if (options.defaults) { - if (options.bytes === String) - object.senderKeyHash = ""; - else { - object.senderKeyHash = []; - if (options.bytes !== Array) - object.senderKeyHash = $util.newBuffer(object.senderKeyHash); - } - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.senderTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.senderTimestamp = options.longs === String ? "0" : 0; - if (options.bytes === String) - object.recipientKeyHash = ""; - else { - object.recipientKeyHash = []; - if (options.bytes !== Array) - object.recipientKeyHash = $util.newBuffer(object.recipientKeyHash); - } if ($util.Long) { var long = new $util.Long(0, 0, true); - object.recipientTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.code = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else - object.recipientTimestamp = options.longs === String ? "0" : 0; - } - if (message.senderKeyHash != null && message.hasOwnProperty("senderKeyHash")) - object.senderKeyHash = options.bytes === String ? $util.base64.encode(message.senderKeyHash, 0, message.senderKeyHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.senderKeyHash) : message.senderKeyHash; - if (message.senderTimestamp != null && message.hasOwnProperty("senderTimestamp")) - if (typeof message.senderTimestamp === "number") - object.senderTimestamp = options.longs === String ? String(message.senderTimestamp) : message.senderTimestamp; - else - object.senderTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.senderTimestamp) : options.longs === Number ? new $util.LongBits(message.senderTimestamp.low >>> 0, message.senderTimestamp.high >>> 0).toNumber(true) : message.senderTimestamp; - if (message.senderKeyIndexes && message.senderKeyIndexes.length) { - object.senderKeyIndexes = []; - for (var j = 0; j < message.senderKeyIndexes.length; ++j) - object.senderKeyIndexes[j] = message.senderKeyIndexes[j]; + object.code = options.longs === String ? "0" : 0; + object.text = ""; } - if (message.recipientKeyHash != null && message.hasOwnProperty("recipientKeyHash")) - object.recipientKeyHash = options.bytes === String ? $util.base64.encode(message.recipientKeyHash, 0, message.recipientKeyHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.recipientKeyHash) : message.recipientKeyHash; - if (message.recipientTimestamp != null && message.hasOwnProperty("recipientTimestamp")) - if (typeof message.recipientTimestamp === "number") - object.recipientTimestamp = options.longs === String ? String(message.recipientTimestamp) : message.recipientTimestamp; + if (message.code != null && message.hasOwnProperty("code")) + if (typeof message.code === "number") + object.code = options.longs === String ? String(message.code) : message.code; else - object.recipientTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.recipientTimestamp) : options.longs === Number ? new $util.LongBits(message.recipientTimestamp.low >>> 0, message.recipientTimestamp.high >>> 0).toNumber(true) : message.recipientTimestamp; - if (message.recipientKeyIndexes && message.recipientKeyIndexes.length) { - object.recipientKeyIndexes = []; - for (var j = 0; j < message.recipientKeyIndexes.length; ++j) - object.recipientKeyIndexes[j] = message.recipientKeyIndexes[j]; - } + object.code = options.longs === String ? $util.Long.prototype.toString.call(message.code) : options.longs === Number ? new $util.LongBits(message.code.low >>> 0, message.code.high >>> 0).toNumber(true) : message.code; + if (message.text != null && message.hasOwnProperty("text")) + object.text = message.text; return object; }; /** - * Converts this DeviceListMetadata to JSON. + * Converts this ExitCode to JSON. * @function toJSON - * @memberof proto.DeviceListMetadata + * @memberof proto.ExitCode * @instance * @returns {Object.} JSON object */ - DeviceListMetadata.prototype.toJSON = function toJSON() { + ExitCode.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeviceListMetadata; + return ExitCode; })(); - proto.DeviceProps = (function() { + proto.ExternalBlobReference = (function() { /** - * Properties of a DeviceProps. + * Properties of an ExternalBlobReference. * @memberof proto - * @interface IDeviceProps - * @property {string|null} [os] DeviceProps os - * @property {proto.DeviceProps.IAppVersion|null} [version] DeviceProps version - * @property {proto.DeviceProps.PlatformType|null} [platformType] DeviceProps platformType - * @property {boolean|null} [requireFullSync] DeviceProps requireFullSync - * @property {proto.DeviceProps.IHistorySyncConfig|null} [historySyncConfig] DeviceProps historySyncConfig + * @interface IExternalBlobReference + * @property {Uint8Array|null} [mediaKey] ExternalBlobReference mediaKey + * @property {string|null} [directPath] ExternalBlobReference directPath + * @property {string|null} [handle] ExternalBlobReference handle + * @property {number|Long|null} [fileSizeBytes] ExternalBlobReference fileSizeBytes + * @property {Uint8Array|null} [fileSha256] ExternalBlobReference fileSha256 + * @property {Uint8Array|null} [fileEncSha256] ExternalBlobReference fileEncSha256 */ /** - * Constructs a new DeviceProps. + * Constructs a new ExternalBlobReference. * @memberof proto - * @classdesc Represents a DeviceProps. - * @implements IDeviceProps + * @classdesc Represents an ExternalBlobReference. + * @implements IExternalBlobReference * @constructor - * @param {proto.IDeviceProps=} [properties] Properties to set + * @param {proto.IExternalBlobReference=} [properties] Properties to set */ - function DeviceProps(properties) { + function ExternalBlobReference(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13720,127 +18408,140 @@ $root.proto = (function() { } /** - * DeviceProps os. - * @member {string} os - * @memberof proto.DeviceProps + * ExternalBlobReference mediaKey. + * @member {Uint8Array} mediaKey + * @memberof proto.ExternalBlobReference * @instance */ - DeviceProps.prototype.os = ""; + ExternalBlobReference.prototype.mediaKey = $util.newBuffer([]); /** - * DeviceProps version. - * @member {proto.DeviceProps.IAppVersion|null|undefined} version - * @memberof proto.DeviceProps + * ExternalBlobReference directPath. + * @member {string} directPath + * @memberof proto.ExternalBlobReference + * @instance + */ + ExternalBlobReference.prototype.directPath = ""; + + /** + * ExternalBlobReference handle. + * @member {string} handle + * @memberof proto.ExternalBlobReference * @instance */ - DeviceProps.prototype.version = null; + ExternalBlobReference.prototype.handle = ""; /** - * DeviceProps platformType. - * @member {proto.DeviceProps.PlatformType} platformType - * @memberof proto.DeviceProps + * ExternalBlobReference fileSizeBytes. + * @member {number|Long} fileSizeBytes + * @memberof proto.ExternalBlobReference * @instance */ - DeviceProps.prototype.platformType = 0; + ExternalBlobReference.prototype.fileSizeBytes = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** - * DeviceProps requireFullSync. - * @member {boolean} requireFullSync - * @memberof proto.DeviceProps + * ExternalBlobReference fileSha256. + * @member {Uint8Array} fileSha256 + * @memberof proto.ExternalBlobReference * @instance */ - DeviceProps.prototype.requireFullSync = false; + ExternalBlobReference.prototype.fileSha256 = $util.newBuffer([]); /** - * DeviceProps historySyncConfig. - * @member {proto.DeviceProps.IHistorySyncConfig|null|undefined} historySyncConfig - * @memberof proto.DeviceProps + * ExternalBlobReference fileEncSha256. + * @member {Uint8Array} fileEncSha256 + * @memberof proto.ExternalBlobReference * @instance */ - DeviceProps.prototype.historySyncConfig = null; + ExternalBlobReference.prototype.fileEncSha256 = $util.newBuffer([]); /** - * Creates a new DeviceProps instance using the specified properties. + * Creates a new ExternalBlobReference instance using the specified properties. * @function create - * @memberof proto.DeviceProps + * @memberof proto.ExternalBlobReference * @static - * @param {proto.IDeviceProps=} [properties] Properties to set - * @returns {proto.DeviceProps} DeviceProps instance + * @param {proto.IExternalBlobReference=} [properties] Properties to set + * @returns {proto.ExternalBlobReference} ExternalBlobReference instance */ - DeviceProps.create = function create(properties) { - return new DeviceProps(properties); + ExternalBlobReference.create = function create(properties) { + return new ExternalBlobReference(properties); }; /** - * Encodes the specified DeviceProps message. Does not implicitly {@link proto.DeviceProps.verify|verify} messages. + * Encodes the specified ExternalBlobReference message. Does not implicitly {@link proto.ExternalBlobReference.verify|verify} messages. * @function encode - * @memberof proto.DeviceProps + * @memberof proto.ExternalBlobReference * @static - * @param {proto.IDeviceProps} message DeviceProps message or plain object to encode + * @param {proto.IExternalBlobReference} message ExternalBlobReference message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeviceProps.encode = function encode(message, writer) { + ExternalBlobReference.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.os != null && Object.hasOwnProperty.call(message, "os")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.os); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - $root.proto.DeviceProps.AppVersion.encode(message.version, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.platformType != null && Object.hasOwnProperty.call(message, "platformType")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.platformType); - if (message.requireFullSync != null && Object.hasOwnProperty.call(message, "requireFullSync")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.requireFullSync); - if (message.historySyncConfig != null && Object.hasOwnProperty.call(message, "historySyncConfig")) - $root.proto.DeviceProps.HistorySyncConfig.encode(message.historySyncConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.mediaKey != null && Object.hasOwnProperty.call(message, "mediaKey")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.mediaKey); + if (message.directPath != null && Object.hasOwnProperty.call(message, "directPath")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.directPath); + if (message.handle != null && Object.hasOwnProperty.call(message, "handle")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.handle); + if (message.fileSizeBytes != null && Object.hasOwnProperty.call(message, "fileSizeBytes")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.fileSizeBytes); + if (message.fileSha256 != null && Object.hasOwnProperty.call(message, "fileSha256")) + writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.fileSha256); + if (message.fileEncSha256 != null && Object.hasOwnProperty.call(message, "fileEncSha256")) + writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.fileEncSha256); return writer; }; /** - * Encodes the specified DeviceProps message, length delimited. Does not implicitly {@link proto.DeviceProps.verify|verify} messages. + * Encodes the specified ExternalBlobReference message, length delimited. Does not implicitly {@link proto.ExternalBlobReference.verify|verify} messages. * @function encodeDelimited - * @memberof proto.DeviceProps + * @memberof proto.ExternalBlobReference * @static - * @param {proto.IDeviceProps} message DeviceProps message or plain object to encode + * @param {proto.IExternalBlobReference} message ExternalBlobReference message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeviceProps.encodeDelimited = function encodeDelimited(message, writer) { + ExternalBlobReference.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeviceProps message from the specified reader or buffer. + * Decodes an ExternalBlobReference message from the specified reader or buffer. * @function decode - * @memberof proto.DeviceProps + * @memberof proto.ExternalBlobReference * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {proto.DeviceProps} DeviceProps + * @returns {proto.ExternalBlobReference} ExternalBlobReference * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeviceProps.decode = function decode(reader, length) { + ExternalBlobReference.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.DeviceProps(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.ExternalBlobReference(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.os = reader.string(); + message.mediaKey = reader.bytes(); break; case 2: - message.version = $root.proto.DeviceProps.AppVersion.decode(reader, reader.uint32()); + message.directPath = reader.string(); break; case 3: - message.platformType = reader.int32(); + message.handle = reader.string(); break; case 4: - message.requireFullSync = reader.bool(); + message.fileSizeBytes = reader.uint64(); break; case 5: - message.historySyncConfig = $root.proto.DeviceProps.HistorySyncConfig.decode(reader, reader.uint32()); + message.fileSha256 = reader.bytes(); + break; + case 6: + message.fileEncSha256 = reader.bytes(); break; default: reader.skipType(tag & 7); @@ -13851,878 +18552,824 @@ $root.proto = (function() { }; /** - * Decodes a DeviceProps message from the specified reader or buffer, length delimited. + * Decodes an ExternalBlobReference message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof proto.DeviceProps + * @memberof proto.ExternalBlobReference * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.DeviceProps} DeviceProps + * @returns {proto.ExternalBlobReference} ExternalBlobReference * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeviceProps.decodeDelimited = function decodeDelimited(reader) { + ExternalBlobReference.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeviceProps message. + * Verifies an ExternalBlobReference message. * @function verify - * @memberof proto.DeviceProps + * @memberof proto.ExternalBlobReference * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeviceProps.verify = function verify(message) { + ExternalBlobReference.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.os != null && message.hasOwnProperty("os")) - if (!$util.isString(message.os)) - return "os: string expected"; - if (message.version != null && message.hasOwnProperty("version")) { - var error = $root.proto.DeviceProps.AppVersion.verify(message.version); - if (error) - return "version." + error; - } - if (message.platformType != null && message.hasOwnProperty("platformType")) - switch (message.platformType) { - default: - return "platformType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - case 15: - case 16: - case 17: - case 18: - case 19: - case 20: - case 21: - case 22: - break; - } - if (message.requireFullSync != null && message.hasOwnProperty("requireFullSync")) - if (typeof message.requireFullSync !== "boolean") - return "requireFullSync: boolean expected"; - if (message.historySyncConfig != null && message.hasOwnProperty("historySyncConfig")) { - var error = $root.proto.DeviceProps.HistorySyncConfig.verify(message.historySyncConfig); - if (error) - return "historySyncConfig." + error; - } + if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) + if (!(message.mediaKey && typeof message.mediaKey.length === "number" || $util.isString(message.mediaKey))) + return "mediaKey: buffer expected"; + if (message.directPath != null && message.hasOwnProperty("directPath")) + if (!$util.isString(message.directPath)) + return "directPath: string expected"; + if (message.handle != null && message.hasOwnProperty("handle")) + if (!$util.isString(message.handle)) + return "handle: string expected"; + if (message.fileSizeBytes != null && message.hasOwnProperty("fileSizeBytes")) + if (!$util.isInteger(message.fileSizeBytes) && !(message.fileSizeBytes && $util.isInteger(message.fileSizeBytes.low) && $util.isInteger(message.fileSizeBytes.high))) + return "fileSizeBytes: integer|Long expected"; + if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) + if (!(message.fileSha256 && typeof message.fileSha256.length === "number" || $util.isString(message.fileSha256))) + return "fileSha256: buffer expected"; + if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) + if (!(message.fileEncSha256 && typeof message.fileEncSha256.length === "number" || $util.isString(message.fileEncSha256))) + return "fileEncSha256: buffer expected"; return null; }; /** - * Creates a DeviceProps message from a plain object. Also converts values to their respective internal types. + * Creates an ExternalBlobReference message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof proto.DeviceProps + * @memberof proto.ExternalBlobReference * @static * @param {Object.} object Plain object - * @returns {proto.DeviceProps} DeviceProps + * @returns {proto.ExternalBlobReference} ExternalBlobReference */ - DeviceProps.fromObject = function fromObject(object) { - if (object instanceof $root.proto.DeviceProps) + ExternalBlobReference.fromObject = function fromObject(object) { + if (object instanceof $root.proto.ExternalBlobReference) return object; - var message = new $root.proto.DeviceProps(); - if (object.os != null) - message.os = String(object.os); - if (object.version != null) { - if (typeof object.version !== "object") - throw TypeError(".proto.DeviceProps.version: object expected"); - message.version = $root.proto.DeviceProps.AppVersion.fromObject(object.version); - } - switch (object.platformType) { - case "UNKNOWN": - case 0: - message.platformType = 0; - break; - case "CHROME": - case 1: - message.platformType = 1; - break; - case "FIREFOX": - case 2: - message.platformType = 2; - break; - case "IE": - case 3: - message.platformType = 3; - break; - case "OPERA": - case 4: - message.platformType = 4; - break; - case "SAFARI": - case 5: - message.platformType = 5; - break; - case "EDGE": - case 6: - message.platformType = 6; - break; - case "DESKTOP": - case 7: - message.platformType = 7; - break; - case "IPAD": - case 8: - message.platformType = 8; - break; - case "ANDROID_TABLET": - case 9: - message.platformType = 9; - break; - case "OHANA": - case 10: - message.platformType = 10; - break; - case "ALOHA": - case 11: - message.platformType = 11; - break; - case "CATALINA": - case 12: - message.platformType = 12; - break; - case "TCL_TV": - case 13: - message.platformType = 13; - break; - case "IOS_PHONE": - case 14: - message.platformType = 14; - break; - case "IOS_CATALYST": - case 15: - message.platformType = 15; - break; - case "ANDROID_PHONE": - case 16: - message.platformType = 16; - break; - case "ANDROID_AMBIGUOUS": - case 17: - message.platformType = 17; - break; - case "WEAR_OS": - case 18: - message.platformType = 18; - break; - case "AR_WRIST": - case 19: - message.platformType = 19; - break; - case "AR_DEVICE": - case 20: - message.platformType = 20; - break; - case "UWP": - case 21: - message.platformType = 21; - break; - case "VR": - case 22: - message.platformType = 22; - break; - } - if (object.requireFullSync != null) - message.requireFullSync = Boolean(object.requireFullSync); - if (object.historySyncConfig != null) { - if (typeof object.historySyncConfig !== "object") - throw TypeError(".proto.DeviceProps.historySyncConfig: object expected"); - message.historySyncConfig = $root.proto.DeviceProps.HistorySyncConfig.fromObject(object.historySyncConfig); - } + var message = new $root.proto.ExternalBlobReference(); + if (object.mediaKey != null) + if (typeof object.mediaKey === "string") + $util.base64.decode(object.mediaKey, message.mediaKey = $util.newBuffer($util.base64.length(object.mediaKey)), 0); + else if (object.mediaKey.length) + message.mediaKey = object.mediaKey; + if (object.directPath != null) + message.directPath = String(object.directPath); + if (object.handle != null) + message.handle = String(object.handle); + if (object.fileSizeBytes != null) + if ($util.Long) + (message.fileSizeBytes = $util.Long.fromValue(object.fileSizeBytes)).unsigned = true; + else if (typeof object.fileSizeBytes === "string") + message.fileSizeBytes = parseInt(object.fileSizeBytes, 10); + else if (typeof object.fileSizeBytes === "number") + message.fileSizeBytes = object.fileSizeBytes; + else if (typeof object.fileSizeBytes === "object") + message.fileSizeBytes = new $util.LongBits(object.fileSizeBytes.low >>> 0, object.fileSizeBytes.high >>> 0).toNumber(true); + if (object.fileSha256 != null) + if (typeof object.fileSha256 === "string") + $util.base64.decode(object.fileSha256, message.fileSha256 = $util.newBuffer($util.base64.length(object.fileSha256)), 0); + else if (object.fileSha256.length) + message.fileSha256 = object.fileSha256; + if (object.fileEncSha256 != null) + if (typeof object.fileEncSha256 === "string") + $util.base64.decode(object.fileEncSha256, message.fileEncSha256 = $util.newBuffer($util.base64.length(object.fileEncSha256)), 0); + else if (object.fileEncSha256.length) + message.fileEncSha256 = object.fileEncSha256; return message; }; /** - * Creates a plain object from a DeviceProps message. Also converts values to other types if specified. + * Creates a plain object from an ExternalBlobReference message. Also converts values to other types if specified. * @function toObject - * @memberof proto.DeviceProps + * @memberof proto.ExternalBlobReference * @static - * @param {proto.DeviceProps} message DeviceProps + * @param {proto.ExternalBlobReference} message ExternalBlobReference * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeviceProps.toObject = function toObject(message, options) { + ExternalBlobReference.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.os = ""; - object.version = null; - object.platformType = options.enums === String ? "UNKNOWN" : 0; - object.requireFullSync = false; - object.historySyncConfig = null; + if (options.bytes === String) + object.mediaKey = ""; + else { + object.mediaKey = []; + if (options.bytes !== Array) + object.mediaKey = $util.newBuffer(object.mediaKey); + } + object.directPath = ""; + object.handle = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.fileSizeBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.fileSizeBytes = options.longs === String ? "0" : 0; + if (options.bytes === String) + object.fileSha256 = ""; + else { + object.fileSha256 = []; + if (options.bytes !== Array) + object.fileSha256 = $util.newBuffer(object.fileSha256); + } + if (options.bytes === String) + object.fileEncSha256 = ""; + else { + object.fileEncSha256 = []; + if (options.bytes !== Array) + object.fileEncSha256 = $util.newBuffer(object.fileEncSha256); + } } - if (message.os != null && message.hasOwnProperty("os")) - object.os = message.os; - if (message.version != null && message.hasOwnProperty("version")) - object.version = $root.proto.DeviceProps.AppVersion.toObject(message.version, options); - if (message.platformType != null && message.hasOwnProperty("platformType")) - object.platformType = options.enums === String ? $root.proto.DeviceProps.PlatformType[message.platformType] : message.platformType; - if (message.requireFullSync != null && message.hasOwnProperty("requireFullSync")) - object.requireFullSync = message.requireFullSync; - if (message.historySyncConfig != null && message.hasOwnProperty("historySyncConfig")) - object.historySyncConfig = $root.proto.DeviceProps.HistorySyncConfig.toObject(message.historySyncConfig, options); + if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) + object.mediaKey = options.bytes === String ? $util.base64.encode(message.mediaKey, 0, message.mediaKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.mediaKey) : message.mediaKey; + if (message.directPath != null && message.hasOwnProperty("directPath")) + object.directPath = message.directPath; + if (message.handle != null && message.hasOwnProperty("handle")) + object.handle = message.handle; + if (message.fileSizeBytes != null && message.hasOwnProperty("fileSizeBytes")) + if (typeof message.fileSizeBytes === "number") + object.fileSizeBytes = options.longs === String ? String(message.fileSizeBytes) : message.fileSizeBytes; + else + object.fileSizeBytes = options.longs === String ? $util.Long.prototype.toString.call(message.fileSizeBytes) : options.longs === Number ? new $util.LongBits(message.fileSizeBytes.low >>> 0, message.fileSizeBytes.high >>> 0).toNumber(true) : message.fileSizeBytes; + if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) + object.fileSha256 = options.bytes === String ? $util.base64.encode(message.fileSha256, 0, message.fileSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.fileSha256) : message.fileSha256; + if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) + object.fileEncSha256 = options.bytes === String ? $util.base64.encode(message.fileEncSha256, 0, message.fileEncSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.fileEncSha256) : message.fileEncSha256; return object; }; /** - * Converts this DeviceProps to JSON. + * Converts this ExternalBlobReference to JSON. * @function toJSON - * @memberof proto.DeviceProps + * @memberof proto.ExternalBlobReference * @instance * @returns {Object.} JSON object */ - DeviceProps.prototype.toJSON = function toJSON() { + ExternalBlobReference.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - DeviceProps.AppVersion = (function() { - - /** - * Properties of an AppVersion. - * @memberof proto.DeviceProps - * @interface IAppVersion - * @property {number|null} [primary] AppVersion primary - * @property {number|null} [secondary] AppVersion secondary - * @property {number|null} [tertiary] AppVersion tertiary - * @property {number|null} [quaternary] AppVersion quaternary - * @property {number|null} [quinary] AppVersion quinary - */ - - /** - * Constructs a new AppVersion. - * @memberof proto.DeviceProps - * @classdesc Represents an AppVersion. - * @implements IAppVersion - * @constructor - * @param {proto.DeviceProps.IAppVersion=} [properties] Properties to set - */ - function AppVersion(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AppVersion primary. - * @member {number} primary - * @memberof proto.DeviceProps.AppVersion - * @instance - */ - AppVersion.prototype.primary = 0; - - /** - * AppVersion secondary. - * @member {number} secondary - * @memberof proto.DeviceProps.AppVersion - * @instance - */ - AppVersion.prototype.secondary = 0; - - /** - * AppVersion tertiary. - * @member {number} tertiary - * @memberof proto.DeviceProps.AppVersion - * @instance - */ - AppVersion.prototype.tertiary = 0; - - /** - * AppVersion quaternary. - * @member {number} quaternary - * @memberof proto.DeviceProps.AppVersion - * @instance - */ - AppVersion.prototype.quaternary = 0; - - /** - * AppVersion quinary. - * @member {number} quinary - * @memberof proto.DeviceProps.AppVersion - * @instance - */ - AppVersion.prototype.quinary = 0; + return ExternalBlobReference; + })(); - /** - * Creates a new AppVersion instance using the specified properties. - * @function create - * @memberof proto.DeviceProps.AppVersion - * @static - * @param {proto.DeviceProps.IAppVersion=} [properties] Properties to set - * @returns {proto.DeviceProps.AppVersion} AppVersion instance - */ - AppVersion.create = function create(properties) { - return new AppVersion(properties); - }; + proto.GlobalSettings = (function() { - /** - * Encodes the specified AppVersion message. Does not implicitly {@link proto.DeviceProps.AppVersion.verify|verify} messages. - * @function encode - * @memberof proto.DeviceProps.AppVersion - * @static - * @param {proto.DeviceProps.IAppVersion} message AppVersion message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AppVersion.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.primary != null && Object.hasOwnProperty.call(message, "primary")) - writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.primary); - if (message.secondary != null && Object.hasOwnProperty.call(message, "secondary")) - writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.secondary); - if (message.tertiary != null && Object.hasOwnProperty.call(message, "tertiary")) - writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.tertiary); - if (message.quaternary != null && Object.hasOwnProperty.call(message, "quaternary")) - writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.quaternary); - if (message.quinary != null && Object.hasOwnProperty.call(message, "quinary")) - writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.quinary); - return writer; - }; + /** + * Properties of a GlobalSettings. + * @memberof proto + * @interface IGlobalSettings + * @property {proto.IWallpaperSettings|null} [lightThemeWallpaper] GlobalSettings lightThemeWallpaper + * @property {proto.MediaVisibility|null} [mediaVisibility] GlobalSettings mediaVisibility + * @property {proto.IWallpaperSettings|null} [darkThemeWallpaper] GlobalSettings darkThemeWallpaper + * @property {proto.IAutoDownloadSettings|null} [autoDownloadWiFi] GlobalSettings autoDownloadWiFi + * @property {proto.IAutoDownloadSettings|null} [autoDownloadCellular] GlobalSettings autoDownloadCellular + * @property {proto.IAutoDownloadSettings|null} [autoDownloadRoaming] GlobalSettings autoDownloadRoaming + * @property {boolean|null} [showIndividualNotificationsPreview] GlobalSettings showIndividualNotificationsPreview + * @property {boolean|null} [showGroupNotificationsPreview] GlobalSettings showGroupNotificationsPreview + * @property {number|null} [disappearingModeDuration] GlobalSettings disappearingModeDuration + * @property {number|Long|null} [disappearingModeTimestamp] GlobalSettings disappearingModeTimestamp + * @property {proto.IAvatarUserSettings|null} [avatarUserSettings] GlobalSettings avatarUserSettings + * @property {number|null} [fontSize] GlobalSettings fontSize + * @property {boolean|null} [securityNotifications] GlobalSettings securityNotifications + * @property {boolean|null} [autoUnarchiveChats] GlobalSettings autoUnarchiveChats + * @property {number|null} [videoQualityMode] GlobalSettings videoQualityMode + * @property {number|null} [photoQualityMode] GlobalSettings photoQualityMode + * @property {proto.INotificationSettings|null} [individualNotificationSettings] GlobalSettings individualNotificationSettings + * @property {proto.INotificationSettings|null} [groupNotificationSettings] GlobalSettings groupNotificationSettings + */ - /** - * Encodes the specified AppVersion message, length delimited. Does not implicitly {@link proto.DeviceProps.AppVersion.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.DeviceProps.AppVersion - * @static - * @param {proto.DeviceProps.IAppVersion} message AppVersion message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AppVersion.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Constructs a new GlobalSettings. + * @memberof proto + * @classdesc Represents a GlobalSettings. + * @implements IGlobalSettings + * @constructor + * @param {proto.IGlobalSettings=} [properties] Properties to set + */ + function GlobalSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Decodes an AppVersion message from the specified reader or buffer. - * @function decode - * @memberof proto.DeviceProps.AppVersion - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.DeviceProps.AppVersion} AppVersion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AppVersion.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.DeviceProps.AppVersion(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.primary = reader.uint32(); - break; - case 2: - message.secondary = reader.uint32(); - break; - case 3: - message.tertiary = reader.uint32(); - break; - case 4: - message.quaternary = reader.uint32(); - break; - case 5: - message.quinary = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * GlobalSettings lightThemeWallpaper. + * @member {proto.IWallpaperSettings|null|undefined} lightThemeWallpaper + * @memberof proto.GlobalSettings + * @instance + */ + GlobalSettings.prototype.lightThemeWallpaper = null; - /** - * Decodes an AppVersion message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.DeviceProps.AppVersion - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.DeviceProps.AppVersion} AppVersion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AppVersion.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * GlobalSettings mediaVisibility. + * @member {proto.MediaVisibility} mediaVisibility + * @memberof proto.GlobalSettings + * @instance + */ + GlobalSettings.prototype.mediaVisibility = 0; - /** - * Verifies an AppVersion message. - * @function verify - * @memberof proto.DeviceProps.AppVersion - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AppVersion.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.primary != null && message.hasOwnProperty("primary")) - if (!$util.isInteger(message.primary)) - return "primary: integer expected"; - if (message.secondary != null && message.hasOwnProperty("secondary")) - if (!$util.isInteger(message.secondary)) - return "secondary: integer expected"; - if (message.tertiary != null && message.hasOwnProperty("tertiary")) - if (!$util.isInteger(message.tertiary)) - return "tertiary: integer expected"; - if (message.quaternary != null && message.hasOwnProperty("quaternary")) - if (!$util.isInteger(message.quaternary)) - return "quaternary: integer expected"; - if (message.quinary != null && message.hasOwnProperty("quinary")) - if (!$util.isInteger(message.quinary)) - return "quinary: integer expected"; - return null; - }; + /** + * GlobalSettings darkThemeWallpaper. + * @member {proto.IWallpaperSettings|null|undefined} darkThemeWallpaper + * @memberof proto.GlobalSettings + * @instance + */ + GlobalSettings.prototype.darkThemeWallpaper = null; - /** - * Creates an AppVersion message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.DeviceProps.AppVersion - * @static - * @param {Object.} object Plain object - * @returns {proto.DeviceProps.AppVersion} AppVersion - */ - AppVersion.fromObject = function fromObject(object) { - if (object instanceof $root.proto.DeviceProps.AppVersion) - return object; - var message = new $root.proto.DeviceProps.AppVersion(); - if (object.primary != null) - message.primary = object.primary >>> 0; - if (object.secondary != null) - message.secondary = object.secondary >>> 0; - if (object.tertiary != null) - message.tertiary = object.tertiary >>> 0; - if (object.quaternary != null) - message.quaternary = object.quaternary >>> 0; - if (object.quinary != null) - message.quinary = object.quinary >>> 0; - return message; - }; + /** + * GlobalSettings autoDownloadWiFi. + * @member {proto.IAutoDownloadSettings|null|undefined} autoDownloadWiFi + * @memberof proto.GlobalSettings + * @instance + */ + GlobalSettings.prototype.autoDownloadWiFi = null; - /** - * Creates a plain object from an AppVersion message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.DeviceProps.AppVersion - * @static - * @param {proto.DeviceProps.AppVersion} message AppVersion - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AppVersion.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.primary = 0; - object.secondary = 0; - object.tertiary = 0; - object.quaternary = 0; - object.quinary = 0; - } - if (message.primary != null && message.hasOwnProperty("primary")) - object.primary = message.primary; - if (message.secondary != null && message.hasOwnProperty("secondary")) - object.secondary = message.secondary; - if (message.tertiary != null && message.hasOwnProperty("tertiary")) - object.tertiary = message.tertiary; - if (message.quaternary != null && message.hasOwnProperty("quaternary")) - object.quaternary = message.quaternary; - if (message.quinary != null && message.hasOwnProperty("quinary")) - object.quinary = message.quinary; - return object; - }; + /** + * GlobalSettings autoDownloadCellular. + * @member {proto.IAutoDownloadSettings|null|undefined} autoDownloadCellular + * @memberof proto.GlobalSettings + * @instance + */ + GlobalSettings.prototype.autoDownloadCellular = null; - /** - * Converts this AppVersion to JSON. - * @function toJSON - * @memberof proto.DeviceProps.AppVersion - * @instance - * @returns {Object.} JSON object - */ - AppVersion.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * GlobalSettings autoDownloadRoaming. + * @member {proto.IAutoDownloadSettings|null|undefined} autoDownloadRoaming + * @memberof proto.GlobalSettings + * @instance + */ + GlobalSettings.prototype.autoDownloadRoaming = null; - return AppVersion; - })(); + /** + * GlobalSettings showIndividualNotificationsPreview. + * @member {boolean} showIndividualNotificationsPreview + * @memberof proto.GlobalSettings + * @instance + */ + GlobalSettings.prototype.showIndividualNotificationsPreview = false; - DeviceProps.HistorySyncConfig = (function() { + /** + * GlobalSettings showGroupNotificationsPreview. + * @member {boolean} showGroupNotificationsPreview + * @memberof proto.GlobalSettings + * @instance + */ + GlobalSettings.prototype.showGroupNotificationsPreview = false; - /** - * Properties of a HistorySyncConfig. - * @memberof proto.DeviceProps - * @interface IHistorySyncConfig - * @property {number|null} [fullSyncDaysLimit] HistorySyncConfig fullSyncDaysLimit - * @property {number|null} [fullSyncSizeMbLimit] HistorySyncConfig fullSyncSizeMbLimit - * @property {number|null} [storageQuotaMb] HistorySyncConfig storageQuotaMb - * @property {boolean|null} [inlineInitialPayloadInE2EeMsg] HistorySyncConfig inlineInitialPayloadInE2EeMsg - * @property {number|null} [recentSyncDaysLimit] HistorySyncConfig recentSyncDaysLimit - */ + /** + * GlobalSettings disappearingModeDuration. + * @member {number} disappearingModeDuration + * @memberof proto.GlobalSettings + * @instance + */ + GlobalSettings.prototype.disappearingModeDuration = 0; - /** - * Constructs a new HistorySyncConfig. - * @memberof proto.DeviceProps - * @classdesc Represents a HistorySyncConfig. - * @implements IHistorySyncConfig - * @constructor - * @param {proto.DeviceProps.IHistorySyncConfig=} [properties] Properties to set - */ - function HistorySyncConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * GlobalSettings disappearingModeTimestamp. + * @member {number|Long} disappearingModeTimestamp + * @memberof proto.GlobalSettings + * @instance + */ + GlobalSettings.prototype.disappearingModeTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * HistorySyncConfig fullSyncDaysLimit. - * @member {number} fullSyncDaysLimit - * @memberof proto.DeviceProps.HistorySyncConfig - * @instance - */ - HistorySyncConfig.prototype.fullSyncDaysLimit = 0; + /** + * GlobalSettings avatarUserSettings. + * @member {proto.IAvatarUserSettings|null|undefined} avatarUserSettings + * @memberof proto.GlobalSettings + * @instance + */ + GlobalSettings.prototype.avatarUserSettings = null; - /** - * HistorySyncConfig fullSyncSizeMbLimit. - * @member {number} fullSyncSizeMbLimit - * @memberof proto.DeviceProps.HistorySyncConfig - * @instance - */ - HistorySyncConfig.prototype.fullSyncSizeMbLimit = 0; + /** + * GlobalSettings fontSize. + * @member {number} fontSize + * @memberof proto.GlobalSettings + * @instance + */ + GlobalSettings.prototype.fontSize = 0; - /** - * HistorySyncConfig storageQuotaMb. - * @member {number} storageQuotaMb - * @memberof proto.DeviceProps.HistorySyncConfig - * @instance - */ - HistorySyncConfig.prototype.storageQuotaMb = 0; + /** + * GlobalSettings securityNotifications. + * @member {boolean} securityNotifications + * @memberof proto.GlobalSettings + * @instance + */ + GlobalSettings.prototype.securityNotifications = false; - /** - * HistorySyncConfig inlineInitialPayloadInE2EeMsg. - * @member {boolean} inlineInitialPayloadInE2EeMsg - * @memberof proto.DeviceProps.HistorySyncConfig - * @instance - */ - HistorySyncConfig.prototype.inlineInitialPayloadInE2EeMsg = false; + /** + * GlobalSettings autoUnarchiveChats. + * @member {boolean} autoUnarchiveChats + * @memberof proto.GlobalSettings + * @instance + */ + GlobalSettings.prototype.autoUnarchiveChats = false; - /** - * HistorySyncConfig recentSyncDaysLimit. - * @member {number} recentSyncDaysLimit - * @memberof proto.DeviceProps.HistorySyncConfig - * @instance - */ - HistorySyncConfig.prototype.recentSyncDaysLimit = 0; + /** + * GlobalSettings videoQualityMode. + * @member {number} videoQualityMode + * @memberof proto.GlobalSettings + * @instance + */ + GlobalSettings.prototype.videoQualityMode = 0; - /** - * Creates a new HistorySyncConfig instance using the specified properties. - * @function create - * @memberof proto.DeviceProps.HistorySyncConfig - * @static - * @param {proto.DeviceProps.IHistorySyncConfig=} [properties] Properties to set - * @returns {proto.DeviceProps.HistorySyncConfig} HistorySyncConfig instance - */ - HistorySyncConfig.create = function create(properties) { - return new HistorySyncConfig(properties); - }; + /** + * GlobalSettings photoQualityMode. + * @member {number} photoQualityMode + * @memberof proto.GlobalSettings + * @instance + */ + GlobalSettings.prototype.photoQualityMode = 0; - /** - * Encodes the specified HistorySyncConfig message. Does not implicitly {@link proto.DeviceProps.HistorySyncConfig.verify|verify} messages. - * @function encode - * @memberof proto.DeviceProps.HistorySyncConfig - * @static - * @param {proto.DeviceProps.IHistorySyncConfig} message HistorySyncConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HistorySyncConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.fullSyncDaysLimit != null && Object.hasOwnProperty.call(message, "fullSyncDaysLimit")) - writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.fullSyncDaysLimit); - if (message.fullSyncSizeMbLimit != null && Object.hasOwnProperty.call(message, "fullSyncSizeMbLimit")) - writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.fullSyncSizeMbLimit); - if (message.storageQuotaMb != null && Object.hasOwnProperty.call(message, "storageQuotaMb")) - writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.storageQuotaMb); - if (message.inlineInitialPayloadInE2EeMsg != null && Object.hasOwnProperty.call(message, "inlineInitialPayloadInE2EeMsg")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.inlineInitialPayloadInE2EeMsg); - if (message.recentSyncDaysLimit != null && Object.hasOwnProperty.call(message, "recentSyncDaysLimit")) - writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.recentSyncDaysLimit); - return writer; - }; + /** + * GlobalSettings individualNotificationSettings. + * @member {proto.INotificationSettings|null|undefined} individualNotificationSettings + * @memberof proto.GlobalSettings + * @instance + */ + GlobalSettings.prototype.individualNotificationSettings = null; - /** - * Encodes the specified HistorySyncConfig message, length delimited. Does not implicitly {@link proto.DeviceProps.HistorySyncConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.DeviceProps.HistorySyncConfig - * @static - * @param {proto.DeviceProps.IHistorySyncConfig} message HistorySyncConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HistorySyncConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * GlobalSettings groupNotificationSettings. + * @member {proto.INotificationSettings|null|undefined} groupNotificationSettings + * @memberof proto.GlobalSettings + * @instance + */ + GlobalSettings.prototype.groupNotificationSettings = null; - /** - * Decodes a HistorySyncConfig message from the specified reader or buffer. - * @function decode - * @memberof proto.DeviceProps.HistorySyncConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.DeviceProps.HistorySyncConfig} HistorySyncConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HistorySyncConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.DeviceProps.HistorySyncConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.fullSyncDaysLimit = reader.uint32(); - break; - case 2: - message.fullSyncSizeMbLimit = reader.uint32(); - break; - case 3: - message.storageQuotaMb = reader.uint32(); - break; - case 4: - message.inlineInitialPayloadInE2EeMsg = reader.bool(); - break; - case 5: - message.recentSyncDaysLimit = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Creates a new GlobalSettings instance using the specified properties. + * @function create + * @memberof proto.GlobalSettings + * @static + * @param {proto.IGlobalSettings=} [properties] Properties to set + * @returns {proto.GlobalSettings} GlobalSettings instance + */ + GlobalSettings.create = function create(properties) { + return new GlobalSettings(properties); + }; + + /** + * Encodes the specified GlobalSettings message. Does not implicitly {@link proto.GlobalSettings.verify|verify} messages. + * @function encode + * @memberof proto.GlobalSettings + * @static + * @param {proto.IGlobalSettings} message GlobalSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GlobalSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.lightThemeWallpaper != null && Object.hasOwnProperty.call(message, "lightThemeWallpaper")) + $root.proto.WallpaperSettings.encode(message.lightThemeWallpaper, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.mediaVisibility != null && Object.hasOwnProperty.call(message, "mediaVisibility")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.mediaVisibility); + if (message.darkThemeWallpaper != null && Object.hasOwnProperty.call(message, "darkThemeWallpaper")) + $root.proto.WallpaperSettings.encode(message.darkThemeWallpaper, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.autoDownloadWiFi != null && Object.hasOwnProperty.call(message, "autoDownloadWiFi")) + $root.proto.AutoDownloadSettings.encode(message.autoDownloadWiFi, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.autoDownloadCellular != null && Object.hasOwnProperty.call(message, "autoDownloadCellular")) + $root.proto.AutoDownloadSettings.encode(message.autoDownloadCellular, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.autoDownloadRoaming != null && Object.hasOwnProperty.call(message, "autoDownloadRoaming")) + $root.proto.AutoDownloadSettings.encode(message.autoDownloadRoaming, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.showIndividualNotificationsPreview != null && Object.hasOwnProperty.call(message, "showIndividualNotificationsPreview")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.showIndividualNotificationsPreview); + if (message.showGroupNotificationsPreview != null && Object.hasOwnProperty.call(message, "showGroupNotificationsPreview")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.showGroupNotificationsPreview); + if (message.disappearingModeDuration != null && Object.hasOwnProperty.call(message, "disappearingModeDuration")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.disappearingModeDuration); + if (message.disappearingModeTimestamp != null && Object.hasOwnProperty.call(message, "disappearingModeTimestamp")) + writer.uint32(/* id 10, wireType 0 =*/80).int64(message.disappearingModeTimestamp); + if (message.avatarUserSettings != null && Object.hasOwnProperty.call(message, "avatarUserSettings")) + $root.proto.AvatarUserSettings.encode(message.avatarUserSettings, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.fontSize != null && Object.hasOwnProperty.call(message, "fontSize")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.fontSize); + if (message.securityNotifications != null && Object.hasOwnProperty.call(message, "securityNotifications")) + writer.uint32(/* id 13, wireType 0 =*/104).bool(message.securityNotifications); + if (message.autoUnarchiveChats != null && Object.hasOwnProperty.call(message, "autoUnarchiveChats")) + writer.uint32(/* id 14, wireType 0 =*/112).bool(message.autoUnarchiveChats); + if (message.videoQualityMode != null && Object.hasOwnProperty.call(message, "videoQualityMode")) + writer.uint32(/* id 15, wireType 0 =*/120).int32(message.videoQualityMode); + if (message.photoQualityMode != null && Object.hasOwnProperty.call(message, "photoQualityMode")) + writer.uint32(/* id 16, wireType 0 =*/128).int32(message.photoQualityMode); + if (message.individualNotificationSettings != null && Object.hasOwnProperty.call(message, "individualNotificationSettings")) + $root.proto.NotificationSettings.encode(message.individualNotificationSettings, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.groupNotificationSettings != null && Object.hasOwnProperty.call(message, "groupNotificationSettings")) + $root.proto.NotificationSettings.encode(message.groupNotificationSettings, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + return writer; + }; - /** - * Decodes a HistorySyncConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.DeviceProps.HistorySyncConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.DeviceProps.HistorySyncConfig} HistorySyncConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HistorySyncConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encodes the specified GlobalSettings message, length delimited. Does not implicitly {@link proto.GlobalSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.GlobalSettings + * @static + * @param {proto.IGlobalSettings} message GlobalSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GlobalSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Verifies a HistorySyncConfig message. - * @function verify - * @memberof proto.DeviceProps.HistorySyncConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HistorySyncConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.fullSyncDaysLimit != null && message.hasOwnProperty("fullSyncDaysLimit")) - if (!$util.isInteger(message.fullSyncDaysLimit)) - return "fullSyncDaysLimit: integer expected"; - if (message.fullSyncSizeMbLimit != null && message.hasOwnProperty("fullSyncSizeMbLimit")) - if (!$util.isInteger(message.fullSyncSizeMbLimit)) - return "fullSyncSizeMbLimit: integer expected"; - if (message.storageQuotaMb != null && message.hasOwnProperty("storageQuotaMb")) - if (!$util.isInteger(message.storageQuotaMb)) - return "storageQuotaMb: integer expected"; - if (message.inlineInitialPayloadInE2EeMsg != null && message.hasOwnProperty("inlineInitialPayloadInE2EeMsg")) - if (typeof message.inlineInitialPayloadInE2EeMsg !== "boolean") - return "inlineInitialPayloadInE2EeMsg: boolean expected"; - if (message.recentSyncDaysLimit != null && message.hasOwnProperty("recentSyncDaysLimit")) - if (!$util.isInteger(message.recentSyncDaysLimit)) - return "recentSyncDaysLimit: integer expected"; - return null; - }; + /** + * Decodes a GlobalSettings message from the specified reader or buffer. + * @function decode + * @memberof proto.GlobalSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.GlobalSettings} GlobalSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GlobalSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.GlobalSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.lightThemeWallpaper = $root.proto.WallpaperSettings.decode(reader, reader.uint32()); + break; + case 2: + message.mediaVisibility = reader.int32(); + break; + case 3: + message.darkThemeWallpaper = $root.proto.WallpaperSettings.decode(reader, reader.uint32()); + break; + case 4: + message.autoDownloadWiFi = $root.proto.AutoDownloadSettings.decode(reader, reader.uint32()); + break; + case 5: + message.autoDownloadCellular = $root.proto.AutoDownloadSettings.decode(reader, reader.uint32()); + break; + case 6: + message.autoDownloadRoaming = $root.proto.AutoDownloadSettings.decode(reader, reader.uint32()); + break; + case 7: + message.showIndividualNotificationsPreview = reader.bool(); + break; + case 8: + message.showGroupNotificationsPreview = reader.bool(); + break; + case 9: + message.disappearingModeDuration = reader.int32(); + break; + case 10: + message.disappearingModeTimestamp = reader.int64(); + break; + case 11: + message.avatarUserSettings = $root.proto.AvatarUserSettings.decode(reader, reader.uint32()); + break; + case 12: + message.fontSize = reader.int32(); + break; + case 13: + message.securityNotifications = reader.bool(); + break; + case 14: + message.autoUnarchiveChats = reader.bool(); + break; + case 15: + message.videoQualityMode = reader.int32(); + break; + case 16: + message.photoQualityMode = reader.int32(); + break; + case 17: + message.individualNotificationSettings = $root.proto.NotificationSettings.decode(reader, reader.uint32()); + break; + case 18: + message.groupNotificationSettings = $root.proto.NotificationSettings.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Creates a HistorySyncConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.DeviceProps.HistorySyncConfig - * @static - * @param {Object.} object Plain object - * @returns {proto.DeviceProps.HistorySyncConfig} HistorySyncConfig - */ - HistorySyncConfig.fromObject = function fromObject(object) { - if (object instanceof $root.proto.DeviceProps.HistorySyncConfig) - return object; - var message = new $root.proto.DeviceProps.HistorySyncConfig(); - if (object.fullSyncDaysLimit != null) - message.fullSyncDaysLimit = object.fullSyncDaysLimit >>> 0; - if (object.fullSyncSizeMbLimit != null) - message.fullSyncSizeMbLimit = object.fullSyncSizeMbLimit >>> 0; - if (object.storageQuotaMb != null) - message.storageQuotaMb = object.storageQuotaMb >>> 0; - if (object.inlineInitialPayloadInE2EeMsg != null) - message.inlineInitialPayloadInE2EeMsg = Boolean(object.inlineInitialPayloadInE2EeMsg); - if (object.recentSyncDaysLimit != null) - message.recentSyncDaysLimit = object.recentSyncDaysLimit >>> 0; - return message; - }; + /** + * Decodes a GlobalSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.GlobalSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.GlobalSettings} GlobalSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GlobalSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a plain object from a HistorySyncConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.DeviceProps.HistorySyncConfig - * @static - * @param {proto.DeviceProps.HistorySyncConfig} message HistorySyncConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HistorySyncConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.fullSyncDaysLimit = 0; - object.fullSyncSizeMbLimit = 0; - object.storageQuotaMb = 0; - object.inlineInitialPayloadInE2EeMsg = false; - object.recentSyncDaysLimit = 0; + /** + * Verifies a GlobalSettings message. + * @function verify + * @memberof proto.GlobalSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GlobalSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.lightThemeWallpaper != null && message.hasOwnProperty("lightThemeWallpaper")) { + var error = $root.proto.WallpaperSettings.verify(message.lightThemeWallpaper); + if (error) + return "lightThemeWallpaper." + error; + } + if (message.mediaVisibility != null && message.hasOwnProperty("mediaVisibility")) + switch (message.mediaVisibility) { + default: + return "mediaVisibility: enum value expected"; + case 0: + case 1: + case 2: + break; } - if (message.fullSyncDaysLimit != null && message.hasOwnProperty("fullSyncDaysLimit")) - object.fullSyncDaysLimit = message.fullSyncDaysLimit; - if (message.fullSyncSizeMbLimit != null && message.hasOwnProperty("fullSyncSizeMbLimit")) - object.fullSyncSizeMbLimit = message.fullSyncSizeMbLimit; - if (message.storageQuotaMb != null && message.hasOwnProperty("storageQuotaMb")) - object.storageQuotaMb = message.storageQuotaMb; - if (message.inlineInitialPayloadInE2EeMsg != null && message.hasOwnProperty("inlineInitialPayloadInE2EeMsg")) - object.inlineInitialPayloadInE2EeMsg = message.inlineInitialPayloadInE2EeMsg; - if (message.recentSyncDaysLimit != null && message.hasOwnProperty("recentSyncDaysLimit")) - object.recentSyncDaysLimit = message.recentSyncDaysLimit; - return object; - }; - - /** - * Converts this HistorySyncConfig to JSON. - * @function toJSON - * @memberof proto.DeviceProps.HistorySyncConfig - * @instance - * @returns {Object.} JSON object - */ - HistorySyncConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + if (message.darkThemeWallpaper != null && message.hasOwnProperty("darkThemeWallpaper")) { + var error = $root.proto.WallpaperSettings.verify(message.darkThemeWallpaper); + if (error) + return "darkThemeWallpaper." + error; + } + if (message.autoDownloadWiFi != null && message.hasOwnProperty("autoDownloadWiFi")) { + var error = $root.proto.AutoDownloadSettings.verify(message.autoDownloadWiFi); + if (error) + return "autoDownloadWiFi." + error; + } + if (message.autoDownloadCellular != null && message.hasOwnProperty("autoDownloadCellular")) { + var error = $root.proto.AutoDownloadSettings.verify(message.autoDownloadCellular); + if (error) + return "autoDownloadCellular." + error; + } + if (message.autoDownloadRoaming != null && message.hasOwnProperty("autoDownloadRoaming")) { + var error = $root.proto.AutoDownloadSettings.verify(message.autoDownloadRoaming); + if (error) + return "autoDownloadRoaming." + error; + } + if (message.showIndividualNotificationsPreview != null && message.hasOwnProperty("showIndividualNotificationsPreview")) + if (typeof message.showIndividualNotificationsPreview !== "boolean") + return "showIndividualNotificationsPreview: boolean expected"; + if (message.showGroupNotificationsPreview != null && message.hasOwnProperty("showGroupNotificationsPreview")) + if (typeof message.showGroupNotificationsPreview !== "boolean") + return "showGroupNotificationsPreview: boolean expected"; + if (message.disappearingModeDuration != null && message.hasOwnProperty("disappearingModeDuration")) + if (!$util.isInteger(message.disappearingModeDuration)) + return "disappearingModeDuration: integer expected"; + if (message.disappearingModeTimestamp != null && message.hasOwnProperty("disappearingModeTimestamp")) + if (!$util.isInteger(message.disappearingModeTimestamp) && !(message.disappearingModeTimestamp && $util.isInteger(message.disappearingModeTimestamp.low) && $util.isInteger(message.disappearingModeTimestamp.high))) + return "disappearingModeTimestamp: integer|Long expected"; + if (message.avatarUserSettings != null && message.hasOwnProperty("avatarUserSettings")) { + var error = $root.proto.AvatarUserSettings.verify(message.avatarUserSettings); + if (error) + return "avatarUserSettings." + error; + } + if (message.fontSize != null && message.hasOwnProperty("fontSize")) + if (!$util.isInteger(message.fontSize)) + return "fontSize: integer expected"; + if (message.securityNotifications != null && message.hasOwnProperty("securityNotifications")) + if (typeof message.securityNotifications !== "boolean") + return "securityNotifications: boolean expected"; + if (message.autoUnarchiveChats != null && message.hasOwnProperty("autoUnarchiveChats")) + if (typeof message.autoUnarchiveChats !== "boolean") + return "autoUnarchiveChats: boolean expected"; + if (message.videoQualityMode != null && message.hasOwnProperty("videoQualityMode")) + if (!$util.isInteger(message.videoQualityMode)) + return "videoQualityMode: integer expected"; + if (message.photoQualityMode != null && message.hasOwnProperty("photoQualityMode")) + if (!$util.isInteger(message.photoQualityMode)) + return "photoQualityMode: integer expected"; + if (message.individualNotificationSettings != null && message.hasOwnProperty("individualNotificationSettings")) { + var error = $root.proto.NotificationSettings.verify(message.individualNotificationSettings); + if (error) + return "individualNotificationSettings." + error; + } + if (message.groupNotificationSettings != null && message.hasOwnProperty("groupNotificationSettings")) { + var error = $root.proto.NotificationSettings.verify(message.groupNotificationSettings); + if (error) + return "groupNotificationSettings." + error; + } + return null; + }; - return HistorySyncConfig; - })(); + /** + * Creates a GlobalSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.GlobalSettings + * @static + * @param {Object.} object Plain object + * @returns {proto.GlobalSettings} GlobalSettings + */ + GlobalSettings.fromObject = function fromObject(object) { + if (object instanceof $root.proto.GlobalSettings) + return object; + var message = new $root.proto.GlobalSettings(); + if (object.lightThemeWallpaper != null) { + if (typeof object.lightThemeWallpaper !== "object") + throw TypeError(".proto.GlobalSettings.lightThemeWallpaper: object expected"); + message.lightThemeWallpaper = $root.proto.WallpaperSettings.fromObject(object.lightThemeWallpaper); + } + switch (object.mediaVisibility) { + case "DEFAULT": + case 0: + message.mediaVisibility = 0; + break; + case "OFF": + case 1: + message.mediaVisibility = 1; + break; + case "ON": + case 2: + message.mediaVisibility = 2; + break; + } + if (object.darkThemeWallpaper != null) { + if (typeof object.darkThemeWallpaper !== "object") + throw TypeError(".proto.GlobalSettings.darkThemeWallpaper: object expected"); + message.darkThemeWallpaper = $root.proto.WallpaperSettings.fromObject(object.darkThemeWallpaper); + } + if (object.autoDownloadWiFi != null) { + if (typeof object.autoDownloadWiFi !== "object") + throw TypeError(".proto.GlobalSettings.autoDownloadWiFi: object expected"); + message.autoDownloadWiFi = $root.proto.AutoDownloadSettings.fromObject(object.autoDownloadWiFi); + } + if (object.autoDownloadCellular != null) { + if (typeof object.autoDownloadCellular !== "object") + throw TypeError(".proto.GlobalSettings.autoDownloadCellular: object expected"); + message.autoDownloadCellular = $root.proto.AutoDownloadSettings.fromObject(object.autoDownloadCellular); + } + if (object.autoDownloadRoaming != null) { + if (typeof object.autoDownloadRoaming !== "object") + throw TypeError(".proto.GlobalSettings.autoDownloadRoaming: object expected"); + message.autoDownloadRoaming = $root.proto.AutoDownloadSettings.fromObject(object.autoDownloadRoaming); + } + if (object.showIndividualNotificationsPreview != null) + message.showIndividualNotificationsPreview = Boolean(object.showIndividualNotificationsPreview); + if (object.showGroupNotificationsPreview != null) + message.showGroupNotificationsPreview = Boolean(object.showGroupNotificationsPreview); + if (object.disappearingModeDuration != null) + message.disappearingModeDuration = object.disappearingModeDuration | 0; + if (object.disappearingModeTimestamp != null) + if ($util.Long) + (message.disappearingModeTimestamp = $util.Long.fromValue(object.disappearingModeTimestamp)).unsigned = false; + else if (typeof object.disappearingModeTimestamp === "string") + message.disappearingModeTimestamp = parseInt(object.disappearingModeTimestamp, 10); + else if (typeof object.disappearingModeTimestamp === "number") + message.disappearingModeTimestamp = object.disappearingModeTimestamp; + else if (typeof object.disappearingModeTimestamp === "object") + message.disappearingModeTimestamp = new $util.LongBits(object.disappearingModeTimestamp.low >>> 0, object.disappearingModeTimestamp.high >>> 0).toNumber(); + if (object.avatarUserSettings != null) { + if (typeof object.avatarUserSettings !== "object") + throw TypeError(".proto.GlobalSettings.avatarUserSettings: object expected"); + message.avatarUserSettings = $root.proto.AvatarUserSettings.fromObject(object.avatarUserSettings); + } + if (object.fontSize != null) + message.fontSize = object.fontSize | 0; + if (object.securityNotifications != null) + message.securityNotifications = Boolean(object.securityNotifications); + if (object.autoUnarchiveChats != null) + message.autoUnarchiveChats = Boolean(object.autoUnarchiveChats); + if (object.videoQualityMode != null) + message.videoQualityMode = object.videoQualityMode | 0; + if (object.photoQualityMode != null) + message.photoQualityMode = object.photoQualityMode | 0; + if (object.individualNotificationSettings != null) { + if (typeof object.individualNotificationSettings !== "object") + throw TypeError(".proto.GlobalSettings.individualNotificationSettings: object expected"); + message.individualNotificationSettings = $root.proto.NotificationSettings.fromObject(object.individualNotificationSettings); + } + if (object.groupNotificationSettings != null) { + if (typeof object.groupNotificationSettings !== "object") + throw TypeError(".proto.GlobalSettings.groupNotificationSettings: object expected"); + message.groupNotificationSettings = $root.proto.NotificationSettings.fromObject(object.groupNotificationSettings); + } + return message; + }; /** - * PlatformType enum. - * @name proto.DeviceProps.PlatformType - * @enum {number} - * @property {number} UNKNOWN=0 UNKNOWN value - * @property {number} CHROME=1 CHROME value - * @property {number} FIREFOX=2 FIREFOX value - * @property {number} IE=3 IE value - * @property {number} OPERA=4 OPERA value - * @property {number} SAFARI=5 SAFARI value - * @property {number} EDGE=6 EDGE value - * @property {number} DESKTOP=7 DESKTOP value - * @property {number} IPAD=8 IPAD value - * @property {number} ANDROID_TABLET=9 ANDROID_TABLET value - * @property {number} OHANA=10 OHANA value - * @property {number} ALOHA=11 ALOHA value - * @property {number} CATALINA=12 CATALINA value - * @property {number} TCL_TV=13 TCL_TV value - * @property {number} IOS_PHONE=14 IOS_PHONE value - * @property {number} IOS_CATALYST=15 IOS_CATALYST value - * @property {number} ANDROID_PHONE=16 ANDROID_PHONE value - * @property {number} ANDROID_AMBIGUOUS=17 ANDROID_AMBIGUOUS value - * @property {number} WEAR_OS=18 WEAR_OS value - * @property {number} AR_WRIST=19 AR_WRIST value - * @property {number} AR_DEVICE=20 AR_DEVICE value - * @property {number} UWP=21 UWP value - * @property {number} VR=22 VR value + * Creates a plain object from a GlobalSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.GlobalSettings + * @static + * @param {proto.GlobalSettings} message GlobalSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GlobalSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.lightThemeWallpaper = null; + object.mediaVisibility = options.enums === String ? "DEFAULT" : 0; + object.darkThemeWallpaper = null; + object.autoDownloadWiFi = null; + object.autoDownloadCellular = null; + object.autoDownloadRoaming = null; + object.showIndividualNotificationsPreview = false; + object.showGroupNotificationsPreview = false; + object.disappearingModeDuration = 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.disappearingModeTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.disappearingModeTimestamp = options.longs === String ? "0" : 0; + object.avatarUserSettings = null; + object.fontSize = 0; + object.securityNotifications = false; + object.autoUnarchiveChats = false; + object.videoQualityMode = 0; + object.photoQualityMode = 0; + object.individualNotificationSettings = null; + object.groupNotificationSettings = null; + } + if (message.lightThemeWallpaper != null && message.hasOwnProperty("lightThemeWallpaper")) + object.lightThemeWallpaper = $root.proto.WallpaperSettings.toObject(message.lightThemeWallpaper, options); + if (message.mediaVisibility != null && message.hasOwnProperty("mediaVisibility")) + object.mediaVisibility = options.enums === String ? $root.proto.MediaVisibility[message.mediaVisibility] : message.mediaVisibility; + if (message.darkThemeWallpaper != null && message.hasOwnProperty("darkThemeWallpaper")) + object.darkThemeWallpaper = $root.proto.WallpaperSettings.toObject(message.darkThemeWallpaper, options); + if (message.autoDownloadWiFi != null && message.hasOwnProperty("autoDownloadWiFi")) + object.autoDownloadWiFi = $root.proto.AutoDownloadSettings.toObject(message.autoDownloadWiFi, options); + if (message.autoDownloadCellular != null && message.hasOwnProperty("autoDownloadCellular")) + object.autoDownloadCellular = $root.proto.AutoDownloadSettings.toObject(message.autoDownloadCellular, options); + if (message.autoDownloadRoaming != null && message.hasOwnProperty("autoDownloadRoaming")) + object.autoDownloadRoaming = $root.proto.AutoDownloadSettings.toObject(message.autoDownloadRoaming, options); + if (message.showIndividualNotificationsPreview != null && message.hasOwnProperty("showIndividualNotificationsPreview")) + object.showIndividualNotificationsPreview = message.showIndividualNotificationsPreview; + if (message.showGroupNotificationsPreview != null && message.hasOwnProperty("showGroupNotificationsPreview")) + object.showGroupNotificationsPreview = message.showGroupNotificationsPreview; + if (message.disappearingModeDuration != null && message.hasOwnProperty("disappearingModeDuration")) + object.disappearingModeDuration = message.disappearingModeDuration; + if (message.disappearingModeTimestamp != null && message.hasOwnProperty("disappearingModeTimestamp")) + if (typeof message.disappearingModeTimestamp === "number") + object.disappearingModeTimestamp = options.longs === String ? String(message.disappearingModeTimestamp) : message.disappearingModeTimestamp; + else + object.disappearingModeTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.disappearingModeTimestamp) : options.longs === Number ? new $util.LongBits(message.disappearingModeTimestamp.low >>> 0, message.disappearingModeTimestamp.high >>> 0).toNumber() : message.disappearingModeTimestamp; + if (message.avatarUserSettings != null && message.hasOwnProperty("avatarUserSettings")) + object.avatarUserSettings = $root.proto.AvatarUserSettings.toObject(message.avatarUserSettings, options); + if (message.fontSize != null && message.hasOwnProperty("fontSize")) + object.fontSize = message.fontSize; + if (message.securityNotifications != null && message.hasOwnProperty("securityNotifications")) + object.securityNotifications = message.securityNotifications; + if (message.autoUnarchiveChats != null && message.hasOwnProperty("autoUnarchiveChats")) + object.autoUnarchiveChats = message.autoUnarchiveChats; + if (message.videoQualityMode != null && message.hasOwnProperty("videoQualityMode")) + object.videoQualityMode = message.videoQualityMode; + if (message.photoQualityMode != null && message.hasOwnProperty("photoQualityMode")) + object.photoQualityMode = message.photoQualityMode; + if (message.individualNotificationSettings != null && message.hasOwnProperty("individualNotificationSettings")) + object.individualNotificationSettings = $root.proto.NotificationSettings.toObject(message.individualNotificationSettings, options); + if (message.groupNotificationSettings != null && message.hasOwnProperty("groupNotificationSettings")) + object.groupNotificationSettings = $root.proto.NotificationSettings.toObject(message.groupNotificationSettings, options); + return object; + }; + + /** + * Converts this GlobalSettings to JSON. + * @function toJSON + * @memberof proto.GlobalSettings + * @instance + * @returns {Object.} JSON object */ - DeviceProps.PlatformType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UNKNOWN"] = 0; - values[valuesById[1] = "CHROME"] = 1; - values[valuesById[2] = "FIREFOX"] = 2; - values[valuesById[3] = "IE"] = 3; - values[valuesById[4] = "OPERA"] = 4; - values[valuesById[5] = "SAFARI"] = 5; - values[valuesById[6] = "EDGE"] = 6; - values[valuesById[7] = "DESKTOP"] = 7; - values[valuesById[8] = "IPAD"] = 8; - values[valuesById[9] = "ANDROID_TABLET"] = 9; - values[valuesById[10] = "OHANA"] = 10; - values[valuesById[11] = "ALOHA"] = 11; - values[valuesById[12] = "CATALINA"] = 12; - values[valuesById[13] = "TCL_TV"] = 13; - values[valuesById[14] = "IOS_PHONE"] = 14; - values[valuesById[15] = "IOS_CATALYST"] = 15; - values[valuesById[16] = "ANDROID_PHONE"] = 16; - values[valuesById[17] = "ANDROID_AMBIGUOUS"] = 17; - values[valuesById[18] = "WEAR_OS"] = 18; - values[valuesById[19] = "AR_WRIST"] = 19; - values[valuesById[20] = "AR_DEVICE"] = 20; - values[valuesById[21] = "UWP"] = 21; - values[valuesById[22] = "VR"] = 22; - return values; - })(); + GlobalSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return DeviceProps; + return GlobalSettings; })(); - proto.DisappearingMode = (function() { + proto.GroupMention = (function() { /** - * Properties of a DisappearingMode. + * Properties of a GroupMention. * @memberof proto - * @interface IDisappearingMode - * @property {proto.DisappearingMode.Initiator|null} [initiator] DisappearingMode initiator - * @property {proto.DisappearingMode.Trigger|null} [trigger] DisappearingMode trigger - * @property {string|null} [initiatorDeviceJid] DisappearingMode initiatorDeviceJid + * @interface IGroupMention + * @property {string|null} [groupJid] GroupMention groupJid + * @property {string|null} [groupSubject] GroupMention groupSubject */ /** - * Constructs a new DisappearingMode. + * Constructs a new GroupMention. * @memberof proto - * @classdesc Represents a DisappearingMode. - * @implements IDisappearingMode + * @classdesc Represents a GroupMention. + * @implements IGroupMention * @constructor - * @param {proto.IDisappearingMode=} [properties] Properties to set + * @param {proto.IGroupMention=} [properties] Properties to set */ - function DisappearingMode(properties) { + function GroupMention(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14730,101 +19377,88 @@ $root.proto = (function() { } /** - * DisappearingMode initiator. - * @member {proto.DisappearingMode.Initiator} initiator - * @memberof proto.DisappearingMode - * @instance - */ - DisappearingMode.prototype.initiator = 0; - - /** - * DisappearingMode trigger. - * @member {proto.DisappearingMode.Trigger} trigger - * @memberof proto.DisappearingMode + * GroupMention groupJid. + * @member {string} groupJid + * @memberof proto.GroupMention * @instance */ - DisappearingMode.prototype.trigger = 0; + GroupMention.prototype.groupJid = ""; /** - * DisappearingMode initiatorDeviceJid. - * @member {string} initiatorDeviceJid - * @memberof proto.DisappearingMode + * GroupMention groupSubject. + * @member {string} groupSubject + * @memberof proto.GroupMention * @instance */ - DisappearingMode.prototype.initiatorDeviceJid = ""; + GroupMention.prototype.groupSubject = ""; /** - * Creates a new DisappearingMode instance using the specified properties. + * Creates a new GroupMention instance using the specified properties. * @function create - * @memberof proto.DisappearingMode + * @memberof proto.GroupMention * @static - * @param {proto.IDisappearingMode=} [properties] Properties to set - * @returns {proto.DisappearingMode} DisappearingMode instance + * @param {proto.IGroupMention=} [properties] Properties to set + * @returns {proto.GroupMention} GroupMention instance */ - DisappearingMode.create = function create(properties) { - return new DisappearingMode(properties); + GroupMention.create = function create(properties) { + return new GroupMention(properties); }; /** - * Encodes the specified DisappearingMode message. Does not implicitly {@link proto.DisappearingMode.verify|verify} messages. + * Encodes the specified GroupMention message. Does not implicitly {@link proto.GroupMention.verify|verify} messages. * @function encode - * @memberof proto.DisappearingMode + * @memberof proto.GroupMention * @static - * @param {proto.IDisappearingMode} message DisappearingMode message or plain object to encode + * @param {proto.IGroupMention} message GroupMention message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DisappearingMode.encode = function encode(message, writer) { + GroupMention.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.initiator != null && Object.hasOwnProperty.call(message, "initiator")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.initiator); - if (message.trigger != null && Object.hasOwnProperty.call(message, "trigger")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.trigger); - if (message.initiatorDeviceJid != null && Object.hasOwnProperty.call(message, "initiatorDeviceJid")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.initiatorDeviceJid); + if (message.groupJid != null && Object.hasOwnProperty.call(message, "groupJid")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.groupJid); + if (message.groupSubject != null && Object.hasOwnProperty.call(message, "groupSubject")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.groupSubject); return writer; }; /** - * Encodes the specified DisappearingMode message, length delimited. Does not implicitly {@link proto.DisappearingMode.verify|verify} messages. + * Encodes the specified GroupMention message, length delimited. Does not implicitly {@link proto.GroupMention.verify|verify} messages. * @function encodeDelimited - * @memberof proto.DisappearingMode + * @memberof proto.GroupMention * @static - * @param {proto.IDisappearingMode} message DisappearingMode message or plain object to encode + * @param {proto.IGroupMention} message GroupMention message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DisappearingMode.encodeDelimited = function encodeDelimited(message, writer) { + GroupMention.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DisappearingMode message from the specified reader or buffer. + * Decodes a GroupMention message from the specified reader or buffer. * @function decode - * @memberof proto.DisappearingMode + * @memberof proto.GroupMention * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {proto.DisappearingMode} DisappearingMode + * @returns {proto.GroupMention} GroupMention * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DisappearingMode.decode = function decode(reader, length) { + GroupMention.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.DisappearingMode(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.GroupMention(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.initiator = reader.int32(); + message.groupJid = reader.string(); break; case 2: - message.trigger = reader.int32(); - break; - case 3: - message.initiatorDeviceJid = reader.string(); + message.groupSubject = reader.string(); break; default: reader.skipType(tag & 7); @@ -14835,200 +19469,117 @@ $root.proto = (function() { }; /** - * Decodes a DisappearingMode message from the specified reader or buffer, length delimited. + * Decodes a GroupMention message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof proto.DisappearingMode + * @memberof proto.GroupMention * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.DisappearingMode} DisappearingMode + * @returns {proto.GroupMention} GroupMention * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DisappearingMode.decodeDelimited = function decodeDelimited(reader) { + GroupMention.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DisappearingMode message. + * Verifies a GroupMention message. * @function verify - * @memberof proto.DisappearingMode + * @memberof proto.GroupMention * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DisappearingMode.verify = function verify(message) { + GroupMention.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.initiator != null && message.hasOwnProperty("initiator")) - switch (message.initiator) { - default: - return "initiator: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.trigger != null && message.hasOwnProperty("trigger")) - switch (message.trigger) { - default: - return "trigger: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.initiatorDeviceJid != null && message.hasOwnProperty("initiatorDeviceJid")) - if (!$util.isString(message.initiatorDeviceJid)) - return "initiatorDeviceJid: string expected"; + if (message.groupJid != null && message.hasOwnProperty("groupJid")) + if (!$util.isString(message.groupJid)) + return "groupJid: string expected"; + if (message.groupSubject != null && message.hasOwnProperty("groupSubject")) + if (!$util.isString(message.groupSubject)) + return "groupSubject: string expected"; return null; }; /** - * Creates a DisappearingMode message from a plain object. Also converts values to their respective internal types. + * Creates a GroupMention message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof proto.DisappearingMode + * @memberof proto.GroupMention * @static * @param {Object.} object Plain object - * @returns {proto.DisappearingMode} DisappearingMode + * @returns {proto.GroupMention} GroupMention */ - DisappearingMode.fromObject = function fromObject(object) { - if (object instanceof $root.proto.DisappearingMode) + GroupMention.fromObject = function fromObject(object) { + if (object instanceof $root.proto.GroupMention) return object; - var message = new $root.proto.DisappearingMode(); - switch (object.initiator) { - case "CHANGED_IN_CHAT": - case 0: - message.initiator = 0; - break; - case "INITIATED_BY_ME": - case 1: - message.initiator = 1; - break; - case "INITIATED_BY_OTHER": - case 2: - message.initiator = 2; - break; - } - switch (object.trigger) { - case "UNKNOWN": - case 0: - message.trigger = 0; - break; - case "CHAT_SETTING": - case 1: - message.trigger = 1; - break; - case "ACCOUNT_SETTING": - case 2: - message.trigger = 2; - break; - case "BULK_CHANGE": - case 3: - message.trigger = 3; - break; - } - if (object.initiatorDeviceJid != null) - message.initiatorDeviceJid = String(object.initiatorDeviceJid); + var message = new $root.proto.GroupMention(); + if (object.groupJid != null) + message.groupJid = String(object.groupJid); + if (object.groupSubject != null) + message.groupSubject = String(object.groupSubject); return message; }; /** - * Creates a plain object from a DisappearingMode message. Also converts values to other types if specified. + * Creates a plain object from a GroupMention message. Also converts values to other types if specified. * @function toObject - * @memberof proto.DisappearingMode + * @memberof proto.GroupMention * @static - * @param {proto.DisappearingMode} message DisappearingMode + * @param {proto.GroupMention} message GroupMention * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DisappearingMode.toObject = function toObject(message, options) { + GroupMention.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.initiator = options.enums === String ? "CHANGED_IN_CHAT" : 0; - object.trigger = options.enums === String ? "UNKNOWN" : 0; - object.initiatorDeviceJid = ""; + object.groupJid = ""; + object.groupSubject = ""; } - if (message.initiator != null && message.hasOwnProperty("initiator")) - object.initiator = options.enums === String ? $root.proto.DisappearingMode.Initiator[message.initiator] : message.initiator; - if (message.trigger != null && message.hasOwnProperty("trigger")) - object.trigger = options.enums === String ? $root.proto.DisappearingMode.Trigger[message.trigger] : message.trigger; - if (message.initiatorDeviceJid != null && message.hasOwnProperty("initiatorDeviceJid")) - object.initiatorDeviceJid = message.initiatorDeviceJid; + if (message.groupJid != null && message.hasOwnProperty("groupJid")) + object.groupJid = message.groupJid; + if (message.groupSubject != null && message.hasOwnProperty("groupSubject")) + object.groupSubject = message.groupSubject; return object; }; /** - * Converts this DisappearingMode to JSON. + * Converts this GroupMention to JSON. * @function toJSON - * @memberof proto.DisappearingMode + * @memberof proto.GroupMention * @instance * @returns {Object.} JSON object */ - DisappearingMode.prototype.toJSON = function toJSON() { + GroupMention.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * Initiator enum. - * @name proto.DisappearingMode.Initiator - * @enum {number} - * @property {number} CHANGED_IN_CHAT=0 CHANGED_IN_CHAT value - * @property {number} INITIATED_BY_ME=1 INITIATED_BY_ME value - * @property {number} INITIATED_BY_OTHER=2 INITIATED_BY_OTHER value - */ - DisappearingMode.Initiator = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CHANGED_IN_CHAT"] = 0; - values[valuesById[1] = "INITIATED_BY_ME"] = 1; - values[valuesById[2] = "INITIATED_BY_OTHER"] = 2; - return values; - })(); - - /** - * Trigger enum. - * @name proto.DisappearingMode.Trigger - * @enum {number} - * @property {number} UNKNOWN=0 UNKNOWN value - * @property {number} CHAT_SETTING=1 CHAT_SETTING value - * @property {number} ACCOUNT_SETTING=2 ACCOUNT_SETTING value - * @property {number} BULK_CHANGE=3 BULK_CHANGE value - */ - DisappearingMode.Trigger = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UNKNOWN"] = 0; - values[valuesById[1] = "CHAT_SETTING"] = 1; - values[valuesById[2] = "ACCOUNT_SETTING"] = 2; - values[valuesById[3] = "BULK_CHANGE"] = 3; - return values; - })(); - - return DisappearingMode; + return GroupMention; })(); - proto.EphemeralSetting = (function() { + proto.GroupParticipant = (function() { /** - * Properties of an EphemeralSetting. + * Properties of a GroupParticipant. * @memberof proto - * @interface IEphemeralSetting - * @property {number|null} [duration] EphemeralSetting duration - * @property {number|Long|null} [timestamp] EphemeralSetting timestamp + * @interface IGroupParticipant + * @property {string} userJid GroupParticipant userJid + * @property {proto.GroupParticipant.Rank|null} [rank] GroupParticipant rank */ /** - * Constructs a new EphemeralSetting. + * Constructs a new GroupParticipant. * @memberof proto - * @classdesc Represents an EphemeralSetting. - * @implements IEphemeralSetting + * @classdesc Represents a GroupParticipant. + * @implements IGroupParticipant * @constructor - * @param {proto.IEphemeralSetting=} [properties] Properties to set + * @param {proto.IGroupParticipant=} [properties] Properties to set */ - function EphemeralSetting(properties) { + function GroupParticipant(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15036,223 +19587,244 @@ $root.proto = (function() { } /** - * EphemeralSetting duration. - * @member {number} duration - * @memberof proto.EphemeralSetting + * GroupParticipant userJid. + * @member {string} userJid + * @memberof proto.GroupParticipant * @instance */ - EphemeralSetting.prototype.duration = 0; + GroupParticipant.prototype.userJid = ""; /** - * EphemeralSetting timestamp. - * @member {number|Long} timestamp - * @memberof proto.EphemeralSetting + * GroupParticipant rank. + * @member {proto.GroupParticipant.Rank} rank + * @memberof proto.GroupParticipant * @instance */ - EphemeralSetting.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + GroupParticipant.prototype.rank = 0; /** - * Creates a new EphemeralSetting instance using the specified properties. + * Creates a new GroupParticipant instance using the specified properties. * @function create - * @memberof proto.EphemeralSetting + * @memberof proto.GroupParticipant * @static - * @param {proto.IEphemeralSetting=} [properties] Properties to set - * @returns {proto.EphemeralSetting} EphemeralSetting instance + * @param {proto.IGroupParticipant=} [properties] Properties to set + * @returns {proto.GroupParticipant} GroupParticipant instance */ - EphemeralSetting.create = function create(properties) { - return new EphemeralSetting(properties); + GroupParticipant.create = function create(properties) { + return new GroupParticipant(properties); }; /** - * Encodes the specified EphemeralSetting message. Does not implicitly {@link proto.EphemeralSetting.verify|verify} messages. + * Encodes the specified GroupParticipant message. Does not implicitly {@link proto.GroupParticipant.verify|verify} messages. * @function encode - * @memberof proto.EphemeralSetting + * @memberof proto.GroupParticipant * @static - * @param {proto.IEphemeralSetting} message EphemeralSetting message or plain object to encode + * @param {proto.IGroupParticipant} message GroupParticipant message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EphemeralSetting.encode = function encode(message, writer) { + GroupParticipant.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.duration != null && Object.hasOwnProperty.call(message, "duration")) - writer.uint32(/* id 1, wireType 5 =*/13).sfixed32(message.duration); - if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) - writer.uint32(/* id 2, wireType 1 =*/17).sfixed64(message.timestamp); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.userJid); + if (message.rank != null && Object.hasOwnProperty.call(message, "rank")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.rank); return writer; }; /** - * Encodes the specified EphemeralSetting message, length delimited. Does not implicitly {@link proto.EphemeralSetting.verify|verify} messages. + * Encodes the specified GroupParticipant message, length delimited. Does not implicitly {@link proto.GroupParticipant.verify|verify} messages. * @function encodeDelimited - * @memberof proto.EphemeralSetting + * @memberof proto.GroupParticipant * @static - * @param {proto.IEphemeralSetting} message EphemeralSetting message or plain object to encode + * @param {proto.IGroupParticipant} message GroupParticipant message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EphemeralSetting.encodeDelimited = function encodeDelimited(message, writer) { + GroupParticipant.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EphemeralSetting message from the specified reader or buffer. + * Decodes a GroupParticipant message from the specified reader or buffer. * @function decode - * @memberof proto.EphemeralSetting + * @memberof proto.GroupParticipant * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {proto.EphemeralSetting} EphemeralSetting + * @returns {proto.GroupParticipant} GroupParticipant * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EphemeralSetting.decode = function decode(reader, length) { + GroupParticipant.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.EphemeralSetting(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.GroupParticipant(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.duration = reader.sfixed32(); + message.userJid = reader.string(); break; case 2: - message.timestamp = reader.sfixed64(); + message.rank = reader.int32(); break; default: reader.skipType(tag & 7); break; } } + if (!message.hasOwnProperty("userJid")) + throw $util.ProtocolError("missing required 'userJid'", { instance: message }); return message; }; /** - * Decodes an EphemeralSetting message from the specified reader or buffer, length delimited. + * Decodes a GroupParticipant message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof proto.EphemeralSetting + * @memberof proto.GroupParticipant * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.EphemeralSetting} EphemeralSetting + * @returns {proto.GroupParticipant} GroupParticipant * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EphemeralSetting.decodeDelimited = function decodeDelimited(reader) { + GroupParticipant.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EphemeralSetting message. + * Verifies a GroupParticipant message. * @function verify - * @memberof proto.EphemeralSetting + * @memberof proto.GroupParticipant * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EphemeralSetting.verify = function verify(message) { + GroupParticipant.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.duration != null && message.hasOwnProperty("duration")) - if (!$util.isInteger(message.duration)) - return "duration: integer expected"; - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high))) - return "timestamp: integer|Long expected"; + if (!$util.isString(message.userJid)) + return "userJid: string expected"; + if (message.rank != null && message.hasOwnProperty("rank")) + switch (message.rank) { + default: + return "rank: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; /** - * Creates an EphemeralSetting message from a plain object. Also converts values to their respective internal types. + * Creates a GroupParticipant message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof proto.EphemeralSetting + * @memberof proto.GroupParticipant * @static * @param {Object.} object Plain object - * @returns {proto.EphemeralSetting} EphemeralSetting + * @returns {proto.GroupParticipant} GroupParticipant */ - EphemeralSetting.fromObject = function fromObject(object) { - if (object instanceof $root.proto.EphemeralSetting) + GroupParticipant.fromObject = function fromObject(object) { + if (object instanceof $root.proto.GroupParticipant) return object; - var message = new $root.proto.EphemeralSetting(); - if (object.duration != null) - message.duration = object.duration | 0; - if (object.timestamp != null) - if ($util.Long) - (message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = false; - else if (typeof object.timestamp === "string") - message.timestamp = parseInt(object.timestamp, 10); - else if (typeof object.timestamp === "number") - message.timestamp = object.timestamp; - else if (typeof object.timestamp === "object") - message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber(); + var message = new $root.proto.GroupParticipant(); + if (object.userJid != null) + message.userJid = String(object.userJid); + switch (object.rank) { + case "REGULAR": + case 0: + message.rank = 0; + break; + case "ADMIN": + case 1: + message.rank = 1; + break; + case "SUPERADMIN": + case 2: + message.rank = 2; + break; + } return message; }; /** - * Creates a plain object from an EphemeralSetting message. Also converts values to other types if specified. + * Creates a plain object from a GroupParticipant message. Also converts values to other types if specified. * @function toObject - * @memberof proto.EphemeralSetting + * @memberof proto.GroupParticipant * @static - * @param {proto.EphemeralSetting} message EphemeralSetting + * @param {proto.GroupParticipant} message GroupParticipant * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EphemeralSetting.toObject = function toObject(message, options) { + GroupParticipant.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.duration = 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.timestamp = options.longs === String ? "0" : 0; + object.userJid = ""; + object.rank = options.enums === String ? "REGULAR" : 0; } - if (message.duration != null && message.hasOwnProperty("duration")) - object.duration = message.duration; - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - if (typeof message.timestamp === "number") - object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp; - else - object.timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber() : message.timestamp; + if (message.userJid != null && message.hasOwnProperty("userJid")) + object.userJid = message.userJid; + if (message.rank != null && message.hasOwnProperty("rank")) + object.rank = options.enums === String ? $root.proto.GroupParticipant.Rank[message.rank] : message.rank; return object; }; /** - * Converts this EphemeralSetting to JSON. + * Converts this GroupParticipant to JSON. * @function toJSON - * @memberof proto.EphemeralSetting + * @memberof proto.GroupParticipant * @instance * @returns {Object.} JSON object */ - EphemeralSetting.prototype.toJSON = function toJSON() { + GroupParticipant.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return EphemeralSetting; + /** + * Rank enum. + * @name proto.GroupParticipant.Rank + * @enum {number} + * @property {number} REGULAR=0 REGULAR value + * @property {number} ADMIN=1 ADMIN value + * @property {number} SUPERADMIN=2 SUPERADMIN value + */ + GroupParticipant.Rank = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REGULAR"] = 0; + values[valuesById[1] = "ADMIN"] = 1; + values[valuesById[2] = "SUPERADMIN"] = 2; + return values; + })(); + + return GroupParticipant; })(); - proto.ExitCode = (function() { + proto.HandshakeMessage = (function() { /** - * Properties of an ExitCode. + * Properties of a HandshakeMessage. * @memberof proto - * @interface IExitCode - * @property {number|Long|null} [code] ExitCode code - * @property {string|null} [text] ExitCode text + * @interface IHandshakeMessage + * @property {proto.HandshakeMessage.IClientHello|null} [clientHello] HandshakeMessage clientHello + * @property {proto.HandshakeMessage.IServerHello|null} [serverHello] HandshakeMessage serverHello + * @property {proto.HandshakeMessage.IClientFinish|null} [clientFinish] HandshakeMessage clientFinish */ /** - * Constructs a new ExitCode. + * Constructs a new HandshakeMessage. * @memberof proto - * @classdesc Represents an ExitCode. - * @implements IExitCode + * @classdesc Represents a HandshakeMessage. + * @implements IHandshakeMessage * @constructor - * @param {proto.IExitCode=} [properties] Properties to set + * @param {proto.IHandshakeMessage=} [properties] Properties to set */ - function ExitCode(properties) { + function HandshakeMessage(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15260,88 +19832,101 @@ $root.proto = (function() { } /** - * ExitCode code. - * @member {number|Long} code - * @memberof proto.ExitCode + * HandshakeMessage clientHello. + * @member {proto.HandshakeMessage.IClientHello|null|undefined} clientHello + * @memberof proto.HandshakeMessage * @instance */ - ExitCode.prototype.code = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + HandshakeMessage.prototype.clientHello = null; /** - * ExitCode text. - * @member {string} text - * @memberof proto.ExitCode + * HandshakeMessage serverHello. + * @member {proto.HandshakeMessage.IServerHello|null|undefined} serverHello + * @memberof proto.HandshakeMessage * @instance */ - ExitCode.prototype.text = ""; + HandshakeMessage.prototype.serverHello = null; /** - * Creates a new ExitCode instance using the specified properties. + * HandshakeMessage clientFinish. + * @member {proto.HandshakeMessage.IClientFinish|null|undefined} clientFinish + * @memberof proto.HandshakeMessage + * @instance + */ + HandshakeMessage.prototype.clientFinish = null; + + /** + * Creates a new HandshakeMessage instance using the specified properties. * @function create - * @memberof proto.ExitCode + * @memberof proto.HandshakeMessage * @static - * @param {proto.IExitCode=} [properties] Properties to set - * @returns {proto.ExitCode} ExitCode instance + * @param {proto.IHandshakeMessage=} [properties] Properties to set + * @returns {proto.HandshakeMessage} HandshakeMessage instance */ - ExitCode.create = function create(properties) { - return new ExitCode(properties); + HandshakeMessage.create = function create(properties) { + return new HandshakeMessage(properties); }; /** - * Encodes the specified ExitCode message. Does not implicitly {@link proto.ExitCode.verify|verify} messages. + * Encodes the specified HandshakeMessage message. Does not implicitly {@link proto.HandshakeMessage.verify|verify} messages. * @function encode - * @memberof proto.ExitCode + * @memberof proto.HandshakeMessage * @static - * @param {proto.IExitCode} message ExitCode message or plain object to encode + * @param {proto.IHandshakeMessage} message HandshakeMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExitCode.encode = function encode(message, writer) { + HandshakeMessage.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.code != null && Object.hasOwnProperty.call(message, "code")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.code); - if (message.text != null && Object.hasOwnProperty.call(message, "text")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.text); + if (message.clientHello != null && Object.hasOwnProperty.call(message, "clientHello")) + $root.proto.HandshakeMessage.ClientHello.encode(message.clientHello, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.serverHello != null && Object.hasOwnProperty.call(message, "serverHello")) + $root.proto.HandshakeMessage.ServerHello.encode(message.serverHello, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.clientFinish != null && Object.hasOwnProperty.call(message, "clientFinish")) + $root.proto.HandshakeMessage.ClientFinish.encode(message.clientFinish, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified ExitCode message, length delimited. Does not implicitly {@link proto.ExitCode.verify|verify} messages. + * Encodes the specified HandshakeMessage message, length delimited. Does not implicitly {@link proto.HandshakeMessage.verify|verify} messages. * @function encodeDelimited - * @memberof proto.ExitCode + * @memberof proto.HandshakeMessage * @static - * @param {proto.IExitCode} message ExitCode message or plain object to encode + * @param {proto.IHandshakeMessage} message HandshakeMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExitCode.encodeDelimited = function encodeDelimited(message, writer) { + HandshakeMessage.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExitCode message from the specified reader or buffer. + * Decodes a HandshakeMessage message from the specified reader or buffer. * @function decode - * @memberof proto.ExitCode + * @memberof proto.HandshakeMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {proto.ExitCode} ExitCode + * @returns {proto.HandshakeMessage} HandshakeMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExitCode.decode = function decode(reader, length) { + HandshakeMessage.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.ExitCode(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.HandshakeMessage(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.code = reader.uint64(); - break; case 2: - message.text = reader.string(); + message.clientHello = $root.proto.HandshakeMessage.ClientHello.decode(reader, reader.uint32()); + break; + case 3: + message.serverHello = $root.proto.HandshakeMessage.ServerHello.decode(reader, reader.uint32()); + break; + case 4: + message.clientFinish = $root.proto.HandshakeMessage.ClientFinish.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -15352,486 +19937,905 @@ $root.proto = (function() { }; /** - * Decodes an ExitCode message from the specified reader or buffer, length delimited. + * Decodes a HandshakeMessage message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof proto.ExitCode + * @memberof proto.HandshakeMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.ExitCode} ExitCode + * @returns {proto.HandshakeMessage} HandshakeMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExitCode.decodeDelimited = function decodeDelimited(reader) { + HandshakeMessage.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExitCode message. + * Verifies a HandshakeMessage message. * @function verify - * @memberof proto.ExitCode + * @memberof proto.HandshakeMessage * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExitCode.verify = function verify(message) { + HandshakeMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.code != null && message.hasOwnProperty("code")) - if (!$util.isInteger(message.code) && !(message.code && $util.isInteger(message.code.low) && $util.isInteger(message.code.high))) - return "code: integer|Long expected"; - if (message.text != null && message.hasOwnProperty("text")) - if (!$util.isString(message.text)) - return "text: string expected"; + if (message.clientHello != null && message.hasOwnProperty("clientHello")) { + var error = $root.proto.HandshakeMessage.ClientHello.verify(message.clientHello); + if (error) + return "clientHello." + error; + } + if (message.serverHello != null && message.hasOwnProperty("serverHello")) { + var error = $root.proto.HandshakeMessage.ServerHello.verify(message.serverHello); + if (error) + return "serverHello." + error; + } + if (message.clientFinish != null && message.hasOwnProperty("clientFinish")) { + var error = $root.proto.HandshakeMessage.ClientFinish.verify(message.clientFinish); + if (error) + return "clientFinish." + error; + } return null; }; /** - * Creates an ExitCode message from a plain object. Also converts values to their respective internal types. + * Creates a HandshakeMessage message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof proto.ExitCode + * @memberof proto.HandshakeMessage * @static * @param {Object.} object Plain object - * @returns {proto.ExitCode} ExitCode + * @returns {proto.HandshakeMessage} HandshakeMessage */ - ExitCode.fromObject = function fromObject(object) { - if (object instanceof $root.proto.ExitCode) + HandshakeMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.HandshakeMessage) return object; - var message = new $root.proto.ExitCode(); - if (object.code != null) - if ($util.Long) - (message.code = $util.Long.fromValue(object.code)).unsigned = true; - else if (typeof object.code === "string") - message.code = parseInt(object.code, 10); - else if (typeof object.code === "number") - message.code = object.code; - else if (typeof object.code === "object") - message.code = new $util.LongBits(object.code.low >>> 0, object.code.high >>> 0).toNumber(true); - if (object.text != null) - message.text = String(object.text); + var message = new $root.proto.HandshakeMessage(); + if (object.clientHello != null) { + if (typeof object.clientHello !== "object") + throw TypeError(".proto.HandshakeMessage.clientHello: object expected"); + message.clientHello = $root.proto.HandshakeMessage.ClientHello.fromObject(object.clientHello); + } + if (object.serverHello != null) { + if (typeof object.serverHello !== "object") + throw TypeError(".proto.HandshakeMessage.serverHello: object expected"); + message.serverHello = $root.proto.HandshakeMessage.ServerHello.fromObject(object.serverHello); + } + if (object.clientFinish != null) { + if (typeof object.clientFinish !== "object") + throw TypeError(".proto.HandshakeMessage.clientFinish: object expected"); + message.clientFinish = $root.proto.HandshakeMessage.ClientFinish.fromObject(object.clientFinish); + } return message; }; - /** - * Creates a plain object from an ExitCode message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.ExitCode - * @static - * @param {proto.ExitCode} message ExitCode - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExitCode.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.code = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.code = options.longs === String ? "0" : 0; - object.text = ""; - } - if (message.code != null && message.hasOwnProperty("code")) - if (typeof message.code === "number") - object.code = options.longs === String ? String(message.code) : message.code; - else - object.code = options.longs === String ? $util.Long.prototype.toString.call(message.code) : options.longs === Number ? new $util.LongBits(message.code.low >>> 0, message.code.high >>> 0).toNumber(true) : message.code; - if (message.text != null && message.hasOwnProperty("text")) - object.text = message.text; - return object; - }; + /** + * Creates a plain object from a HandshakeMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.HandshakeMessage + * @static + * @param {proto.HandshakeMessage} message HandshakeMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HandshakeMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.clientHello = null; + object.serverHello = null; + object.clientFinish = null; + } + if (message.clientHello != null && message.hasOwnProperty("clientHello")) + object.clientHello = $root.proto.HandshakeMessage.ClientHello.toObject(message.clientHello, options); + if (message.serverHello != null && message.hasOwnProperty("serverHello")) + object.serverHello = $root.proto.HandshakeMessage.ServerHello.toObject(message.serverHello, options); + if (message.clientFinish != null && message.hasOwnProperty("clientFinish")) + object.clientFinish = $root.proto.HandshakeMessage.ClientFinish.toObject(message.clientFinish, options); + return object; + }; + + /** + * Converts this HandshakeMessage to JSON. + * @function toJSON + * @memberof proto.HandshakeMessage + * @instance + * @returns {Object.} JSON object + */ + HandshakeMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + HandshakeMessage.ClientFinish = (function() { + + /** + * Properties of a ClientFinish. + * @memberof proto.HandshakeMessage + * @interface IClientFinish + * @property {Uint8Array|null} ["static"] ClientFinish static + * @property {Uint8Array|null} [payload] ClientFinish payload + */ + + /** + * Constructs a new ClientFinish. + * @memberof proto.HandshakeMessage + * @classdesc Represents a ClientFinish. + * @implements IClientFinish + * @constructor + * @param {proto.HandshakeMessage.IClientFinish=} [properties] Properties to set + */ + function ClientFinish(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ClientFinish static. + * @member {Uint8Array} static + * @memberof proto.HandshakeMessage.ClientFinish + * @instance + */ + ClientFinish.prototype["static"] = $util.newBuffer([]); + + /** + * ClientFinish payload. + * @member {Uint8Array} payload + * @memberof proto.HandshakeMessage.ClientFinish + * @instance + */ + ClientFinish.prototype.payload = $util.newBuffer([]); + + /** + * Creates a new ClientFinish instance using the specified properties. + * @function create + * @memberof proto.HandshakeMessage.ClientFinish + * @static + * @param {proto.HandshakeMessage.IClientFinish=} [properties] Properties to set + * @returns {proto.HandshakeMessage.ClientFinish} ClientFinish instance + */ + ClientFinish.create = function create(properties) { + return new ClientFinish(properties); + }; + + /** + * Encodes the specified ClientFinish message. Does not implicitly {@link proto.HandshakeMessage.ClientFinish.verify|verify} messages. + * @function encode + * @memberof proto.HandshakeMessage.ClientFinish + * @static + * @param {proto.HandshakeMessage.IClientFinish} message ClientFinish message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientFinish.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message["static"] != null && Object.hasOwnProperty.call(message, "static")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message["static"]); + if (message.payload != null && Object.hasOwnProperty.call(message, "payload")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.payload); + return writer; + }; + + /** + * Encodes the specified ClientFinish message, length delimited. Does not implicitly {@link proto.HandshakeMessage.ClientFinish.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.HandshakeMessage.ClientFinish + * @static + * @param {proto.HandshakeMessage.IClientFinish} message ClientFinish message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientFinish.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ClientFinish message from the specified reader or buffer. + * @function decode + * @memberof proto.HandshakeMessage.ClientFinish + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.HandshakeMessage.ClientFinish} ClientFinish + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientFinish.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.HandshakeMessage.ClientFinish(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message["static"] = reader.bytes(); + break; + case 2: + message.payload = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ClientFinish message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.HandshakeMessage.ClientFinish + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.HandshakeMessage.ClientFinish} ClientFinish + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientFinish.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ClientFinish message. + * @function verify + * @memberof proto.HandshakeMessage.ClientFinish + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ClientFinish.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message["static"] != null && message.hasOwnProperty("static")) + if (!(message["static"] && typeof message["static"].length === "number" || $util.isString(message["static"]))) + return "static: buffer expected"; + if (message.payload != null && message.hasOwnProperty("payload")) + if (!(message.payload && typeof message.payload.length === "number" || $util.isString(message.payload))) + return "payload: buffer expected"; + return null; + }; + + /** + * Creates a ClientFinish message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.HandshakeMessage.ClientFinish + * @static + * @param {Object.} object Plain object + * @returns {proto.HandshakeMessage.ClientFinish} ClientFinish + */ + ClientFinish.fromObject = function fromObject(object) { + if (object instanceof $root.proto.HandshakeMessage.ClientFinish) + return object; + var message = new $root.proto.HandshakeMessage.ClientFinish(); + if (object["static"] != null) + if (typeof object["static"] === "string") + $util.base64.decode(object["static"], message["static"] = $util.newBuffer($util.base64.length(object["static"])), 0); + else if (object["static"].length) + message["static"] = object["static"]; + if (object.payload != null) + if (typeof object.payload === "string") + $util.base64.decode(object.payload, message.payload = $util.newBuffer($util.base64.length(object.payload)), 0); + else if (object.payload.length) + message.payload = object.payload; + return message; + }; + + /** + * Creates a plain object from a ClientFinish message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.HandshakeMessage.ClientFinish + * @static + * @param {proto.HandshakeMessage.ClientFinish} message ClientFinish + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ClientFinish.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object["static"] = ""; + else { + object["static"] = []; + if (options.bytes !== Array) + object["static"] = $util.newBuffer(object["static"]); + } + if (options.bytes === String) + object.payload = ""; + else { + object.payload = []; + if (options.bytes !== Array) + object.payload = $util.newBuffer(object.payload); + } + } + if (message["static"] != null && message.hasOwnProperty("static")) + object["static"] = options.bytes === String ? $util.base64.encode(message["static"], 0, message["static"].length) : options.bytes === Array ? Array.prototype.slice.call(message["static"]) : message["static"]; + if (message.payload != null && message.hasOwnProperty("payload")) + object.payload = options.bytes === String ? $util.base64.encode(message.payload, 0, message.payload.length) : options.bytes === Array ? Array.prototype.slice.call(message.payload) : message.payload; + return object; + }; + + /** + * Converts this ClientFinish to JSON. + * @function toJSON + * @memberof proto.HandshakeMessage.ClientFinish + * @instance + * @returns {Object.} JSON object + */ + ClientFinish.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ClientFinish; + })(); + + HandshakeMessage.ClientHello = (function() { + + /** + * Properties of a ClientHello. + * @memberof proto.HandshakeMessage + * @interface IClientHello + * @property {Uint8Array|null} [ephemeral] ClientHello ephemeral + * @property {Uint8Array|null} ["static"] ClientHello static + * @property {Uint8Array|null} [payload] ClientHello payload + */ + + /** + * Constructs a new ClientHello. + * @memberof proto.HandshakeMessage + * @classdesc Represents a ClientHello. + * @implements IClientHello + * @constructor + * @param {proto.HandshakeMessage.IClientHello=} [properties] Properties to set + */ + function ClientHello(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ClientHello ephemeral. + * @member {Uint8Array} ephemeral + * @memberof proto.HandshakeMessage.ClientHello + * @instance + */ + ClientHello.prototype.ephemeral = $util.newBuffer([]); + + /** + * ClientHello static. + * @member {Uint8Array} static + * @memberof proto.HandshakeMessage.ClientHello + * @instance + */ + ClientHello.prototype["static"] = $util.newBuffer([]); + + /** + * ClientHello payload. + * @member {Uint8Array} payload + * @memberof proto.HandshakeMessage.ClientHello + * @instance + */ + ClientHello.prototype.payload = $util.newBuffer([]); + + /** + * Creates a new ClientHello instance using the specified properties. + * @function create + * @memberof proto.HandshakeMessage.ClientHello + * @static + * @param {proto.HandshakeMessage.IClientHello=} [properties] Properties to set + * @returns {proto.HandshakeMessage.ClientHello} ClientHello instance + */ + ClientHello.create = function create(properties) { + return new ClientHello(properties); + }; + + /** + * Encodes the specified ClientHello message. Does not implicitly {@link proto.HandshakeMessage.ClientHello.verify|verify} messages. + * @function encode + * @memberof proto.HandshakeMessage.ClientHello + * @static + * @param {proto.HandshakeMessage.IClientHello} message ClientHello message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientHello.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ephemeral != null && Object.hasOwnProperty.call(message, "ephemeral")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.ephemeral); + if (message["static"] != null && Object.hasOwnProperty.call(message, "static")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message["static"]); + if (message.payload != null && Object.hasOwnProperty.call(message, "payload")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.payload); + return writer; + }; + + /** + * Encodes the specified ClientHello message, length delimited. Does not implicitly {@link proto.HandshakeMessage.ClientHello.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.HandshakeMessage.ClientHello + * @static + * @param {proto.HandshakeMessage.IClientHello} message ClientHello message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientHello.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Converts this ExitCode to JSON. - * @function toJSON - * @memberof proto.ExitCode - * @instance - * @returns {Object.} JSON object - */ - ExitCode.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Decodes a ClientHello message from the specified reader or buffer. + * @function decode + * @memberof proto.HandshakeMessage.ClientHello + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.HandshakeMessage.ClientHello} ClientHello + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientHello.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.HandshakeMessage.ClientHello(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.ephemeral = reader.bytes(); + break; + case 2: + message["static"] = reader.bytes(); + break; + case 3: + message.payload = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - return ExitCode; - })(); + /** + * Decodes a ClientHello message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.HandshakeMessage.ClientHello + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.HandshakeMessage.ClientHello} ClientHello + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientHello.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - proto.ExternalBlobReference = (function() { + /** + * Verifies a ClientHello message. + * @function verify + * @memberof proto.HandshakeMessage.ClientHello + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ClientHello.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ephemeral != null && message.hasOwnProperty("ephemeral")) + if (!(message.ephemeral && typeof message.ephemeral.length === "number" || $util.isString(message.ephemeral))) + return "ephemeral: buffer expected"; + if (message["static"] != null && message.hasOwnProperty("static")) + if (!(message["static"] && typeof message["static"].length === "number" || $util.isString(message["static"]))) + return "static: buffer expected"; + if (message.payload != null && message.hasOwnProperty("payload")) + if (!(message.payload && typeof message.payload.length === "number" || $util.isString(message.payload))) + return "payload: buffer expected"; + return null; + }; - /** - * Properties of an ExternalBlobReference. - * @memberof proto - * @interface IExternalBlobReference - * @property {Uint8Array|null} [mediaKey] ExternalBlobReference mediaKey - * @property {string|null} [directPath] ExternalBlobReference directPath - * @property {string|null} [handle] ExternalBlobReference handle - * @property {number|Long|null} [fileSizeBytes] ExternalBlobReference fileSizeBytes - * @property {Uint8Array|null} [fileSha256] ExternalBlobReference fileSha256 - * @property {Uint8Array|null} [fileEncSha256] ExternalBlobReference fileEncSha256 - */ + /** + * Creates a ClientHello message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.HandshakeMessage.ClientHello + * @static + * @param {Object.} object Plain object + * @returns {proto.HandshakeMessage.ClientHello} ClientHello + */ + ClientHello.fromObject = function fromObject(object) { + if (object instanceof $root.proto.HandshakeMessage.ClientHello) + return object; + var message = new $root.proto.HandshakeMessage.ClientHello(); + if (object.ephemeral != null) + if (typeof object.ephemeral === "string") + $util.base64.decode(object.ephemeral, message.ephemeral = $util.newBuffer($util.base64.length(object.ephemeral)), 0); + else if (object.ephemeral.length) + message.ephemeral = object.ephemeral; + if (object["static"] != null) + if (typeof object["static"] === "string") + $util.base64.decode(object["static"], message["static"] = $util.newBuffer($util.base64.length(object["static"])), 0); + else if (object["static"].length) + message["static"] = object["static"]; + if (object.payload != null) + if (typeof object.payload === "string") + $util.base64.decode(object.payload, message.payload = $util.newBuffer($util.base64.length(object.payload)), 0); + else if (object.payload.length) + message.payload = object.payload; + return message; + }; - /** - * Constructs a new ExternalBlobReference. - * @memberof proto - * @classdesc Represents an ExternalBlobReference. - * @implements IExternalBlobReference - * @constructor - * @param {proto.IExternalBlobReference=} [properties] Properties to set - */ - function ExternalBlobReference(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Creates a plain object from a ClientHello message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.HandshakeMessage.ClientHello + * @static + * @param {proto.HandshakeMessage.ClientHello} message ClientHello + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ClientHello.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.ephemeral = ""; + else { + object.ephemeral = []; + if (options.bytes !== Array) + object.ephemeral = $util.newBuffer(object.ephemeral); + } + if (options.bytes === String) + object["static"] = ""; + else { + object["static"] = []; + if (options.bytes !== Array) + object["static"] = $util.newBuffer(object["static"]); + } + if (options.bytes === String) + object.payload = ""; + else { + object.payload = []; + if (options.bytes !== Array) + object.payload = $util.newBuffer(object.payload); + } + } + if (message.ephemeral != null && message.hasOwnProperty("ephemeral")) + object.ephemeral = options.bytes === String ? $util.base64.encode(message.ephemeral, 0, message.ephemeral.length) : options.bytes === Array ? Array.prototype.slice.call(message.ephemeral) : message.ephemeral; + if (message["static"] != null && message.hasOwnProperty("static")) + object["static"] = options.bytes === String ? $util.base64.encode(message["static"], 0, message["static"].length) : options.bytes === Array ? Array.prototype.slice.call(message["static"]) : message["static"]; + if (message.payload != null && message.hasOwnProperty("payload")) + object.payload = options.bytes === String ? $util.base64.encode(message.payload, 0, message.payload.length) : options.bytes === Array ? Array.prototype.slice.call(message.payload) : message.payload; + return object; + }; - /** - * ExternalBlobReference mediaKey. - * @member {Uint8Array} mediaKey - * @memberof proto.ExternalBlobReference - * @instance - */ - ExternalBlobReference.prototype.mediaKey = $util.newBuffer([]); + /** + * Converts this ClientHello to JSON. + * @function toJSON + * @memberof proto.HandshakeMessage.ClientHello + * @instance + * @returns {Object.} JSON object + */ + ClientHello.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * ExternalBlobReference directPath. - * @member {string} directPath - * @memberof proto.ExternalBlobReference - * @instance - */ - ExternalBlobReference.prototype.directPath = ""; + return ClientHello; + })(); - /** - * ExternalBlobReference handle. - * @member {string} handle - * @memberof proto.ExternalBlobReference - * @instance - */ - ExternalBlobReference.prototype.handle = ""; + HandshakeMessage.ServerHello = (function() { - /** - * ExternalBlobReference fileSizeBytes. - * @member {number|Long} fileSizeBytes - * @memberof proto.ExternalBlobReference - * @instance - */ - ExternalBlobReference.prototype.fileSizeBytes = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + /** + * Properties of a ServerHello. + * @memberof proto.HandshakeMessage + * @interface IServerHello + * @property {Uint8Array|null} [ephemeral] ServerHello ephemeral + * @property {Uint8Array|null} ["static"] ServerHello static + * @property {Uint8Array|null} [payload] ServerHello payload + */ - /** - * ExternalBlobReference fileSha256. - * @member {Uint8Array} fileSha256 - * @memberof proto.ExternalBlobReference - * @instance - */ - ExternalBlobReference.prototype.fileSha256 = $util.newBuffer([]); + /** + * Constructs a new ServerHello. + * @memberof proto.HandshakeMessage + * @classdesc Represents a ServerHello. + * @implements IServerHello + * @constructor + * @param {proto.HandshakeMessage.IServerHello=} [properties] Properties to set + */ + function ServerHello(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * ExternalBlobReference fileEncSha256. - * @member {Uint8Array} fileEncSha256 - * @memberof proto.ExternalBlobReference - * @instance - */ - ExternalBlobReference.prototype.fileEncSha256 = $util.newBuffer([]); + /** + * ServerHello ephemeral. + * @member {Uint8Array} ephemeral + * @memberof proto.HandshakeMessage.ServerHello + * @instance + */ + ServerHello.prototype.ephemeral = $util.newBuffer([]); - /** - * Creates a new ExternalBlobReference instance using the specified properties. - * @function create - * @memberof proto.ExternalBlobReference - * @static - * @param {proto.IExternalBlobReference=} [properties] Properties to set - * @returns {proto.ExternalBlobReference} ExternalBlobReference instance - */ - ExternalBlobReference.create = function create(properties) { - return new ExternalBlobReference(properties); - }; + /** + * ServerHello static. + * @member {Uint8Array} static + * @memberof proto.HandshakeMessage.ServerHello + * @instance + */ + ServerHello.prototype["static"] = $util.newBuffer([]); - /** - * Encodes the specified ExternalBlobReference message. Does not implicitly {@link proto.ExternalBlobReference.verify|verify} messages. - * @function encode - * @memberof proto.ExternalBlobReference - * @static - * @param {proto.IExternalBlobReference} message ExternalBlobReference message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExternalBlobReference.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.mediaKey != null && Object.hasOwnProperty.call(message, "mediaKey")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.mediaKey); - if (message.directPath != null && Object.hasOwnProperty.call(message, "directPath")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.directPath); - if (message.handle != null && Object.hasOwnProperty.call(message, "handle")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.handle); - if (message.fileSizeBytes != null && Object.hasOwnProperty.call(message, "fileSizeBytes")) - writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.fileSizeBytes); - if (message.fileSha256 != null && Object.hasOwnProperty.call(message, "fileSha256")) - writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.fileSha256); - if (message.fileEncSha256 != null && Object.hasOwnProperty.call(message, "fileEncSha256")) - writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.fileEncSha256); - return writer; - }; + /** + * ServerHello payload. + * @member {Uint8Array} payload + * @memberof proto.HandshakeMessage.ServerHello + * @instance + */ + ServerHello.prototype.payload = $util.newBuffer([]); - /** - * Encodes the specified ExternalBlobReference message, length delimited. Does not implicitly {@link proto.ExternalBlobReference.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.ExternalBlobReference - * @static - * @param {proto.IExternalBlobReference} message ExternalBlobReference message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExternalBlobReference.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a new ServerHello instance using the specified properties. + * @function create + * @memberof proto.HandshakeMessage.ServerHello + * @static + * @param {proto.HandshakeMessage.IServerHello=} [properties] Properties to set + * @returns {proto.HandshakeMessage.ServerHello} ServerHello instance + */ + ServerHello.create = function create(properties) { + return new ServerHello(properties); + }; - /** - * Decodes an ExternalBlobReference message from the specified reader or buffer. - * @function decode - * @memberof proto.ExternalBlobReference - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.ExternalBlobReference} ExternalBlobReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExternalBlobReference.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.ExternalBlobReference(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.mediaKey = reader.bytes(); - break; - case 2: - message.directPath = reader.string(); - break; - case 3: - message.handle = reader.string(); - break; - case 4: - message.fileSizeBytes = reader.uint64(); - break; - case 5: - message.fileSha256 = reader.bytes(); - break; - case 6: - message.fileEncSha256 = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Encodes the specified ServerHello message. Does not implicitly {@link proto.HandshakeMessage.ServerHello.verify|verify} messages. + * @function encode + * @memberof proto.HandshakeMessage.ServerHello + * @static + * @param {proto.HandshakeMessage.IServerHello} message ServerHello message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServerHello.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ephemeral != null && Object.hasOwnProperty.call(message, "ephemeral")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.ephemeral); + if (message["static"] != null && Object.hasOwnProperty.call(message, "static")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message["static"]); + if (message.payload != null && Object.hasOwnProperty.call(message, "payload")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.payload); + return writer; + }; + + /** + * Encodes the specified ServerHello message, length delimited. Does not implicitly {@link proto.HandshakeMessage.ServerHello.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.HandshakeMessage.ServerHello + * @static + * @param {proto.HandshakeMessage.IServerHello} message ServerHello message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServerHello.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServerHello message from the specified reader or buffer. + * @function decode + * @memberof proto.HandshakeMessage.ServerHello + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.HandshakeMessage.ServerHello} ServerHello + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServerHello.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.HandshakeMessage.ServerHello(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.ephemeral = reader.bytes(); + break; + case 2: + message["static"] = reader.bytes(); + break; + case 3: + message.payload = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } } - } - return message; - }; + return message; + }; + + /** + * Decodes a ServerHello message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.HandshakeMessage.ServerHello + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.HandshakeMessage.ServerHello} ServerHello + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServerHello.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Decodes an ExternalBlobReference message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.ExternalBlobReference - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.ExternalBlobReference} ExternalBlobReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExternalBlobReference.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Verifies a ServerHello message. + * @function verify + * @memberof proto.HandshakeMessage.ServerHello + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServerHello.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ephemeral != null && message.hasOwnProperty("ephemeral")) + if (!(message.ephemeral && typeof message.ephemeral.length === "number" || $util.isString(message.ephemeral))) + return "ephemeral: buffer expected"; + if (message["static"] != null && message.hasOwnProperty("static")) + if (!(message["static"] && typeof message["static"].length === "number" || $util.isString(message["static"]))) + return "static: buffer expected"; + if (message.payload != null && message.hasOwnProperty("payload")) + if (!(message.payload && typeof message.payload.length === "number" || $util.isString(message.payload))) + return "payload: buffer expected"; + return null; + }; - /** - * Verifies an ExternalBlobReference message. - * @function verify - * @memberof proto.ExternalBlobReference - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExternalBlobReference.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) - if (!(message.mediaKey && typeof message.mediaKey.length === "number" || $util.isString(message.mediaKey))) - return "mediaKey: buffer expected"; - if (message.directPath != null && message.hasOwnProperty("directPath")) - if (!$util.isString(message.directPath)) - return "directPath: string expected"; - if (message.handle != null && message.hasOwnProperty("handle")) - if (!$util.isString(message.handle)) - return "handle: string expected"; - if (message.fileSizeBytes != null && message.hasOwnProperty("fileSizeBytes")) - if (!$util.isInteger(message.fileSizeBytes) && !(message.fileSizeBytes && $util.isInteger(message.fileSizeBytes.low) && $util.isInteger(message.fileSizeBytes.high))) - return "fileSizeBytes: integer|Long expected"; - if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) - if (!(message.fileSha256 && typeof message.fileSha256.length === "number" || $util.isString(message.fileSha256))) - return "fileSha256: buffer expected"; - if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) - if (!(message.fileEncSha256 && typeof message.fileEncSha256.length === "number" || $util.isString(message.fileEncSha256))) - return "fileEncSha256: buffer expected"; - return null; - }; + /** + * Creates a ServerHello message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.HandshakeMessage.ServerHello + * @static + * @param {Object.} object Plain object + * @returns {proto.HandshakeMessage.ServerHello} ServerHello + */ + ServerHello.fromObject = function fromObject(object) { + if (object instanceof $root.proto.HandshakeMessage.ServerHello) + return object; + var message = new $root.proto.HandshakeMessage.ServerHello(); + if (object.ephemeral != null) + if (typeof object.ephemeral === "string") + $util.base64.decode(object.ephemeral, message.ephemeral = $util.newBuffer($util.base64.length(object.ephemeral)), 0); + else if (object.ephemeral.length) + message.ephemeral = object.ephemeral; + if (object["static"] != null) + if (typeof object["static"] === "string") + $util.base64.decode(object["static"], message["static"] = $util.newBuffer($util.base64.length(object["static"])), 0); + else if (object["static"].length) + message["static"] = object["static"]; + if (object.payload != null) + if (typeof object.payload === "string") + $util.base64.decode(object.payload, message.payload = $util.newBuffer($util.base64.length(object.payload)), 0); + else if (object.payload.length) + message.payload = object.payload; + return message; + }; - /** - * Creates an ExternalBlobReference message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.ExternalBlobReference - * @static - * @param {Object.} object Plain object - * @returns {proto.ExternalBlobReference} ExternalBlobReference - */ - ExternalBlobReference.fromObject = function fromObject(object) { - if (object instanceof $root.proto.ExternalBlobReference) + /** + * Creates a plain object from a ServerHello message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.HandshakeMessage.ServerHello + * @static + * @param {proto.HandshakeMessage.ServerHello} message ServerHello + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServerHello.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.ephemeral = ""; + else { + object.ephemeral = []; + if (options.bytes !== Array) + object.ephemeral = $util.newBuffer(object.ephemeral); + } + if (options.bytes === String) + object["static"] = ""; + else { + object["static"] = []; + if (options.bytes !== Array) + object["static"] = $util.newBuffer(object["static"]); + } + if (options.bytes === String) + object.payload = ""; + else { + object.payload = []; + if (options.bytes !== Array) + object.payload = $util.newBuffer(object.payload); + } + } + if (message.ephemeral != null && message.hasOwnProperty("ephemeral")) + object.ephemeral = options.bytes === String ? $util.base64.encode(message.ephemeral, 0, message.ephemeral.length) : options.bytes === Array ? Array.prototype.slice.call(message.ephemeral) : message.ephemeral; + if (message["static"] != null && message.hasOwnProperty("static")) + object["static"] = options.bytes === String ? $util.base64.encode(message["static"], 0, message["static"].length) : options.bytes === Array ? Array.prototype.slice.call(message["static"]) : message["static"]; + if (message.payload != null && message.hasOwnProperty("payload")) + object.payload = options.bytes === String ? $util.base64.encode(message.payload, 0, message.payload.length) : options.bytes === Array ? Array.prototype.slice.call(message.payload) : message.payload; return object; - var message = new $root.proto.ExternalBlobReference(); - if (object.mediaKey != null) - if (typeof object.mediaKey === "string") - $util.base64.decode(object.mediaKey, message.mediaKey = $util.newBuffer($util.base64.length(object.mediaKey)), 0); - else if (object.mediaKey.length) - message.mediaKey = object.mediaKey; - if (object.directPath != null) - message.directPath = String(object.directPath); - if (object.handle != null) - message.handle = String(object.handle); - if (object.fileSizeBytes != null) - if ($util.Long) - (message.fileSizeBytes = $util.Long.fromValue(object.fileSizeBytes)).unsigned = true; - else if (typeof object.fileSizeBytes === "string") - message.fileSizeBytes = parseInt(object.fileSizeBytes, 10); - else if (typeof object.fileSizeBytes === "number") - message.fileSizeBytes = object.fileSizeBytes; - else if (typeof object.fileSizeBytes === "object") - message.fileSizeBytes = new $util.LongBits(object.fileSizeBytes.low >>> 0, object.fileSizeBytes.high >>> 0).toNumber(true); - if (object.fileSha256 != null) - if (typeof object.fileSha256 === "string") - $util.base64.decode(object.fileSha256, message.fileSha256 = $util.newBuffer($util.base64.length(object.fileSha256)), 0); - else if (object.fileSha256.length) - message.fileSha256 = object.fileSha256; - if (object.fileEncSha256 != null) - if (typeof object.fileEncSha256 === "string") - $util.base64.decode(object.fileEncSha256, message.fileEncSha256 = $util.newBuffer($util.base64.length(object.fileEncSha256)), 0); - else if (object.fileEncSha256.length) - message.fileEncSha256 = object.fileEncSha256; - return message; - }; + }; - /** - * Creates a plain object from an ExternalBlobReference message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.ExternalBlobReference - * @static - * @param {proto.ExternalBlobReference} message ExternalBlobReference - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExternalBlobReference.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.mediaKey = ""; - else { - object.mediaKey = []; - if (options.bytes !== Array) - object.mediaKey = $util.newBuffer(object.mediaKey); - } - object.directPath = ""; - object.handle = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.fileSizeBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.fileSizeBytes = options.longs === String ? "0" : 0; - if (options.bytes === String) - object.fileSha256 = ""; - else { - object.fileSha256 = []; - if (options.bytes !== Array) - object.fileSha256 = $util.newBuffer(object.fileSha256); - } - if (options.bytes === String) - object.fileEncSha256 = ""; - else { - object.fileEncSha256 = []; - if (options.bytes !== Array) - object.fileEncSha256 = $util.newBuffer(object.fileEncSha256); - } - } - if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) - object.mediaKey = options.bytes === String ? $util.base64.encode(message.mediaKey, 0, message.mediaKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.mediaKey) : message.mediaKey; - if (message.directPath != null && message.hasOwnProperty("directPath")) - object.directPath = message.directPath; - if (message.handle != null && message.hasOwnProperty("handle")) - object.handle = message.handle; - if (message.fileSizeBytes != null && message.hasOwnProperty("fileSizeBytes")) - if (typeof message.fileSizeBytes === "number") - object.fileSizeBytes = options.longs === String ? String(message.fileSizeBytes) : message.fileSizeBytes; - else - object.fileSizeBytes = options.longs === String ? $util.Long.prototype.toString.call(message.fileSizeBytes) : options.longs === Number ? new $util.LongBits(message.fileSizeBytes.low >>> 0, message.fileSizeBytes.high >>> 0).toNumber(true) : message.fileSizeBytes; - if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) - object.fileSha256 = options.bytes === String ? $util.base64.encode(message.fileSha256, 0, message.fileSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.fileSha256) : message.fileSha256; - if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) - object.fileEncSha256 = options.bytes === String ? $util.base64.encode(message.fileEncSha256, 0, message.fileEncSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.fileEncSha256) : message.fileEncSha256; - return object; - }; + /** + * Converts this ServerHello to JSON. + * @function toJSON + * @memberof proto.HandshakeMessage.ServerHello + * @instance + * @returns {Object.} JSON object + */ + ServerHello.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this ExternalBlobReference to JSON. - * @function toJSON - * @memberof proto.ExternalBlobReference - * @instance - * @returns {Object.} JSON object - */ - ExternalBlobReference.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return ServerHello; + })(); - return ExternalBlobReference; + return HandshakeMessage; })(); - proto.GlobalSettings = (function() { + proto.HistorySync = (function() { /** - * Properties of a GlobalSettings. + * Properties of a HistorySync. * @memberof proto - * @interface IGlobalSettings - * @property {proto.IWallpaperSettings|null} [lightThemeWallpaper] GlobalSettings lightThemeWallpaper - * @property {proto.MediaVisibility|null} [mediaVisibility] GlobalSettings mediaVisibility - * @property {proto.IWallpaperSettings|null} [darkThemeWallpaper] GlobalSettings darkThemeWallpaper - * @property {proto.IAutoDownloadSettings|null} [autoDownloadWiFi] GlobalSettings autoDownloadWiFi - * @property {proto.IAutoDownloadSettings|null} [autoDownloadCellular] GlobalSettings autoDownloadCellular - * @property {proto.IAutoDownloadSettings|null} [autoDownloadRoaming] GlobalSettings autoDownloadRoaming - * @property {boolean|null} [showIndividualNotificationsPreview] GlobalSettings showIndividualNotificationsPreview - * @property {boolean|null} [showGroupNotificationsPreview] GlobalSettings showGroupNotificationsPreview - * @property {number|null} [disappearingModeDuration] GlobalSettings disappearingModeDuration - * @property {number|Long|null} [disappearingModeTimestamp] GlobalSettings disappearingModeTimestamp - * @property {proto.IAvatarUserSettings|null} [avatarUserSettings] GlobalSettings avatarUserSettings - * @property {number|null} [fontSize] GlobalSettings fontSize - * @property {boolean|null} [securityNotifications] GlobalSettings securityNotifications - * @property {boolean|null} [autoUnarchiveChats] GlobalSettings autoUnarchiveChats - * @property {number|null} [videoQualityMode] GlobalSettings videoQualityMode - * @property {number|null} [photoQualityMode] GlobalSettings photoQualityMode - * @property {proto.INotificationSettings|null} [individualNotificationSettings] GlobalSettings individualNotificationSettings - * @property {proto.INotificationSettings|null} [groupNotificationSettings] GlobalSettings groupNotificationSettings + * @interface IHistorySync + * @property {proto.HistorySync.HistorySyncType} syncType HistorySync syncType + * @property {Array.|null} [conversations] HistorySync conversations + * @property {Array.|null} [statusV3Messages] HistorySync statusV3Messages + * @property {number|null} [chunkOrder] HistorySync chunkOrder + * @property {number|null} [progress] HistorySync progress + * @property {Array.|null} [pushnames] HistorySync pushnames + * @property {proto.IGlobalSettings|null} [globalSettings] HistorySync globalSettings + * @property {Uint8Array|null} [threadIdUserSecret] HistorySync threadIdUserSecret + * @property {number|null} [threadDsTimeframeOffset] HistorySync threadDsTimeframeOffset + * @property {Array.|null} [recentStickers] HistorySync recentStickers + * @property {Array.|null} [pastParticipants] HistorySync pastParticipants + * @property {Array.|null} [callLogRecords] HistorySync callLogRecords + * @property {proto.HistorySync.BotAIWaitListState|null} [aiWaitListState] HistorySync aiWaitListState + * @property {Array.|null} [phoneNumberToLidMappings] HistorySync phoneNumberToLidMappings */ /** - * Constructs a new GlobalSettings. + * Constructs a new HistorySync. * @memberof proto - * @classdesc Represents a GlobalSettings. - * @implements IGlobalSettings + * @classdesc Represents a HistorySync. + * @implements IHistorySync * @constructor - * @param {proto.IGlobalSettings=} [properties] Properties to set + * @param {proto.IHistorySync=} [properties] Properties to set */ - function GlobalSettings(properties) { + function HistorySync(properties) { + this.conversations = []; + this.statusV3Messages = []; + this.pushnames = []; + this.recentStickers = []; + this.pastParticipants = []; + this.callLogRecords = []; + this.phoneNumberToLidMappings = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15839,827 +20843,706 @@ $root.proto = (function() { } /** - * GlobalSettings lightThemeWallpaper. - * @member {proto.IWallpaperSettings|null|undefined} lightThemeWallpaper - * @memberof proto.GlobalSettings - * @instance - */ - GlobalSettings.prototype.lightThemeWallpaper = null; - - /** - * GlobalSettings mediaVisibility. - * @member {proto.MediaVisibility} mediaVisibility - * @memberof proto.GlobalSettings - * @instance - */ - GlobalSettings.prototype.mediaVisibility = 0; - - /** - * GlobalSettings darkThemeWallpaper. - * @member {proto.IWallpaperSettings|null|undefined} darkThemeWallpaper - * @memberof proto.GlobalSettings - * @instance - */ - GlobalSettings.prototype.darkThemeWallpaper = null; - - /** - * GlobalSettings autoDownloadWiFi. - * @member {proto.IAutoDownloadSettings|null|undefined} autoDownloadWiFi - * @memberof proto.GlobalSettings - * @instance - */ - GlobalSettings.prototype.autoDownloadWiFi = null; - - /** - * GlobalSettings autoDownloadCellular. - * @member {proto.IAutoDownloadSettings|null|undefined} autoDownloadCellular - * @memberof proto.GlobalSettings + * HistorySync syncType. + * @member {proto.HistorySync.HistorySyncType} syncType + * @memberof proto.HistorySync * @instance */ - GlobalSettings.prototype.autoDownloadCellular = null; + HistorySync.prototype.syncType = 0; /** - * GlobalSettings autoDownloadRoaming. - * @member {proto.IAutoDownloadSettings|null|undefined} autoDownloadRoaming - * @memberof proto.GlobalSettings + * HistorySync conversations. + * @member {Array.} conversations + * @memberof proto.HistorySync * @instance */ - GlobalSettings.prototype.autoDownloadRoaming = null; + HistorySync.prototype.conversations = $util.emptyArray; /** - * GlobalSettings showIndividualNotificationsPreview. - * @member {boolean} showIndividualNotificationsPreview - * @memberof proto.GlobalSettings + * HistorySync statusV3Messages. + * @member {Array.} statusV3Messages + * @memberof proto.HistorySync * @instance */ - GlobalSettings.prototype.showIndividualNotificationsPreview = false; + HistorySync.prototype.statusV3Messages = $util.emptyArray; /** - * GlobalSettings showGroupNotificationsPreview. - * @member {boolean} showGroupNotificationsPreview - * @memberof proto.GlobalSettings + * HistorySync chunkOrder. + * @member {number} chunkOrder + * @memberof proto.HistorySync * @instance */ - GlobalSettings.prototype.showGroupNotificationsPreview = false; + HistorySync.prototype.chunkOrder = 0; /** - * GlobalSettings disappearingModeDuration. - * @member {number} disappearingModeDuration - * @memberof proto.GlobalSettings + * HistorySync progress. + * @member {number} progress + * @memberof proto.HistorySync * @instance */ - GlobalSettings.prototype.disappearingModeDuration = 0; + HistorySync.prototype.progress = 0; /** - * GlobalSettings disappearingModeTimestamp. - * @member {number|Long} disappearingModeTimestamp - * @memberof proto.GlobalSettings + * HistorySync pushnames. + * @member {Array.} pushnames + * @memberof proto.HistorySync * @instance */ - GlobalSettings.prototype.disappearingModeTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + HistorySync.prototype.pushnames = $util.emptyArray; /** - * GlobalSettings avatarUserSettings. - * @member {proto.IAvatarUserSettings|null|undefined} avatarUserSettings - * @memberof proto.GlobalSettings + * HistorySync globalSettings. + * @member {proto.IGlobalSettings|null|undefined} globalSettings + * @memberof proto.HistorySync * @instance */ - GlobalSettings.prototype.avatarUserSettings = null; + HistorySync.prototype.globalSettings = null; /** - * GlobalSettings fontSize. - * @member {number} fontSize - * @memberof proto.GlobalSettings + * HistorySync threadIdUserSecret. + * @member {Uint8Array} threadIdUserSecret + * @memberof proto.HistorySync * @instance */ - GlobalSettings.prototype.fontSize = 0; + HistorySync.prototype.threadIdUserSecret = $util.newBuffer([]); /** - * GlobalSettings securityNotifications. - * @member {boolean} securityNotifications - * @memberof proto.GlobalSettings + * HistorySync threadDsTimeframeOffset. + * @member {number} threadDsTimeframeOffset + * @memberof proto.HistorySync * @instance */ - GlobalSettings.prototype.securityNotifications = false; + HistorySync.prototype.threadDsTimeframeOffset = 0; /** - * GlobalSettings autoUnarchiveChats. - * @member {boolean} autoUnarchiveChats - * @memberof proto.GlobalSettings + * HistorySync recentStickers. + * @member {Array.} recentStickers + * @memberof proto.HistorySync * @instance */ - GlobalSettings.prototype.autoUnarchiveChats = false; + HistorySync.prototype.recentStickers = $util.emptyArray; /** - * GlobalSettings videoQualityMode. - * @member {number} videoQualityMode - * @memberof proto.GlobalSettings + * HistorySync pastParticipants. + * @member {Array.} pastParticipants + * @memberof proto.HistorySync * @instance */ - GlobalSettings.prototype.videoQualityMode = 0; + HistorySync.prototype.pastParticipants = $util.emptyArray; /** - * GlobalSettings photoQualityMode. - * @member {number} photoQualityMode - * @memberof proto.GlobalSettings + * HistorySync callLogRecords. + * @member {Array.} callLogRecords + * @memberof proto.HistorySync * @instance */ - GlobalSettings.prototype.photoQualityMode = 0; + HistorySync.prototype.callLogRecords = $util.emptyArray; /** - * GlobalSettings individualNotificationSettings. - * @member {proto.INotificationSettings|null|undefined} individualNotificationSettings - * @memberof proto.GlobalSettings + * HistorySync aiWaitListState. + * @member {proto.HistorySync.BotAIWaitListState} aiWaitListState + * @memberof proto.HistorySync * @instance */ - GlobalSettings.prototype.individualNotificationSettings = null; + HistorySync.prototype.aiWaitListState = 0; /** - * GlobalSettings groupNotificationSettings. - * @member {proto.INotificationSettings|null|undefined} groupNotificationSettings - * @memberof proto.GlobalSettings + * HistorySync phoneNumberToLidMappings. + * @member {Array.} phoneNumberToLidMappings + * @memberof proto.HistorySync * @instance */ - GlobalSettings.prototype.groupNotificationSettings = null; + HistorySync.prototype.phoneNumberToLidMappings = $util.emptyArray; /** - * Creates a new GlobalSettings instance using the specified properties. + * Creates a new HistorySync instance using the specified properties. * @function create - * @memberof proto.GlobalSettings + * @memberof proto.HistorySync * @static - * @param {proto.IGlobalSettings=} [properties] Properties to set - * @returns {proto.GlobalSettings} GlobalSettings instance + * @param {proto.IHistorySync=} [properties] Properties to set + * @returns {proto.HistorySync} HistorySync instance */ - GlobalSettings.create = function create(properties) { - return new GlobalSettings(properties); + HistorySync.create = function create(properties) { + return new HistorySync(properties); }; /** - * Encodes the specified GlobalSettings message. Does not implicitly {@link proto.GlobalSettings.verify|verify} messages. + * Encodes the specified HistorySync message. Does not implicitly {@link proto.HistorySync.verify|verify} messages. * @function encode - * @memberof proto.GlobalSettings + * @memberof proto.HistorySync * @static - * @param {proto.IGlobalSettings} message GlobalSettings message or plain object to encode + * @param {proto.IHistorySync} message HistorySync message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GlobalSettings.encode = function encode(message, writer) { + HistorySync.encode = function encode(message, writer) { if (!writer) - writer = $Writer.create(); - if (message.lightThemeWallpaper != null && Object.hasOwnProperty.call(message, "lightThemeWallpaper")) - $root.proto.WallpaperSettings.encode(message.lightThemeWallpaper, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.mediaVisibility != null && Object.hasOwnProperty.call(message, "mediaVisibility")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.mediaVisibility); - if (message.darkThemeWallpaper != null && Object.hasOwnProperty.call(message, "darkThemeWallpaper")) - $root.proto.WallpaperSettings.encode(message.darkThemeWallpaper, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.autoDownloadWiFi != null && Object.hasOwnProperty.call(message, "autoDownloadWiFi")) - $root.proto.AutoDownloadSettings.encode(message.autoDownloadWiFi, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.autoDownloadCellular != null && Object.hasOwnProperty.call(message, "autoDownloadCellular")) - $root.proto.AutoDownloadSettings.encode(message.autoDownloadCellular, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.autoDownloadRoaming != null && Object.hasOwnProperty.call(message, "autoDownloadRoaming")) - $root.proto.AutoDownloadSettings.encode(message.autoDownloadRoaming, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.showIndividualNotificationsPreview != null && Object.hasOwnProperty.call(message, "showIndividualNotificationsPreview")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.showIndividualNotificationsPreview); - if (message.showGroupNotificationsPreview != null && Object.hasOwnProperty.call(message, "showGroupNotificationsPreview")) - writer.uint32(/* id 8, wireType 0 =*/64).bool(message.showGroupNotificationsPreview); - if (message.disappearingModeDuration != null && Object.hasOwnProperty.call(message, "disappearingModeDuration")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.disappearingModeDuration); - if (message.disappearingModeTimestamp != null && Object.hasOwnProperty.call(message, "disappearingModeTimestamp")) - writer.uint32(/* id 10, wireType 0 =*/80).int64(message.disappearingModeTimestamp); - if (message.avatarUserSettings != null && Object.hasOwnProperty.call(message, "avatarUserSettings")) - $root.proto.AvatarUserSettings.encode(message.avatarUserSettings, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.fontSize != null && Object.hasOwnProperty.call(message, "fontSize")) - writer.uint32(/* id 12, wireType 0 =*/96).int32(message.fontSize); - if (message.securityNotifications != null && Object.hasOwnProperty.call(message, "securityNotifications")) - writer.uint32(/* id 13, wireType 0 =*/104).bool(message.securityNotifications); - if (message.autoUnarchiveChats != null && Object.hasOwnProperty.call(message, "autoUnarchiveChats")) - writer.uint32(/* id 14, wireType 0 =*/112).bool(message.autoUnarchiveChats); - if (message.videoQualityMode != null && Object.hasOwnProperty.call(message, "videoQualityMode")) - writer.uint32(/* id 15, wireType 0 =*/120).int32(message.videoQualityMode); - if (message.photoQualityMode != null && Object.hasOwnProperty.call(message, "photoQualityMode")) - writer.uint32(/* id 16, wireType 0 =*/128).int32(message.photoQualityMode); - if (message.individualNotificationSettings != null && Object.hasOwnProperty.call(message, "individualNotificationSettings")) - $root.proto.NotificationSettings.encode(message.individualNotificationSettings, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); - if (message.groupNotificationSettings != null && Object.hasOwnProperty.call(message, "groupNotificationSettings")) - $root.proto.NotificationSettings.encode(message.groupNotificationSettings, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.syncType); + if (message.conversations != null && message.conversations.length) + for (var i = 0; i < message.conversations.length; ++i) + $root.proto.Conversation.encode(message.conversations[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.statusV3Messages != null && message.statusV3Messages.length) + for (var i = 0; i < message.statusV3Messages.length; ++i) + $root.proto.WebMessageInfo.encode(message.statusV3Messages[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.chunkOrder != null && Object.hasOwnProperty.call(message, "chunkOrder")) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.chunkOrder); + if (message.progress != null && Object.hasOwnProperty.call(message, "progress")) + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.progress); + if (message.pushnames != null && message.pushnames.length) + for (var i = 0; i < message.pushnames.length; ++i) + $root.proto.Pushname.encode(message.pushnames[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.globalSettings != null && Object.hasOwnProperty.call(message, "globalSettings")) + $root.proto.GlobalSettings.encode(message.globalSettings, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.threadIdUserSecret != null && Object.hasOwnProperty.call(message, "threadIdUserSecret")) + writer.uint32(/* id 9, wireType 2 =*/74).bytes(message.threadIdUserSecret); + if (message.threadDsTimeframeOffset != null && Object.hasOwnProperty.call(message, "threadDsTimeframeOffset")) + writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.threadDsTimeframeOffset); + if (message.recentStickers != null && message.recentStickers.length) + for (var i = 0; i < message.recentStickers.length; ++i) + $root.proto.StickerMetadata.encode(message.recentStickers[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.pastParticipants != null && message.pastParticipants.length) + for (var i = 0; i < message.pastParticipants.length; ++i) + $root.proto.PastParticipants.encode(message.pastParticipants[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.callLogRecords != null && message.callLogRecords.length) + for (var i = 0; i < message.callLogRecords.length; ++i) + $root.proto.CallLogRecord.encode(message.callLogRecords[i], writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.aiWaitListState != null && Object.hasOwnProperty.call(message, "aiWaitListState")) + writer.uint32(/* id 14, wireType 0 =*/112).int32(message.aiWaitListState); + if (message.phoneNumberToLidMappings != null && message.phoneNumberToLidMappings.length) + for (var i = 0; i < message.phoneNumberToLidMappings.length; ++i) + $root.proto.PhoneNumberToLIDMapping.encode(message.phoneNumberToLidMappings[i], writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); return writer; }; /** - * Encodes the specified GlobalSettings message, length delimited. Does not implicitly {@link proto.GlobalSettings.verify|verify} messages. + * Encodes the specified HistorySync message, length delimited. Does not implicitly {@link proto.HistorySync.verify|verify} messages. * @function encodeDelimited - * @memberof proto.GlobalSettings + * @memberof proto.HistorySync * @static - * @param {proto.IGlobalSettings} message GlobalSettings message or plain object to encode + * @param {proto.IHistorySync} message HistorySync message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GlobalSettings.encodeDelimited = function encodeDelimited(message, writer) { + HistorySync.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GlobalSettings message from the specified reader or buffer. + * Decodes a HistorySync message from the specified reader or buffer. * @function decode - * @memberof proto.GlobalSettings + * @memberof proto.HistorySync * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {proto.GlobalSettings} GlobalSettings + * @returns {proto.HistorySync} HistorySync * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GlobalSettings.decode = function decode(reader, length) { + HistorySync.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.GlobalSettings(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.HistorySync(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.lightThemeWallpaper = $root.proto.WallpaperSettings.decode(reader, reader.uint32()); + message.syncType = reader.int32(); break; case 2: - message.mediaVisibility = reader.int32(); + if (!(message.conversations && message.conversations.length)) + message.conversations = []; + message.conversations.push($root.proto.Conversation.decode(reader, reader.uint32())); break; case 3: - message.darkThemeWallpaper = $root.proto.WallpaperSettings.decode(reader, reader.uint32()); - break; - case 4: - message.autoDownloadWiFi = $root.proto.AutoDownloadSettings.decode(reader, reader.uint32()); + if (!(message.statusV3Messages && message.statusV3Messages.length)) + message.statusV3Messages = []; + message.statusV3Messages.push($root.proto.WebMessageInfo.decode(reader, reader.uint32())); break; case 5: - message.autoDownloadCellular = $root.proto.AutoDownloadSettings.decode(reader, reader.uint32()); + message.chunkOrder = reader.uint32(); break; case 6: - message.autoDownloadRoaming = $root.proto.AutoDownloadSettings.decode(reader, reader.uint32()); + message.progress = reader.uint32(); break; case 7: - message.showIndividualNotificationsPreview = reader.bool(); + if (!(message.pushnames && message.pushnames.length)) + message.pushnames = []; + message.pushnames.push($root.proto.Pushname.decode(reader, reader.uint32())); break; case 8: - message.showGroupNotificationsPreview = reader.bool(); + message.globalSettings = $root.proto.GlobalSettings.decode(reader, reader.uint32()); break; case 9: - message.disappearingModeDuration = reader.int32(); + message.threadIdUserSecret = reader.bytes(); break; case 10: - message.disappearingModeTimestamp = reader.int64(); + message.threadDsTimeframeOffset = reader.uint32(); break; case 11: - message.avatarUserSettings = $root.proto.AvatarUserSettings.decode(reader, reader.uint32()); + if (!(message.recentStickers && message.recentStickers.length)) + message.recentStickers = []; + message.recentStickers.push($root.proto.StickerMetadata.decode(reader, reader.uint32())); break; case 12: - message.fontSize = reader.int32(); + if (!(message.pastParticipants && message.pastParticipants.length)) + message.pastParticipants = []; + message.pastParticipants.push($root.proto.PastParticipants.decode(reader, reader.uint32())); break; case 13: - message.securityNotifications = reader.bool(); + if (!(message.callLogRecords && message.callLogRecords.length)) + message.callLogRecords = []; + message.callLogRecords.push($root.proto.CallLogRecord.decode(reader, reader.uint32())); break; case 14: - message.autoUnarchiveChats = reader.bool(); + message.aiWaitListState = reader.int32(); break; case 15: - message.videoQualityMode = reader.int32(); - break; - case 16: - message.photoQualityMode = reader.int32(); - break; - case 17: - message.individualNotificationSettings = $root.proto.NotificationSettings.decode(reader, reader.uint32()); - break; - case 18: - message.groupNotificationSettings = $root.proto.NotificationSettings.decode(reader, reader.uint32()); + if (!(message.phoneNumberToLidMappings && message.phoneNumberToLidMappings.length)) + message.phoneNumberToLidMappings = []; + message.phoneNumberToLidMappings.push($root.proto.PhoneNumberToLIDMapping.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); break; } } + if (!message.hasOwnProperty("syncType")) + throw $util.ProtocolError("missing required 'syncType'", { instance: message }); return message; }; /** - * Decodes a GlobalSettings message from the specified reader or buffer, length delimited. + * Decodes a HistorySync message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof proto.GlobalSettings + * @memberof proto.HistorySync * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.GlobalSettings} GlobalSettings + * @returns {proto.HistorySync} HistorySync * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GlobalSettings.decodeDelimited = function decodeDelimited(reader) { + HistorySync.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GlobalSettings message. + * Verifies a HistorySync message. * @function verify - * @memberof proto.GlobalSettings + * @memberof proto.HistorySync * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GlobalSettings.verify = function verify(message) { + HistorySync.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.lightThemeWallpaper != null && message.hasOwnProperty("lightThemeWallpaper")) { - var error = $root.proto.WallpaperSettings.verify(message.lightThemeWallpaper); - if (error) - return "lightThemeWallpaper." + error; - } - if (message.mediaVisibility != null && message.hasOwnProperty("mediaVisibility")) - switch (message.mediaVisibility) { - default: - return "mediaVisibility: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.darkThemeWallpaper != null && message.hasOwnProperty("darkThemeWallpaper")) { - var error = $root.proto.WallpaperSettings.verify(message.darkThemeWallpaper); - if (error) - return "darkThemeWallpaper." + error; - } - if (message.autoDownloadWiFi != null && message.hasOwnProperty("autoDownloadWiFi")) { - var error = $root.proto.AutoDownloadSettings.verify(message.autoDownloadWiFi); - if (error) - return "autoDownloadWiFi." + error; - } - if (message.autoDownloadCellular != null && message.hasOwnProperty("autoDownloadCellular")) { - var error = $root.proto.AutoDownloadSettings.verify(message.autoDownloadCellular); - if (error) - return "autoDownloadCellular." + error; - } - if (message.autoDownloadRoaming != null && message.hasOwnProperty("autoDownloadRoaming")) { - var error = $root.proto.AutoDownloadSettings.verify(message.autoDownloadRoaming); - if (error) - return "autoDownloadRoaming." + error; - } - if (message.showIndividualNotificationsPreview != null && message.hasOwnProperty("showIndividualNotificationsPreview")) - if (typeof message.showIndividualNotificationsPreview !== "boolean") - return "showIndividualNotificationsPreview: boolean expected"; - if (message.showGroupNotificationsPreview != null && message.hasOwnProperty("showGroupNotificationsPreview")) - if (typeof message.showGroupNotificationsPreview !== "boolean") - return "showGroupNotificationsPreview: boolean expected"; - if (message.disappearingModeDuration != null && message.hasOwnProperty("disappearingModeDuration")) - if (!$util.isInteger(message.disappearingModeDuration)) - return "disappearingModeDuration: integer expected"; - if (message.disappearingModeTimestamp != null && message.hasOwnProperty("disappearingModeTimestamp")) - if (!$util.isInteger(message.disappearingModeTimestamp) && !(message.disappearingModeTimestamp && $util.isInteger(message.disappearingModeTimestamp.low) && $util.isInteger(message.disappearingModeTimestamp.high))) - return "disappearingModeTimestamp: integer|Long expected"; - if (message.avatarUserSettings != null && message.hasOwnProperty("avatarUserSettings")) { - var error = $root.proto.AvatarUserSettings.verify(message.avatarUserSettings); - if (error) - return "avatarUserSettings." + error; - } - if (message.fontSize != null && message.hasOwnProperty("fontSize")) - if (!$util.isInteger(message.fontSize)) - return "fontSize: integer expected"; - if (message.securityNotifications != null && message.hasOwnProperty("securityNotifications")) - if (typeof message.securityNotifications !== "boolean") - return "securityNotifications: boolean expected"; - if (message.autoUnarchiveChats != null && message.hasOwnProperty("autoUnarchiveChats")) - if (typeof message.autoUnarchiveChats !== "boolean") - return "autoUnarchiveChats: boolean expected"; - if (message.videoQualityMode != null && message.hasOwnProperty("videoQualityMode")) - if (!$util.isInteger(message.videoQualityMode)) - return "videoQualityMode: integer expected"; - if (message.photoQualityMode != null && message.hasOwnProperty("photoQualityMode")) - if (!$util.isInteger(message.photoQualityMode)) - return "photoQualityMode: integer expected"; - if (message.individualNotificationSettings != null && message.hasOwnProperty("individualNotificationSettings")) { - var error = $root.proto.NotificationSettings.verify(message.individualNotificationSettings); - if (error) - return "individualNotificationSettings." + error; - } - if (message.groupNotificationSettings != null && message.hasOwnProperty("groupNotificationSettings")) { - var error = $root.proto.NotificationSettings.verify(message.groupNotificationSettings); - if (error) - return "groupNotificationSettings." + error; - } - return null; - }; - - /** - * Creates a GlobalSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.GlobalSettings - * @static - * @param {Object.} object Plain object - * @returns {proto.GlobalSettings} GlobalSettings - */ - GlobalSettings.fromObject = function fromObject(object) { - if (object instanceof $root.proto.GlobalSettings) - return object; - var message = new $root.proto.GlobalSettings(); - if (object.lightThemeWallpaper != null) { - if (typeof object.lightThemeWallpaper !== "object") - throw TypeError(".proto.GlobalSettings.lightThemeWallpaper: object expected"); - message.lightThemeWallpaper = $root.proto.WallpaperSettings.fromObject(object.lightThemeWallpaper); - } - switch (object.mediaVisibility) { - case "DEFAULT": + switch (message.syncType) { + default: + return "syncType: enum value expected"; case 0: - message.mediaVisibility = 0; - break; - case "OFF": case 1: - message.mediaVisibility = 1; - break; - case "ON": case 2: - message.mediaVisibility = 2; + case 3: + case 4: + case 5: + case 6: break; } - if (object.darkThemeWallpaper != null) { - if (typeof object.darkThemeWallpaper !== "object") - throw TypeError(".proto.GlobalSettings.darkThemeWallpaper: object expected"); - message.darkThemeWallpaper = $root.proto.WallpaperSettings.fromObject(object.darkThemeWallpaper); - } - if (object.autoDownloadWiFi != null) { - if (typeof object.autoDownloadWiFi !== "object") - throw TypeError(".proto.GlobalSettings.autoDownloadWiFi: object expected"); - message.autoDownloadWiFi = $root.proto.AutoDownloadSettings.fromObject(object.autoDownloadWiFi); - } - if (object.autoDownloadCellular != null) { - if (typeof object.autoDownloadCellular !== "object") - throw TypeError(".proto.GlobalSettings.autoDownloadCellular: object expected"); - message.autoDownloadCellular = $root.proto.AutoDownloadSettings.fromObject(object.autoDownloadCellular); - } - if (object.autoDownloadRoaming != null) { - if (typeof object.autoDownloadRoaming !== "object") - throw TypeError(".proto.GlobalSettings.autoDownloadRoaming: object expected"); - message.autoDownloadRoaming = $root.proto.AutoDownloadSettings.fromObject(object.autoDownloadRoaming); - } - if (object.showIndividualNotificationsPreview != null) - message.showIndividualNotificationsPreview = Boolean(object.showIndividualNotificationsPreview); - if (object.showGroupNotificationsPreview != null) - message.showGroupNotificationsPreview = Boolean(object.showGroupNotificationsPreview); - if (object.disappearingModeDuration != null) - message.disappearingModeDuration = object.disappearingModeDuration | 0; - if (object.disappearingModeTimestamp != null) - if ($util.Long) - (message.disappearingModeTimestamp = $util.Long.fromValue(object.disappearingModeTimestamp)).unsigned = false; - else if (typeof object.disappearingModeTimestamp === "string") - message.disappearingModeTimestamp = parseInt(object.disappearingModeTimestamp, 10); - else if (typeof object.disappearingModeTimestamp === "number") - message.disappearingModeTimestamp = object.disappearingModeTimestamp; - else if (typeof object.disappearingModeTimestamp === "object") - message.disappearingModeTimestamp = new $util.LongBits(object.disappearingModeTimestamp.low >>> 0, object.disappearingModeTimestamp.high >>> 0).toNumber(); - if (object.avatarUserSettings != null) { - if (typeof object.avatarUserSettings !== "object") - throw TypeError(".proto.GlobalSettings.avatarUserSettings: object expected"); - message.avatarUserSettings = $root.proto.AvatarUserSettings.fromObject(object.avatarUserSettings); - } - if (object.fontSize != null) - message.fontSize = object.fontSize | 0; - if (object.securityNotifications != null) - message.securityNotifications = Boolean(object.securityNotifications); - if (object.autoUnarchiveChats != null) - message.autoUnarchiveChats = Boolean(object.autoUnarchiveChats); - if (object.videoQualityMode != null) - message.videoQualityMode = object.videoQualityMode | 0; - if (object.photoQualityMode != null) - message.photoQualityMode = object.photoQualityMode | 0; - if (object.individualNotificationSettings != null) { - if (typeof object.individualNotificationSettings !== "object") - throw TypeError(".proto.GlobalSettings.individualNotificationSettings: object expected"); - message.individualNotificationSettings = $root.proto.NotificationSettings.fromObject(object.individualNotificationSettings); - } - if (object.groupNotificationSettings != null) { - if (typeof object.groupNotificationSettings !== "object") - throw TypeError(".proto.GlobalSettings.groupNotificationSettings: object expected"); - message.groupNotificationSettings = $root.proto.NotificationSettings.fromObject(object.groupNotificationSettings); + if (message.conversations != null && message.hasOwnProperty("conversations")) { + if (!Array.isArray(message.conversations)) + return "conversations: array expected"; + for (var i = 0; i < message.conversations.length; ++i) { + var error = $root.proto.Conversation.verify(message.conversations[i]); + if (error) + return "conversations." + error; + } } - return message; - }; - - /** - * Creates a plain object from a GlobalSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.GlobalSettings - * @static - * @param {proto.GlobalSettings} message GlobalSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GlobalSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.lightThemeWallpaper = null; - object.mediaVisibility = options.enums === String ? "DEFAULT" : 0; - object.darkThemeWallpaper = null; - object.autoDownloadWiFi = null; - object.autoDownloadCellular = null; - object.autoDownloadRoaming = null; - object.showIndividualNotificationsPreview = false; - object.showGroupNotificationsPreview = false; - object.disappearingModeDuration = 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.disappearingModeTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.disappearingModeTimestamp = options.longs === String ? "0" : 0; - object.avatarUserSettings = null; - object.fontSize = 0; - object.securityNotifications = false; - object.autoUnarchiveChats = false; - object.videoQualityMode = 0; - object.photoQualityMode = 0; - object.individualNotificationSettings = null; - object.groupNotificationSettings = null; + if (message.statusV3Messages != null && message.hasOwnProperty("statusV3Messages")) { + if (!Array.isArray(message.statusV3Messages)) + return "statusV3Messages: array expected"; + for (var i = 0; i < message.statusV3Messages.length; ++i) { + var error = $root.proto.WebMessageInfo.verify(message.statusV3Messages[i]); + if (error) + return "statusV3Messages." + error; + } } - if (message.lightThemeWallpaper != null && message.hasOwnProperty("lightThemeWallpaper")) - object.lightThemeWallpaper = $root.proto.WallpaperSettings.toObject(message.lightThemeWallpaper, options); - if (message.mediaVisibility != null && message.hasOwnProperty("mediaVisibility")) - object.mediaVisibility = options.enums === String ? $root.proto.MediaVisibility[message.mediaVisibility] : message.mediaVisibility; - if (message.darkThemeWallpaper != null && message.hasOwnProperty("darkThemeWallpaper")) - object.darkThemeWallpaper = $root.proto.WallpaperSettings.toObject(message.darkThemeWallpaper, options); - if (message.autoDownloadWiFi != null && message.hasOwnProperty("autoDownloadWiFi")) - object.autoDownloadWiFi = $root.proto.AutoDownloadSettings.toObject(message.autoDownloadWiFi, options); - if (message.autoDownloadCellular != null && message.hasOwnProperty("autoDownloadCellular")) - object.autoDownloadCellular = $root.proto.AutoDownloadSettings.toObject(message.autoDownloadCellular, options); - if (message.autoDownloadRoaming != null && message.hasOwnProperty("autoDownloadRoaming")) - object.autoDownloadRoaming = $root.proto.AutoDownloadSettings.toObject(message.autoDownloadRoaming, options); - if (message.showIndividualNotificationsPreview != null && message.hasOwnProperty("showIndividualNotificationsPreview")) - object.showIndividualNotificationsPreview = message.showIndividualNotificationsPreview; - if (message.showGroupNotificationsPreview != null && message.hasOwnProperty("showGroupNotificationsPreview")) - object.showGroupNotificationsPreview = message.showGroupNotificationsPreview; - if (message.disappearingModeDuration != null && message.hasOwnProperty("disappearingModeDuration")) - object.disappearingModeDuration = message.disappearingModeDuration; - if (message.disappearingModeTimestamp != null && message.hasOwnProperty("disappearingModeTimestamp")) - if (typeof message.disappearingModeTimestamp === "number") - object.disappearingModeTimestamp = options.longs === String ? String(message.disappearingModeTimestamp) : message.disappearingModeTimestamp; - else - object.disappearingModeTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.disappearingModeTimestamp) : options.longs === Number ? new $util.LongBits(message.disappearingModeTimestamp.low >>> 0, message.disappearingModeTimestamp.high >>> 0).toNumber() : message.disappearingModeTimestamp; - if (message.avatarUserSettings != null && message.hasOwnProperty("avatarUserSettings")) - object.avatarUserSettings = $root.proto.AvatarUserSettings.toObject(message.avatarUserSettings, options); - if (message.fontSize != null && message.hasOwnProperty("fontSize")) - object.fontSize = message.fontSize; - if (message.securityNotifications != null && message.hasOwnProperty("securityNotifications")) - object.securityNotifications = message.securityNotifications; - if (message.autoUnarchiveChats != null && message.hasOwnProperty("autoUnarchiveChats")) - object.autoUnarchiveChats = message.autoUnarchiveChats; - if (message.videoQualityMode != null && message.hasOwnProperty("videoQualityMode")) - object.videoQualityMode = message.videoQualityMode; - if (message.photoQualityMode != null && message.hasOwnProperty("photoQualityMode")) - object.photoQualityMode = message.photoQualityMode; - if (message.individualNotificationSettings != null && message.hasOwnProperty("individualNotificationSettings")) - object.individualNotificationSettings = $root.proto.NotificationSettings.toObject(message.individualNotificationSettings, options); - if (message.groupNotificationSettings != null && message.hasOwnProperty("groupNotificationSettings")) - object.groupNotificationSettings = $root.proto.NotificationSettings.toObject(message.groupNotificationSettings, options); - return object; - }; - - /** - * Converts this GlobalSettings to JSON. - * @function toJSON - * @memberof proto.GlobalSettings - * @instance - * @returns {Object.} JSON object - */ - GlobalSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GlobalSettings; - })(); - - proto.GroupMention = (function() { - - /** - * Properties of a GroupMention. - * @memberof proto - * @interface IGroupMention - * @property {string|null} [groupJid] GroupMention groupJid - * @property {string|null} [groupSubject] GroupMention groupSubject - */ - - /** - * Constructs a new GroupMention. - * @memberof proto - * @classdesc Represents a GroupMention. - * @implements IGroupMention - * @constructor - * @param {proto.IGroupMention=} [properties] Properties to set - */ - function GroupMention(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GroupMention groupJid. - * @member {string} groupJid - * @memberof proto.GroupMention - * @instance - */ - GroupMention.prototype.groupJid = ""; - - /** - * GroupMention groupSubject. - * @member {string} groupSubject - * @memberof proto.GroupMention - * @instance - */ - GroupMention.prototype.groupSubject = ""; - - /** - * Creates a new GroupMention instance using the specified properties. - * @function create - * @memberof proto.GroupMention - * @static - * @param {proto.IGroupMention=} [properties] Properties to set - * @returns {proto.GroupMention} GroupMention instance - */ - GroupMention.create = function create(properties) { - return new GroupMention(properties); - }; - - /** - * Encodes the specified GroupMention message. Does not implicitly {@link proto.GroupMention.verify|verify} messages. - * @function encode - * @memberof proto.GroupMention - * @static - * @param {proto.IGroupMention} message GroupMention message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GroupMention.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.groupJid != null && Object.hasOwnProperty.call(message, "groupJid")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.groupJid); - if (message.groupSubject != null && Object.hasOwnProperty.call(message, "groupSubject")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.groupSubject); - return writer; - }; - - /** - * Encodes the specified GroupMention message, length delimited. Does not implicitly {@link proto.GroupMention.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.GroupMention - * @static - * @param {proto.IGroupMention} message GroupMention message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GroupMention.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GroupMention message from the specified reader or buffer. - * @function decode - * @memberof proto.GroupMention - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.GroupMention} GroupMention - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GroupMention.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.GroupMention(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.groupJid = reader.string(); - break; - case 2: - message.groupSubject = reader.string(); - break; + if (message.chunkOrder != null && message.hasOwnProperty("chunkOrder")) + if (!$util.isInteger(message.chunkOrder)) + return "chunkOrder: integer expected"; + if (message.progress != null && message.hasOwnProperty("progress")) + if (!$util.isInteger(message.progress)) + return "progress: integer expected"; + if (message.pushnames != null && message.hasOwnProperty("pushnames")) { + if (!Array.isArray(message.pushnames)) + return "pushnames: array expected"; + for (var i = 0; i < message.pushnames.length; ++i) { + var error = $root.proto.Pushname.verify(message.pushnames[i]); + if (error) + return "pushnames." + error; + } + } + if (message.globalSettings != null && message.hasOwnProperty("globalSettings")) { + var error = $root.proto.GlobalSettings.verify(message.globalSettings); + if (error) + return "globalSettings." + error; + } + if (message.threadIdUserSecret != null && message.hasOwnProperty("threadIdUserSecret")) + if (!(message.threadIdUserSecret && typeof message.threadIdUserSecret.length === "number" || $util.isString(message.threadIdUserSecret))) + return "threadIdUserSecret: buffer expected"; + if (message.threadDsTimeframeOffset != null && message.hasOwnProperty("threadDsTimeframeOffset")) + if (!$util.isInteger(message.threadDsTimeframeOffset)) + return "threadDsTimeframeOffset: integer expected"; + if (message.recentStickers != null && message.hasOwnProperty("recentStickers")) { + if (!Array.isArray(message.recentStickers)) + return "recentStickers: array expected"; + for (var i = 0; i < message.recentStickers.length; ++i) { + var error = $root.proto.StickerMetadata.verify(message.recentStickers[i]); + if (error) + return "recentStickers." + error; + } + } + if (message.pastParticipants != null && message.hasOwnProperty("pastParticipants")) { + if (!Array.isArray(message.pastParticipants)) + return "pastParticipants: array expected"; + for (var i = 0; i < message.pastParticipants.length; ++i) { + var error = $root.proto.PastParticipants.verify(message.pastParticipants[i]); + if (error) + return "pastParticipants." + error; + } + } + if (message.callLogRecords != null && message.hasOwnProperty("callLogRecords")) { + if (!Array.isArray(message.callLogRecords)) + return "callLogRecords: array expected"; + for (var i = 0; i < message.callLogRecords.length; ++i) { + var error = $root.proto.CallLogRecord.verify(message.callLogRecords[i]); + if (error) + return "callLogRecords." + error; + } + } + if (message.aiWaitListState != null && message.hasOwnProperty("aiWaitListState")) + switch (message.aiWaitListState) { default: - reader.skipType(tag & 7); + return "aiWaitListState: enum value expected"; + case 0: + case 1: break; } + if (message.phoneNumberToLidMappings != null && message.hasOwnProperty("phoneNumberToLidMappings")) { + if (!Array.isArray(message.phoneNumberToLidMappings)) + return "phoneNumberToLidMappings: array expected"; + for (var i = 0; i < message.phoneNumberToLidMappings.length; ++i) { + var error = $root.proto.PhoneNumberToLIDMapping.verify(message.phoneNumberToLidMappings[i]); + if (error) + return "phoneNumberToLidMappings." + error; + } } - return message; - }; - - /** - * Decodes a GroupMention message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.GroupMention - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.GroupMention} GroupMention - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GroupMention.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GroupMention message. - * @function verify - * @memberof proto.GroupMention - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GroupMention.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.groupJid != null && message.hasOwnProperty("groupJid")) - if (!$util.isString(message.groupJid)) - return "groupJid: string expected"; - if (message.groupSubject != null && message.hasOwnProperty("groupSubject")) - if (!$util.isString(message.groupSubject)) - return "groupSubject: string expected"; return null; }; /** - * Creates a GroupMention message from a plain object. Also converts values to their respective internal types. + * Creates a HistorySync message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof proto.GroupMention + * @memberof proto.HistorySync * @static * @param {Object.} object Plain object - * @returns {proto.GroupMention} GroupMention + * @returns {proto.HistorySync} HistorySync */ - GroupMention.fromObject = function fromObject(object) { - if (object instanceof $root.proto.GroupMention) + HistorySync.fromObject = function fromObject(object) { + if (object instanceof $root.proto.HistorySync) return object; - var message = new $root.proto.GroupMention(); - if (object.groupJid != null) - message.groupJid = String(object.groupJid); - if (object.groupSubject != null) - message.groupSubject = String(object.groupSubject); + var message = new $root.proto.HistorySync(); + switch (object.syncType) { + case "INITIAL_BOOTSTRAP": + case 0: + message.syncType = 0; + break; + case "INITIAL_STATUS_V3": + case 1: + message.syncType = 1; + break; + case "FULL": + case 2: + message.syncType = 2; + break; + case "RECENT": + case 3: + message.syncType = 3; + break; + case "PUSH_NAME": + case 4: + message.syncType = 4; + break; + case "NON_BLOCKING_DATA": + case 5: + message.syncType = 5; + break; + case "ON_DEMAND": + case 6: + message.syncType = 6; + break; + } + if (object.conversations) { + if (!Array.isArray(object.conversations)) + throw TypeError(".proto.HistorySync.conversations: array expected"); + message.conversations = []; + for (var i = 0; i < object.conversations.length; ++i) { + if (typeof object.conversations[i] !== "object") + throw TypeError(".proto.HistorySync.conversations: object expected"); + message.conversations[i] = $root.proto.Conversation.fromObject(object.conversations[i]); + } + } + if (object.statusV3Messages) { + if (!Array.isArray(object.statusV3Messages)) + throw TypeError(".proto.HistorySync.statusV3Messages: array expected"); + message.statusV3Messages = []; + for (var i = 0; i < object.statusV3Messages.length; ++i) { + if (typeof object.statusV3Messages[i] !== "object") + throw TypeError(".proto.HistorySync.statusV3Messages: object expected"); + message.statusV3Messages[i] = $root.proto.WebMessageInfo.fromObject(object.statusV3Messages[i]); + } + } + if (object.chunkOrder != null) + message.chunkOrder = object.chunkOrder >>> 0; + if (object.progress != null) + message.progress = object.progress >>> 0; + if (object.pushnames) { + if (!Array.isArray(object.pushnames)) + throw TypeError(".proto.HistorySync.pushnames: array expected"); + message.pushnames = []; + for (var i = 0; i < object.pushnames.length; ++i) { + if (typeof object.pushnames[i] !== "object") + throw TypeError(".proto.HistorySync.pushnames: object expected"); + message.pushnames[i] = $root.proto.Pushname.fromObject(object.pushnames[i]); + } + } + if (object.globalSettings != null) { + if (typeof object.globalSettings !== "object") + throw TypeError(".proto.HistorySync.globalSettings: object expected"); + message.globalSettings = $root.proto.GlobalSettings.fromObject(object.globalSettings); + } + if (object.threadIdUserSecret != null) + if (typeof object.threadIdUserSecret === "string") + $util.base64.decode(object.threadIdUserSecret, message.threadIdUserSecret = $util.newBuffer($util.base64.length(object.threadIdUserSecret)), 0); + else if (object.threadIdUserSecret.length) + message.threadIdUserSecret = object.threadIdUserSecret; + if (object.threadDsTimeframeOffset != null) + message.threadDsTimeframeOffset = object.threadDsTimeframeOffset >>> 0; + if (object.recentStickers) { + if (!Array.isArray(object.recentStickers)) + throw TypeError(".proto.HistorySync.recentStickers: array expected"); + message.recentStickers = []; + for (var i = 0; i < object.recentStickers.length; ++i) { + if (typeof object.recentStickers[i] !== "object") + throw TypeError(".proto.HistorySync.recentStickers: object expected"); + message.recentStickers[i] = $root.proto.StickerMetadata.fromObject(object.recentStickers[i]); + } + } + if (object.pastParticipants) { + if (!Array.isArray(object.pastParticipants)) + throw TypeError(".proto.HistorySync.pastParticipants: array expected"); + message.pastParticipants = []; + for (var i = 0; i < object.pastParticipants.length; ++i) { + if (typeof object.pastParticipants[i] !== "object") + throw TypeError(".proto.HistorySync.pastParticipants: object expected"); + message.pastParticipants[i] = $root.proto.PastParticipants.fromObject(object.pastParticipants[i]); + } + } + if (object.callLogRecords) { + if (!Array.isArray(object.callLogRecords)) + throw TypeError(".proto.HistorySync.callLogRecords: array expected"); + message.callLogRecords = []; + for (var i = 0; i < object.callLogRecords.length; ++i) { + if (typeof object.callLogRecords[i] !== "object") + throw TypeError(".proto.HistorySync.callLogRecords: object expected"); + message.callLogRecords[i] = $root.proto.CallLogRecord.fromObject(object.callLogRecords[i]); + } + } + switch (object.aiWaitListState) { + case "IN_WAITLIST": + case 0: + message.aiWaitListState = 0; + break; + case "AI_AVAILABLE": + case 1: + message.aiWaitListState = 1; + break; + } + if (object.phoneNumberToLidMappings) { + if (!Array.isArray(object.phoneNumberToLidMappings)) + throw TypeError(".proto.HistorySync.phoneNumberToLidMappings: array expected"); + message.phoneNumberToLidMappings = []; + for (var i = 0; i < object.phoneNumberToLidMappings.length; ++i) { + if (typeof object.phoneNumberToLidMappings[i] !== "object") + throw TypeError(".proto.HistorySync.phoneNumberToLidMappings: object expected"); + message.phoneNumberToLidMappings[i] = $root.proto.PhoneNumberToLIDMapping.fromObject(object.phoneNumberToLidMappings[i]); + } + } return message; }; /** - * Creates a plain object from a GroupMention message. Also converts values to other types if specified. + * Creates a plain object from a HistorySync message. Also converts values to other types if specified. * @function toObject - * @memberof proto.GroupMention + * @memberof proto.HistorySync * @static - * @param {proto.GroupMention} message GroupMention + * @param {proto.HistorySync} message HistorySync * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GroupMention.toObject = function toObject(message, options) { + HistorySync.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) { + object.conversations = []; + object.statusV3Messages = []; + object.pushnames = []; + object.recentStickers = []; + object.pastParticipants = []; + object.callLogRecords = []; + object.phoneNumberToLidMappings = []; + } if (options.defaults) { - object.groupJid = ""; - object.groupSubject = ""; + object.syncType = options.enums === String ? "INITIAL_BOOTSTRAP" : 0; + object.chunkOrder = 0; + object.progress = 0; + object.globalSettings = null; + if (options.bytes === String) + object.threadIdUserSecret = ""; + else { + object.threadIdUserSecret = []; + if (options.bytes !== Array) + object.threadIdUserSecret = $util.newBuffer(object.threadIdUserSecret); + } + object.threadDsTimeframeOffset = 0; + object.aiWaitListState = options.enums === String ? "IN_WAITLIST" : 0; + } + if (message.syncType != null && message.hasOwnProperty("syncType")) + object.syncType = options.enums === String ? $root.proto.HistorySync.HistorySyncType[message.syncType] : message.syncType; + if (message.conversations && message.conversations.length) { + object.conversations = []; + for (var j = 0; j < message.conversations.length; ++j) + object.conversations[j] = $root.proto.Conversation.toObject(message.conversations[j], options); + } + if (message.statusV3Messages && message.statusV3Messages.length) { + object.statusV3Messages = []; + for (var j = 0; j < message.statusV3Messages.length; ++j) + object.statusV3Messages[j] = $root.proto.WebMessageInfo.toObject(message.statusV3Messages[j], options); + } + if (message.chunkOrder != null && message.hasOwnProperty("chunkOrder")) + object.chunkOrder = message.chunkOrder; + if (message.progress != null && message.hasOwnProperty("progress")) + object.progress = message.progress; + if (message.pushnames && message.pushnames.length) { + object.pushnames = []; + for (var j = 0; j < message.pushnames.length; ++j) + object.pushnames[j] = $root.proto.Pushname.toObject(message.pushnames[j], options); + } + if (message.globalSettings != null && message.hasOwnProperty("globalSettings")) + object.globalSettings = $root.proto.GlobalSettings.toObject(message.globalSettings, options); + if (message.threadIdUserSecret != null && message.hasOwnProperty("threadIdUserSecret")) + object.threadIdUserSecret = options.bytes === String ? $util.base64.encode(message.threadIdUserSecret, 0, message.threadIdUserSecret.length) : options.bytes === Array ? Array.prototype.slice.call(message.threadIdUserSecret) : message.threadIdUserSecret; + if (message.threadDsTimeframeOffset != null && message.hasOwnProperty("threadDsTimeframeOffset")) + object.threadDsTimeframeOffset = message.threadDsTimeframeOffset; + if (message.recentStickers && message.recentStickers.length) { + object.recentStickers = []; + for (var j = 0; j < message.recentStickers.length; ++j) + object.recentStickers[j] = $root.proto.StickerMetadata.toObject(message.recentStickers[j], options); + } + if (message.pastParticipants && message.pastParticipants.length) { + object.pastParticipants = []; + for (var j = 0; j < message.pastParticipants.length; ++j) + object.pastParticipants[j] = $root.proto.PastParticipants.toObject(message.pastParticipants[j], options); + } + if (message.callLogRecords && message.callLogRecords.length) { + object.callLogRecords = []; + for (var j = 0; j < message.callLogRecords.length; ++j) + object.callLogRecords[j] = $root.proto.CallLogRecord.toObject(message.callLogRecords[j], options); + } + if (message.aiWaitListState != null && message.hasOwnProperty("aiWaitListState")) + object.aiWaitListState = options.enums === String ? $root.proto.HistorySync.BotAIWaitListState[message.aiWaitListState] : message.aiWaitListState; + if (message.phoneNumberToLidMappings && message.phoneNumberToLidMappings.length) { + object.phoneNumberToLidMappings = []; + for (var j = 0; j < message.phoneNumberToLidMappings.length; ++j) + object.phoneNumberToLidMappings[j] = $root.proto.PhoneNumberToLIDMapping.toObject(message.phoneNumberToLidMappings[j], options); } - if (message.groupJid != null && message.hasOwnProperty("groupJid")) - object.groupJid = message.groupJid; - if (message.groupSubject != null && message.hasOwnProperty("groupSubject")) - object.groupSubject = message.groupSubject; return object; }; /** - * Converts this GroupMention to JSON. + * Converts this HistorySync to JSON. * @function toJSON - * @memberof proto.GroupMention + * @memberof proto.HistorySync * @instance * @returns {Object.} JSON object */ - GroupMention.prototype.toJSON = function toJSON() { + HistorySync.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GroupMention; + /** + * BotAIWaitListState enum. + * @name proto.HistorySync.BotAIWaitListState + * @enum {number} + * @property {number} IN_WAITLIST=0 IN_WAITLIST value + * @property {number} AI_AVAILABLE=1 AI_AVAILABLE value + */ + HistorySync.BotAIWaitListState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IN_WAITLIST"] = 0; + values[valuesById[1] = "AI_AVAILABLE"] = 1; + return values; + })(); + + /** + * HistorySyncType enum. + * @name proto.HistorySync.HistorySyncType + * @enum {number} + * @property {number} INITIAL_BOOTSTRAP=0 INITIAL_BOOTSTRAP value + * @property {number} INITIAL_STATUS_V3=1 INITIAL_STATUS_V3 value + * @property {number} FULL=2 FULL value + * @property {number} RECENT=3 RECENT value + * @property {number} PUSH_NAME=4 PUSH_NAME value + * @property {number} NON_BLOCKING_DATA=5 NON_BLOCKING_DATA value + * @property {number} ON_DEMAND=6 ON_DEMAND value + */ + HistorySync.HistorySyncType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "INITIAL_BOOTSTRAP"] = 0; + values[valuesById[1] = "INITIAL_STATUS_V3"] = 1; + values[valuesById[2] = "FULL"] = 2; + values[valuesById[3] = "RECENT"] = 3; + values[valuesById[4] = "PUSH_NAME"] = 4; + values[valuesById[5] = "NON_BLOCKING_DATA"] = 5; + values[valuesById[6] = "ON_DEMAND"] = 6; + return values; + })(); + + return HistorySync; })(); - proto.GroupParticipant = (function() { + proto.HistorySyncMsg = (function() { /** - * Properties of a GroupParticipant. + * Properties of a HistorySyncMsg. * @memberof proto - * @interface IGroupParticipant - * @property {string} userJid GroupParticipant userJid - * @property {proto.GroupParticipant.Rank|null} [rank] GroupParticipant rank + * @interface IHistorySyncMsg + * @property {proto.IWebMessageInfo|null} [message] HistorySyncMsg message + * @property {number|Long|null} [msgOrderId] HistorySyncMsg msgOrderId */ /** - * Constructs a new GroupParticipant. + * Constructs a new HistorySyncMsg. * @memberof proto - * @classdesc Represents a GroupParticipant. - * @implements IGroupParticipant + * @classdesc Represents a HistorySyncMsg. + * @implements IHistorySyncMsg * @constructor - * @param {proto.IGroupParticipant=} [properties] Properties to set + * @param {proto.IHistorySyncMsg=} [properties] Properties to set */ - function GroupParticipant(properties) { + function HistorySyncMsg(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16667,244 +21550,230 @@ $root.proto = (function() { } /** - * GroupParticipant userJid. - * @member {string} userJid - * @memberof proto.GroupParticipant + * HistorySyncMsg message. + * @member {proto.IWebMessageInfo|null|undefined} message + * @memberof proto.HistorySyncMsg * @instance */ - GroupParticipant.prototype.userJid = ""; + HistorySyncMsg.prototype.message = null; /** - * GroupParticipant rank. - * @member {proto.GroupParticipant.Rank} rank - * @memberof proto.GroupParticipant + * HistorySyncMsg msgOrderId. + * @member {number|Long} msgOrderId + * @memberof proto.HistorySyncMsg * @instance */ - GroupParticipant.prototype.rank = 0; + HistorySyncMsg.prototype.msgOrderId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** - * Creates a new GroupParticipant instance using the specified properties. + * Creates a new HistorySyncMsg instance using the specified properties. * @function create - * @memberof proto.GroupParticipant + * @memberof proto.HistorySyncMsg * @static - * @param {proto.IGroupParticipant=} [properties] Properties to set - * @returns {proto.GroupParticipant} GroupParticipant instance + * @param {proto.IHistorySyncMsg=} [properties] Properties to set + * @returns {proto.HistorySyncMsg} HistorySyncMsg instance */ - GroupParticipant.create = function create(properties) { - return new GroupParticipant(properties); + HistorySyncMsg.create = function create(properties) { + return new HistorySyncMsg(properties); }; /** - * Encodes the specified GroupParticipant message. Does not implicitly {@link proto.GroupParticipant.verify|verify} messages. + * Encodes the specified HistorySyncMsg message. Does not implicitly {@link proto.HistorySyncMsg.verify|verify} messages. * @function encode - * @memberof proto.GroupParticipant + * @memberof proto.HistorySyncMsg * @static - * @param {proto.IGroupParticipant} message GroupParticipant message or plain object to encode + * @param {proto.IHistorySyncMsg} message HistorySyncMsg message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GroupParticipant.encode = function encode(message, writer) { + HistorySyncMsg.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - writer.uint32(/* id 1, wireType 2 =*/10).string(message.userJid); - if (message.rank != null && Object.hasOwnProperty.call(message, "rank")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.rank); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + $root.proto.WebMessageInfo.encode(message.message, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.msgOrderId != null && Object.hasOwnProperty.call(message, "msgOrderId")) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.msgOrderId); return writer; }; /** - * Encodes the specified GroupParticipant message, length delimited. Does not implicitly {@link proto.GroupParticipant.verify|verify} messages. + * Encodes the specified HistorySyncMsg message, length delimited. Does not implicitly {@link proto.HistorySyncMsg.verify|verify} messages. * @function encodeDelimited - * @memberof proto.GroupParticipant + * @memberof proto.HistorySyncMsg * @static - * @param {proto.IGroupParticipant} message GroupParticipant message or plain object to encode + * @param {proto.IHistorySyncMsg} message HistorySyncMsg message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GroupParticipant.encodeDelimited = function encodeDelimited(message, writer) { + HistorySyncMsg.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GroupParticipant message from the specified reader or buffer. + * Decodes a HistorySyncMsg message from the specified reader or buffer. * @function decode - * @memberof proto.GroupParticipant + * @memberof proto.HistorySyncMsg * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {proto.GroupParticipant} GroupParticipant + * @returns {proto.HistorySyncMsg} HistorySyncMsg * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GroupParticipant.decode = function decode(reader, length) { + HistorySyncMsg.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.GroupParticipant(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.HistorySyncMsg(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.userJid = reader.string(); + message.message = $root.proto.WebMessageInfo.decode(reader, reader.uint32()); break; case 2: - message.rank = reader.int32(); + message.msgOrderId = reader.uint64(); break; default: reader.skipType(tag & 7); break; } } - if (!message.hasOwnProperty("userJid")) - throw $util.ProtocolError("missing required 'userJid'", { instance: message }); return message; }; /** - * Decodes a GroupParticipant message from the specified reader or buffer, length delimited. + * Decodes a HistorySyncMsg message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof proto.GroupParticipant + * @memberof proto.HistorySyncMsg * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.GroupParticipant} GroupParticipant + * @returns {proto.HistorySyncMsg} HistorySyncMsg * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GroupParticipant.decodeDelimited = function decodeDelimited(reader) { + HistorySyncMsg.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GroupParticipant message. + * Verifies a HistorySyncMsg message. * @function verify - * @memberof proto.GroupParticipant + * @memberof proto.HistorySyncMsg * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GroupParticipant.verify = function verify(message) { + HistorySyncMsg.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (!$util.isString(message.userJid)) - return "userJid: string expected"; - if (message.rank != null && message.hasOwnProperty("rank")) - switch (message.rank) { - default: - return "rank: enum value expected"; - case 0: - case 1: - case 2: - break; - } + if (message.message != null && message.hasOwnProperty("message")) { + var error = $root.proto.WebMessageInfo.verify(message.message); + if (error) + return "message." + error; + } + if (message.msgOrderId != null && message.hasOwnProperty("msgOrderId")) + if (!$util.isInteger(message.msgOrderId) && !(message.msgOrderId && $util.isInteger(message.msgOrderId.low) && $util.isInteger(message.msgOrderId.high))) + return "msgOrderId: integer|Long expected"; return null; }; /** - * Creates a GroupParticipant message from a plain object. Also converts values to their respective internal types. + * Creates a HistorySyncMsg message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof proto.GroupParticipant + * @memberof proto.HistorySyncMsg * @static * @param {Object.} object Plain object - * @returns {proto.GroupParticipant} GroupParticipant + * @returns {proto.HistorySyncMsg} HistorySyncMsg */ - GroupParticipant.fromObject = function fromObject(object) { - if (object instanceof $root.proto.GroupParticipant) + HistorySyncMsg.fromObject = function fromObject(object) { + if (object instanceof $root.proto.HistorySyncMsg) return object; - var message = new $root.proto.GroupParticipant(); - if (object.userJid != null) - message.userJid = String(object.userJid); - switch (object.rank) { - case "REGULAR": - case 0: - message.rank = 0; - break; - case "ADMIN": - case 1: - message.rank = 1; - break; - case "SUPERADMIN": - case 2: - message.rank = 2; - break; + var message = new $root.proto.HistorySyncMsg(); + if (object.message != null) { + if (typeof object.message !== "object") + throw TypeError(".proto.HistorySyncMsg.message: object expected"); + message.message = $root.proto.WebMessageInfo.fromObject(object.message); } + if (object.msgOrderId != null) + if ($util.Long) + (message.msgOrderId = $util.Long.fromValue(object.msgOrderId)).unsigned = true; + else if (typeof object.msgOrderId === "string") + message.msgOrderId = parseInt(object.msgOrderId, 10); + else if (typeof object.msgOrderId === "number") + message.msgOrderId = object.msgOrderId; + else if (typeof object.msgOrderId === "object") + message.msgOrderId = new $util.LongBits(object.msgOrderId.low >>> 0, object.msgOrderId.high >>> 0).toNumber(true); return message; }; /** - * Creates a plain object from a GroupParticipant message. Also converts values to other types if specified. + * Creates a plain object from a HistorySyncMsg message. Also converts values to other types if specified. * @function toObject - * @memberof proto.GroupParticipant + * @memberof proto.HistorySyncMsg * @static - * @param {proto.GroupParticipant} message GroupParticipant + * @param {proto.HistorySyncMsg} message HistorySyncMsg * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GroupParticipant.toObject = function toObject(message, options) { + HistorySyncMsg.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.userJid = ""; - object.rank = options.enums === String ? "REGULAR" : 0; + object.message = null; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.msgOrderId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.msgOrderId = options.longs === String ? "0" : 0; } - if (message.userJid != null && message.hasOwnProperty("userJid")) - object.userJid = message.userJid; - if (message.rank != null && message.hasOwnProperty("rank")) - object.rank = options.enums === String ? $root.proto.GroupParticipant.Rank[message.rank] : message.rank; + if (message.message != null && message.hasOwnProperty("message")) + object.message = $root.proto.WebMessageInfo.toObject(message.message, options); + if (message.msgOrderId != null && message.hasOwnProperty("msgOrderId")) + if (typeof message.msgOrderId === "number") + object.msgOrderId = options.longs === String ? String(message.msgOrderId) : message.msgOrderId; + else + object.msgOrderId = options.longs === String ? $util.Long.prototype.toString.call(message.msgOrderId) : options.longs === Number ? new $util.LongBits(message.msgOrderId.low >>> 0, message.msgOrderId.high >>> 0).toNumber(true) : message.msgOrderId; return object; }; /** - * Converts this GroupParticipant to JSON. - * @function toJSON - * @memberof proto.GroupParticipant - * @instance - * @returns {Object.} JSON object - */ - GroupParticipant.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Rank enum. - * @name proto.GroupParticipant.Rank - * @enum {number} - * @property {number} REGULAR=0 REGULAR value - * @property {number} ADMIN=1 ADMIN value - * @property {number} SUPERADMIN=2 SUPERADMIN value + * Converts this HistorySyncMsg to JSON. + * @function toJSON + * @memberof proto.HistorySyncMsg + * @instance + * @returns {Object.} JSON object */ - GroupParticipant.Rank = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "REGULAR"] = 0; - values[valuesById[1] = "ADMIN"] = 1; - values[valuesById[2] = "SUPERADMIN"] = 2; - return values; - })(); + HistorySyncMsg.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return GroupParticipant; + return HistorySyncMsg; })(); - proto.HandshakeMessage = (function() { + proto.HydratedTemplateButton = (function() { /** - * Properties of a HandshakeMessage. + * Properties of a HydratedTemplateButton. * @memberof proto - * @interface IHandshakeMessage - * @property {proto.HandshakeMessage.IClientHello|null} [clientHello] HandshakeMessage clientHello - * @property {proto.HandshakeMessage.IServerHello|null} [serverHello] HandshakeMessage serverHello - * @property {proto.HandshakeMessage.IClientFinish|null} [clientFinish] HandshakeMessage clientFinish + * @interface IHydratedTemplateButton + * @property {number|null} [index] HydratedTemplateButton index + * @property {proto.HydratedTemplateButton.IHydratedQuickReplyButton|null} [quickReplyButton] HydratedTemplateButton quickReplyButton + * @property {proto.HydratedTemplateButton.IHydratedURLButton|null} [urlButton] HydratedTemplateButton urlButton + * @property {proto.HydratedTemplateButton.IHydratedCallButton|null} [callButton] HydratedTemplateButton callButton */ /** - * Constructs a new HandshakeMessage. + * Constructs a new HydratedTemplateButton. * @memberof proto - * @classdesc Represents a HandshakeMessage. - * @implements IHandshakeMessage + * @classdesc Represents a HydratedTemplateButton. + * @implements IHydratedTemplateButton * @constructor - * @param {proto.IHandshakeMessage=} [properties] Properties to set + * @param {proto.IHydratedTemplateButton=} [properties] Properties to set */ - function HandshakeMessage(properties) { + function HydratedTemplateButton(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16912,101 +21781,128 @@ $root.proto = (function() { } /** - * HandshakeMessage clientHello. - * @member {proto.HandshakeMessage.IClientHello|null|undefined} clientHello - * @memberof proto.HandshakeMessage + * HydratedTemplateButton index. + * @member {number} index + * @memberof proto.HydratedTemplateButton * @instance */ - HandshakeMessage.prototype.clientHello = null; + HydratedTemplateButton.prototype.index = 0; /** - * HandshakeMessage serverHello. - * @member {proto.HandshakeMessage.IServerHello|null|undefined} serverHello - * @memberof proto.HandshakeMessage + * HydratedTemplateButton quickReplyButton. + * @member {proto.HydratedTemplateButton.IHydratedQuickReplyButton|null|undefined} quickReplyButton + * @memberof proto.HydratedTemplateButton * @instance */ - HandshakeMessage.prototype.serverHello = null; + HydratedTemplateButton.prototype.quickReplyButton = null; /** - * HandshakeMessage clientFinish. - * @member {proto.HandshakeMessage.IClientFinish|null|undefined} clientFinish - * @memberof proto.HandshakeMessage + * HydratedTemplateButton urlButton. + * @member {proto.HydratedTemplateButton.IHydratedURLButton|null|undefined} urlButton + * @memberof proto.HydratedTemplateButton * @instance */ - HandshakeMessage.prototype.clientFinish = null; + HydratedTemplateButton.prototype.urlButton = null; /** - * Creates a new HandshakeMessage instance using the specified properties. + * HydratedTemplateButton callButton. + * @member {proto.HydratedTemplateButton.IHydratedCallButton|null|undefined} callButton + * @memberof proto.HydratedTemplateButton + * @instance + */ + HydratedTemplateButton.prototype.callButton = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * HydratedTemplateButton hydratedButton. + * @member {"quickReplyButton"|"urlButton"|"callButton"|undefined} hydratedButton + * @memberof proto.HydratedTemplateButton + * @instance + */ + Object.defineProperty(HydratedTemplateButton.prototype, "hydratedButton", { + get: $util.oneOfGetter($oneOfFields = ["quickReplyButton", "urlButton", "callButton"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new HydratedTemplateButton instance using the specified properties. * @function create - * @memberof proto.HandshakeMessage + * @memberof proto.HydratedTemplateButton * @static - * @param {proto.IHandshakeMessage=} [properties] Properties to set - * @returns {proto.HandshakeMessage} HandshakeMessage instance + * @param {proto.IHydratedTemplateButton=} [properties] Properties to set + * @returns {proto.HydratedTemplateButton} HydratedTemplateButton instance */ - HandshakeMessage.create = function create(properties) { - return new HandshakeMessage(properties); + HydratedTemplateButton.create = function create(properties) { + return new HydratedTemplateButton(properties); }; /** - * Encodes the specified HandshakeMessage message. Does not implicitly {@link proto.HandshakeMessage.verify|verify} messages. + * Encodes the specified HydratedTemplateButton message. Does not implicitly {@link proto.HydratedTemplateButton.verify|verify} messages. * @function encode - * @memberof proto.HandshakeMessage + * @memberof proto.HydratedTemplateButton * @static - * @param {proto.IHandshakeMessage} message HandshakeMessage message or plain object to encode + * @param {proto.IHydratedTemplateButton} message HydratedTemplateButton message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HandshakeMessage.encode = function encode(message, writer) { + HydratedTemplateButton.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.clientHello != null && Object.hasOwnProperty.call(message, "clientHello")) - $root.proto.HandshakeMessage.ClientHello.encode(message.clientHello, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.serverHello != null && Object.hasOwnProperty.call(message, "serverHello")) - $root.proto.HandshakeMessage.ServerHello.encode(message.serverHello, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.clientFinish != null && Object.hasOwnProperty.call(message, "clientFinish")) - $root.proto.HandshakeMessage.ClientFinish.encode(message.clientFinish, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.quickReplyButton != null && Object.hasOwnProperty.call(message, "quickReplyButton")) + $root.proto.HydratedTemplateButton.HydratedQuickReplyButton.encode(message.quickReplyButton, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.urlButton != null && Object.hasOwnProperty.call(message, "urlButton")) + $root.proto.HydratedTemplateButton.HydratedURLButton.encode(message.urlButton, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.callButton != null && Object.hasOwnProperty.call(message, "callButton")) + $root.proto.HydratedTemplateButton.HydratedCallButton.encode(message.callButton, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.index != null && Object.hasOwnProperty.call(message, "index")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.index); return writer; }; /** - * Encodes the specified HandshakeMessage message, length delimited. Does not implicitly {@link proto.HandshakeMessage.verify|verify} messages. + * Encodes the specified HydratedTemplateButton message, length delimited. Does not implicitly {@link proto.HydratedTemplateButton.verify|verify} messages. * @function encodeDelimited - * @memberof proto.HandshakeMessage + * @memberof proto.HydratedTemplateButton * @static - * @param {proto.IHandshakeMessage} message HandshakeMessage message or plain object to encode + * @param {proto.IHydratedTemplateButton} message HydratedTemplateButton message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HandshakeMessage.encodeDelimited = function encodeDelimited(message, writer) { + HydratedTemplateButton.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a HandshakeMessage message from the specified reader or buffer. + * Decodes a HydratedTemplateButton message from the specified reader or buffer. * @function decode - * @memberof proto.HandshakeMessage + * @memberof proto.HydratedTemplateButton * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {proto.HandshakeMessage} HandshakeMessage + * @returns {proto.HydratedTemplateButton} HydratedTemplateButton * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HandshakeMessage.decode = function decode(reader, length) { + HydratedTemplateButton.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.HandshakeMessage(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.HydratedTemplateButton(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 4: + message.index = reader.uint32(); + break; + case 1: + message.quickReplyButton = $root.proto.HydratedTemplateButton.HydratedQuickReplyButton.decode(reader, reader.uint32()); + break; case 2: - message.clientHello = $root.proto.HandshakeMessage.ClientHello.decode(reader, reader.uint32()); + message.urlButton = $root.proto.HydratedTemplateButton.HydratedURLButton.decode(reader, reader.uint32()); break; case 3: - message.serverHello = $root.proto.HandshakeMessage.ServerHello.decode(reader, reader.uint32()); - break; - case 4: - message.clientFinish = $root.proto.HandshakeMessage.ClientFinish.decode(reader, reader.uint32()); + message.callButton = $root.proto.HydratedTemplateButton.HydratedCallButton.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -17017,137 +21913,164 @@ $root.proto = (function() { }; /** - * Decodes a HandshakeMessage message from the specified reader or buffer, length delimited. + * Decodes a HydratedTemplateButton message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof proto.HandshakeMessage + * @memberof proto.HydratedTemplateButton * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.HandshakeMessage} HandshakeMessage + * @returns {proto.HydratedTemplateButton} HydratedTemplateButton * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HandshakeMessage.decodeDelimited = function decodeDelimited(reader) { + HydratedTemplateButton.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a HandshakeMessage message. + * Verifies a HydratedTemplateButton message. * @function verify - * @memberof proto.HandshakeMessage + * @memberof proto.HydratedTemplateButton * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - HandshakeMessage.verify = function verify(message) { + HydratedTemplateButton.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.clientHello != null && message.hasOwnProperty("clientHello")) { - var error = $root.proto.HandshakeMessage.ClientHello.verify(message.clientHello); - if (error) - return "clientHello." + error; + var properties = {}; + if (message.index != null && message.hasOwnProperty("index")) + if (!$util.isInteger(message.index)) + return "index: integer expected"; + if (message.quickReplyButton != null && message.hasOwnProperty("quickReplyButton")) { + properties.hydratedButton = 1; + { + var error = $root.proto.HydratedTemplateButton.HydratedQuickReplyButton.verify(message.quickReplyButton); + if (error) + return "quickReplyButton." + error; + } } - if (message.serverHello != null && message.hasOwnProperty("serverHello")) { - var error = $root.proto.HandshakeMessage.ServerHello.verify(message.serverHello); - if (error) - return "serverHello." + error; + if (message.urlButton != null && message.hasOwnProperty("urlButton")) { + if (properties.hydratedButton === 1) + return "hydratedButton: multiple values"; + properties.hydratedButton = 1; + { + var error = $root.proto.HydratedTemplateButton.HydratedURLButton.verify(message.urlButton); + if (error) + return "urlButton." + error; + } } - if (message.clientFinish != null && message.hasOwnProperty("clientFinish")) { - var error = $root.proto.HandshakeMessage.ClientFinish.verify(message.clientFinish); - if (error) - return "clientFinish." + error; + if (message.callButton != null && message.hasOwnProperty("callButton")) { + if (properties.hydratedButton === 1) + return "hydratedButton: multiple values"; + properties.hydratedButton = 1; + { + var error = $root.proto.HydratedTemplateButton.HydratedCallButton.verify(message.callButton); + if (error) + return "callButton." + error; + } } return null; }; /** - * Creates a HandshakeMessage message from a plain object. Also converts values to their respective internal types. + * Creates a HydratedTemplateButton message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof proto.HandshakeMessage + * @memberof proto.HydratedTemplateButton * @static * @param {Object.} object Plain object - * @returns {proto.HandshakeMessage} HandshakeMessage + * @returns {proto.HydratedTemplateButton} HydratedTemplateButton */ - HandshakeMessage.fromObject = function fromObject(object) { - if (object instanceof $root.proto.HandshakeMessage) + HydratedTemplateButton.fromObject = function fromObject(object) { + if (object instanceof $root.proto.HydratedTemplateButton) return object; - var message = new $root.proto.HandshakeMessage(); - if (object.clientHello != null) { - if (typeof object.clientHello !== "object") - throw TypeError(".proto.HandshakeMessage.clientHello: object expected"); - message.clientHello = $root.proto.HandshakeMessage.ClientHello.fromObject(object.clientHello); + var message = new $root.proto.HydratedTemplateButton(); + if (object.index != null) + message.index = object.index >>> 0; + if (object.quickReplyButton != null) { + if (typeof object.quickReplyButton !== "object") + throw TypeError(".proto.HydratedTemplateButton.quickReplyButton: object expected"); + message.quickReplyButton = $root.proto.HydratedTemplateButton.HydratedQuickReplyButton.fromObject(object.quickReplyButton); } - if (object.serverHello != null) { - if (typeof object.serverHello !== "object") - throw TypeError(".proto.HandshakeMessage.serverHello: object expected"); - message.serverHello = $root.proto.HandshakeMessage.ServerHello.fromObject(object.serverHello); + if (object.urlButton != null) { + if (typeof object.urlButton !== "object") + throw TypeError(".proto.HydratedTemplateButton.urlButton: object expected"); + message.urlButton = $root.proto.HydratedTemplateButton.HydratedURLButton.fromObject(object.urlButton); } - if (object.clientFinish != null) { - if (typeof object.clientFinish !== "object") - throw TypeError(".proto.HandshakeMessage.clientFinish: object expected"); - message.clientFinish = $root.proto.HandshakeMessage.ClientFinish.fromObject(object.clientFinish); + if (object.callButton != null) { + if (typeof object.callButton !== "object") + throw TypeError(".proto.HydratedTemplateButton.callButton: object expected"); + message.callButton = $root.proto.HydratedTemplateButton.HydratedCallButton.fromObject(object.callButton); } return message; }; /** - * Creates a plain object from a HandshakeMessage message. Also converts values to other types if specified. + * Creates a plain object from a HydratedTemplateButton message. Also converts values to other types if specified. * @function toObject - * @memberof proto.HandshakeMessage + * @memberof proto.HydratedTemplateButton * @static - * @param {proto.HandshakeMessage} message HandshakeMessage + * @param {proto.HydratedTemplateButton} message HydratedTemplateButton * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - HandshakeMessage.toObject = function toObject(message, options) { + HydratedTemplateButton.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.clientHello = null; - object.serverHello = null; - object.clientFinish = null; + if (options.defaults) + object.index = 0; + if (message.quickReplyButton != null && message.hasOwnProperty("quickReplyButton")) { + object.quickReplyButton = $root.proto.HydratedTemplateButton.HydratedQuickReplyButton.toObject(message.quickReplyButton, options); + if (options.oneofs) + object.hydratedButton = "quickReplyButton"; } - if (message.clientHello != null && message.hasOwnProperty("clientHello")) - object.clientHello = $root.proto.HandshakeMessage.ClientHello.toObject(message.clientHello, options); - if (message.serverHello != null && message.hasOwnProperty("serverHello")) - object.serverHello = $root.proto.HandshakeMessage.ServerHello.toObject(message.serverHello, options); - if (message.clientFinish != null && message.hasOwnProperty("clientFinish")) - object.clientFinish = $root.proto.HandshakeMessage.ClientFinish.toObject(message.clientFinish, options); + if (message.urlButton != null && message.hasOwnProperty("urlButton")) { + object.urlButton = $root.proto.HydratedTemplateButton.HydratedURLButton.toObject(message.urlButton, options); + if (options.oneofs) + object.hydratedButton = "urlButton"; + } + if (message.callButton != null && message.hasOwnProperty("callButton")) { + object.callButton = $root.proto.HydratedTemplateButton.HydratedCallButton.toObject(message.callButton, options); + if (options.oneofs) + object.hydratedButton = "callButton"; + } + if (message.index != null && message.hasOwnProperty("index")) + object.index = message.index; return object; }; /** - * Converts this HandshakeMessage to JSON. + * Converts this HydratedTemplateButton to JSON. * @function toJSON - * @memberof proto.HandshakeMessage + * @memberof proto.HydratedTemplateButton * @instance * @returns {Object.} JSON object */ - HandshakeMessage.prototype.toJSON = function toJSON() { + HydratedTemplateButton.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - HandshakeMessage.ClientFinish = (function() { + HydratedTemplateButton.HydratedCallButton = (function() { /** - * Properties of a ClientFinish. - * @memberof proto.HandshakeMessage - * @interface IClientFinish - * @property {Uint8Array|null} ["static"] ClientFinish static - * @property {Uint8Array|null} [payload] ClientFinish payload + * Properties of a HydratedCallButton. + * @memberof proto.HydratedTemplateButton + * @interface IHydratedCallButton + * @property {string|null} [displayText] HydratedCallButton displayText + * @property {string|null} [phoneNumber] HydratedCallButton phoneNumber */ /** - * Constructs a new ClientFinish. - * @memberof proto.HandshakeMessage - * @classdesc Represents a ClientFinish. - * @implements IClientFinish + * Constructs a new HydratedCallButton. + * @memberof proto.HydratedTemplateButton + * @classdesc Represents a HydratedCallButton. + * @implements IHydratedCallButton * @constructor - * @param {proto.HandshakeMessage.IClientFinish=} [properties] Properties to set + * @param {proto.HydratedTemplateButton.IHydratedCallButton=} [properties] Properties to set */ - function ClientFinish(properties) { + function HydratedCallButton(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -17155,88 +22078,88 @@ $root.proto = (function() { } /** - * ClientFinish static. - * @member {Uint8Array} static - * @memberof proto.HandshakeMessage.ClientFinish + * HydratedCallButton displayText. + * @member {string} displayText + * @memberof proto.HydratedTemplateButton.HydratedCallButton * @instance */ - ClientFinish.prototype["static"] = $util.newBuffer([]); + HydratedCallButton.prototype.displayText = ""; /** - * ClientFinish payload. - * @member {Uint8Array} payload - * @memberof proto.HandshakeMessage.ClientFinish + * HydratedCallButton phoneNumber. + * @member {string} phoneNumber + * @memberof proto.HydratedTemplateButton.HydratedCallButton * @instance */ - ClientFinish.prototype.payload = $util.newBuffer([]); + HydratedCallButton.prototype.phoneNumber = ""; /** - * Creates a new ClientFinish instance using the specified properties. + * Creates a new HydratedCallButton instance using the specified properties. * @function create - * @memberof proto.HandshakeMessage.ClientFinish + * @memberof proto.HydratedTemplateButton.HydratedCallButton * @static - * @param {proto.HandshakeMessage.IClientFinish=} [properties] Properties to set - * @returns {proto.HandshakeMessage.ClientFinish} ClientFinish instance + * @param {proto.HydratedTemplateButton.IHydratedCallButton=} [properties] Properties to set + * @returns {proto.HydratedTemplateButton.HydratedCallButton} HydratedCallButton instance */ - ClientFinish.create = function create(properties) { - return new ClientFinish(properties); + HydratedCallButton.create = function create(properties) { + return new HydratedCallButton(properties); }; /** - * Encodes the specified ClientFinish message. Does not implicitly {@link proto.HandshakeMessage.ClientFinish.verify|verify} messages. + * Encodes the specified HydratedCallButton message. Does not implicitly {@link proto.HydratedTemplateButton.HydratedCallButton.verify|verify} messages. * @function encode - * @memberof proto.HandshakeMessage.ClientFinish + * @memberof proto.HydratedTemplateButton.HydratedCallButton * @static - * @param {proto.HandshakeMessage.IClientFinish} message ClientFinish message or plain object to encode + * @param {proto.HydratedTemplateButton.IHydratedCallButton} message HydratedCallButton message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ClientFinish.encode = function encode(message, writer) { + HydratedCallButton.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message["static"] != null && Object.hasOwnProperty.call(message, "static")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message["static"]); - if (message.payload != null && Object.hasOwnProperty.call(message, "payload")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.payload); + if (message.displayText != null && Object.hasOwnProperty.call(message, "displayText")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayText); + if (message.phoneNumber != null && Object.hasOwnProperty.call(message, "phoneNumber")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.phoneNumber); return writer; }; /** - * Encodes the specified ClientFinish message, length delimited. Does not implicitly {@link proto.HandshakeMessage.ClientFinish.verify|verify} messages. + * Encodes the specified HydratedCallButton message, length delimited. Does not implicitly {@link proto.HydratedTemplateButton.HydratedCallButton.verify|verify} messages. * @function encodeDelimited - * @memberof proto.HandshakeMessage.ClientFinish + * @memberof proto.HydratedTemplateButton.HydratedCallButton * @static - * @param {proto.HandshakeMessage.IClientFinish} message ClientFinish message or plain object to encode + * @param {proto.HydratedTemplateButton.IHydratedCallButton} message HydratedCallButton message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ClientFinish.encodeDelimited = function encodeDelimited(message, writer) { + HydratedCallButton.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ClientFinish message from the specified reader or buffer. + * Decodes a HydratedCallButton message from the specified reader or buffer. * @function decode - * @memberof proto.HandshakeMessage.ClientFinish + * @memberof proto.HydratedTemplateButton.HydratedCallButton * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {proto.HandshakeMessage.ClientFinish} ClientFinish + * @returns {proto.HydratedTemplateButton.HydratedCallButton} HydratedCallButton * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ClientFinish.decode = function decode(reader, length) { + HydratedCallButton.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.HandshakeMessage.ClientFinish(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.HydratedTemplateButton.HydratedCallButton(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message["static"] = reader.bytes(); + message.displayText = reader.string(); break; case 2: - message.payload = reader.bytes(); + message.phoneNumber = reader.string(); break; default: reader.skipType(tag & 7); @@ -17247,136 +22170,117 @@ $root.proto = (function() { }; /** - * Decodes a ClientFinish message from the specified reader or buffer, length delimited. + * Decodes a HydratedCallButton message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof proto.HandshakeMessage.ClientFinish + * @memberof proto.HydratedTemplateButton.HydratedCallButton * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.HandshakeMessage.ClientFinish} ClientFinish + * @returns {proto.HydratedTemplateButton.HydratedCallButton} HydratedCallButton * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ClientFinish.decodeDelimited = function decodeDelimited(reader) { + HydratedCallButton.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ClientFinish message. + * Verifies a HydratedCallButton message. * @function verify - * @memberof proto.HandshakeMessage.ClientFinish + * @memberof proto.HydratedTemplateButton.HydratedCallButton * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ClientFinish.verify = function verify(message) { + HydratedCallButton.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message["static"] != null && message.hasOwnProperty("static")) - if (!(message["static"] && typeof message["static"].length === "number" || $util.isString(message["static"]))) - return "static: buffer expected"; - if (message.payload != null && message.hasOwnProperty("payload")) - if (!(message.payload && typeof message.payload.length === "number" || $util.isString(message.payload))) - return "payload: buffer expected"; + if (message.displayText != null && message.hasOwnProperty("displayText")) + if (!$util.isString(message.displayText)) + return "displayText: string expected"; + if (message.phoneNumber != null && message.hasOwnProperty("phoneNumber")) + if (!$util.isString(message.phoneNumber)) + return "phoneNumber: string expected"; return null; }; /** - * Creates a ClientFinish message from a plain object. Also converts values to their respective internal types. + * Creates a HydratedCallButton message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof proto.HandshakeMessage.ClientFinish + * @memberof proto.HydratedTemplateButton.HydratedCallButton * @static * @param {Object.} object Plain object - * @returns {proto.HandshakeMessage.ClientFinish} ClientFinish + * @returns {proto.HydratedTemplateButton.HydratedCallButton} HydratedCallButton */ - ClientFinish.fromObject = function fromObject(object) { - if (object instanceof $root.proto.HandshakeMessage.ClientFinish) + HydratedCallButton.fromObject = function fromObject(object) { + if (object instanceof $root.proto.HydratedTemplateButton.HydratedCallButton) return object; - var message = new $root.proto.HandshakeMessage.ClientFinish(); - if (object["static"] != null) - if (typeof object["static"] === "string") - $util.base64.decode(object["static"], message["static"] = $util.newBuffer($util.base64.length(object["static"])), 0); - else if (object["static"].length) - message["static"] = object["static"]; - if (object.payload != null) - if (typeof object.payload === "string") - $util.base64.decode(object.payload, message.payload = $util.newBuffer($util.base64.length(object.payload)), 0); - else if (object.payload.length) - message.payload = object.payload; + var message = new $root.proto.HydratedTemplateButton.HydratedCallButton(); + if (object.displayText != null) + message.displayText = String(object.displayText); + if (object.phoneNumber != null) + message.phoneNumber = String(object.phoneNumber); return message; }; /** - * Creates a plain object from a ClientFinish message. Also converts values to other types if specified. + * Creates a plain object from a HydratedCallButton message. Also converts values to other types if specified. * @function toObject - * @memberof proto.HandshakeMessage.ClientFinish + * @memberof proto.HydratedTemplateButton.HydratedCallButton * @static - * @param {proto.HandshakeMessage.ClientFinish} message ClientFinish + * @param {proto.HydratedTemplateButton.HydratedCallButton} message HydratedCallButton * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ClientFinish.toObject = function toObject(message, options) { + HydratedCallButton.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - if (options.bytes === String) - object["static"] = ""; - else { - object["static"] = []; - if (options.bytes !== Array) - object["static"] = $util.newBuffer(object["static"]); - } - if (options.bytes === String) - object.payload = ""; - else { - object.payload = []; - if (options.bytes !== Array) - object.payload = $util.newBuffer(object.payload); - } + object.displayText = ""; + object.phoneNumber = ""; } - if (message["static"] != null && message.hasOwnProperty("static")) - object["static"] = options.bytes === String ? $util.base64.encode(message["static"], 0, message["static"].length) : options.bytes === Array ? Array.prototype.slice.call(message["static"]) : message["static"]; - if (message.payload != null && message.hasOwnProperty("payload")) - object.payload = options.bytes === String ? $util.base64.encode(message.payload, 0, message.payload.length) : options.bytes === Array ? Array.prototype.slice.call(message.payload) : message.payload; + if (message.displayText != null && message.hasOwnProperty("displayText")) + object.displayText = message.displayText; + if (message.phoneNumber != null && message.hasOwnProperty("phoneNumber")) + object.phoneNumber = message.phoneNumber; return object; }; /** - * Converts this ClientFinish to JSON. + * Converts this HydratedCallButton to JSON. * @function toJSON - * @memberof proto.HandshakeMessage.ClientFinish + * @memberof proto.HydratedTemplateButton.HydratedCallButton * @instance * @returns {Object.} JSON object */ - ClientFinish.prototype.toJSON = function toJSON() { + HydratedCallButton.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ClientFinish; + return HydratedCallButton; })(); - HandshakeMessage.ClientHello = (function() { + HydratedTemplateButton.HydratedQuickReplyButton = (function() { /** - * Properties of a ClientHello. - * @memberof proto.HandshakeMessage - * @interface IClientHello - * @property {Uint8Array|null} [ephemeral] ClientHello ephemeral - * @property {Uint8Array|null} ["static"] ClientHello static - * @property {Uint8Array|null} [payload] ClientHello payload + * Properties of a HydratedQuickReplyButton. + * @memberof proto.HydratedTemplateButton + * @interface IHydratedQuickReplyButton + * @property {string|null} [displayText] HydratedQuickReplyButton displayText + * @property {string|null} [id] HydratedQuickReplyButton id */ /** - * Constructs a new ClientHello. - * @memberof proto.HandshakeMessage - * @classdesc Represents a ClientHello. - * @implements IClientHello + * Constructs a new HydratedQuickReplyButton. + * @memberof proto.HydratedTemplateButton + * @classdesc Represents a HydratedQuickReplyButton. + * @implements IHydratedQuickReplyButton * @constructor - * @param {proto.HandshakeMessage.IClientHello=} [properties] Properties to set + * @param {proto.HydratedTemplateButton.IHydratedQuickReplyButton=} [properties] Properties to set */ - function ClientHello(properties) { + function HydratedQuickReplyButton(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -17384,101 +22288,88 @@ $root.proto = (function() { } /** - * ClientHello ephemeral. - * @member {Uint8Array} ephemeral - * @memberof proto.HandshakeMessage.ClientHello - * @instance - */ - ClientHello.prototype.ephemeral = $util.newBuffer([]); - - /** - * ClientHello static. - * @member {Uint8Array} static - * @memberof proto.HandshakeMessage.ClientHello + * HydratedQuickReplyButton displayText. + * @member {string} displayText + * @memberof proto.HydratedTemplateButton.HydratedQuickReplyButton * @instance */ - ClientHello.prototype["static"] = $util.newBuffer([]); + HydratedQuickReplyButton.prototype.displayText = ""; - /** - * ClientHello payload. - * @member {Uint8Array} payload - * @memberof proto.HandshakeMessage.ClientHello + /** + * HydratedQuickReplyButton id. + * @member {string} id + * @memberof proto.HydratedTemplateButton.HydratedQuickReplyButton * @instance */ - ClientHello.prototype.payload = $util.newBuffer([]); + HydratedQuickReplyButton.prototype.id = ""; /** - * Creates a new ClientHello instance using the specified properties. + * Creates a new HydratedQuickReplyButton instance using the specified properties. * @function create - * @memberof proto.HandshakeMessage.ClientHello + * @memberof proto.HydratedTemplateButton.HydratedQuickReplyButton * @static - * @param {proto.HandshakeMessage.IClientHello=} [properties] Properties to set - * @returns {proto.HandshakeMessage.ClientHello} ClientHello instance + * @param {proto.HydratedTemplateButton.IHydratedQuickReplyButton=} [properties] Properties to set + * @returns {proto.HydratedTemplateButton.HydratedQuickReplyButton} HydratedQuickReplyButton instance */ - ClientHello.create = function create(properties) { - return new ClientHello(properties); + HydratedQuickReplyButton.create = function create(properties) { + return new HydratedQuickReplyButton(properties); }; /** - * Encodes the specified ClientHello message. Does not implicitly {@link proto.HandshakeMessage.ClientHello.verify|verify} messages. + * Encodes the specified HydratedQuickReplyButton message. Does not implicitly {@link proto.HydratedTemplateButton.HydratedQuickReplyButton.verify|verify} messages. * @function encode - * @memberof proto.HandshakeMessage.ClientHello + * @memberof proto.HydratedTemplateButton.HydratedQuickReplyButton * @static - * @param {proto.HandshakeMessage.IClientHello} message ClientHello message or plain object to encode + * @param {proto.HydratedTemplateButton.IHydratedQuickReplyButton} message HydratedQuickReplyButton message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ClientHello.encode = function encode(message, writer) { + HydratedQuickReplyButton.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.ephemeral != null && Object.hasOwnProperty.call(message, "ephemeral")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.ephemeral); - if (message["static"] != null && Object.hasOwnProperty.call(message, "static")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message["static"]); - if (message.payload != null && Object.hasOwnProperty.call(message, "payload")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.payload); + if (message.displayText != null && Object.hasOwnProperty.call(message, "displayText")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayText); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.id); return writer; }; /** - * Encodes the specified ClientHello message, length delimited. Does not implicitly {@link proto.HandshakeMessage.ClientHello.verify|verify} messages. + * Encodes the specified HydratedQuickReplyButton message, length delimited. Does not implicitly {@link proto.HydratedTemplateButton.HydratedQuickReplyButton.verify|verify} messages. * @function encodeDelimited - * @memberof proto.HandshakeMessage.ClientHello + * @memberof proto.HydratedTemplateButton.HydratedQuickReplyButton * @static - * @param {proto.HandshakeMessage.IClientHello} message ClientHello message or plain object to encode + * @param {proto.HydratedTemplateButton.IHydratedQuickReplyButton} message HydratedQuickReplyButton message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ClientHello.encodeDelimited = function encodeDelimited(message, writer) { + HydratedQuickReplyButton.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ClientHello message from the specified reader or buffer. + * Decodes a HydratedQuickReplyButton message from the specified reader or buffer. * @function decode - * @memberof proto.HandshakeMessage.ClientHello + * @memberof proto.HydratedTemplateButton.HydratedQuickReplyButton * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {proto.HandshakeMessage.ClientHello} ClientHello + * @returns {proto.HydratedTemplateButton.HydratedQuickReplyButton} HydratedQuickReplyButton * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ClientHello.decode = function decode(reader, length) { + HydratedQuickReplyButton.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.HandshakeMessage.ClientHello(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.HydratedTemplateButton.HydratedQuickReplyButton(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.ephemeral = reader.bytes(); + message.displayText = reader.string(); break; case 2: - message["static"] = reader.bytes(); - break; - case 3: - message.payload = reader.bytes(); + message.id = reader.string(); break; default: reader.skipType(tag & 7); @@ -17489,153 +22380,119 @@ $root.proto = (function() { }; /** - * Decodes a ClientHello message from the specified reader or buffer, length delimited. + * Decodes a HydratedQuickReplyButton message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof proto.HandshakeMessage.ClientHello + * @memberof proto.HydratedTemplateButton.HydratedQuickReplyButton * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.HandshakeMessage.ClientHello} ClientHello + * @returns {proto.HydratedTemplateButton.HydratedQuickReplyButton} HydratedQuickReplyButton * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ClientHello.decodeDelimited = function decodeDelimited(reader) { + HydratedQuickReplyButton.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ClientHello message. + * Verifies a HydratedQuickReplyButton message. * @function verify - * @memberof proto.HandshakeMessage.ClientHello + * @memberof proto.HydratedTemplateButton.HydratedQuickReplyButton * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ClientHello.verify = function verify(message) { + HydratedQuickReplyButton.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.ephemeral != null && message.hasOwnProperty("ephemeral")) - if (!(message.ephemeral && typeof message.ephemeral.length === "number" || $util.isString(message.ephemeral))) - return "ephemeral: buffer expected"; - if (message["static"] != null && message.hasOwnProperty("static")) - if (!(message["static"] && typeof message["static"].length === "number" || $util.isString(message["static"]))) - return "static: buffer expected"; - if (message.payload != null && message.hasOwnProperty("payload")) - if (!(message.payload && typeof message.payload.length === "number" || $util.isString(message.payload))) - return "payload: buffer expected"; + if (message.displayText != null && message.hasOwnProperty("displayText")) + if (!$util.isString(message.displayText)) + return "displayText: string expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; return null; }; /** - * Creates a ClientHello message from a plain object. Also converts values to their respective internal types. + * Creates a HydratedQuickReplyButton message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof proto.HandshakeMessage.ClientHello + * @memberof proto.HydratedTemplateButton.HydratedQuickReplyButton * @static * @param {Object.} object Plain object - * @returns {proto.HandshakeMessage.ClientHello} ClientHello + * @returns {proto.HydratedTemplateButton.HydratedQuickReplyButton} HydratedQuickReplyButton */ - ClientHello.fromObject = function fromObject(object) { - if (object instanceof $root.proto.HandshakeMessage.ClientHello) + HydratedQuickReplyButton.fromObject = function fromObject(object) { + if (object instanceof $root.proto.HydratedTemplateButton.HydratedQuickReplyButton) return object; - var message = new $root.proto.HandshakeMessage.ClientHello(); - if (object.ephemeral != null) - if (typeof object.ephemeral === "string") - $util.base64.decode(object.ephemeral, message.ephemeral = $util.newBuffer($util.base64.length(object.ephemeral)), 0); - else if (object.ephemeral.length) - message.ephemeral = object.ephemeral; - if (object["static"] != null) - if (typeof object["static"] === "string") - $util.base64.decode(object["static"], message["static"] = $util.newBuffer($util.base64.length(object["static"])), 0); - else if (object["static"].length) - message["static"] = object["static"]; - if (object.payload != null) - if (typeof object.payload === "string") - $util.base64.decode(object.payload, message.payload = $util.newBuffer($util.base64.length(object.payload)), 0); - else if (object.payload.length) - message.payload = object.payload; + var message = new $root.proto.HydratedTemplateButton.HydratedQuickReplyButton(); + if (object.displayText != null) + message.displayText = String(object.displayText); + if (object.id != null) + message.id = String(object.id); return message; }; /** - * Creates a plain object from a ClientHello message. Also converts values to other types if specified. + * Creates a plain object from a HydratedQuickReplyButton message. Also converts values to other types if specified. * @function toObject - * @memberof proto.HandshakeMessage.ClientHello + * @memberof proto.HydratedTemplateButton.HydratedQuickReplyButton * @static - * @param {proto.HandshakeMessage.ClientHello} message ClientHello + * @param {proto.HydratedTemplateButton.HydratedQuickReplyButton} message HydratedQuickReplyButton * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ClientHello.toObject = function toObject(message, options) { + HydratedQuickReplyButton.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - if (options.bytes === String) - object.ephemeral = ""; - else { - object.ephemeral = []; - if (options.bytes !== Array) - object.ephemeral = $util.newBuffer(object.ephemeral); - } - if (options.bytes === String) - object["static"] = ""; - else { - object["static"] = []; - if (options.bytes !== Array) - object["static"] = $util.newBuffer(object["static"]); - } - if (options.bytes === String) - object.payload = ""; - else { - object.payload = []; - if (options.bytes !== Array) - object.payload = $util.newBuffer(object.payload); - } + object.displayText = ""; + object.id = ""; } - if (message.ephemeral != null && message.hasOwnProperty("ephemeral")) - object.ephemeral = options.bytes === String ? $util.base64.encode(message.ephemeral, 0, message.ephemeral.length) : options.bytes === Array ? Array.prototype.slice.call(message.ephemeral) : message.ephemeral; - if (message["static"] != null && message.hasOwnProperty("static")) - object["static"] = options.bytes === String ? $util.base64.encode(message["static"], 0, message["static"].length) : options.bytes === Array ? Array.prototype.slice.call(message["static"]) : message["static"]; - if (message.payload != null && message.hasOwnProperty("payload")) - object.payload = options.bytes === String ? $util.base64.encode(message.payload, 0, message.payload.length) : options.bytes === Array ? Array.prototype.slice.call(message.payload) : message.payload; + if (message.displayText != null && message.hasOwnProperty("displayText")) + object.displayText = message.displayText; + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; return object; }; /** - * Converts this ClientHello to JSON. + * Converts this HydratedQuickReplyButton to JSON. * @function toJSON - * @memberof proto.HandshakeMessage.ClientHello + * @memberof proto.HydratedTemplateButton.HydratedQuickReplyButton * @instance * @returns {Object.} JSON object */ - ClientHello.prototype.toJSON = function toJSON() { + HydratedQuickReplyButton.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ClientHello; + return HydratedQuickReplyButton; })(); - HandshakeMessage.ServerHello = (function() { + HydratedTemplateButton.HydratedURLButton = (function() { /** - * Properties of a ServerHello. - * @memberof proto.HandshakeMessage - * @interface IServerHello - * @property {Uint8Array|null} [ephemeral] ServerHello ephemeral - * @property {Uint8Array|null} ["static"] ServerHello static - * @property {Uint8Array|null} [payload] ServerHello payload + * Properties of a HydratedURLButton. + * @memberof proto.HydratedTemplateButton + * @interface IHydratedURLButton + * @property {string|null} [displayText] HydratedURLButton displayText + * @property {string|null} [url] HydratedURLButton url + * @property {string|null} [consentedUsersUrl] HydratedURLButton consentedUsersUrl + * @property {proto.HydratedTemplateButton.HydratedURLButton.WebviewPresentationType|null} [webviewPresentation] HydratedURLButton webviewPresentation */ /** - * Constructs a new ServerHello. - * @memberof proto.HandshakeMessage - * @classdesc Represents a ServerHello. - * @implements IServerHello + * Constructs a new HydratedURLButton. + * @memberof proto.HydratedTemplateButton + * @classdesc Represents a HydratedURLButton. + * @implements IHydratedURLButton * @constructor - * @param {proto.HandshakeMessage.IServerHello=} [properties] Properties to set + * @param {proto.HydratedTemplateButton.IHydratedURLButton=} [properties] Properties to set */ - function ServerHello(properties) { + function HydratedURLButton(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -17643,101 +22500,114 @@ $root.proto = (function() { } /** - * ServerHello ephemeral. - * @member {Uint8Array} ephemeral - * @memberof proto.HandshakeMessage.ServerHello + * HydratedURLButton displayText. + * @member {string} displayText + * @memberof proto.HydratedTemplateButton.HydratedURLButton * @instance */ - ServerHello.prototype.ephemeral = $util.newBuffer([]); + HydratedURLButton.prototype.displayText = ""; /** - * ServerHello static. - * @member {Uint8Array} static - * @memberof proto.HandshakeMessage.ServerHello + * HydratedURLButton url. + * @member {string} url + * @memberof proto.HydratedTemplateButton.HydratedURLButton * @instance */ - ServerHello.prototype["static"] = $util.newBuffer([]); + HydratedURLButton.prototype.url = ""; /** - * ServerHello payload. - * @member {Uint8Array} payload - * @memberof proto.HandshakeMessage.ServerHello + * HydratedURLButton consentedUsersUrl. + * @member {string} consentedUsersUrl + * @memberof proto.HydratedTemplateButton.HydratedURLButton * @instance */ - ServerHello.prototype.payload = $util.newBuffer([]); + HydratedURLButton.prototype.consentedUsersUrl = ""; /** - * Creates a new ServerHello instance using the specified properties. + * HydratedURLButton webviewPresentation. + * @member {proto.HydratedTemplateButton.HydratedURLButton.WebviewPresentationType} webviewPresentation + * @memberof proto.HydratedTemplateButton.HydratedURLButton + * @instance + */ + HydratedURLButton.prototype.webviewPresentation = 1; + + /** + * Creates a new HydratedURLButton instance using the specified properties. * @function create - * @memberof proto.HandshakeMessage.ServerHello + * @memberof proto.HydratedTemplateButton.HydratedURLButton * @static - * @param {proto.HandshakeMessage.IServerHello=} [properties] Properties to set - * @returns {proto.HandshakeMessage.ServerHello} ServerHello instance + * @param {proto.HydratedTemplateButton.IHydratedURLButton=} [properties] Properties to set + * @returns {proto.HydratedTemplateButton.HydratedURLButton} HydratedURLButton instance */ - ServerHello.create = function create(properties) { - return new ServerHello(properties); + HydratedURLButton.create = function create(properties) { + return new HydratedURLButton(properties); }; /** - * Encodes the specified ServerHello message. Does not implicitly {@link proto.HandshakeMessage.ServerHello.verify|verify} messages. + * Encodes the specified HydratedURLButton message. Does not implicitly {@link proto.HydratedTemplateButton.HydratedURLButton.verify|verify} messages. * @function encode - * @memberof proto.HandshakeMessage.ServerHello + * @memberof proto.HydratedTemplateButton.HydratedURLButton * @static - * @param {proto.HandshakeMessage.IServerHello} message ServerHello message or plain object to encode + * @param {proto.HydratedTemplateButton.IHydratedURLButton} message HydratedURLButton message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServerHello.encode = function encode(message, writer) { + HydratedURLButton.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.ephemeral != null && Object.hasOwnProperty.call(message, "ephemeral")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.ephemeral); - if (message["static"] != null && Object.hasOwnProperty.call(message, "static")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message["static"]); - if (message.payload != null && Object.hasOwnProperty.call(message, "payload")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.payload); + if (message.displayText != null && Object.hasOwnProperty.call(message, "displayText")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayText); + if (message.url != null && Object.hasOwnProperty.call(message, "url")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.url); + if (message.consentedUsersUrl != null && Object.hasOwnProperty.call(message, "consentedUsersUrl")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.consentedUsersUrl); + if (message.webviewPresentation != null && Object.hasOwnProperty.call(message, "webviewPresentation")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.webviewPresentation); return writer; }; /** - * Encodes the specified ServerHello message, length delimited. Does not implicitly {@link proto.HandshakeMessage.ServerHello.verify|verify} messages. + * Encodes the specified HydratedURLButton message, length delimited. Does not implicitly {@link proto.HydratedTemplateButton.HydratedURLButton.verify|verify} messages. * @function encodeDelimited - * @memberof proto.HandshakeMessage.ServerHello + * @memberof proto.HydratedTemplateButton.HydratedURLButton * @static - * @param {proto.HandshakeMessage.IServerHello} message ServerHello message or plain object to encode + * @param {proto.HydratedTemplateButton.IHydratedURLButton} message HydratedURLButton message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServerHello.encodeDelimited = function encodeDelimited(message, writer) { + HydratedURLButton.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ServerHello message from the specified reader or buffer. + * Decodes a HydratedURLButton message from the specified reader or buffer. * @function decode - * @memberof proto.HandshakeMessage.ServerHello + * @memberof proto.HydratedTemplateButton.HydratedURLButton * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {proto.HandshakeMessage.ServerHello} ServerHello + * @returns {proto.HydratedTemplateButton.HydratedURLButton} HydratedURLButton * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ServerHello.decode = function decode(reader, length) { + HydratedURLButton.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.HandshakeMessage.ServerHello(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.HydratedTemplateButton.HydratedURLButton(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.ephemeral = reader.bytes(); + message.displayText = reader.string(); break; case 2: - message["static"] = reader.bytes(); + message.url = reader.string(); break; case 3: - message.payload = reader.bytes(); + message.consentedUsersUrl = reader.string(); + break; + case 4: + message.webviewPresentation = reader.int32(); break; default: reader.skipType(tag & 7); @@ -17748,169 +22618,401 @@ $root.proto = (function() { }; /** - * Decodes a ServerHello message from the specified reader or buffer, length delimited. + * Decodes a HydratedURLButton message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof proto.HandshakeMessage.ServerHello + * @memberof proto.HydratedTemplateButton.HydratedURLButton * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.HandshakeMessage.ServerHello} ServerHello + * @returns {proto.HydratedTemplateButton.HydratedURLButton} HydratedURLButton * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ServerHello.decodeDelimited = function decodeDelimited(reader) { + HydratedURLButton.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ServerHello message. + * Verifies a HydratedURLButton message. * @function verify - * @memberof proto.HandshakeMessage.ServerHello + * @memberof proto.HydratedTemplateButton.HydratedURLButton * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ServerHello.verify = function verify(message) { + HydratedURLButton.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.ephemeral != null && message.hasOwnProperty("ephemeral")) - if (!(message.ephemeral && typeof message.ephemeral.length === "number" || $util.isString(message.ephemeral))) - return "ephemeral: buffer expected"; - if (message["static"] != null && message.hasOwnProperty("static")) - if (!(message["static"] && typeof message["static"].length === "number" || $util.isString(message["static"]))) - return "static: buffer expected"; - if (message.payload != null && message.hasOwnProperty("payload")) - if (!(message.payload && typeof message.payload.length === "number" || $util.isString(message.payload))) - return "payload: buffer expected"; + if (message.displayText != null && message.hasOwnProperty("displayText")) + if (!$util.isString(message.displayText)) + return "displayText: string expected"; + if (message.url != null && message.hasOwnProperty("url")) + if (!$util.isString(message.url)) + return "url: string expected"; + if (message.consentedUsersUrl != null && message.hasOwnProperty("consentedUsersUrl")) + if (!$util.isString(message.consentedUsersUrl)) + return "consentedUsersUrl: string expected"; + if (message.webviewPresentation != null && message.hasOwnProperty("webviewPresentation")) + switch (message.webviewPresentation) { + default: + return "webviewPresentation: enum value expected"; + case 1: + case 2: + case 3: + break; + } return null; }; - /** - * Creates a ServerHello message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.HandshakeMessage.ServerHello - * @static - * @param {Object.} object Plain object - * @returns {proto.HandshakeMessage.ServerHello} ServerHello - */ - ServerHello.fromObject = function fromObject(object) { - if (object instanceof $root.proto.HandshakeMessage.ServerHello) - return object; - var message = new $root.proto.HandshakeMessage.ServerHello(); - if (object.ephemeral != null) - if (typeof object.ephemeral === "string") - $util.base64.decode(object.ephemeral, message.ephemeral = $util.newBuffer($util.base64.length(object.ephemeral)), 0); - else if (object.ephemeral.length) - message.ephemeral = object.ephemeral; - if (object["static"] != null) - if (typeof object["static"] === "string") - $util.base64.decode(object["static"], message["static"] = $util.newBuffer($util.base64.length(object["static"])), 0); - else if (object["static"].length) - message["static"] = object["static"]; - if (object.payload != null) - if (typeof object.payload === "string") - $util.base64.decode(object.payload, message.payload = $util.newBuffer($util.base64.length(object.payload)), 0); - else if (object.payload.length) - message.payload = object.payload; - return message; - }; + /** + * Creates a HydratedURLButton message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.HydratedTemplateButton.HydratedURLButton + * @static + * @param {Object.} object Plain object + * @returns {proto.HydratedTemplateButton.HydratedURLButton} HydratedURLButton + */ + HydratedURLButton.fromObject = function fromObject(object) { + if (object instanceof $root.proto.HydratedTemplateButton.HydratedURLButton) + return object; + var message = new $root.proto.HydratedTemplateButton.HydratedURLButton(); + if (object.displayText != null) + message.displayText = String(object.displayText); + if (object.url != null) + message.url = String(object.url); + if (object.consentedUsersUrl != null) + message.consentedUsersUrl = String(object.consentedUsersUrl); + switch (object.webviewPresentation) { + case "FULL": + case 1: + message.webviewPresentation = 1; + break; + case "TALL": + case 2: + message.webviewPresentation = 2; + break; + case "COMPACT": + case 3: + message.webviewPresentation = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a HydratedURLButton message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.HydratedTemplateButton.HydratedURLButton + * @static + * @param {proto.HydratedTemplateButton.HydratedURLButton} message HydratedURLButton + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HydratedURLButton.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayText = ""; + object.url = ""; + object.consentedUsersUrl = ""; + object.webviewPresentation = options.enums === String ? "FULL" : 1; + } + if (message.displayText != null && message.hasOwnProperty("displayText")) + object.displayText = message.displayText; + if (message.url != null && message.hasOwnProperty("url")) + object.url = message.url; + if (message.consentedUsersUrl != null && message.hasOwnProperty("consentedUsersUrl")) + object.consentedUsersUrl = message.consentedUsersUrl; + if (message.webviewPresentation != null && message.hasOwnProperty("webviewPresentation")) + object.webviewPresentation = options.enums === String ? $root.proto.HydratedTemplateButton.HydratedURLButton.WebviewPresentationType[message.webviewPresentation] : message.webviewPresentation; + return object; + }; + + /** + * Converts this HydratedURLButton to JSON. + * @function toJSON + * @memberof proto.HydratedTemplateButton.HydratedURLButton + * @instance + * @returns {Object.} JSON object + */ + HydratedURLButton.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * WebviewPresentationType enum. + * @name proto.HydratedTemplateButton.HydratedURLButton.WebviewPresentationType + * @enum {number} + * @property {number} FULL=1 FULL value + * @property {number} TALL=2 TALL value + * @property {number} COMPACT=3 COMPACT value + */ + HydratedURLButton.WebviewPresentationType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "FULL"] = 1; + values[valuesById[2] = "TALL"] = 2; + values[valuesById[3] = "COMPACT"] = 3; + return values; + })(); + + return HydratedURLButton; + })(); + + return HydratedTemplateButton; + })(); + + proto.IdentityKeyPairStructure = (function() { + + /** + * Properties of an IdentityKeyPairStructure. + * @memberof proto + * @interface IIdentityKeyPairStructure + * @property {Uint8Array|null} [publicKey] IdentityKeyPairStructure publicKey + * @property {Uint8Array|null} [privateKey] IdentityKeyPairStructure privateKey + */ + + /** + * Constructs a new IdentityKeyPairStructure. + * @memberof proto + * @classdesc Represents an IdentityKeyPairStructure. + * @implements IIdentityKeyPairStructure + * @constructor + * @param {proto.IIdentityKeyPairStructure=} [properties] Properties to set + */ + function IdentityKeyPairStructure(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * IdentityKeyPairStructure publicKey. + * @member {Uint8Array} publicKey + * @memberof proto.IdentityKeyPairStructure + * @instance + */ + IdentityKeyPairStructure.prototype.publicKey = $util.newBuffer([]); + + /** + * IdentityKeyPairStructure privateKey. + * @member {Uint8Array} privateKey + * @memberof proto.IdentityKeyPairStructure + * @instance + */ + IdentityKeyPairStructure.prototype.privateKey = $util.newBuffer([]); + + /** + * Creates a new IdentityKeyPairStructure instance using the specified properties. + * @function create + * @memberof proto.IdentityKeyPairStructure + * @static + * @param {proto.IIdentityKeyPairStructure=} [properties] Properties to set + * @returns {proto.IdentityKeyPairStructure} IdentityKeyPairStructure instance + */ + IdentityKeyPairStructure.create = function create(properties) { + return new IdentityKeyPairStructure(properties); + }; + + /** + * Encodes the specified IdentityKeyPairStructure message. Does not implicitly {@link proto.IdentityKeyPairStructure.verify|verify} messages. + * @function encode + * @memberof proto.IdentityKeyPairStructure + * @static + * @param {proto.IIdentityKeyPairStructure} message IdentityKeyPairStructure message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IdentityKeyPairStructure.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.publicKey != null && Object.hasOwnProperty.call(message, "publicKey")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.publicKey); + if (message.privateKey != null && Object.hasOwnProperty.call(message, "privateKey")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.privateKey); + return writer; + }; + + /** + * Encodes the specified IdentityKeyPairStructure message, length delimited. Does not implicitly {@link proto.IdentityKeyPairStructure.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.IdentityKeyPairStructure + * @static + * @param {proto.IIdentityKeyPairStructure} message IdentityKeyPairStructure message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IdentityKeyPairStructure.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IdentityKeyPairStructure message from the specified reader or buffer. + * @function decode + * @memberof proto.IdentityKeyPairStructure + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.IdentityKeyPairStructure} IdentityKeyPairStructure + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IdentityKeyPairStructure.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.IdentityKeyPairStructure(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.publicKey = reader.bytes(); + break; + case 2: + message.privateKey = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IdentityKeyPairStructure message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.IdentityKeyPairStructure + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.IdentityKeyPairStructure} IdentityKeyPairStructure + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IdentityKeyPairStructure.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IdentityKeyPairStructure message. + * @function verify + * @memberof proto.IdentityKeyPairStructure + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IdentityKeyPairStructure.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.publicKey != null && message.hasOwnProperty("publicKey")) + if (!(message.publicKey && typeof message.publicKey.length === "number" || $util.isString(message.publicKey))) + return "publicKey: buffer expected"; + if (message.privateKey != null && message.hasOwnProperty("privateKey")) + if (!(message.privateKey && typeof message.privateKey.length === "number" || $util.isString(message.privateKey))) + return "privateKey: buffer expected"; + return null; + }; - /** - * Creates a plain object from a ServerHello message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.HandshakeMessage.ServerHello - * @static - * @param {proto.HandshakeMessage.ServerHello} message ServerHello - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ServerHello.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.ephemeral = ""; - else { - object.ephemeral = []; - if (options.bytes !== Array) - object.ephemeral = $util.newBuffer(object.ephemeral); - } - if (options.bytes === String) - object["static"] = ""; - else { - object["static"] = []; - if (options.bytes !== Array) - object["static"] = $util.newBuffer(object["static"]); - } - if (options.bytes === String) - object.payload = ""; - else { - object.payload = []; - if (options.bytes !== Array) - object.payload = $util.newBuffer(object.payload); - } - } - if (message.ephemeral != null && message.hasOwnProperty("ephemeral")) - object.ephemeral = options.bytes === String ? $util.base64.encode(message.ephemeral, 0, message.ephemeral.length) : options.bytes === Array ? Array.prototype.slice.call(message.ephemeral) : message.ephemeral; - if (message["static"] != null && message.hasOwnProperty("static")) - object["static"] = options.bytes === String ? $util.base64.encode(message["static"], 0, message["static"].length) : options.bytes === Array ? Array.prototype.slice.call(message["static"]) : message["static"]; - if (message.payload != null && message.hasOwnProperty("payload")) - object.payload = options.bytes === String ? $util.base64.encode(message.payload, 0, message.payload.length) : options.bytes === Array ? Array.prototype.slice.call(message.payload) : message.payload; + /** + * Creates an IdentityKeyPairStructure message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.IdentityKeyPairStructure + * @static + * @param {Object.} object Plain object + * @returns {proto.IdentityKeyPairStructure} IdentityKeyPairStructure + */ + IdentityKeyPairStructure.fromObject = function fromObject(object) { + if (object instanceof $root.proto.IdentityKeyPairStructure) return object; - }; + var message = new $root.proto.IdentityKeyPairStructure(); + if (object.publicKey != null) + if (typeof object.publicKey === "string") + $util.base64.decode(object.publicKey, message.publicKey = $util.newBuffer($util.base64.length(object.publicKey)), 0); + else if (object.publicKey.length) + message.publicKey = object.publicKey; + if (object.privateKey != null) + if (typeof object.privateKey === "string") + $util.base64.decode(object.privateKey, message.privateKey = $util.newBuffer($util.base64.length(object.privateKey)), 0); + else if (object.privateKey.length) + message.privateKey = object.privateKey; + return message; + }; - /** - * Converts this ServerHello to JSON. - * @function toJSON - * @memberof proto.HandshakeMessage.ServerHello - * @instance - * @returns {Object.} JSON object - */ - ServerHello.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from an IdentityKeyPairStructure message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.IdentityKeyPairStructure + * @static + * @param {proto.IdentityKeyPairStructure} message IdentityKeyPairStructure + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IdentityKeyPairStructure.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.publicKey = ""; + else { + object.publicKey = []; + if (options.bytes !== Array) + object.publicKey = $util.newBuffer(object.publicKey); + } + if (options.bytes === String) + object.privateKey = ""; + else { + object.privateKey = []; + if (options.bytes !== Array) + object.privateKey = $util.newBuffer(object.privateKey); + } + } + if (message.publicKey != null && message.hasOwnProperty("publicKey")) + object.publicKey = options.bytes === String ? $util.base64.encode(message.publicKey, 0, message.publicKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.publicKey) : message.publicKey; + if (message.privateKey != null && message.hasOwnProperty("privateKey")) + object.privateKey = options.bytes === String ? $util.base64.encode(message.privateKey, 0, message.privateKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.privateKey) : message.privateKey; + return object; + }; - return ServerHello; - })(); + /** + * Converts this IdentityKeyPairStructure to JSON. + * @function toJSON + * @memberof proto.IdentityKeyPairStructure + * @instance + * @returns {Object.} JSON object + */ + IdentityKeyPairStructure.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return HandshakeMessage; + return IdentityKeyPairStructure; })(); - proto.HistorySync = (function() { + proto.InteractiveAnnotation = (function() { /** - * Properties of a HistorySync. + * Properties of an InteractiveAnnotation. * @memberof proto - * @interface IHistorySync - * @property {proto.HistorySync.HistorySyncType} syncType HistorySync syncType - * @property {Array.|null} [conversations] HistorySync conversations - * @property {Array.|null} [statusV3Messages] HistorySync statusV3Messages - * @property {number|null} [chunkOrder] HistorySync chunkOrder - * @property {number|null} [progress] HistorySync progress - * @property {Array.|null} [pushnames] HistorySync pushnames - * @property {proto.IGlobalSettings|null} [globalSettings] HistorySync globalSettings - * @property {Uint8Array|null} [threadIdUserSecret] HistorySync threadIdUserSecret - * @property {number|null} [threadDsTimeframeOffset] HistorySync threadDsTimeframeOffset - * @property {Array.|null} [recentStickers] HistorySync recentStickers - * @property {Array.|null} [pastParticipants] HistorySync pastParticipants + * @interface IInteractiveAnnotation + * @property {Array.|null} [polygonVertices] InteractiveAnnotation polygonVertices + * @property {boolean|null} [shouldSkipConfirmation] InteractiveAnnotation shouldSkipConfirmation + * @property {proto.ILocation|null} [location] InteractiveAnnotation location + * @property {proto.ContextInfo.IForwardedNewsletterMessageInfo|null} [newsletter] InteractiveAnnotation newsletter */ /** - * Constructs a new HistorySync. + * Constructs a new InteractiveAnnotation. * @memberof proto - * @classdesc Represents a HistorySync. - * @implements IHistorySync + * @classdesc Represents an InteractiveAnnotation. + * @implements IInteractiveAnnotation * @constructor - * @param {proto.IHistorySync=} [properties] Properties to set + * @param {proto.IInteractiveAnnotation=} [properties] Properties to set */ - function HistorySync(properties) { - this.conversations = []; - this.statusV3Messages = []; - this.pushnames = []; - this.recentStickers = []; - this.pastParticipants = []; + function InteractiveAnnotation(properties) { + this.polygonVertices = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -17918,576 +23020,998 @@ $root.proto = (function() { } /** - * HistorySync syncType. - * @member {proto.HistorySync.HistorySyncType} syncType - * @memberof proto.HistorySync + * InteractiveAnnotation polygonVertices. + * @member {Array.} polygonVertices + * @memberof proto.InteractiveAnnotation * @instance */ - HistorySync.prototype.syncType = 0; + InteractiveAnnotation.prototype.polygonVertices = $util.emptyArray; /** - * HistorySync conversations. - * @member {Array.} conversations - * @memberof proto.HistorySync + * InteractiveAnnotation shouldSkipConfirmation. + * @member {boolean} shouldSkipConfirmation + * @memberof proto.InteractiveAnnotation * @instance */ - HistorySync.prototype.conversations = $util.emptyArray; + InteractiveAnnotation.prototype.shouldSkipConfirmation = false; /** - * HistorySync statusV3Messages. - * @member {Array.} statusV3Messages - * @memberof proto.HistorySync + * InteractiveAnnotation location. + * @member {proto.ILocation|null|undefined} location + * @memberof proto.InteractiveAnnotation * @instance */ - HistorySync.prototype.statusV3Messages = $util.emptyArray; + InteractiveAnnotation.prototype.location = null; /** - * HistorySync chunkOrder. - * @member {number} chunkOrder - * @memberof proto.HistorySync + * InteractiveAnnotation newsletter. + * @member {proto.ContextInfo.IForwardedNewsletterMessageInfo|null|undefined} newsletter + * @memberof proto.InteractiveAnnotation * @instance */ - HistorySync.prototype.chunkOrder = 0; + InteractiveAnnotation.prototype.newsletter = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * HistorySync progress. - * @member {number} progress - * @memberof proto.HistorySync + * InteractiveAnnotation action. + * @member {"location"|"newsletter"|undefined} action + * @memberof proto.InteractiveAnnotation * @instance */ - HistorySync.prototype.progress = 0; + Object.defineProperty(InteractiveAnnotation.prototype, "action", { + get: $util.oneOfGetter($oneOfFields = ["location", "newsletter"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * HistorySync pushnames. - * @member {Array.} pushnames - * @memberof proto.HistorySync + * Creates a new InteractiveAnnotation instance using the specified properties. + * @function create + * @memberof proto.InteractiveAnnotation + * @static + * @param {proto.IInteractiveAnnotation=} [properties] Properties to set + * @returns {proto.InteractiveAnnotation} InteractiveAnnotation instance + */ + InteractiveAnnotation.create = function create(properties) { + return new InteractiveAnnotation(properties); + }; + + /** + * Encodes the specified InteractiveAnnotation message. Does not implicitly {@link proto.InteractiveAnnotation.verify|verify} messages. + * @function encode + * @memberof proto.InteractiveAnnotation + * @static + * @param {proto.IInteractiveAnnotation} message InteractiveAnnotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InteractiveAnnotation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.polygonVertices != null && message.polygonVertices.length) + for (var i = 0; i < message.polygonVertices.length; ++i) + $root.proto.Point.encode(message.polygonVertices[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + $root.proto.Location.encode(message.location, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.newsletter != null && Object.hasOwnProperty.call(message, "newsletter")) + $root.proto.ContextInfo.ForwardedNewsletterMessageInfo.encode(message.newsletter, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.shouldSkipConfirmation != null && Object.hasOwnProperty.call(message, "shouldSkipConfirmation")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.shouldSkipConfirmation); + return writer; + }; + + /** + * Encodes the specified InteractiveAnnotation message, length delimited. Does not implicitly {@link proto.InteractiveAnnotation.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.InteractiveAnnotation + * @static + * @param {proto.IInteractiveAnnotation} message InteractiveAnnotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InteractiveAnnotation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InteractiveAnnotation message from the specified reader or buffer. + * @function decode + * @memberof proto.InteractiveAnnotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.InteractiveAnnotation} InteractiveAnnotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InteractiveAnnotation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.InteractiveAnnotation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.polygonVertices && message.polygonVertices.length)) + message.polygonVertices = []; + message.polygonVertices.push($root.proto.Point.decode(reader, reader.uint32())); + break; + case 4: + message.shouldSkipConfirmation = reader.bool(); + break; + case 2: + message.location = $root.proto.Location.decode(reader, reader.uint32()); + break; + case 3: + message.newsletter = $root.proto.ContextInfo.ForwardedNewsletterMessageInfo.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InteractiveAnnotation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.InteractiveAnnotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.InteractiveAnnotation} InteractiveAnnotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InteractiveAnnotation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InteractiveAnnotation message. + * @function verify + * @memberof proto.InteractiveAnnotation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InteractiveAnnotation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.polygonVertices != null && message.hasOwnProperty("polygonVertices")) { + if (!Array.isArray(message.polygonVertices)) + return "polygonVertices: array expected"; + for (var i = 0; i < message.polygonVertices.length; ++i) { + var error = $root.proto.Point.verify(message.polygonVertices[i]); + if (error) + return "polygonVertices." + error; + } + } + if (message.shouldSkipConfirmation != null && message.hasOwnProperty("shouldSkipConfirmation")) + if (typeof message.shouldSkipConfirmation !== "boolean") + return "shouldSkipConfirmation: boolean expected"; + if (message.location != null && message.hasOwnProperty("location")) { + properties.action = 1; + { + var error = $root.proto.Location.verify(message.location); + if (error) + return "location." + error; + } + } + if (message.newsletter != null && message.hasOwnProperty("newsletter")) { + if (properties.action === 1) + return "action: multiple values"; + properties.action = 1; + { + var error = $root.proto.ContextInfo.ForwardedNewsletterMessageInfo.verify(message.newsletter); + if (error) + return "newsletter." + error; + } + } + return null; + }; + + /** + * Creates an InteractiveAnnotation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.InteractiveAnnotation + * @static + * @param {Object.} object Plain object + * @returns {proto.InteractiveAnnotation} InteractiveAnnotation + */ + InteractiveAnnotation.fromObject = function fromObject(object) { + if (object instanceof $root.proto.InteractiveAnnotation) + return object; + var message = new $root.proto.InteractiveAnnotation(); + if (object.polygonVertices) { + if (!Array.isArray(object.polygonVertices)) + throw TypeError(".proto.InteractiveAnnotation.polygonVertices: array expected"); + message.polygonVertices = []; + for (var i = 0; i < object.polygonVertices.length; ++i) { + if (typeof object.polygonVertices[i] !== "object") + throw TypeError(".proto.InteractiveAnnotation.polygonVertices: object expected"); + message.polygonVertices[i] = $root.proto.Point.fromObject(object.polygonVertices[i]); + } + } + if (object.shouldSkipConfirmation != null) + message.shouldSkipConfirmation = Boolean(object.shouldSkipConfirmation); + if (object.location != null) { + if (typeof object.location !== "object") + throw TypeError(".proto.InteractiveAnnotation.location: object expected"); + message.location = $root.proto.Location.fromObject(object.location); + } + if (object.newsletter != null) { + if (typeof object.newsletter !== "object") + throw TypeError(".proto.InteractiveAnnotation.newsletter: object expected"); + message.newsletter = $root.proto.ContextInfo.ForwardedNewsletterMessageInfo.fromObject(object.newsletter); + } + return message; + }; + + /** + * Creates a plain object from an InteractiveAnnotation message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.InteractiveAnnotation + * @static + * @param {proto.InteractiveAnnotation} message InteractiveAnnotation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InteractiveAnnotation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.polygonVertices = []; + if (options.defaults) + object.shouldSkipConfirmation = false; + if (message.polygonVertices && message.polygonVertices.length) { + object.polygonVertices = []; + for (var j = 0; j < message.polygonVertices.length; ++j) + object.polygonVertices[j] = $root.proto.Point.toObject(message.polygonVertices[j], options); + } + if (message.location != null && message.hasOwnProperty("location")) { + object.location = $root.proto.Location.toObject(message.location, options); + if (options.oneofs) + object.action = "location"; + } + if (message.newsletter != null && message.hasOwnProperty("newsletter")) { + object.newsletter = $root.proto.ContextInfo.ForwardedNewsletterMessageInfo.toObject(message.newsletter, options); + if (options.oneofs) + object.action = "newsletter"; + } + if (message.shouldSkipConfirmation != null && message.hasOwnProperty("shouldSkipConfirmation")) + object.shouldSkipConfirmation = message.shouldSkipConfirmation; + return object; + }; + + /** + * Converts this InteractiveAnnotation to JSON. + * @function toJSON + * @memberof proto.InteractiveAnnotation * @instance + * @returns {Object.} JSON object */ - HistorySync.prototype.pushnames = $util.emptyArray; + InteractiveAnnotation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return InteractiveAnnotation; + })(); + + proto.KeepInChat = (function() { /** - * HistorySync globalSettings. - * @member {proto.IGlobalSettings|null|undefined} globalSettings - * @memberof proto.HistorySync + * Properties of a KeepInChat. + * @memberof proto + * @interface IKeepInChat + * @property {proto.KeepType|null} [keepType] KeepInChat keepType + * @property {number|Long|null} [serverTimestamp] KeepInChat serverTimestamp + * @property {proto.IMessageKey|null} [key] KeepInChat key + * @property {string|null} [deviceJid] KeepInChat deviceJid + * @property {number|Long|null} [clientTimestampMs] KeepInChat clientTimestampMs + * @property {number|Long|null} [serverTimestampMs] KeepInChat serverTimestampMs + */ + + /** + * Constructs a new KeepInChat. + * @memberof proto + * @classdesc Represents a KeepInChat. + * @implements IKeepInChat + * @constructor + * @param {proto.IKeepInChat=} [properties] Properties to set + */ + function KeepInChat(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * KeepInChat keepType. + * @member {proto.KeepType} keepType + * @memberof proto.KeepInChat * @instance */ - HistorySync.prototype.globalSettings = null; + KeepInChat.prototype.keepType = 0; /** - * HistorySync threadIdUserSecret. - * @member {Uint8Array} threadIdUserSecret - * @memberof proto.HistorySync + * KeepInChat serverTimestamp. + * @member {number|Long} serverTimestamp + * @memberof proto.KeepInChat + * @instance + */ + KeepInChat.prototype.serverTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * KeepInChat key. + * @member {proto.IMessageKey|null|undefined} key + * @memberof proto.KeepInChat * @instance */ - HistorySync.prototype.threadIdUserSecret = $util.newBuffer([]); + KeepInChat.prototype.key = null; /** - * HistorySync threadDsTimeframeOffset. - * @member {number} threadDsTimeframeOffset - * @memberof proto.HistorySync + * KeepInChat deviceJid. + * @member {string} deviceJid + * @memberof proto.KeepInChat * @instance */ - HistorySync.prototype.threadDsTimeframeOffset = 0; + KeepInChat.prototype.deviceJid = ""; /** - * HistorySync recentStickers. - * @member {Array.} recentStickers - * @memberof proto.HistorySync + * KeepInChat clientTimestampMs. + * @member {number|Long} clientTimestampMs + * @memberof proto.KeepInChat * @instance */ - HistorySync.prototype.recentStickers = $util.emptyArray; + KeepInChat.prototype.clientTimestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * HistorySync pastParticipants. - * @member {Array.} pastParticipants - * @memberof proto.HistorySync + * KeepInChat serverTimestampMs. + * @member {number|Long} serverTimestampMs + * @memberof proto.KeepInChat * @instance */ - HistorySync.prototype.pastParticipants = $util.emptyArray; + KeepInChat.prototype.serverTimestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new HistorySync instance using the specified properties. + * Creates a new KeepInChat instance using the specified properties. * @function create - * @memberof proto.HistorySync + * @memberof proto.KeepInChat * @static - * @param {proto.IHistorySync=} [properties] Properties to set - * @returns {proto.HistorySync} HistorySync instance + * @param {proto.IKeepInChat=} [properties] Properties to set + * @returns {proto.KeepInChat} KeepInChat instance */ - HistorySync.create = function create(properties) { - return new HistorySync(properties); + KeepInChat.create = function create(properties) { + return new KeepInChat(properties); }; /** - * Encodes the specified HistorySync message. Does not implicitly {@link proto.HistorySync.verify|verify} messages. + * Encodes the specified KeepInChat message. Does not implicitly {@link proto.KeepInChat.verify|verify} messages. * @function encode - * @memberof proto.HistorySync + * @memberof proto.KeepInChat * @static - * @param {proto.IHistorySync} message HistorySync message or plain object to encode + * @param {proto.IKeepInChat} message KeepInChat message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HistorySync.encode = function encode(message, writer) { + KeepInChat.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.syncType); - if (message.conversations != null && message.conversations.length) - for (var i = 0; i < message.conversations.length; ++i) - $root.proto.Conversation.encode(message.conversations[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.statusV3Messages != null && message.statusV3Messages.length) - for (var i = 0; i < message.statusV3Messages.length; ++i) - $root.proto.WebMessageInfo.encode(message.statusV3Messages[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.chunkOrder != null && Object.hasOwnProperty.call(message, "chunkOrder")) - writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.chunkOrder); - if (message.progress != null && Object.hasOwnProperty.call(message, "progress")) - writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.progress); - if (message.pushnames != null && message.pushnames.length) - for (var i = 0; i < message.pushnames.length; ++i) - $root.proto.Pushname.encode(message.pushnames[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.globalSettings != null && Object.hasOwnProperty.call(message, "globalSettings")) - $root.proto.GlobalSettings.encode(message.globalSettings, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.threadIdUserSecret != null && Object.hasOwnProperty.call(message, "threadIdUserSecret")) - writer.uint32(/* id 9, wireType 2 =*/74).bytes(message.threadIdUserSecret); - if (message.threadDsTimeframeOffset != null && Object.hasOwnProperty.call(message, "threadDsTimeframeOffset")) - writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.threadDsTimeframeOffset); - if (message.recentStickers != null && message.recentStickers.length) - for (var i = 0; i < message.recentStickers.length; ++i) - $root.proto.StickerMetadata.encode(message.recentStickers[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.pastParticipants != null && message.pastParticipants.length) - for (var i = 0; i < message.pastParticipants.length; ++i) - $root.proto.PastParticipants.encode(message.pastParticipants[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.keepType != null && Object.hasOwnProperty.call(message, "keepType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.keepType); + if (message.serverTimestamp != null && Object.hasOwnProperty.call(message, "serverTimestamp")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.serverTimestamp); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + $root.proto.MessageKey.encode(message.key, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.deviceJid != null && Object.hasOwnProperty.call(message, "deviceJid")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.deviceJid); + if (message.clientTimestampMs != null && Object.hasOwnProperty.call(message, "clientTimestampMs")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.clientTimestampMs); + if (message.serverTimestampMs != null && Object.hasOwnProperty.call(message, "serverTimestampMs")) + writer.uint32(/* id 6, wireType 0 =*/48).int64(message.serverTimestampMs); return writer; }; /** - * Encodes the specified HistorySync message, length delimited. Does not implicitly {@link proto.HistorySync.verify|verify} messages. + * Encodes the specified KeepInChat message, length delimited. Does not implicitly {@link proto.KeepInChat.verify|verify} messages. * @function encodeDelimited - * @memberof proto.HistorySync + * @memberof proto.KeepInChat * @static - * @param {proto.IHistorySync} message HistorySync message or plain object to encode + * @param {proto.IKeepInChat} message KeepInChat message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HistorySync.encodeDelimited = function encodeDelimited(message, writer) { + KeepInChat.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a HistorySync message from the specified reader or buffer. + * Decodes a KeepInChat message from the specified reader or buffer. * @function decode - * @memberof proto.HistorySync + * @memberof proto.KeepInChat * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {proto.HistorySync} HistorySync + * @returns {proto.KeepInChat} KeepInChat * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HistorySync.decode = function decode(reader, length) { + KeepInChat.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.HistorySync(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.KeepInChat(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.syncType = reader.int32(); + message.keepType = reader.int32(); break; case 2: - if (!(message.conversations && message.conversations.length)) - message.conversations = []; - message.conversations.push($root.proto.Conversation.decode(reader, reader.uint32())); + message.serverTimestamp = reader.int64(); break; case 3: - if (!(message.statusV3Messages && message.statusV3Messages.length)) - message.statusV3Messages = []; - message.statusV3Messages.push($root.proto.WebMessageInfo.decode(reader, reader.uint32())); + message.key = $root.proto.MessageKey.decode(reader, reader.uint32()); + break; + case 4: + message.deviceJid = reader.string(); break; case 5: - message.chunkOrder = reader.uint32(); + message.clientTimestampMs = reader.int64(); break; case 6: - message.progress = reader.uint32(); - break; - case 7: - if (!(message.pushnames && message.pushnames.length)) - message.pushnames = []; - message.pushnames.push($root.proto.Pushname.decode(reader, reader.uint32())); - break; - case 8: - message.globalSettings = $root.proto.GlobalSettings.decode(reader, reader.uint32()); - break; - case 9: - message.threadIdUserSecret = reader.bytes(); - break; - case 10: - message.threadDsTimeframeOffset = reader.uint32(); - break; - case 11: - if (!(message.recentStickers && message.recentStickers.length)) - message.recentStickers = []; - message.recentStickers.push($root.proto.StickerMetadata.decode(reader, reader.uint32())); - break; - case 12: - if (!(message.pastParticipants && message.pastParticipants.length)) - message.pastParticipants = []; - message.pastParticipants.push($root.proto.PastParticipants.decode(reader, reader.uint32())); + message.serverTimestampMs = reader.int64(); break; default: reader.skipType(tag & 7); break; } } - if (!message.hasOwnProperty("syncType")) - throw $util.ProtocolError("missing required 'syncType'", { instance: message }); return message; }; /** - * Decodes a HistorySync message from the specified reader or buffer, length delimited. + * Decodes a KeepInChat message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof proto.HistorySync + * @memberof proto.KeepInChat * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.HistorySync} HistorySync + * @returns {proto.KeepInChat} KeepInChat * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HistorySync.decodeDelimited = function decodeDelimited(reader) { + KeepInChat.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a HistorySync message. + * Verifies a KeepInChat message. * @function verify - * @memberof proto.HistorySync + * @memberof proto.KeepInChat * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - HistorySync.verify = function verify(message) { + KeepInChat.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - switch (message.syncType) { - default: - return "syncType: enum value expected"; + if (message.keepType != null && message.hasOwnProperty("keepType")) + switch (message.keepType) { + default: + return "keepType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.serverTimestamp != null && message.hasOwnProperty("serverTimestamp")) + if (!$util.isInteger(message.serverTimestamp) && !(message.serverTimestamp && $util.isInteger(message.serverTimestamp.low) && $util.isInteger(message.serverTimestamp.high))) + return "serverTimestamp: integer|Long expected"; + if (message.key != null && message.hasOwnProperty("key")) { + var error = $root.proto.MessageKey.verify(message.key); + if (error) + return "key." + error; + } + if (message.deviceJid != null && message.hasOwnProperty("deviceJid")) + if (!$util.isString(message.deviceJid)) + return "deviceJid: string expected"; + if (message.clientTimestampMs != null && message.hasOwnProperty("clientTimestampMs")) + if (!$util.isInteger(message.clientTimestampMs) && !(message.clientTimestampMs && $util.isInteger(message.clientTimestampMs.low) && $util.isInteger(message.clientTimestampMs.high))) + return "clientTimestampMs: integer|Long expected"; + if (message.serverTimestampMs != null && message.hasOwnProperty("serverTimestampMs")) + if (!$util.isInteger(message.serverTimestampMs) && !(message.serverTimestampMs && $util.isInteger(message.serverTimestampMs.low) && $util.isInteger(message.serverTimestampMs.high))) + return "serverTimestampMs: integer|Long expected"; + return null; + }; + + /** + * Creates a KeepInChat message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.KeepInChat + * @static + * @param {Object.} object Plain object + * @returns {proto.KeepInChat} KeepInChat + */ + KeepInChat.fromObject = function fromObject(object) { + if (object instanceof $root.proto.KeepInChat) + return object; + var message = new $root.proto.KeepInChat(); + switch (object.keepType) { + case "UNKNOWN": case 0: + message.keepType = 0; + break; + case "KEEP_FOR_ALL": case 1: + message.keepType = 1; + break; + case "UNDO_KEEP_FOR_ALL": case 2: - case 3: - case 4: - case 5: - case 6: + message.keepType = 2; break; } - if (message.conversations != null && message.hasOwnProperty("conversations")) { - if (!Array.isArray(message.conversations)) - return "conversations: array expected"; - for (var i = 0; i < message.conversations.length; ++i) { - var error = $root.proto.Conversation.verify(message.conversations[i]); - if (error) - return "conversations." + error; - } - } - if (message.statusV3Messages != null && message.hasOwnProperty("statusV3Messages")) { - if (!Array.isArray(message.statusV3Messages)) - return "statusV3Messages: array expected"; - for (var i = 0; i < message.statusV3Messages.length; ++i) { - var error = $root.proto.WebMessageInfo.verify(message.statusV3Messages[i]); - if (error) - return "statusV3Messages." + error; - } - } - if (message.chunkOrder != null && message.hasOwnProperty("chunkOrder")) - if (!$util.isInteger(message.chunkOrder)) - return "chunkOrder: integer expected"; - if (message.progress != null && message.hasOwnProperty("progress")) - if (!$util.isInteger(message.progress)) - return "progress: integer expected"; - if (message.pushnames != null && message.hasOwnProperty("pushnames")) { - if (!Array.isArray(message.pushnames)) - return "pushnames: array expected"; - for (var i = 0; i < message.pushnames.length; ++i) { - var error = $root.proto.Pushname.verify(message.pushnames[i]); - if (error) - return "pushnames." + error; - } - } - if (message.globalSettings != null && message.hasOwnProperty("globalSettings")) { - var error = $root.proto.GlobalSettings.verify(message.globalSettings); - if (error) - return "globalSettings." + error; + if (object.serverTimestamp != null) + if ($util.Long) + (message.serverTimestamp = $util.Long.fromValue(object.serverTimestamp)).unsigned = false; + else if (typeof object.serverTimestamp === "string") + message.serverTimestamp = parseInt(object.serverTimestamp, 10); + else if (typeof object.serverTimestamp === "number") + message.serverTimestamp = object.serverTimestamp; + else if (typeof object.serverTimestamp === "object") + message.serverTimestamp = new $util.LongBits(object.serverTimestamp.low >>> 0, object.serverTimestamp.high >>> 0).toNumber(); + if (object.key != null) { + if (typeof object.key !== "object") + throw TypeError(".proto.KeepInChat.key: object expected"); + message.key = $root.proto.MessageKey.fromObject(object.key); } - if (message.threadIdUserSecret != null && message.hasOwnProperty("threadIdUserSecret")) - if (!(message.threadIdUserSecret && typeof message.threadIdUserSecret.length === "number" || $util.isString(message.threadIdUserSecret))) - return "threadIdUserSecret: buffer expected"; - if (message.threadDsTimeframeOffset != null && message.hasOwnProperty("threadDsTimeframeOffset")) - if (!$util.isInteger(message.threadDsTimeframeOffset)) - return "threadDsTimeframeOffset: integer expected"; - if (message.recentStickers != null && message.hasOwnProperty("recentStickers")) { - if (!Array.isArray(message.recentStickers)) - return "recentStickers: array expected"; - for (var i = 0; i < message.recentStickers.length; ++i) { - var error = $root.proto.StickerMetadata.verify(message.recentStickers[i]); - if (error) - return "recentStickers." + error; - } + if (object.deviceJid != null) + message.deviceJid = String(object.deviceJid); + if (object.clientTimestampMs != null) + if ($util.Long) + (message.clientTimestampMs = $util.Long.fromValue(object.clientTimestampMs)).unsigned = false; + else if (typeof object.clientTimestampMs === "string") + message.clientTimestampMs = parseInt(object.clientTimestampMs, 10); + else if (typeof object.clientTimestampMs === "number") + message.clientTimestampMs = object.clientTimestampMs; + else if (typeof object.clientTimestampMs === "object") + message.clientTimestampMs = new $util.LongBits(object.clientTimestampMs.low >>> 0, object.clientTimestampMs.high >>> 0).toNumber(); + if (object.serverTimestampMs != null) + if ($util.Long) + (message.serverTimestampMs = $util.Long.fromValue(object.serverTimestampMs)).unsigned = false; + else if (typeof object.serverTimestampMs === "string") + message.serverTimestampMs = parseInt(object.serverTimestampMs, 10); + else if (typeof object.serverTimestampMs === "number") + message.serverTimestampMs = object.serverTimestampMs; + else if (typeof object.serverTimestampMs === "object") + message.serverTimestampMs = new $util.LongBits(object.serverTimestampMs.low >>> 0, object.serverTimestampMs.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a KeepInChat message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.KeepInChat + * @static + * @param {proto.KeepInChat} message KeepInChat + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + KeepInChat.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.keepType = options.enums === String ? "UNKNOWN" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.serverTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.serverTimestamp = options.longs === String ? "0" : 0; + object.key = null; + object.deviceJid = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.clientTimestampMs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.clientTimestampMs = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.serverTimestampMs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.serverTimestampMs = options.longs === String ? "0" : 0; } - if (message.pastParticipants != null && message.hasOwnProperty("pastParticipants")) { - if (!Array.isArray(message.pastParticipants)) - return "pastParticipants: array expected"; - for (var i = 0; i < message.pastParticipants.length; ++i) { - var error = $root.proto.PastParticipants.verify(message.pastParticipants[i]); - if (error) - return "pastParticipants." + error; + if (message.keepType != null && message.hasOwnProperty("keepType")) + object.keepType = options.enums === String ? $root.proto.KeepType[message.keepType] : message.keepType; + if (message.serverTimestamp != null && message.hasOwnProperty("serverTimestamp")) + if (typeof message.serverTimestamp === "number") + object.serverTimestamp = options.longs === String ? String(message.serverTimestamp) : message.serverTimestamp; + else + object.serverTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.serverTimestamp) : options.longs === Number ? new $util.LongBits(message.serverTimestamp.low >>> 0, message.serverTimestamp.high >>> 0).toNumber() : message.serverTimestamp; + if (message.key != null && message.hasOwnProperty("key")) + object.key = $root.proto.MessageKey.toObject(message.key, options); + if (message.deviceJid != null && message.hasOwnProperty("deviceJid")) + object.deviceJid = message.deviceJid; + if (message.clientTimestampMs != null && message.hasOwnProperty("clientTimestampMs")) + if (typeof message.clientTimestampMs === "number") + object.clientTimestampMs = options.longs === String ? String(message.clientTimestampMs) : message.clientTimestampMs; + else + object.clientTimestampMs = options.longs === String ? $util.Long.prototype.toString.call(message.clientTimestampMs) : options.longs === Number ? new $util.LongBits(message.clientTimestampMs.low >>> 0, message.clientTimestampMs.high >>> 0).toNumber() : message.clientTimestampMs; + if (message.serverTimestampMs != null && message.hasOwnProperty("serverTimestampMs")) + if (typeof message.serverTimestampMs === "number") + object.serverTimestampMs = options.longs === String ? String(message.serverTimestampMs) : message.serverTimestampMs; + else + object.serverTimestampMs = options.longs === String ? $util.Long.prototype.toString.call(message.serverTimestampMs) : options.longs === Number ? new $util.LongBits(message.serverTimestampMs.low >>> 0, message.serverTimestampMs.high >>> 0).toNumber() : message.serverTimestampMs; + return object; + }; + + /** + * Converts this KeepInChat to JSON. + * @function toJSON + * @memberof proto.KeepInChat + * @instance + * @returns {Object.} JSON object + */ + KeepInChat.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return KeepInChat; + })(); + + /** + * KeepType enum. + * @name proto.KeepType + * @enum {number} + * @property {number} UNKNOWN=0 UNKNOWN value + * @property {number} KEEP_FOR_ALL=1 KEEP_FOR_ALL value + * @property {number} UNDO_KEEP_FOR_ALL=2 UNDO_KEEP_FOR_ALL value + */ + proto.KeepType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN"] = 0; + values[valuesById[1] = "KEEP_FOR_ALL"] = 1; + values[valuesById[2] = "UNDO_KEEP_FOR_ALL"] = 2; + return values; + })(); + + proto.KeyExchangeMessage = (function() { + + /** + * Properties of a KeyExchangeMessage. + * @memberof proto + * @interface IKeyExchangeMessage + * @property {number|null} [id] KeyExchangeMessage id + * @property {Uint8Array|null} [baseKey] KeyExchangeMessage baseKey + * @property {Uint8Array|null} [ratchetKey] KeyExchangeMessage ratchetKey + * @property {Uint8Array|null} [identityKey] KeyExchangeMessage identityKey + * @property {Uint8Array|null} [baseKeySignature] KeyExchangeMessage baseKeySignature + */ + + /** + * Constructs a new KeyExchangeMessage. + * @memberof proto + * @classdesc Represents a KeyExchangeMessage. + * @implements IKeyExchangeMessage + * @constructor + * @param {proto.IKeyExchangeMessage=} [properties] Properties to set + */ + function KeyExchangeMessage(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * KeyExchangeMessage id. + * @member {number} id + * @memberof proto.KeyExchangeMessage + * @instance + */ + KeyExchangeMessage.prototype.id = 0; + + /** + * KeyExchangeMessage baseKey. + * @member {Uint8Array} baseKey + * @memberof proto.KeyExchangeMessage + * @instance + */ + KeyExchangeMessage.prototype.baseKey = $util.newBuffer([]); + + /** + * KeyExchangeMessage ratchetKey. + * @member {Uint8Array} ratchetKey + * @memberof proto.KeyExchangeMessage + * @instance + */ + KeyExchangeMessage.prototype.ratchetKey = $util.newBuffer([]); + + /** + * KeyExchangeMessage identityKey. + * @member {Uint8Array} identityKey + * @memberof proto.KeyExchangeMessage + * @instance + */ + KeyExchangeMessage.prototype.identityKey = $util.newBuffer([]); + + /** + * KeyExchangeMessage baseKeySignature. + * @member {Uint8Array} baseKeySignature + * @memberof proto.KeyExchangeMessage + * @instance + */ + KeyExchangeMessage.prototype.baseKeySignature = $util.newBuffer([]); + + /** + * Creates a new KeyExchangeMessage instance using the specified properties. + * @function create + * @memberof proto.KeyExchangeMessage + * @static + * @param {proto.IKeyExchangeMessage=} [properties] Properties to set + * @returns {proto.KeyExchangeMessage} KeyExchangeMessage instance + */ + KeyExchangeMessage.create = function create(properties) { + return new KeyExchangeMessage(properties); + }; + + /** + * Encodes the specified KeyExchangeMessage message. Does not implicitly {@link proto.KeyExchangeMessage.verify|verify} messages. + * @function encode + * @memberof proto.KeyExchangeMessage + * @static + * @param {proto.IKeyExchangeMessage} message KeyExchangeMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KeyExchangeMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.id); + if (message.baseKey != null && Object.hasOwnProperty.call(message, "baseKey")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.baseKey); + if (message.ratchetKey != null && Object.hasOwnProperty.call(message, "ratchetKey")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.ratchetKey); + if (message.identityKey != null && Object.hasOwnProperty.call(message, "identityKey")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.identityKey); + if (message.baseKeySignature != null && Object.hasOwnProperty.call(message, "baseKeySignature")) + writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.baseKeySignature); + return writer; + }; + + /** + * Encodes the specified KeyExchangeMessage message, length delimited. Does not implicitly {@link proto.KeyExchangeMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.KeyExchangeMessage + * @static + * @param {proto.IKeyExchangeMessage} message KeyExchangeMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KeyExchangeMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a KeyExchangeMessage message from the specified reader or buffer. + * @function decode + * @memberof proto.KeyExchangeMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.KeyExchangeMessage} KeyExchangeMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KeyExchangeMessage.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.KeyExchangeMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.id = reader.uint32(); + break; + case 2: + message.baseKey = reader.bytes(); + break; + case 3: + message.ratchetKey = reader.bytes(); + break; + case 4: + message.identityKey = reader.bytes(); + break; + case 5: + message.baseKeySignature = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; } } + return message; + }; + + /** + * Decodes a KeyExchangeMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.KeyExchangeMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.KeyExchangeMessage} KeyExchangeMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KeyExchangeMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a KeyExchangeMessage message. + * @function verify + * @memberof proto.KeyExchangeMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + KeyExchangeMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isInteger(message.id)) + return "id: integer expected"; + if (message.baseKey != null && message.hasOwnProperty("baseKey")) + if (!(message.baseKey && typeof message.baseKey.length === "number" || $util.isString(message.baseKey))) + return "baseKey: buffer expected"; + if (message.ratchetKey != null && message.hasOwnProperty("ratchetKey")) + if (!(message.ratchetKey && typeof message.ratchetKey.length === "number" || $util.isString(message.ratchetKey))) + return "ratchetKey: buffer expected"; + if (message.identityKey != null && message.hasOwnProperty("identityKey")) + if (!(message.identityKey && typeof message.identityKey.length === "number" || $util.isString(message.identityKey))) + return "identityKey: buffer expected"; + if (message.baseKeySignature != null && message.hasOwnProperty("baseKeySignature")) + if (!(message.baseKeySignature && typeof message.baseKeySignature.length === "number" || $util.isString(message.baseKeySignature))) + return "baseKeySignature: buffer expected"; return null; }; /** - * Creates a HistorySync message from a plain object. Also converts values to their respective internal types. + * Creates a KeyExchangeMessage message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof proto.HistorySync + * @memberof proto.KeyExchangeMessage * @static * @param {Object.} object Plain object - * @returns {proto.HistorySync} HistorySync + * @returns {proto.KeyExchangeMessage} KeyExchangeMessage */ - HistorySync.fromObject = function fromObject(object) { - if (object instanceof $root.proto.HistorySync) + KeyExchangeMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.KeyExchangeMessage) return object; - var message = new $root.proto.HistorySync(); - switch (object.syncType) { - case "INITIAL_BOOTSTRAP": - case 0: - message.syncType = 0; - break; - case "INITIAL_STATUS_V3": - case 1: - message.syncType = 1; - break; - case "FULL": - case 2: - message.syncType = 2; - break; - case "RECENT": - case 3: - message.syncType = 3; - break; - case "PUSH_NAME": - case 4: - message.syncType = 4; - break; - case "NON_BLOCKING_DATA": - case 5: - message.syncType = 5; - break; - case "ON_DEMAND": - case 6: - message.syncType = 6; - break; - } - if (object.conversations) { - if (!Array.isArray(object.conversations)) - throw TypeError(".proto.HistorySync.conversations: array expected"); - message.conversations = []; - for (var i = 0; i < object.conversations.length; ++i) { - if (typeof object.conversations[i] !== "object") - throw TypeError(".proto.HistorySync.conversations: object expected"); - message.conversations[i] = $root.proto.Conversation.fromObject(object.conversations[i]); - } - } - if (object.statusV3Messages) { - if (!Array.isArray(object.statusV3Messages)) - throw TypeError(".proto.HistorySync.statusV3Messages: array expected"); - message.statusV3Messages = []; - for (var i = 0; i < object.statusV3Messages.length; ++i) { - if (typeof object.statusV3Messages[i] !== "object") - throw TypeError(".proto.HistorySync.statusV3Messages: object expected"); - message.statusV3Messages[i] = $root.proto.WebMessageInfo.fromObject(object.statusV3Messages[i]); - } - } - if (object.chunkOrder != null) - message.chunkOrder = object.chunkOrder >>> 0; - if (object.progress != null) - message.progress = object.progress >>> 0; - if (object.pushnames) { - if (!Array.isArray(object.pushnames)) - throw TypeError(".proto.HistorySync.pushnames: array expected"); - message.pushnames = []; - for (var i = 0; i < object.pushnames.length; ++i) { - if (typeof object.pushnames[i] !== "object") - throw TypeError(".proto.HistorySync.pushnames: object expected"); - message.pushnames[i] = $root.proto.Pushname.fromObject(object.pushnames[i]); - } - } - if (object.globalSettings != null) { - if (typeof object.globalSettings !== "object") - throw TypeError(".proto.HistorySync.globalSettings: object expected"); - message.globalSettings = $root.proto.GlobalSettings.fromObject(object.globalSettings); - } - if (object.threadIdUserSecret != null) - if (typeof object.threadIdUserSecret === "string") - $util.base64.decode(object.threadIdUserSecret, message.threadIdUserSecret = $util.newBuffer($util.base64.length(object.threadIdUserSecret)), 0); - else if (object.threadIdUserSecret.length) - message.threadIdUserSecret = object.threadIdUserSecret; - if (object.threadDsTimeframeOffset != null) - message.threadDsTimeframeOffset = object.threadDsTimeframeOffset >>> 0; - if (object.recentStickers) { - if (!Array.isArray(object.recentStickers)) - throw TypeError(".proto.HistorySync.recentStickers: array expected"); - message.recentStickers = []; - for (var i = 0; i < object.recentStickers.length; ++i) { - if (typeof object.recentStickers[i] !== "object") - throw TypeError(".proto.HistorySync.recentStickers: object expected"); - message.recentStickers[i] = $root.proto.StickerMetadata.fromObject(object.recentStickers[i]); - } - } - if (object.pastParticipants) { - if (!Array.isArray(object.pastParticipants)) - throw TypeError(".proto.HistorySync.pastParticipants: array expected"); - message.pastParticipants = []; - for (var i = 0; i < object.pastParticipants.length; ++i) { - if (typeof object.pastParticipants[i] !== "object") - throw TypeError(".proto.HistorySync.pastParticipants: object expected"); - message.pastParticipants[i] = $root.proto.PastParticipants.fromObject(object.pastParticipants[i]); - } - } + var message = new $root.proto.KeyExchangeMessage(); + if (object.id != null) + message.id = object.id >>> 0; + if (object.baseKey != null) + if (typeof object.baseKey === "string") + $util.base64.decode(object.baseKey, message.baseKey = $util.newBuffer($util.base64.length(object.baseKey)), 0); + else if (object.baseKey.length) + message.baseKey = object.baseKey; + if (object.ratchetKey != null) + if (typeof object.ratchetKey === "string") + $util.base64.decode(object.ratchetKey, message.ratchetKey = $util.newBuffer($util.base64.length(object.ratchetKey)), 0); + else if (object.ratchetKey.length) + message.ratchetKey = object.ratchetKey; + if (object.identityKey != null) + if (typeof object.identityKey === "string") + $util.base64.decode(object.identityKey, message.identityKey = $util.newBuffer($util.base64.length(object.identityKey)), 0); + else if (object.identityKey.length) + message.identityKey = object.identityKey; + if (object.baseKeySignature != null) + if (typeof object.baseKeySignature === "string") + $util.base64.decode(object.baseKeySignature, message.baseKeySignature = $util.newBuffer($util.base64.length(object.baseKeySignature)), 0); + else if (object.baseKeySignature.length) + message.baseKeySignature = object.baseKeySignature; return message; }; /** - * Creates a plain object from a HistorySync message. Also converts values to other types if specified. + * Creates a plain object from a KeyExchangeMessage message. Also converts values to other types if specified. * @function toObject - * @memberof proto.HistorySync + * @memberof proto.KeyExchangeMessage * @static - * @param {proto.HistorySync} message HistorySync + * @param {proto.KeyExchangeMessage} message KeyExchangeMessage * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - HistorySync.toObject = function toObject(message, options) { + KeyExchangeMessage.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.conversations = []; - object.statusV3Messages = []; - object.pushnames = []; - object.recentStickers = []; - object.pastParticipants = []; - } if (options.defaults) { - object.syncType = options.enums === String ? "INITIAL_BOOTSTRAP" : 0; - object.chunkOrder = 0; - object.progress = 0; - object.globalSettings = null; + object.id = 0; if (options.bytes === String) - object.threadIdUserSecret = ""; + object.baseKey = ""; else { - object.threadIdUserSecret = []; + object.baseKey = []; if (options.bytes !== Array) - object.threadIdUserSecret = $util.newBuffer(object.threadIdUserSecret); + object.baseKey = $util.newBuffer(object.baseKey); + } + if (options.bytes === String) + object.ratchetKey = ""; + else { + object.ratchetKey = []; + if (options.bytes !== Array) + object.ratchetKey = $util.newBuffer(object.ratchetKey); + } + if (options.bytes === String) + object.identityKey = ""; + else { + object.identityKey = []; + if (options.bytes !== Array) + object.identityKey = $util.newBuffer(object.identityKey); + } + if (options.bytes === String) + object.baseKeySignature = ""; + else { + object.baseKeySignature = []; + if (options.bytes !== Array) + object.baseKeySignature = $util.newBuffer(object.baseKeySignature); } - object.threadDsTimeframeOffset = 0; - } - if (message.syncType != null && message.hasOwnProperty("syncType")) - object.syncType = options.enums === String ? $root.proto.HistorySync.HistorySyncType[message.syncType] : message.syncType; - if (message.conversations && message.conversations.length) { - object.conversations = []; - for (var j = 0; j < message.conversations.length; ++j) - object.conversations[j] = $root.proto.Conversation.toObject(message.conversations[j], options); - } - if (message.statusV3Messages && message.statusV3Messages.length) { - object.statusV3Messages = []; - for (var j = 0; j < message.statusV3Messages.length; ++j) - object.statusV3Messages[j] = $root.proto.WebMessageInfo.toObject(message.statusV3Messages[j], options); - } - if (message.chunkOrder != null && message.hasOwnProperty("chunkOrder")) - object.chunkOrder = message.chunkOrder; - if (message.progress != null && message.hasOwnProperty("progress")) - object.progress = message.progress; - if (message.pushnames && message.pushnames.length) { - object.pushnames = []; - for (var j = 0; j < message.pushnames.length; ++j) - object.pushnames[j] = $root.proto.Pushname.toObject(message.pushnames[j], options); - } - if (message.globalSettings != null && message.hasOwnProperty("globalSettings")) - object.globalSettings = $root.proto.GlobalSettings.toObject(message.globalSettings, options); - if (message.threadIdUserSecret != null && message.hasOwnProperty("threadIdUserSecret")) - object.threadIdUserSecret = options.bytes === String ? $util.base64.encode(message.threadIdUserSecret, 0, message.threadIdUserSecret.length) : options.bytes === Array ? Array.prototype.slice.call(message.threadIdUserSecret) : message.threadIdUserSecret; - if (message.threadDsTimeframeOffset != null && message.hasOwnProperty("threadDsTimeframeOffset")) - object.threadDsTimeframeOffset = message.threadDsTimeframeOffset; - if (message.recentStickers && message.recentStickers.length) { - object.recentStickers = []; - for (var j = 0; j < message.recentStickers.length; ++j) - object.recentStickers[j] = $root.proto.StickerMetadata.toObject(message.recentStickers[j], options); - } - if (message.pastParticipants && message.pastParticipants.length) { - object.pastParticipants = []; - for (var j = 0; j < message.pastParticipants.length; ++j) - object.pastParticipants[j] = $root.proto.PastParticipants.toObject(message.pastParticipants[j], options); } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.baseKey != null && message.hasOwnProperty("baseKey")) + object.baseKey = options.bytes === String ? $util.base64.encode(message.baseKey, 0, message.baseKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.baseKey) : message.baseKey; + if (message.ratchetKey != null && message.hasOwnProperty("ratchetKey")) + object.ratchetKey = options.bytes === String ? $util.base64.encode(message.ratchetKey, 0, message.ratchetKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.ratchetKey) : message.ratchetKey; + if (message.identityKey != null && message.hasOwnProperty("identityKey")) + object.identityKey = options.bytes === String ? $util.base64.encode(message.identityKey, 0, message.identityKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.identityKey) : message.identityKey; + if (message.baseKeySignature != null && message.hasOwnProperty("baseKeySignature")) + object.baseKeySignature = options.bytes === String ? $util.base64.encode(message.baseKeySignature, 0, message.baseKeySignature.length) : options.bytes === Array ? Array.prototype.slice.call(message.baseKeySignature) : message.baseKeySignature; return object; }; /** - * Converts this HistorySync to JSON. + * Converts this KeyExchangeMessage to JSON. * @function toJSON - * @memberof proto.HistorySync + * @memberof proto.KeyExchangeMessage * @instance * @returns {Object.} JSON object */ - HistorySync.prototype.toJSON = function toJSON() { + KeyExchangeMessage.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * HistorySyncType enum. - * @name proto.HistorySync.HistorySyncType - * @enum {number} - * @property {number} INITIAL_BOOTSTRAP=0 INITIAL_BOOTSTRAP value - * @property {number} INITIAL_STATUS_V3=1 INITIAL_STATUS_V3 value - * @property {number} FULL=2 FULL value - * @property {number} RECENT=3 RECENT value - * @property {number} PUSH_NAME=4 PUSH_NAME value - * @property {number} NON_BLOCKING_DATA=5 NON_BLOCKING_DATA value - * @property {number} ON_DEMAND=6 ON_DEMAND value - */ - HistorySync.HistorySyncType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "INITIAL_BOOTSTRAP"] = 0; - values[valuesById[1] = "INITIAL_STATUS_V3"] = 1; - values[valuesById[2] = "FULL"] = 2; - values[valuesById[3] = "RECENT"] = 3; - values[valuesById[4] = "PUSH_NAME"] = 4; - values[valuesById[5] = "NON_BLOCKING_DATA"] = 5; - values[valuesById[6] = "ON_DEMAND"] = 6; - return values; - })(); - - return HistorySync; + return KeyExchangeMessage; })(); - proto.HistorySyncMsg = (function() { + proto.KeyId = (function() { /** - * Properties of a HistorySyncMsg. + * Properties of a KeyId. * @memberof proto - * @interface IHistorySyncMsg - * @property {proto.IWebMessageInfo|null} [message] HistorySyncMsg message - * @property {number|Long|null} [msgOrderId] HistorySyncMsg msgOrderId + * @interface IKeyId + * @property {Uint8Array|null} [id] KeyId id */ /** - * Constructs a new HistorySyncMsg. + * Constructs a new KeyId. * @memberof proto - * @classdesc Represents a HistorySyncMsg. - * @implements IHistorySyncMsg + * @classdesc Represents a KeyId. + * @implements IKeyId * @constructor - * @param {proto.IHistorySyncMsg=} [properties] Properties to set + * @param {proto.IKeyId=} [properties] Properties to set */ - function HistorySyncMsg(properties) { + function KeyId(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18495,88 +24019,75 @@ $root.proto = (function() { } /** - * HistorySyncMsg message. - * @member {proto.IWebMessageInfo|null|undefined} message - * @memberof proto.HistorySyncMsg - * @instance - */ - HistorySyncMsg.prototype.message = null; - - /** - * HistorySyncMsg msgOrderId. - * @member {number|Long} msgOrderId - * @memberof proto.HistorySyncMsg + * KeyId id. + * @member {Uint8Array} id + * @memberof proto.KeyId * @instance */ - HistorySyncMsg.prototype.msgOrderId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + KeyId.prototype.id = $util.newBuffer([]); /** - * Creates a new HistorySyncMsg instance using the specified properties. + * Creates a new KeyId instance using the specified properties. * @function create - * @memberof proto.HistorySyncMsg + * @memberof proto.KeyId * @static - * @param {proto.IHistorySyncMsg=} [properties] Properties to set - * @returns {proto.HistorySyncMsg} HistorySyncMsg instance + * @param {proto.IKeyId=} [properties] Properties to set + * @returns {proto.KeyId} KeyId instance */ - HistorySyncMsg.create = function create(properties) { - return new HistorySyncMsg(properties); + KeyId.create = function create(properties) { + return new KeyId(properties); }; /** - * Encodes the specified HistorySyncMsg message. Does not implicitly {@link proto.HistorySyncMsg.verify|verify} messages. + * Encodes the specified KeyId message. Does not implicitly {@link proto.KeyId.verify|verify} messages. * @function encode - * @memberof proto.HistorySyncMsg + * @memberof proto.KeyId * @static - * @param {proto.IHistorySyncMsg} message HistorySyncMsg message or plain object to encode + * @param {proto.IKeyId} message KeyId message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HistorySyncMsg.encode = function encode(message, writer) { + KeyId.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - $root.proto.WebMessageInfo.encode(message.message, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.msgOrderId != null && Object.hasOwnProperty.call(message, "msgOrderId")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.msgOrderId); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.id); return writer; }; /** - * Encodes the specified HistorySyncMsg message, length delimited. Does not implicitly {@link proto.HistorySyncMsg.verify|verify} messages. + * Encodes the specified KeyId message, length delimited. Does not implicitly {@link proto.KeyId.verify|verify} messages. * @function encodeDelimited - * @memberof proto.HistorySyncMsg + * @memberof proto.KeyId * @static - * @param {proto.IHistorySyncMsg} message HistorySyncMsg message or plain object to encode + * @param {proto.IKeyId} message KeyId message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HistorySyncMsg.encodeDelimited = function encodeDelimited(message, writer) { + KeyId.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a HistorySyncMsg message from the specified reader or buffer. + * Decodes a KeyId message from the specified reader or buffer. * @function decode - * @memberof proto.HistorySyncMsg + * @memberof proto.KeyId * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {proto.HistorySyncMsg} HistorySyncMsg + * @returns {proto.KeyId} KeyId * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HistorySyncMsg.decode = function decode(reader, length) { + KeyId.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.HistorySyncMsg(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.KeyId(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.message = $root.proto.WebMessageInfo.decode(reader, reader.uint32()); - break; - case 2: - message.msgOrderId = reader.uint64(); + message.id = reader.bytes(); break; default: reader.skipType(tag & 7); @@ -18587,138 +24098,118 @@ $root.proto = (function() { }; /** - * Decodes a HistorySyncMsg message from the specified reader or buffer, length delimited. + * Decodes a KeyId message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof proto.HistorySyncMsg + * @memberof proto.KeyId * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.HistorySyncMsg} HistorySyncMsg + * @returns {proto.KeyId} KeyId * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HistorySyncMsg.decodeDelimited = function decodeDelimited(reader) { + KeyId.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a HistorySyncMsg message. + * Verifies a KeyId message. * @function verify - * @memberof proto.HistorySyncMsg + * @memberof proto.KeyId * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - HistorySyncMsg.verify = function verify(message) { + KeyId.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.message != null && message.hasOwnProperty("message")) { - var error = $root.proto.WebMessageInfo.verify(message.message); - if (error) - return "message." + error; - } - if (message.msgOrderId != null && message.hasOwnProperty("msgOrderId")) - if (!$util.isInteger(message.msgOrderId) && !(message.msgOrderId && $util.isInteger(message.msgOrderId.low) && $util.isInteger(message.msgOrderId.high))) - return "msgOrderId: integer|Long expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!(message.id && typeof message.id.length === "number" || $util.isString(message.id))) + return "id: buffer expected"; return null; }; /** - * Creates a HistorySyncMsg message from a plain object. Also converts values to their respective internal types. + * Creates a KeyId message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof proto.HistorySyncMsg + * @memberof proto.KeyId * @static * @param {Object.} object Plain object - * @returns {proto.HistorySyncMsg} HistorySyncMsg + * @returns {proto.KeyId} KeyId */ - HistorySyncMsg.fromObject = function fromObject(object) { - if (object instanceof $root.proto.HistorySyncMsg) + KeyId.fromObject = function fromObject(object) { + if (object instanceof $root.proto.KeyId) return object; - var message = new $root.proto.HistorySyncMsg(); - if (object.message != null) { - if (typeof object.message !== "object") - throw TypeError(".proto.HistorySyncMsg.message: object expected"); - message.message = $root.proto.WebMessageInfo.fromObject(object.message); - } - if (object.msgOrderId != null) - if ($util.Long) - (message.msgOrderId = $util.Long.fromValue(object.msgOrderId)).unsigned = true; - else if (typeof object.msgOrderId === "string") - message.msgOrderId = parseInt(object.msgOrderId, 10); - else if (typeof object.msgOrderId === "number") - message.msgOrderId = object.msgOrderId; - else if (typeof object.msgOrderId === "object") - message.msgOrderId = new $util.LongBits(object.msgOrderId.low >>> 0, object.msgOrderId.high >>> 0).toNumber(true); + var message = new $root.proto.KeyId(); + if (object.id != null) + if (typeof object.id === "string") + $util.base64.decode(object.id, message.id = $util.newBuffer($util.base64.length(object.id)), 0); + else if (object.id.length) + message.id = object.id; return message; }; - /** - * Creates a plain object from a HistorySyncMsg message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.HistorySyncMsg - * @static - * @param {proto.HistorySyncMsg} message HistorySyncMsg - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HistorySyncMsg.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.message = null; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.msgOrderId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.msgOrderId = options.longs === String ? "0" : 0; - } - if (message.message != null && message.hasOwnProperty("message")) - object.message = $root.proto.WebMessageInfo.toObject(message.message, options); - if (message.msgOrderId != null && message.hasOwnProperty("msgOrderId")) - if (typeof message.msgOrderId === "number") - object.msgOrderId = options.longs === String ? String(message.msgOrderId) : message.msgOrderId; - else - object.msgOrderId = options.longs === String ? $util.Long.prototype.toString.call(message.msgOrderId) : options.longs === Number ? new $util.LongBits(message.msgOrderId.low >>> 0, message.msgOrderId.high >>> 0).toNumber(true) : message.msgOrderId; + /** + * Creates a plain object from a KeyId message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.KeyId + * @static + * @param {proto.KeyId} message KeyId + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + KeyId.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if (options.bytes === String) + object.id = ""; + else { + object.id = []; + if (options.bytes !== Array) + object.id = $util.newBuffer(object.id); + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = options.bytes === String ? $util.base64.encode(message.id, 0, message.id.length) : options.bytes === Array ? Array.prototype.slice.call(message.id) : message.id; return object; }; /** - * Converts this HistorySyncMsg to JSON. + * Converts this KeyId to JSON. * @function toJSON - * @memberof proto.HistorySyncMsg + * @memberof proto.KeyId * @instance * @returns {Object.} JSON object */ - HistorySyncMsg.prototype.toJSON = function toJSON() { + KeyId.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return HistorySyncMsg; + return KeyId; })(); - proto.HydratedTemplateButton = (function() { + proto.LocalizedName = (function() { /** - * Properties of a HydratedTemplateButton. + * Properties of a LocalizedName. * @memberof proto - * @interface IHydratedTemplateButton - * @property {number|null} [index] HydratedTemplateButton index - * @property {proto.HydratedTemplateButton.IHydratedQuickReplyButton|null} [quickReplyButton] HydratedTemplateButton quickReplyButton - * @property {proto.HydratedTemplateButton.IHydratedURLButton|null} [urlButton] HydratedTemplateButton urlButton - * @property {proto.HydratedTemplateButton.IHydratedCallButton|null} [callButton] HydratedTemplateButton callButton + * @interface ILocalizedName + * @property {string|null} [lg] LocalizedName lg + * @property {string|null} [lc] LocalizedName lc + * @property {string|null} [verifiedName] LocalizedName verifiedName */ /** - * Constructs a new HydratedTemplateButton. + * Constructs a new LocalizedName. * @memberof proto - * @classdesc Represents a HydratedTemplateButton. - * @implements IHydratedTemplateButton + * @classdesc Represents a LocalizedName. + * @implements ILocalizedName * @constructor - * @param {proto.IHydratedTemplateButton=} [properties] Properties to set + * @param {proto.ILocalizedName=} [properties] Properties to set */ - function HydratedTemplateButton(properties) { + function LocalizedName(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18726,128 +24217,101 @@ $root.proto = (function() { } /** - * HydratedTemplateButton index. - * @member {number} index - * @memberof proto.HydratedTemplateButton - * @instance - */ - HydratedTemplateButton.prototype.index = 0; - - /** - * HydratedTemplateButton quickReplyButton. - * @member {proto.HydratedTemplateButton.IHydratedQuickReplyButton|null|undefined} quickReplyButton - * @memberof proto.HydratedTemplateButton - * @instance - */ - HydratedTemplateButton.prototype.quickReplyButton = null; - - /** - * HydratedTemplateButton urlButton. - * @member {proto.HydratedTemplateButton.IHydratedURLButton|null|undefined} urlButton - * @memberof proto.HydratedTemplateButton + * LocalizedName lg. + * @member {string} lg + * @memberof proto.LocalizedName * @instance */ - HydratedTemplateButton.prototype.urlButton = null; + LocalizedName.prototype.lg = ""; /** - * HydratedTemplateButton callButton. - * @member {proto.HydratedTemplateButton.IHydratedCallButton|null|undefined} callButton - * @memberof proto.HydratedTemplateButton + * LocalizedName lc. + * @member {string} lc + * @memberof proto.LocalizedName * @instance */ - HydratedTemplateButton.prototype.callButton = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + LocalizedName.prototype.lc = ""; /** - * HydratedTemplateButton hydratedButton. - * @member {"quickReplyButton"|"urlButton"|"callButton"|undefined} hydratedButton - * @memberof proto.HydratedTemplateButton + * LocalizedName verifiedName. + * @member {string} verifiedName + * @memberof proto.LocalizedName * @instance */ - Object.defineProperty(HydratedTemplateButton.prototype, "hydratedButton", { - get: $util.oneOfGetter($oneOfFields = ["quickReplyButton", "urlButton", "callButton"]), - set: $util.oneOfSetter($oneOfFields) - }); + LocalizedName.prototype.verifiedName = ""; /** - * Creates a new HydratedTemplateButton instance using the specified properties. + * Creates a new LocalizedName instance using the specified properties. * @function create - * @memberof proto.HydratedTemplateButton + * @memberof proto.LocalizedName * @static - * @param {proto.IHydratedTemplateButton=} [properties] Properties to set - * @returns {proto.HydratedTemplateButton} HydratedTemplateButton instance + * @param {proto.ILocalizedName=} [properties] Properties to set + * @returns {proto.LocalizedName} LocalizedName instance */ - HydratedTemplateButton.create = function create(properties) { - return new HydratedTemplateButton(properties); + LocalizedName.create = function create(properties) { + return new LocalizedName(properties); }; /** - * Encodes the specified HydratedTemplateButton message. Does not implicitly {@link proto.HydratedTemplateButton.verify|verify} messages. + * Encodes the specified LocalizedName message. Does not implicitly {@link proto.LocalizedName.verify|verify} messages. * @function encode - * @memberof proto.HydratedTemplateButton + * @memberof proto.LocalizedName * @static - * @param {proto.IHydratedTemplateButton} message HydratedTemplateButton message or plain object to encode + * @param {proto.ILocalizedName} message LocalizedName message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HydratedTemplateButton.encode = function encode(message, writer) { + LocalizedName.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.quickReplyButton != null && Object.hasOwnProperty.call(message, "quickReplyButton")) - $root.proto.HydratedTemplateButton.HydratedQuickReplyButton.encode(message.quickReplyButton, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.urlButton != null && Object.hasOwnProperty.call(message, "urlButton")) - $root.proto.HydratedTemplateButton.HydratedURLButton.encode(message.urlButton, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.callButton != null && Object.hasOwnProperty.call(message, "callButton")) - $root.proto.HydratedTemplateButton.HydratedCallButton.encode(message.callButton, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.index != null && Object.hasOwnProperty.call(message, "index")) - writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.index); + if (message.lg != null && Object.hasOwnProperty.call(message, "lg")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.lg); + if (message.lc != null && Object.hasOwnProperty.call(message, "lc")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.lc); + if (message.verifiedName != null && Object.hasOwnProperty.call(message, "verifiedName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.verifiedName); return writer; }; /** - * Encodes the specified HydratedTemplateButton message, length delimited. Does not implicitly {@link proto.HydratedTemplateButton.verify|verify} messages. + * Encodes the specified LocalizedName message, length delimited. Does not implicitly {@link proto.LocalizedName.verify|verify} messages. * @function encodeDelimited - * @memberof proto.HydratedTemplateButton + * @memberof proto.LocalizedName * @static - * @param {proto.IHydratedTemplateButton} message HydratedTemplateButton message or plain object to encode + * @param {proto.ILocalizedName} message LocalizedName message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HydratedTemplateButton.encodeDelimited = function encodeDelimited(message, writer) { + LocalizedName.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a HydratedTemplateButton message from the specified reader or buffer. + * Decodes a LocalizedName message from the specified reader or buffer. * @function decode - * @memberof proto.HydratedTemplateButton + * @memberof proto.LocalizedName * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {proto.HydratedTemplateButton} HydratedTemplateButton + * @returns {proto.LocalizedName} LocalizedName * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HydratedTemplateButton.decode = function decode(reader, length) { + LocalizedName.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.HydratedTemplateButton(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.LocalizedName(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 4: - message.index = reader.uint32(); - break; case 1: - message.quickReplyButton = $root.proto.HydratedTemplateButton.HydratedQuickReplyButton.decode(reader, reader.uint32()); + message.lg = reader.string(); break; case 2: - message.urlButton = $root.proto.HydratedTemplateButton.HydratedURLButton.decode(reader, reader.uint32()); + message.lc = reader.string(); break; case 3: - message.callButton = $root.proto.HydratedTemplateButton.HydratedCallButton.decode(reader, reader.uint32()); + message.verifiedName = reader.string(); break; default: reader.skipType(tag & 7); @@ -18858,797 +24322,557 @@ $root.proto = (function() { }; /** - * Decodes a HydratedTemplateButton message from the specified reader or buffer, length delimited. + * Decodes a LocalizedName message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof proto.HydratedTemplateButton + * @memberof proto.LocalizedName * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.HydratedTemplateButton} HydratedTemplateButton + * @returns {proto.LocalizedName} LocalizedName * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HydratedTemplateButton.decodeDelimited = function decodeDelimited(reader) { + LocalizedName.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a HydratedTemplateButton message. + * Verifies a LocalizedName message. * @function verify - * @memberof proto.HydratedTemplateButton + * @memberof proto.LocalizedName * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - HydratedTemplateButton.verify = function verify(message) { + LocalizedName.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.index != null && message.hasOwnProperty("index")) - if (!$util.isInteger(message.index)) - return "index: integer expected"; - if (message.quickReplyButton != null && message.hasOwnProperty("quickReplyButton")) { - properties.hydratedButton = 1; - { - var error = $root.proto.HydratedTemplateButton.HydratedQuickReplyButton.verify(message.quickReplyButton); - if (error) - return "quickReplyButton." + error; - } - } - if (message.urlButton != null && message.hasOwnProperty("urlButton")) { - if (properties.hydratedButton === 1) - return "hydratedButton: multiple values"; - properties.hydratedButton = 1; - { - var error = $root.proto.HydratedTemplateButton.HydratedURLButton.verify(message.urlButton); - if (error) - return "urlButton." + error; - } - } - if (message.callButton != null && message.hasOwnProperty("callButton")) { - if (properties.hydratedButton === 1) - return "hydratedButton: multiple values"; - properties.hydratedButton = 1; - { - var error = $root.proto.HydratedTemplateButton.HydratedCallButton.verify(message.callButton); - if (error) - return "callButton." + error; - } - } + if (message.lg != null && message.hasOwnProperty("lg")) + if (!$util.isString(message.lg)) + return "lg: string expected"; + if (message.lc != null && message.hasOwnProperty("lc")) + if (!$util.isString(message.lc)) + return "lc: string expected"; + if (message.verifiedName != null && message.hasOwnProperty("verifiedName")) + if (!$util.isString(message.verifiedName)) + return "verifiedName: string expected"; return null; }; /** - * Creates a HydratedTemplateButton message from a plain object. Also converts values to their respective internal types. + * Creates a LocalizedName message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof proto.HydratedTemplateButton + * @memberof proto.LocalizedName * @static * @param {Object.} object Plain object - * @returns {proto.HydratedTemplateButton} HydratedTemplateButton + * @returns {proto.LocalizedName} LocalizedName */ - HydratedTemplateButton.fromObject = function fromObject(object) { - if (object instanceof $root.proto.HydratedTemplateButton) + LocalizedName.fromObject = function fromObject(object) { + if (object instanceof $root.proto.LocalizedName) return object; - var message = new $root.proto.HydratedTemplateButton(); - if (object.index != null) - message.index = object.index >>> 0; - if (object.quickReplyButton != null) { - if (typeof object.quickReplyButton !== "object") - throw TypeError(".proto.HydratedTemplateButton.quickReplyButton: object expected"); - message.quickReplyButton = $root.proto.HydratedTemplateButton.HydratedQuickReplyButton.fromObject(object.quickReplyButton); - } - if (object.urlButton != null) { - if (typeof object.urlButton !== "object") - throw TypeError(".proto.HydratedTemplateButton.urlButton: object expected"); - message.urlButton = $root.proto.HydratedTemplateButton.HydratedURLButton.fromObject(object.urlButton); - } - if (object.callButton != null) { - if (typeof object.callButton !== "object") - throw TypeError(".proto.HydratedTemplateButton.callButton: object expected"); - message.callButton = $root.proto.HydratedTemplateButton.HydratedCallButton.fromObject(object.callButton); - } + var message = new $root.proto.LocalizedName(); + if (object.lg != null) + message.lg = String(object.lg); + if (object.lc != null) + message.lc = String(object.lc); + if (object.verifiedName != null) + message.verifiedName = String(object.verifiedName); return message; }; /** - * Creates a plain object from a HydratedTemplateButton message. Also converts values to other types if specified. + * Creates a plain object from a LocalizedName message. Also converts values to other types if specified. * @function toObject - * @memberof proto.HydratedTemplateButton + * @memberof proto.LocalizedName * @static - * @param {proto.HydratedTemplateButton} message HydratedTemplateButton + * @param {proto.LocalizedName} message LocalizedName * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - HydratedTemplateButton.toObject = function toObject(message, options) { + LocalizedName.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.index = 0; - if (message.quickReplyButton != null && message.hasOwnProperty("quickReplyButton")) { - object.quickReplyButton = $root.proto.HydratedTemplateButton.HydratedQuickReplyButton.toObject(message.quickReplyButton, options); - if (options.oneofs) - object.hydratedButton = "quickReplyButton"; - } - if (message.urlButton != null && message.hasOwnProperty("urlButton")) { - object.urlButton = $root.proto.HydratedTemplateButton.HydratedURLButton.toObject(message.urlButton, options); - if (options.oneofs) - object.hydratedButton = "urlButton"; - } - if (message.callButton != null && message.hasOwnProperty("callButton")) { - object.callButton = $root.proto.HydratedTemplateButton.HydratedCallButton.toObject(message.callButton, options); - if (options.oneofs) - object.hydratedButton = "callButton"; + if (options.defaults) { + object.lg = ""; + object.lc = ""; + object.verifiedName = ""; } - if (message.index != null && message.hasOwnProperty("index")) - object.index = message.index; + if (message.lg != null && message.hasOwnProperty("lg")) + object.lg = message.lg; + if (message.lc != null && message.hasOwnProperty("lc")) + object.lc = message.lc; + if (message.verifiedName != null && message.hasOwnProperty("verifiedName")) + object.verifiedName = message.verifiedName; return object; }; /** - * Converts this HydratedTemplateButton to JSON. + * Converts this LocalizedName to JSON. * @function toJSON - * @memberof proto.HydratedTemplateButton + * @memberof proto.LocalizedName * @instance * @returns {Object.} JSON object */ - HydratedTemplateButton.prototype.toJSON = function toJSON() { + LocalizedName.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - HydratedTemplateButton.HydratedCallButton = (function() { - - /** - * Properties of a HydratedCallButton. - * @memberof proto.HydratedTemplateButton - * @interface IHydratedCallButton - * @property {string|null} [displayText] HydratedCallButton displayText - * @property {string|null} [phoneNumber] HydratedCallButton phoneNumber - */ - - /** - * Constructs a new HydratedCallButton. - * @memberof proto.HydratedTemplateButton - * @classdesc Represents a HydratedCallButton. - * @implements IHydratedCallButton - * @constructor - * @param {proto.HydratedTemplateButton.IHydratedCallButton=} [properties] Properties to set - */ - function HydratedCallButton(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * HydratedCallButton displayText. - * @member {string} displayText - * @memberof proto.HydratedTemplateButton.HydratedCallButton - * @instance - */ - HydratedCallButton.prototype.displayText = ""; - - /** - * HydratedCallButton phoneNumber. - * @member {string} phoneNumber - * @memberof proto.HydratedTemplateButton.HydratedCallButton - * @instance - */ - HydratedCallButton.prototype.phoneNumber = ""; - - /** - * Creates a new HydratedCallButton instance using the specified properties. - * @function create - * @memberof proto.HydratedTemplateButton.HydratedCallButton - * @static - * @param {proto.HydratedTemplateButton.IHydratedCallButton=} [properties] Properties to set - * @returns {proto.HydratedTemplateButton.HydratedCallButton} HydratedCallButton instance - */ - HydratedCallButton.create = function create(properties) { - return new HydratedCallButton(properties); - }; - - /** - * Encodes the specified HydratedCallButton message. Does not implicitly {@link proto.HydratedTemplateButton.HydratedCallButton.verify|verify} messages. - * @function encode - * @memberof proto.HydratedTemplateButton.HydratedCallButton - * @static - * @param {proto.HydratedTemplateButton.IHydratedCallButton} message HydratedCallButton message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HydratedCallButton.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayText != null && Object.hasOwnProperty.call(message, "displayText")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayText); - if (message.phoneNumber != null && Object.hasOwnProperty.call(message, "phoneNumber")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.phoneNumber); - return writer; - }; - - /** - * Encodes the specified HydratedCallButton message, length delimited. Does not implicitly {@link proto.HydratedTemplateButton.HydratedCallButton.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.HydratedTemplateButton.HydratedCallButton - * @static - * @param {proto.HydratedTemplateButton.IHydratedCallButton} message HydratedCallButton message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HydratedCallButton.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a HydratedCallButton message from the specified reader or buffer. - * @function decode - * @memberof proto.HydratedTemplateButton.HydratedCallButton - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.HydratedTemplateButton.HydratedCallButton} HydratedCallButton - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HydratedCallButton.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.HydratedTemplateButton.HydratedCallButton(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.displayText = reader.string(); - break; - case 2: - message.phoneNumber = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a HydratedCallButton message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.HydratedTemplateButton.HydratedCallButton - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.HydratedTemplateButton.HydratedCallButton} HydratedCallButton - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HydratedCallButton.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a HydratedCallButton message. - * @function verify - * @memberof proto.HydratedTemplateButton.HydratedCallButton - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HydratedCallButton.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayText != null && message.hasOwnProperty("displayText")) - if (!$util.isString(message.displayText)) - return "displayText: string expected"; - if (message.phoneNumber != null && message.hasOwnProperty("phoneNumber")) - if (!$util.isString(message.phoneNumber)) - return "phoneNumber: string expected"; - return null; - }; - - /** - * Creates a HydratedCallButton message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.HydratedTemplateButton.HydratedCallButton - * @static - * @param {Object.} object Plain object - * @returns {proto.HydratedTemplateButton.HydratedCallButton} HydratedCallButton - */ - HydratedCallButton.fromObject = function fromObject(object) { - if (object instanceof $root.proto.HydratedTemplateButton.HydratedCallButton) - return object; - var message = new $root.proto.HydratedTemplateButton.HydratedCallButton(); - if (object.displayText != null) - message.displayText = String(object.displayText); - if (object.phoneNumber != null) - message.phoneNumber = String(object.phoneNumber); - return message; - }; - - /** - * Creates a plain object from a HydratedCallButton message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.HydratedTemplateButton.HydratedCallButton - * @static - * @param {proto.HydratedTemplateButton.HydratedCallButton} message HydratedCallButton - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HydratedCallButton.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayText = ""; - object.phoneNumber = ""; - } - if (message.displayText != null && message.hasOwnProperty("displayText")) - object.displayText = message.displayText; - if (message.phoneNumber != null && message.hasOwnProperty("phoneNumber")) - object.phoneNumber = message.phoneNumber; - return object; - }; - - /** - * Converts this HydratedCallButton to JSON. - * @function toJSON - * @memberof proto.HydratedTemplateButton.HydratedCallButton - * @instance - * @returns {Object.} JSON object - */ - HydratedCallButton.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return LocalizedName; + })(); - return HydratedCallButton; - })(); + proto.Location = (function() { - HydratedTemplateButton.HydratedQuickReplyButton = (function() { + /** + * Properties of a Location. + * @memberof proto + * @interface ILocation + * @property {number|null} [degreesLatitude] Location degreesLatitude + * @property {number|null} [degreesLongitude] Location degreesLongitude + * @property {string|null} [name] Location name + */ - /** - * Properties of a HydratedQuickReplyButton. - * @memberof proto.HydratedTemplateButton - * @interface IHydratedQuickReplyButton - * @property {string|null} [displayText] HydratedQuickReplyButton displayText - * @property {string|null} [id] HydratedQuickReplyButton id - */ + /** + * Constructs a new Location. + * @memberof proto + * @classdesc Represents a Location. + * @implements ILocation + * @constructor + * @param {proto.ILocation=} [properties] Properties to set + */ + function Location(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Constructs a new HydratedQuickReplyButton. - * @memberof proto.HydratedTemplateButton - * @classdesc Represents a HydratedQuickReplyButton. - * @implements IHydratedQuickReplyButton - * @constructor - * @param {proto.HydratedTemplateButton.IHydratedQuickReplyButton=} [properties] Properties to set - */ - function HydratedQuickReplyButton(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Location degreesLatitude. + * @member {number} degreesLatitude + * @memberof proto.Location + * @instance + */ + Location.prototype.degreesLatitude = 0; - /** - * HydratedQuickReplyButton displayText. - * @member {string} displayText - * @memberof proto.HydratedTemplateButton.HydratedQuickReplyButton - * @instance - */ - HydratedQuickReplyButton.prototype.displayText = ""; + /** + * Location degreesLongitude. + * @member {number} degreesLongitude + * @memberof proto.Location + * @instance + */ + Location.prototype.degreesLongitude = 0; - /** - * HydratedQuickReplyButton id. - * @member {string} id - * @memberof proto.HydratedTemplateButton.HydratedQuickReplyButton - * @instance - */ - HydratedQuickReplyButton.prototype.id = ""; + /** + * Location name. + * @member {string} name + * @memberof proto.Location + * @instance + */ + Location.prototype.name = ""; - /** - * Creates a new HydratedQuickReplyButton instance using the specified properties. - * @function create - * @memberof proto.HydratedTemplateButton.HydratedQuickReplyButton - * @static - * @param {proto.HydratedTemplateButton.IHydratedQuickReplyButton=} [properties] Properties to set - * @returns {proto.HydratedTemplateButton.HydratedQuickReplyButton} HydratedQuickReplyButton instance - */ - HydratedQuickReplyButton.create = function create(properties) { - return new HydratedQuickReplyButton(properties); - }; + /** + * Creates a new Location instance using the specified properties. + * @function create + * @memberof proto.Location + * @static + * @param {proto.ILocation=} [properties] Properties to set + * @returns {proto.Location} Location instance + */ + Location.create = function create(properties) { + return new Location(properties); + }; - /** - * Encodes the specified HydratedQuickReplyButton message. Does not implicitly {@link proto.HydratedTemplateButton.HydratedQuickReplyButton.verify|verify} messages. - * @function encode - * @memberof proto.HydratedTemplateButton.HydratedQuickReplyButton - * @static - * @param {proto.HydratedTemplateButton.IHydratedQuickReplyButton} message HydratedQuickReplyButton message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HydratedQuickReplyButton.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayText != null && Object.hasOwnProperty.call(message, "displayText")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayText); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.id); - return writer; - }; + /** + * Encodes the specified Location message. Does not implicitly {@link proto.Location.verify|verify} messages. + * @function encode + * @memberof proto.Location + * @static + * @param {proto.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.degreesLatitude != null && Object.hasOwnProperty.call(message, "degreesLatitude")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.degreesLatitude); + if (message.degreesLongitude != null && Object.hasOwnProperty.call(message, "degreesLongitude")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.degreesLongitude); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + return writer; + }; - /** - * Encodes the specified HydratedQuickReplyButton message, length delimited. Does not implicitly {@link proto.HydratedTemplateButton.HydratedQuickReplyButton.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.HydratedTemplateButton.HydratedQuickReplyButton - * @static - * @param {proto.HydratedTemplateButton.IHydratedQuickReplyButton} message HydratedQuickReplyButton message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HydratedQuickReplyButton.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link proto.Location.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Location + * @static + * @param {proto.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a HydratedQuickReplyButton message from the specified reader or buffer. - * @function decode - * @memberof proto.HydratedTemplateButton.HydratedQuickReplyButton - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.HydratedTemplateButton.HydratedQuickReplyButton} HydratedQuickReplyButton - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HydratedQuickReplyButton.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.HydratedTemplateButton.HydratedQuickReplyButton(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.displayText = reader.string(); - break; - case 2: - message.id = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } + /** + * Decodes a Location message from the specified reader or buffer. + * @function decode + * @memberof proto.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Location(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.degreesLatitude = reader.double(); + break; + case 2: + message.degreesLongitude = reader.double(); + break; + case 3: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } - return message; - }; - - /** - * Decodes a HydratedQuickReplyButton message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.HydratedTemplateButton.HydratedQuickReplyButton - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.HydratedTemplateButton.HydratedQuickReplyButton} HydratedQuickReplyButton - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HydratedQuickReplyButton.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + } + return message; + }; - /** - * Verifies a HydratedQuickReplyButton message. - * @function verify - * @memberof proto.HydratedTemplateButton.HydratedQuickReplyButton - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HydratedQuickReplyButton.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayText != null && message.hasOwnProperty("displayText")) - if (!$util.isString(message.displayText)) - return "displayText: string expected"; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; - return null; - }; + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a HydratedQuickReplyButton message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.HydratedTemplateButton.HydratedQuickReplyButton - * @static - * @param {Object.} object Plain object - * @returns {proto.HydratedTemplateButton.HydratedQuickReplyButton} HydratedQuickReplyButton - */ - HydratedQuickReplyButton.fromObject = function fromObject(object) { - if (object instanceof $root.proto.HydratedTemplateButton.HydratedQuickReplyButton) - return object; - var message = new $root.proto.HydratedTemplateButton.HydratedQuickReplyButton(); - if (object.displayText != null) - message.displayText = String(object.displayText); - if (object.id != null) - message.id = String(object.id); - return message; - }; + /** + * Verifies a Location message. + * @function verify + * @memberof proto.Location + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Location.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.degreesLatitude != null && message.hasOwnProperty("degreesLatitude")) + if (typeof message.degreesLatitude !== "number") + return "degreesLatitude: number expected"; + if (message.degreesLongitude != null && message.hasOwnProperty("degreesLongitude")) + if (typeof message.degreesLongitude !== "number") + return "degreesLongitude: number expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; - /** - * Creates a plain object from a HydratedQuickReplyButton message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.HydratedTemplateButton.HydratedQuickReplyButton - * @static - * @param {proto.HydratedTemplateButton.HydratedQuickReplyButton} message HydratedQuickReplyButton - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HydratedQuickReplyButton.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayText = ""; - object.id = ""; - } - if (message.displayText != null && message.hasOwnProperty("displayText")) - object.displayText = message.displayText; - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Location + * @static + * @param {Object.} object Plain object + * @returns {proto.Location} Location + */ + Location.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Location) return object; - }; + var message = new $root.proto.Location(); + if (object.degreesLatitude != null) + message.degreesLatitude = Number(object.degreesLatitude); + if (object.degreesLongitude != null) + message.degreesLongitude = Number(object.degreesLongitude); + if (object.name != null) + message.name = String(object.name); + return message; + }; - /** - * Converts this HydratedQuickReplyButton to JSON. - * @function toJSON - * @memberof proto.HydratedTemplateButton.HydratedQuickReplyButton - * @instance - * @returns {Object.} JSON object - */ - HydratedQuickReplyButton.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Location + * @static + * @param {proto.Location} message Location + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Location.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.degreesLatitude = 0; + object.degreesLongitude = 0; + object.name = ""; + } + if (message.degreesLatitude != null && message.hasOwnProperty("degreesLatitude")) + object.degreesLatitude = options.json && !isFinite(message.degreesLatitude) ? String(message.degreesLatitude) : message.degreesLatitude; + if (message.degreesLongitude != null && message.hasOwnProperty("degreesLongitude")) + object.degreesLongitude = options.json && !isFinite(message.degreesLongitude) ? String(message.degreesLongitude) : message.degreesLongitude; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; - return HydratedQuickReplyButton; - })(); + /** + * Converts this Location to JSON. + * @function toJSON + * @memberof proto.Location + * @instance + * @returns {Object.} JSON object + */ + Location.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - HydratedTemplateButton.HydratedURLButton = (function() { + return Location; + })(); - /** - * Properties of a HydratedURLButton. - * @memberof proto.HydratedTemplateButton - * @interface IHydratedURLButton - * @property {string|null} [displayText] HydratedURLButton displayText - * @property {string|null} [url] HydratedURLButton url - */ + proto.MediaData = (function() { - /** - * Constructs a new HydratedURLButton. - * @memberof proto.HydratedTemplateButton - * @classdesc Represents a HydratedURLButton. - * @implements IHydratedURLButton - * @constructor - * @param {proto.HydratedTemplateButton.IHydratedURLButton=} [properties] Properties to set - */ - function HydratedURLButton(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of a MediaData. + * @memberof proto + * @interface IMediaData + * @property {string|null} [localPath] MediaData localPath + */ - /** - * HydratedURLButton displayText. - * @member {string} displayText - * @memberof proto.HydratedTemplateButton.HydratedURLButton - * @instance - */ - HydratedURLButton.prototype.displayText = ""; + /** + * Constructs a new MediaData. + * @memberof proto + * @classdesc Represents a MediaData. + * @implements IMediaData + * @constructor + * @param {proto.IMediaData=} [properties] Properties to set + */ + function MediaData(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * HydratedURLButton url. - * @member {string} url - * @memberof proto.HydratedTemplateButton.HydratedURLButton - * @instance - */ - HydratedURLButton.prototype.url = ""; + /** + * MediaData localPath. + * @member {string} localPath + * @memberof proto.MediaData + * @instance + */ + MediaData.prototype.localPath = ""; - /** - * Creates a new HydratedURLButton instance using the specified properties. - * @function create - * @memberof proto.HydratedTemplateButton.HydratedURLButton - * @static - * @param {proto.HydratedTemplateButton.IHydratedURLButton=} [properties] Properties to set - * @returns {proto.HydratedTemplateButton.HydratedURLButton} HydratedURLButton instance - */ - HydratedURLButton.create = function create(properties) { - return new HydratedURLButton(properties); - }; + /** + * Creates a new MediaData instance using the specified properties. + * @function create + * @memberof proto.MediaData + * @static + * @param {proto.IMediaData=} [properties] Properties to set + * @returns {proto.MediaData} MediaData instance + */ + MediaData.create = function create(properties) { + return new MediaData(properties); + }; - /** - * Encodes the specified HydratedURLButton message. Does not implicitly {@link proto.HydratedTemplateButton.HydratedURLButton.verify|verify} messages. - * @function encode - * @memberof proto.HydratedTemplateButton.HydratedURLButton - * @static - * @param {proto.HydratedTemplateButton.IHydratedURLButton} message HydratedURLButton message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HydratedURLButton.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayText != null && Object.hasOwnProperty.call(message, "displayText")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayText); - if (message.url != null && Object.hasOwnProperty.call(message, "url")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.url); - return writer; - }; + /** + * Encodes the specified MediaData message. Does not implicitly {@link proto.MediaData.verify|verify} messages. + * @function encode + * @memberof proto.MediaData + * @static + * @param {proto.IMediaData} message MediaData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MediaData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.localPath != null && Object.hasOwnProperty.call(message, "localPath")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.localPath); + return writer; + }; - /** - * Encodes the specified HydratedURLButton message, length delimited. Does not implicitly {@link proto.HydratedTemplateButton.HydratedURLButton.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.HydratedTemplateButton.HydratedURLButton - * @static - * @param {proto.HydratedTemplateButton.IHydratedURLButton} message HydratedURLButton message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HydratedURLButton.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified MediaData message, length delimited. Does not implicitly {@link proto.MediaData.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.MediaData + * @static + * @param {proto.IMediaData} message MediaData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MediaData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a HydratedURLButton message from the specified reader or buffer. - * @function decode - * @memberof proto.HydratedTemplateButton.HydratedURLButton - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.HydratedTemplateButton.HydratedURLButton} HydratedURLButton - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HydratedURLButton.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.HydratedTemplateButton.HydratedURLButton(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.displayText = reader.string(); - break; - case 2: - message.url = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } + /** + * Decodes a MediaData message from the specified reader or buffer. + * @function decode + * @memberof proto.MediaData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.MediaData} MediaData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MediaData.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.MediaData(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.localPath = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } - return message; - }; - - /** - * Decodes a HydratedURLButton message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.HydratedTemplateButton.HydratedURLButton - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.HydratedTemplateButton.HydratedURLButton} HydratedURLButton - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HydratedURLButton.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + } + return message; + }; - /** - * Verifies a HydratedURLButton message. - * @function verify - * @memberof proto.HydratedTemplateButton.HydratedURLButton - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HydratedURLButton.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayText != null && message.hasOwnProperty("displayText")) - if (!$util.isString(message.displayText)) - return "displayText: string expected"; - if (message.url != null && message.hasOwnProperty("url")) - if (!$util.isString(message.url)) - return "url: string expected"; - return null; - }; + /** + * Decodes a MediaData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.MediaData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.MediaData} MediaData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MediaData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a HydratedURLButton message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.HydratedTemplateButton.HydratedURLButton - * @static - * @param {Object.} object Plain object - * @returns {proto.HydratedTemplateButton.HydratedURLButton} HydratedURLButton - */ - HydratedURLButton.fromObject = function fromObject(object) { - if (object instanceof $root.proto.HydratedTemplateButton.HydratedURLButton) - return object; - var message = new $root.proto.HydratedTemplateButton.HydratedURLButton(); - if (object.displayText != null) - message.displayText = String(object.displayText); - if (object.url != null) - message.url = String(object.url); - return message; - }; + /** + * Verifies a MediaData message. + * @function verify + * @memberof proto.MediaData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MediaData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.localPath != null && message.hasOwnProperty("localPath")) + if (!$util.isString(message.localPath)) + return "localPath: string expected"; + return null; + }; - /** - * Creates a plain object from a HydratedURLButton message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.HydratedTemplateButton.HydratedURLButton - * @static - * @param {proto.HydratedTemplateButton.HydratedURLButton} message HydratedURLButton - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HydratedURLButton.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayText = ""; - object.url = ""; - } - if (message.displayText != null && message.hasOwnProperty("displayText")) - object.displayText = message.displayText; - if (message.url != null && message.hasOwnProperty("url")) - object.url = message.url; + /** + * Creates a MediaData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.MediaData + * @static + * @param {Object.} object Plain object + * @returns {proto.MediaData} MediaData + */ + MediaData.fromObject = function fromObject(object) { + if (object instanceof $root.proto.MediaData) return object; - }; + var message = new $root.proto.MediaData(); + if (object.localPath != null) + message.localPath = String(object.localPath); + return message; + }; - /** - * Converts this HydratedURLButton to JSON. - * @function toJSON - * @memberof proto.HydratedTemplateButton.HydratedURLButton - * @instance - * @returns {Object.} JSON object - */ - HydratedURLButton.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a MediaData message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.MediaData + * @static + * @param {proto.MediaData} message MediaData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MediaData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.localPath = ""; + if (message.localPath != null && message.hasOwnProperty("localPath")) + object.localPath = message.localPath; + return object; + }; - return HydratedURLButton; - })(); + /** + * Converts this MediaData to JSON. + * @function toJSON + * @memberof proto.MediaData + * @instance + * @returns {Object.} JSON object + */ + MediaData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return HydratedTemplateButton; + return MediaData; })(); - proto.IdentityKeyPairStructure = (function() { + proto.MediaEntry = (function() { /** - * Properties of an IdentityKeyPairStructure. + * Properties of a MediaEntry. * @memberof proto - * @interface IIdentityKeyPairStructure - * @property {Uint8Array|null} [publicKey] IdentityKeyPairStructure publicKey - * @property {Uint8Array|null} [privateKey] IdentityKeyPairStructure privateKey - */ - - /** - * Constructs a new IdentityKeyPairStructure. + * @interface IMediaEntry + * @property {Uint8Array|null} [fileSha256] MediaEntry fileSha256 + * @property {Uint8Array|null} [mediaKey] MediaEntry mediaKey + * @property {Uint8Array|null} [fileEncSha256] MediaEntry fileEncSha256 + * @property {string|null} [directPath] MediaEntry directPath + * @property {number|Long|null} [mediaKeyTimestamp] MediaEntry mediaKeyTimestamp + * @property {string|null} [serverMediaType] MediaEntry serverMediaType + * @property {Uint8Array|null} [uploadToken] MediaEntry uploadToken + * @property {Uint8Array|null} [validatedTimestamp] MediaEntry validatedTimestamp + * @property {Uint8Array|null} [sidecar] MediaEntry sidecar + * @property {string|null} [objectId] MediaEntry objectId + * @property {string|null} [fbid] MediaEntry fbid + * @property {proto.MediaEntry.IDownloadableThumbnail|null} [downloadableThumbnail] MediaEntry downloadableThumbnail + * @property {string|null} [handle] MediaEntry handle + * @property {string|null} [filename] MediaEntry filename + * @property {proto.MediaEntry.IProgressiveJpegDetails|null} [progressiveJpegDetails] MediaEntry progressiveJpegDetails + */ + + /** + * Constructs a new MediaEntry. * @memberof proto - * @classdesc Represents an IdentityKeyPairStructure. - * @implements IIdentityKeyPairStructure + * @classdesc Represents a MediaEntry. + * @implements IMediaEntry * @constructor - * @param {proto.IIdentityKeyPairStructure=} [properties] Properties to set + * @param {proto.IMediaEntry=} [properties] Properties to set */ - function IdentityKeyPairStructure(properties) { + function MediaEntry(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -19656,88 +24880,257 @@ $root.proto = (function() { } /** - * IdentityKeyPairStructure publicKey. - * @member {Uint8Array} publicKey - * @memberof proto.IdentityKeyPairStructure + * MediaEntry fileSha256. + * @member {Uint8Array} fileSha256 + * @memberof proto.MediaEntry * @instance */ - IdentityKeyPairStructure.prototype.publicKey = $util.newBuffer([]); + MediaEntry.prototype.fileSha256 = $util.newBuffer([]); /** - * IdentityKeyPairStructure privateKey. - * @member {Uint8Array} privateKey - * @memberof proto.IdentityKeyPairStructure + * MediaEntry mediaKey. + * @member {Uint8Array} mediaKey + * @memberof proto.MediaEntry * @instance */ - IdentityKeyPairStructure.prototype.privateKey = $util.newBuffer([]); + MediaEntry.prototype.mediaKey = $util.newBuffer([]); /** - * Creates a new IdentityKeyPairStructure instance using the specified properties. + * MediaEntry fileEncSha256. + * @member {Uint8Array} fileEncSha256 + * @memberof proto.MediaEntry + * @instance + */ + MediaEntry.prototype.fileEncSha256 = $util.newBuffer([]); + + /** + * MediaEntry directPath. + * @member {string} directPath + * @memberof proto.MediaEntry + * @instance + */ + MediaEntry.prototype.directPath = ""; + + /** + * MediaEntry mediaKeyTimestamp. + * @member {number|Long} mediaKeyTimestamp + * @memberof proto.MediaEntry + * @instance + */ + MediaEntry.prototype.mediaKeyTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * MediaEntry serverMediaType. + * @member {string} serverMediaType + * @memberof proto.MediaEntry + * @instance + */ + MediaEntry.prototype.serverMediaType = ""; + + /** + * MediaEntry uploadToken. + * @member {Uint8Array} uploadToken + * @memberof proto.MediaEntry + * @instance + */ + MediaEntry.prototype.uploadToken = $util.newBuffer([]); + + /** + * MediaEntry validatedTimestamp. + * @member {Uint8Array} validatedTimestamp + * @memberof proto.MediaEntry + * @instance + */ + MediaEntry.prototype.validatedTimestamp = $util.newBuffer([]); + + /** + * MediaEntry sidecar. + * @member {Uint8Array} sidecar + * @memberof proto.MediaEntry + * @instance + */ + MediaEntry.prototype.sidecar = $util.newBuffer([]); + + /** + * MediaEntry objectId. + * @member {string} objectId + * @memberof proto.MediaEntry + * @instance + */ + MediaEntry.prototype.objectId = ""; + + /** + * MediaEntry fbid. + * @member {string} fbid + * @memberof proto.MediaEntry + * @instance + */ + MediaEntry.prototype.fbid = ""; + + /** + * MediaEntry downloadableThumbnail. + * @member {proto.MediaEntry.IDownloadableThumbnail|null|undefined} downloadableThumbnail + * @memberof proto.MediaEntry + * @instance + */ + MediaEntry.prototype.downloadableThumbnail = null; + + /** + * MediaEntry handle. + * @member {string} handle + * @memberof proto.MediaEntry + * @instance + */ + MediaEntry.prototype.handle = ""; + + /** + * MediaEntry filename. + * @member {string} filename + * @memberof proto.MediaEntry + * @instance + */ + MediaEntry.prototype.filename = ""; + + /** + * MediaEntry progressiveJpegDetails. + * @member {proto.MediaEntry.IProgressiveJpegDetails|null|undefined} progressiveJpegDetails + * @memberof proto.MediaEntry + * @instance + */ + MediaEntry.prototype.progressiveJpegDetails = null; + + /** + * Creates a new MediaEntry instance using the specified properties. * @function create - * @memberof proto.IdentityKeyPairStructure + * @memberof proto.MediaEntry * @static - * @param {proto.IIdentityKeyPairStructure=} [properties] Properties to set - * @returns {proto.IdentityKeyPairStructure} IdentityKeyPairStructure instance + * @param {proto.IMediaEntry=} [properties] Properties to set + * @returns {proto.MediaEntry} MediaEntry instance */ - IdentityKeyPairStructure.create = function create(properties) { - return new IdentityKeyPairStructure(properties); + MediaEntry.create = function create(properties) { + return new MediaEntry(properties); }; /** - * Encodes the specified IdentityKeyPairStructure message. Does not implicitly {@link proto.IdentityKeyPairStructure.verify|verify} messages. + * Encodes the specified MediaEntry message. Does not implicitly {@link proto.MediaEntry.verify|verify} messages. * @function encode - * @memberof proto.IdentityKeyPairStructure + * @memberof proto.MediaEntry * @static - * @param {proto.IIdentityKeyPairStructure} message IdentityKeyPairStructure message or plain object to encode + * @param {proto.IMediaEntry} message MediaEntry message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - IdentityKeyPairStructure.encode = function encode(message, writer) { + MediaEntry.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.publicKey != null && Object.hasOwnProperty.call(message, "publicKey")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.publicKey); - if (message.privateKey != null && Object.hasOwnProperty.call(message, "privateKey")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.privateKey); + if (message.fileSha256 != null && Object.hasOwnProperty.call(message, "fileSha256")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.fileSha256); + if (message.mediaKey != null && Object.hasOwnProperty.call(message, "mediaKey")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.mediaKey); + if (message.fileEncSha256 != null && Object.hasOwnProperty.call(message, "fileEncSha256")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.fileEncSha256); + if (message.directPath != null && Object.hasOwnProperty.call(message, "directPath")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.directPath); + if (message.mediaKeyTimestamp != null && Object.hasOwnProperty.call(message, "mediaKeyTimestamp")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.mediaKeyTimestamp); + if (message.serverMediaType != null && Object.hasOwnProperty.call(message, "serverMediaType")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.serverMediaType); + if (message.uploadToken != null && Object.hasOwnProperty.call(message, "uploadToken")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.uploadToken); + if (message.validatedTimestamp != null && Object.hasOwnProperty.call(message, "validatedTimestamp")) + writer.uint32(/* id 8, wireType 2 =*/66).bytes(message.validatedTimestamp); + if (message.sidecar != null && Object.hasOwnProperty.call(message, "sidecar")) + writer.uint32(/* id 9, wireType 2 =*/74).bytes(message.sidecar); + if (message.objectId != null && Object.hasOwnProperty.call(message, "objectId")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.objectId); + if (message.fbid != null && Object.hasOwnProperty.call(message, "fbid")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.fbid); + if (message.downloadableThumbnail != null && Object.hasOwnProperty.call(message, "downloadableThumbnail")) + $root.proto.MediaEntry.DownloadableThumbnail.encode(message.downloadableThumbnail, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.handle != null && Object.hasOwnProperty.call(message, "handle")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.handle); + if (message.filename != null && Object.hasOwnProperty.call(message, "filename")) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.filename); + if (message.progressiveJpegDetails != null && Object.hasOwnProperty.call(message, "progressiveJpegDetails")) + $root.proto.MediaEntry.ProgressiveJpegDetails.encode(message.progressiveJpegDetails, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); return writer; }; /** - * Encodes the specified IdentityKeyPairStructure message, length delimited. Does not implicitly {@link proto.IdentityKeyPairStructure.verify|verify} messages. + * Encodes the specified MediaEntry message, length delimited. Does not implicitly {@link proto.MediaEntry.verify|verify} messages. * @function encodeDelimited - * @memberof proto.IdentityKeyPairStructure + * @memberof proto.MediaEntry * @static - * @param {proto.IIdentityKeyPairStructure} message IdentityKeyPairStructure message or plain object to encode + * @param {proto.IMediaEntry} message MediaEntry message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - IdentityKeyPairStructure.encodeDelimited = function encodeDelimited(message, writer) { + MediaEntry.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an IdentityKeyPairStructure message from the specified reader or buffer. + * Decodes a MediaEntry message from the specified reader or buffer. * @function decode - * @memberof proto.IdentityKeyPairStructure + * @memberof proto.MediaEntry * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {proto.IdentityKeyPairStructure} IdentityKeyPairStructure + * @returns {proto.MediaEntry} MediaEntry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - IdentityKeyPairStructure.decode = function decode(reader, length) { + MediaEntry.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.IdentityKeyPairStructure(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.MediaEntry(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.publicKey = reader.bytes(); + message.fileSha256 = reader.bytes(); break; case 2: - message.privateKey = reader.bytes(); + message.mediaKey = reader.bytes(); + break; + case 3: + message.fileEncSha256 = reader.bytes(); + break; + case 4: + message.directPath = reader.string(); + break; + case 5: + message.mediaKeyTimestamp = reader.int64(); + break; + case 6: + message.serverMediaType = reader.string(); + break; + case 7: + message.uploadToken = reader.bytes(); + break; + case 8: + message.validatedTimestamp = reader.bytes(); + break; + case 9: + message.sidecar = reader.bytes(); + break; + case 10: + message.objectId = reader.string(); + break; + case 11: + message.fbid = reader.string(); + break; + case 12: + message.downloadableThumbnail = $root.proto.MediaEntry.DownloadableThumbnail.decode(reader, reader.uint32()); + break; + case 13: + message.handle = reader.string(); + break; + case 14: + message.filename = reader.string(); + break; + case 15: + message.progressiveJpegDetails = $root.proto.MediaEntry.ProgressiveJpegDetails.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -19748,394 +25141,889 @@ $root.proto = (function() { }; /** - * Decodes an IdentityKeyPairStructure message from the specified reader or buffer, length delimited. + * Decodes a MediaEntry message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof proto.IdentityKeyPairStructure + * @memberof proto.MediaEntry * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.IdentityKeyPairStructure} IdentityKeyPairStructure + * @returns {proto.MediaEntry} MediaEntry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - IdentityKeyPairStructure.decodeDelimited = function decodeDelimited(reader) { + MediaEntry.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an IdentityKeyPairStructure message. + * Verifies a MediaEntry message. * @function verify - * @memberof proto.IdentityKeyPairStructure + * @memberof proto.MediaEntry * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - IdentityKeyPairStructure.verify = function verify(message) { + MediaEntry.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.publicKey != null && message.hasOwnProperty("publicKey")) - if (!(message.publicKey && typeof message.publicKey.length === "number" || $util.isString(message.publicKey))) - return "publicKey: buffer expected"; - if (message.privateKey != null && message.hasOwnProperty("privateKey")) - if (!(message.privateKey && typeof message.privateKey.length === "number" || $util.isString(message.privateKey))) - return "privateKey: buffer expected"; + if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) + if (!(message.fileSha256 && typeof message.fileSha256.length === "number" || $util.isString(message.fileSha256))) + return "fileSha256: buffer expected"; + if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) + if (!(message.mediaKey && typeof message.mediaKey.length === "number" || $util.isString(message.mediaKey))) + return "mediaKey: buffer expected"; + if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) + if (!(message.fileEncSha256 && typeof message.fileEncSha256.length === "number" || $util.isString(message.fileEncSha256))) + return "fileEncSha256: buffer expected"; + if (message.directPath != null && message.hasOwnProperty("directPath")) + if (!$util.isString(message.directPath)) + return "directPath: string expected"; + if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp")) + if (!$util.isInteger(message.mediaKeyTimestamp) && !(message.mediaKeyTimestamp && $util.isInteger(message.mediaKeyTimestamp.low) && $util.isInteger(message.mediaKeyTimestamp.high))) + return "mediaKeyTimestamp: integer|Long expected"; + if (message.serverMediaType != null && message.hasOwnProperty("serverMediaType")) + if (!$util.isString(message.serverMediaType)) + return "serverMediaType: string expected"; + if (message.uploadToken != null && message.hasOwnProperty("uploadToken")) + if (!(message.uploadToken && typeof message.uploadToken.length === "number" || $util.isString(message.uploadToken))) + return "uploadToken: buffer expected"; + if (message.validatedTimestamp != null && message.hasOwnProperty("validatedTimestamp")) + if (!(message.validatedTimestamp && typeof message.validatedTimestamp.length === "number" || $util.isString(message.validatedTimestamp))) + return "validatedTimestamp: buffer expected"; + if (message.sidecar != null && message.hasOwnProperty("sidecar")) + if (!(message.sidecar && typeof message.sidecar.length === "number" || $util.isString(message.sidecar))) + return "sidecar: buffer expected"; + if (message.objectId != null && message.hasOwnProperty("objectId")) + if (!$util.isString(message.objectId)) + return "objectId: string expected"; + if (message.fbid != null && message.hasOwnProperty("fbid")) + if (!$util.isString(message.fbid)) + return "fbid: string expected"; + if (message.downloadableThumbnail != null && message.hasOwnProperty("downloadableThumbnail")) { + var error = $root.proto.MediaEntry.DownloadableThumbnail.verify(message.downloadableThumbnail); + if (error) + return "downloadableThumbnail." + error; + } + if (message.handle != null && message.hasOwnProperty("handle")) + if (!$util.isString(message.handle)) + return "handle: string expected"; + if (message.filename != null && message.hasOwnProperty("filename")) + if (!$util.isString(message.filename)) + return "filename: string expected"; + if (message.progressiveJpegDetails != null && message.hasOwnProperty("progressiveJpegDetails")) { + var error = $root.proto.MediaEntry.ProgressiveJpegDetails.verify(message.progressiveJpegDetails); + if (error) + return "progressiveJpegDetails." + error; + } return null; }; /** - * Creates an IdentityKeyPairStructure message from a plain object. Also converts values to their respective internal types. + * Creates a MediaEntry message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof proto.IdentityKeyPairStructure + * @memberof proto.MediaEntry * @static * @param {Object.} object Plain object - * @returns {proto.IdentityKeyPairStructure} IdentityKeyPairStructure + * @returns {proto.MediaEntry} MediaEntry */ - IdentityKeyPairStructure.fromObject = function fromObject(object) { - if (object instanceof $root.proto.IdentityKeyPairStructure) + MediaEntry.fromObject = function fromObject(object) { + if (object instanceof $root.proto.MediaEntry) return object; - var message = new $root.proto.IdentityKeyPairStructure(); - if (object.publicKey != null) - if (typeof object.publicKey === "string") - $util.base64.decode(object.publicKey, message.publicKey = $util.newBuffer($util.base64.length(object.publicKey)), 0); - else if (object.publicKey.length) - message.publicKey = object.publicKey; - if (object.privateKey != null) - if (typeof object.privateKey === "string") - $util.base64.decode(object.privateKey, message.privateKey = $util.newBuffer($util.base64.length(object.privateKey)), 0); - else if (object.privateKey.length) - message.privateKey = object.privateKey; + var message = new $root.proto.MediaEntry(); + if (object.fileSha256 != null) + if (typeof object.fileSha256 === "string") + $util.base64.decode(object.fileSha256, message.fileSha256 = $util.newBuffer($util.base64.length(object.fileSha256)), 0); + else if (object.fileSha256.length) + message.fileSha256 = object.fileSha256; + if (object.mediaKey != null) + if (typeof object.mediaKey === "string") + $util.base64.decode(object.mediaKey, message.mediaKey = $util.newBuffer($util.base64.length(object.mediaKey)), 0); + else if (object.mediaKey.length) + message.mediaKey = object.mediaKey; + if (object.fileEncSha256 != null) + if (typeof object.fileEncSha256 === "string") + $util.base64.decode(object.fileEncSha256, message.fileEncSha256 = $util.newBuffer($util.base64.length(object.fileEncSha256)), 0); + else if (object.fileEncSha256.length) + message.fileEncSha256 = object.fileEncSha256; + if (object.directPath != null) + message.directPath = String(object.directPath); + if (object.mediaKeyTimestamp != null) + if ($util.Long) + (message.mediaKeyTimestamp = $util.Long.fromValue(object.mediaKeyTimestamp)).unsigned = false; + else if (typeof object.mediaKeyTimestamp === "string") + message.mediaKeyTimestamp = parseInt(object.mediaKeyTimestamp, 10); + else if (typeof object.mediaKeyTimestamp === "number") + message.mediaKeyTimestamp = object.mediaKeyTimestamp; + else if (typeof object.mediaKeyTimestamp === "object") + message.mediaKeyTimestamp = new $util.LongBits(object.mediaKeyTimestamp.low >>> 0, object.mediaKeyTimestamp.high >>> 0).toNumber(); + if (object.serverMediaType != null) + message.serverMediaType = String(object.serverMediaType); + if (object.uploadToken != null) + if (typeof object.uploadToken === "string") + $util.base64.decode(object.uploadToken, message.uploadToken = $util.newBuffer($util.base64.length(object.uploadToken)), 0); + else if (object.uploadToken.length) + message.uploadToken = object.uploadToken; + if (object.validatedTimestamp != null) + if (typeof object.validatedTimestamp === "string") + $util.base64.decode(object.validatedTimestamp, message.validatedTimestamp = $util.newBuffer($util.base64.length(object.validatedTimestamp)), 0); + else if (object.validatedTimestamp.length) + message.validatedTimestamp = object.validatedTimestamp; + if (object.sidecar != null) + if (typeof object.sidecar === "string") + $util.base64.decode(object.sidecar, message.sidecar = $util.newBuffer($util.base64.length(object.sidecar)), 0); + else if (object.sidecar.length) + message.sidecar = object.sidecar; + if (object.objectId != null) + message.objectId = String(object.objectId); + if (object.fbid != null) + message.fbid = String(object.fbid); + if (object.downloadableThumbnail != null) { + if (typeof object.downloadableThumbnail !== "object") + throw TypeError(".proto.MediaEntry.downloadableThumbnail: object expected"); + message.downloadableThumbnail = $root.proto.MediaEntry.DownloadableThumbnail.fromObject(object.downloadableThumbnail); + } + if (object.handle != null) + message.handle = String(object.handle); + if (object.filename != null) + message.filename = String(object.filename); + if (object.progressiveJpegDetails != null) { + if (typeof object.progressiveJpegDetails !== "object") + throw TypeError(".proto.MediaEntry.progressiveJpegDetails: object expected"); + message.progressiveJpegDetails = $root.proto.MediaEntry.ProgressiveJpegDetails.fromObject(object.progressiveJpegDetails); + } return message; }; /** - * Creates a plain object from an IdentityKeyPairStructure message. Also converts values to other types if specified. + * Creates a plain object from a MediaEntry message. Also converts values to other types if specified. * @function toObject - * @memberof proto.IdentityKeyPairStructure + * @memberof proto.MediaEntry * @static - * @param {proto.IdentityKeyPairStructure} message IdentityKeyPairStructure + * @param {proto.MediaEntry} message MediaEntry * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - IdentityKeyPairStructure.toObject = function toObject(message, options) { + MediaEntry.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { if (options.bytes === String) - object.publicKey = ""; + object.fileSha256 = ""; + else { + object.fileSha256 = []; + if (options.bytes !== Array) + object.fileSha256 = $util.newBuffer(object.fileSha256); + } + if (options.bytes === String) + object.mediaKey = ""; + else { + object.mediaKey = []; + if (options.bytes !== Array) + object.mediaKey = $util.newBuffer(object.mediaKey); + } + if (options.bytes === String) + object.fileEncSha256 = ""; + else { + object.fileEncSha256 = []; + if (options.bytes !== Array) + object.fileEncSha256 = $util.newBuffer(object.fileEncSha256); + } + object.directPath = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.mediaKeyTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.mediaKeyTimestamp = options.longs === String ? "0" : 0; + object.serverMediaType = ""; + if (options.bytes === String) + object.uploadToken = ""; + else { + object.uploadToken = []; + if (options.bytes !== Array) + object.uploadToken = $util.newBuffer(object.uploadToken); + } + if (options.bytes === String) + object.validatedTimestamp = ""; else { - object.publicKey = []; + object.validatedTimestamp = []; if (options.bytes !== Array) - object.publicKey = $util.newBuffer(object.publicKey); + object.validatedTimestamp = $util.newBuffer(object.validatedTimestamp); } if (options.bytes === String) - object.privateKey = ""; + object.sidecar = ""; else { - object.privateKey = []; + object.sidecar = []; if (options.bytes !== Array) - object.privateKey = $util.newBuffer(object.privateKey); + object.sidecar = $util.newBuffer(object.sidecar); } + object.objectId = ""; + object.fbid = ""; + object.downloadableThumbnail = null; + object.handle = ""; + object.filename = ""; + object.progressiveJpegDetails = null; } - if (message.publicKey != null && message.hasOwnProperty("publicKey")) - object.publicKey = options.bytes === String ? $util.base64.encode(message.publicKey, 0, message.publicKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.publicKey) : message.publicKey; - if (message.privateKey != null && message.hasOwnProperty("privateKey")) - object.privateKey = options.bytes === String ? $util.base64.encode(message.privateKey, 0, message.privateKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.privateKey) : message.privateKey; + if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) + object.fileSha256 = options.bytes === String ? $util.base64.encode(message.fileSha256, 0, message.fileSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.fileSha256) : message.fileSha256; + if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) + object.mediaKey = options.bytes === String ? $util.base64.encode(message.mediaKey, 0, message.mediaKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.mediaKey) : message.mediaKey; + if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) + object.fileEncSha256 = options.bytes === String ? $util.base64.encode(message.fileEncSha256, 0, message.fileEncSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.fileEncSha256) : message.fileEncSha256; + if (message.directPath != null && message.hasOwnProperty("directPath")) + object.directPath = message.directPath; + if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp")) + if (typeof message.mediaKeyTimestamp === "number") + object.mediaKeyTimestamp = options.longs === String ? String(message.mediaKeyTimestamp) : message.mediaKeyTimestamp; + else + object.mediaKeyTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.mediaKeyTimestamp) : options.longs === Number ? new $util.LongBits(message.mediaKeyTimestamp.low >>> 0, message.mediaKeyTimestamp.high >>> 0).toNumber() : message.mediaKeyTimestamp; + if (message.serverMediaType != null && message.hasOwnProperty("serverMediaType")) + object.serverMediaType = message.serverMediaType; + if (message.uploadToken != null && message.hasOwnProperty("uploadToken")) + object.uploadToken = options.bytes === String ? $util.base64.encode(message.uploadToken, 0, message.uploadToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.uploadToken) : message.uploadToken; + if (message.validatedTimestamp != null && message.hasOwnProperty("validatedTimestamp")) + object.validatedTimestamp = options.bytes === String ? $util.base64.encode(message.validatedTimestamp, 0, message.validatedTimestamp.length) : options.bytes === Array ? Array.prototype.slice.call(message.validatedTimestamp) : message.validatedTimestamp; + if (message.sidecar != null && message.hasOwnProperty("sidecar")) + object.sidecar = options.bytes === String ? $util.base64.encode(message.sidecar, 0, message.sidecar.length) : options.bytes === Array ? Array.prototype.slice.call(message.sidecar) : message.sidecar; + if (message.objectId != null && message.hasOwnProperty("objectId")) + object.objectId = message.objectId; + if (message.fbid != null && message.hasOwnProperty("fbid")) + object.fbid = message.fbid; + if (message.downloadableThumbnail != null && message.hasOwnProperty("downloadableThumbnail")) + object.downloadableThumbnail = $root.proto.MediaEntry.DownloadableThumbnail.toObject(message.downloadableThumbnail, options); + if (message.handle != null && message.hasOwnProperty("handle")) + object.handle = message.handle; + if (message.filename != null && message.hasOwnProperty("filename")) + object.filename = message.filename; + if (message.progressiveJpegDetails != null && message.hasOwnProperty("progressiveJpegDetails")) + object.progressiveJpegDetails = $root.proto.MediaEntry.ProgressiveJpegDetails.toObject(message.progressiveJpegDetails, options); return object; }; /** - * Converts this IdentityKeyPairStructure to JSON. + * Converts this MediaEntry to JSON. * @function toJSON - * @memberof proto.IdentityKeyPairStructure + * @memberof proto.MediaEntry * @instance * @returns {Object.} JSON object */ - IdentityKeyPairStructure.prototype.toJSON = function toJSON() { + MediaEntry.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return IdentityKeyPairStructure; - })(); + MediaEntry.DownloadableThumbnail = (function() { - proto.InteractiveAnnotation = (function() { + /** + * Properties of a DownloadableThumbnail. + * @memberof proto.MediaEntry + * @interface IDownloadableThumbnail + * @property {Uint8Array|null} [fileSha256] DownloadableThumbnail fileSha256 + * @property {Uint8Array|null} [fileEncSha256] DownloadableThumbnail fileEncSha256 + * @property {string|null} [directPath] DownloadableThumbnail directPath + * @property {Uint8Array|null} [mediaKey] DownloadableThumbnail mediaKey + * @property {number|Long|null} [mediaKeyTimestamp] DownloadableThumbnail mediaKeyTimestamp + * @property {string|null} [objectId] DownloadableThumbnail objectId + */ - /** - * Properties of an InteractiveAnnotation. - * @memberof proto - * @interface IInteractiveAnnotation - * @property {Array.|null} [polygonVertices] InteractiveAnnotation polygonVertices - * @property {proto.ILocation|null} [location] InteractiveAnnotation location - */ + /** + * Constructs a new DownloadableThumbnail. + * @memberof proto.MediaEntry + * @classdesc Represents a DownloadableThumbnail. + * @implements IDownloadableThumbnail + * @constructor + * @param {proto.MediaEntry.IDownloadableThumbnail=} [properties] Properties to set + */ + function DownloadableThumbnail(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Constructs a new InteractiveAnnotation. - * @memberof proto - * @classdesc Represents an InteractiveAnnotation. - * @implements IInteractiveAnnotation - * @constructor - * @param {proto.IInteractiveAnnotation=} [properties] Properties to set - */ - function InteractiveAnnotation(properties) { - this.polygonVertices = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * DownloadableThumbnail fileSha256. + * @member {Uint8Array} fileSha256 + * @memberof proto.MediaEntry.DownloadableThumbnail + * @instance + */ + DownloadableThumbnail.prototype.fileSha256 = $util.newBuffer([]); - /** - * InteractiveAnnotation polygonVertices. - * @member {Array.} polygonVertices - * @memberof proto.InteractiveAnnotation - * @instance - */ - InteractiveAnnotation.prototype.polygonVertices = $util.emptyArray; + /** + * DownloadableThumbnail fileEncSha256. + * @member {Uint8Array} fileEncSha256 + * @memberof proto.MediaEntry.DownloadableThumbnail + * @instance + */ + DownloadableThumbnail.prototype.fileEncSha256 = $util.newBuffer([]); - /** - * InteractiveAnnotation location. - * @member {proto.ILocation|null|undefined} location - * @memberof proto.InteractiveAnnotation - * @instance - */ - InteractiveAnnotation.prototype.location = null; + /** + * DownloadableThumbnail directPath. + * @member {string} directPath + * @memberof proto.MediaEntry.DownloadableThumbnail + * @instance + */ + DownloadableThumbnail.prototype.directPath = ""; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * DownloadableThumbnail mediaKey. + * @member {Uint8Array} mediaKey + * @memberof proto.MediaEntry.DownloadableThumbnail + * @instance + */ + DownloadableThumbnail.prototype.mediaKey = $util.newBuffer([]); - /** - * InteractiveAnnotation action. - * @member {"location"|undefined} action - * @memberof proto.InteractiveAnnotation - * @instance - */ - Object.defineProperty(InteractiveAnnotation.prototype, "action", { - get: $util.oneOfGetter($oneOfFields = ["location"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * DownloadableThumbnail mediaKeyTimestamp. + * @member {number|Long} mediaKeyTimestamp + * @memberof proto.MediaEntry.DownloadableThumbnail + * @instance + */ + DownloadableThumbnail.prototype.mediaKeyTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * Creates a new InteractiveAnnotation instance using the specified properties. - * @function create - * @memberof proto.InteractiveAnnotation - * @static - * @param {proto.IInteractiveAnnotation=} [properties] Properties to set - * @returns {proto.InteractiveAnnotation} InteractiveAnnotation instance - */ - InteractiveAnnotation.create = function create(properties) { - return new InteractiveAnnotation(properties); - }; + /** + * DownloadableThumbnail objectId. + * @member {string} objectId + * @memberof proto.MediaEntry.DownloadableThumbnail + * @instance + */ + DownloadableThumbnail.prototype.objectId = ""; - /** - * Encodes the specified InteractiveAnnotation message. Does not implicitly {@link proto.InteractiveAnnotation.verify|verify} messages. - * @function encode - * @memberof proto.InteractiveAnnotation - * @static - * @param {proto.IInteractiveAnnotation} message InteractiveAnnotation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InteractiveAnnotation.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.polygonVertices != null && message.polygonVertices.length) - for (var i = 0; i < message.polygonVertices.length; ++i) - $root.proto.Point.encode(message.polygonVertices[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.location != null && Object.hasOwnProperty.call(message, "location")) - $root.proto.Location.encode(message.location, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + /** + * Creates a new DownloadableThumbnail instance using the specified properties. + * @function create + * @memberof proto.MediaEntry.DownloadableThumbnail + * @static + * @param {proto.MediaEntry.IDownloadableThumbnail=} [properties] Properties to set + * @returns {proto.MediaEntry.DownloadableThumbnail} DownloadableThumbnail instance + */ + DownloadableThumbnail.create = function create(properties) { + return new DownloadableThumbnail(properties); + }; - /** - * Encodes the specified InteractiveAnnotation message, length delimited. Does not implicitly {@link proto.InteractiveAnnotation.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.InteractiveAnnotation - * @static - * @param {proto.IInteractiveAnnotation} message InteractiveAnnotation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InteractiveAnnotation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified DownloadableThumbnail message. Does not implicitly {@link proto.MediaEntry.DownloadableThumbnail.verify|verify} messages. + * @function encode + * @memberof proto.MediaEntry.DownloadableThumbnail + * @static + * @param {proto.MediaEntry.IDownloadableThumbnail} message DownloadableThumbnail message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DownloadableThumbnail.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fileSha256 != null && Object.hasOwnProperty.call(message, "fileSha256")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.fileSha256); + if (message.fileEncSha256 != null && Object.hasOwnProperty.call(message, "fileEncSha256")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.fileEncSha256); + if (message.directPath != null && Object.hasOwnProperty.call(message, "directPath")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.directPath); + if (message.mediaKey != null && Object.hasOwnProperty.call(message, "mediaKey")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.mediaKey); + if (message.mediaKeyTimestamp != null && Object.hasOwnProperty.call(message, "mediaKeyTimestamp")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.mediaKeyTimestamp); + if (message.objectId != null && Object.hasOwnProperty.call(message, "objectId")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.objectId); + return writer; + }; - /** - * Decodes an InteractiveAnnotation message from the specified reader or buffer. - * @function decode - * @memberof proto.InteractiveAnnotation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.InteractiveAnnotation} InteractiveAnnotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InteractiveAnnotation.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.InteractiveAnnotation(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.polygonVertices && message.polygonVertices.length)) - message.polygonVertices = []; - message.polygonVertices.push($root.proto.Point.decode(reader, reader.uint32())); - break; - case 2: - message.location = $root.proto.Location.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Encodes the specified DownloadableThumbnail message, length delimited. Does not implicitly {@link proto.MediaEntry.DownloadableThumbnail.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.MediaEntry.DownloadableThumbnail + * @static + * @param {proto.MediaEntry.IDownloadableThumbnail} message DownloadableThumbnail message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DownloadableThumbnail.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DownloadableThumbnail message from the specified reader or buffer. + * @function decode + * @memberof proto.MediaEntry.DownloadableThumbnail + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.MediaEntry.DownloadableThumbnail} DownloadableThumbnail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DownloadableThumbnail.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.MediaEntry.DownloadableThumbnail(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.fileSha256 = reader.bytes(); + break; + case 2: + message.fileEncSha256 = reader.bytes(); + break; + case 3: + message.directPath = reader.string(); + break; + case 4: + message.mediaKey = reader.bytes(); + break; + case 5: + message.mediaKeyTimestamp = reader.int64(); + break; + case 6: + message.objectId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } } - } - return message; - }; + return message; + }; - /** - * Decodes an InteractiveAnnotation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.InteractiveAnnotation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.InteractiveAnnotation} InteractiveAnnotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InteractiveAnnotation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a DownloadableThumbnail message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.MediaEntry.DownloadableThumbnail + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.MediaEntry.DownloadableThumbnail} DownloadableThumbnail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DownloadableThumbnail.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies an InteractiveAnnotation message. - * @function verify - * @memberof proto.InteractiveAnnotation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InteractiveAnnotation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.polygonVertices != null && message.hasOwnProperty("polygonVertices")) { - if (!Array.isArray(message.polygonVertices)) - return "polygonVertices: array expected"; - for (var i = 0; i < message.polygonVertices.length; ++i) { - var error = $root.proto.Point.verify(message.polygonVertices[i]); - if (error) - return "polygonVertices." + error; + /** + * Verifies a DownloadableThumbnail message. + * @function verify + * @memberof proto.MediaEntry.DownloadableThumbnail + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DownloadableThumbnail.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) + if (!(message.fileSha256 && typeof message.fileSha256.length === "number" || $util.isString(message.fileSha256))) + return "fileSha256: buffer expected"; + if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) + if (!(message.fileEncSha256 && typeof message.fileEncSha256.length === "number" || $util.isString(message.fileEncSha256))) + return "fileEncSha256: buffer expected"; + if (message.directPath != null && message.hasOwnProperty("directPath")) + if (!$util.isString(message.directPath)) + return "directPath: string expected"; + if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) + if (!(message.mediaKey && typeof message.mediaKey.length === "number" || $util.isString(message.mediaKey))) + return "mediaKey: buffer expected"; + if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp")) + if (!$util.isInteger(message.mediaKeyTimestamp) && !(message.mediaKeyTimestamp && $util.isInteger(message.mediaKeyTimestamp.low) && $util.isInteger(message.mediaKeyTimestamp.high))) + return "mediaKeyTimestamp: integer|Long expected"; + if (message.objectId != null && message.hasOwnProperty("objectId")) + if (!$util.isString(message.objectId)) + return "objectId: string expected"; + return null; + }; + + /** + * Creates a DownloadableThumbnail message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.MediaEntry.DownloadableThumbnail + * @static + * @param {Object.} object Plain object + * @returns {proto.MediaEntry.DownloadableThumbnail} DownloadableThumbnail + */ + DownloadableThumbnail.fromObject = function fromObject(object) { + if (object instanceof $root.proto.MediaEntry.DownloadableThumbnail) + return object; + var message = new $root.proto.MediaEntry.DownloadableThumbnail(); + if (object.fileSha256 != null) + if (typeof object.fileSha256 === "string") + $util.base64.decode(object.fileSha256, message.fileSha256 = $util.newBuffer($util.base64.length(object.fileSha256)), 0); + else if (object.fileSha256.length) + message.fileSha256 = object.fileSha256; + if (object.fileEncSha256 != null) + if (typeof object.fileEncSha256 === "string") + $util.base64.decode(object.fileEncSha256, message.fileEncSha256 = $util.newBuffer($util.base64.length(object.fileEncSha256)), 0); + else if (object.fileEncSha256.length) + message.fileEncSha256 = object.fileEncSha256; + if (object.directPath != null) + message.directPath = String(object.directPath); + if (object.mediaKey != null) + if (typeof object.mediaKey === "string") + $util.base64.decode(object.mediaKey, message.mediaKey = $util.newBuffer($util.base64.length(object.mediaKey)), 0); + else if (object.mediaKey.length) + message.mediaKey = object.mediaKey; + if (object.mediaKeyTimestamp != null) + if ($util.Long) + (message.mediaKeyTimestamp = $util.Long.fromValue(object.mediaKeyTimestamp)).unsigned = false; + else if (typeof object.mediaKeyTimestamp === "string") + message.mediaKeyTimestamp = parseInt(object.mediaKeyTimestamp, 10); + else if (typeof object.mediaKeyTimestamp === "number") + message.mediaKeyTimestamp = object.mediaKeyTimestamp; + else if (typeof object.mediaKeyTimestamp === "object") + message.mediaKeyTimestamp = new $util.LongBits(object.mediaKeyTimestamp.low >>> 0, object.mediaKeyTimestamp.high >>> 0).toNumber(); + if (object.objectId != null) + message.objectId = String(object.objectId); + return message; + }; + + /** + * Creates a plain object from a DownloadableThumbnail message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.MediaEntry.DownloadableThumbnail + * @static + * @param {proto.MediaEntry.DownloadableThumbnail} message DownloadableThumbnail + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DownloadableThumbnail.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.fileSha256 = ""; + else { + object.fileSha256 = []; + if (options.bytes !== Array) + object.fileSha256 = $util.newBuffer(object.fileSha256); + } + if (options.bytes === String) + object.fileEncSha256 = ""; + else { + object.fileEncSha256 = []; + if (options.bytes !== Array) + object.fileEncSha256 = $util.newBuffer(object.fileEncSha256); + } + object.directPath = ""; + if (options.bytes === String) + object.mediaKey = ""; + else { + object.mediaKey = []; + if (options.bytes !== Array) + object.mediaKey = $util.newBuffer(object.mediaKey); + } + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.mediaKeyTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.mediaKeyTimestamp = options.longs === String ? "0" : 0; + object.objectId = ""; } + if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) + object.fileSha256 = options.bytes === String ? $util.base64.encode(message.fileSha256, 0, message.fileSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.fileSha256) : message.fileSha256; + if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) + object.fileEncSha256 = options.bytes === String ? $util.base64.encode(message.fileEncSha256, 0, message.fileEncSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.fileEncSha256) : message.fileEncSha256; + if (message.directPath != null && message.hasOwnProperty("directPath")) + object.directPath = message.directPath; + if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) + object.mediaKey = options.bytes === String ? $util.base64.encode(message.mediaKey, 0, message.mediaKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.mediaKey) : message.mediaKey; + if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp")) + if (typeof message.mediaKeyTimestamp === "number") + object.mediaKeyTimestamp = options.longs === String ? String(message.mediaKeyTimestamp) : message.mediaKeyTimestamp; + else + object.mediaKeyTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.mediaKeyTimestamp) : options.longs === Number ? new $util.LongBits(message.mediaKeyTimestamp.low >>> 0, message.mediaKeyTimestamp.high >>> 0).toNumber() : message.mediaKeyTimestamp; + if (message.objectId != null && message.hasOwnProperty("objectId")) + object.objectId = message.objectId; + return object; + }; + + /** + * Converts this DownloadableThumbnail to JSON. + * @function toJSON + * @memberof proto.MediaEntry.DownloadableThumbnail + * @instance + * @returns {Object.} JSON object + */ + DownloadableThumbnail.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DownloadableThumbnail; + })(); + + MediaEntry.ProgressiveJpegDetails = (function() { + + /** + * Properties of a ProgressiveJpegDetails. + * @memberof proto.MediaEntry + * @interface IProgressiveJpegDetails + * @property {Array.|null} [scanLengths] ProgressiveJpegDetails scanLengths + * @property {Uint8Array|null} [sidecar] ProgressiveJpegDetails sidecar + */ + + /** + * Constructs a new ProgressiveJpegDetails. + * @memberof proto.MediaEntry + * @classdesc Represents a ProgressiveJpegDetails. + * @implements IProgressiveJpegDetails + * @constructor + * @param {proto.MediaEntry.IProgressiveJpegDetails=} [properties] Properties to set + */ + function ProgressiveJpegDetails(properties) { + this.scanLengths = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - if (message.location != null && message.hasOwnProperty("location")) { - properties.action = 1; - { - var error = $root.proto.Location.verify(message.location); - if (error) - return "location." + error; + + /** + * ProgressiveJpegDetails scanLengths. + * @member {Array.} scanLengths + * @memberof proto.MediaEntry.ProgressiveJpegDetails + * @instance + */ + ProgressiveJpegDetails.prototype.scanLengths = $util.emptyArray; + + /** + * ProgressiveJpegDetails sidecar. + * @member {Uint8Array} sidecar + * @memberof proto.MediaEntry.ProgressiveJpegDetails + * @instance + */ + ProgressiveJpegDetails.prototype.sidecar = $util.newBuffer([]); + + /** + * Creates a new ProgressiveJpegDetails instance using the specified properties. + * @function create + * @memberof proto.MediaEntry.ProgressiveJpegDetails + * @static + * @param {proto.MediaEntry.IProgressiveJpegDetails=} [properties] Properties to set + * @returns {proto.MediaEntry.ProgressiveJpegDetails} ProgressiveJpegDetails instance + */ + ProgressiveJpegDetails.create = function create(properties) { + return new ProgressiveJpegDetails(properties); + }; + + /** + * Encodes the specified ProgressiveJpegDetails message. Does not implicitly {@link proto.MediaEntry.ProgressiveJpegDetails.verify|verify} messages. + * @function encode + * @memberof proto.MediaEntry.ProgressiveJpegDetails + * @static + * @param {proto.MediaEntry.IProgressiveJpegDetails} message ProgressiveJpegDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProgressiveJpegDetails.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.scanLengths != null && message.scanLengths.length) + for (var i = 0; i < message.scanLengths.length; ++i) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.scanLengths[i]); + if (message.sidecar != null && Object.hasOwnProperty.call(message, "sidecar")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.sidecar); + return writer; + }; + + /** + * Encodes the specified ProgressiveJpegDetails message, length delimited. Does not implicitly {@link proto.MediaEntry.ProgressiveJpegDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.MediaEntry.ProgressiveJpegDetails + * @static + * @param {proto.MediaEntry.IProgressiveJpegDetails} message ProgressiveJpegDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProgressiveJpegDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ProgressiveJpegDetails message from the specified reader or buffer. + * @function decode + * @memberof proto.MediaEntry.ProgressiveJpegDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.MediaEntry.ProgressiveJpegDetails} ProgressiveJpegDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProgressiveJpegDetails.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.MediaEntry.ProgressiveJpegDetails(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.scanLengths && message.scanLengths.length)) + message.scanLengths = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.scanLengths.push(reader.int64()); + } else + message.scanLengths.push(reader.int64()); + break; + case 2: + message.sidecar = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ProgressiveJpegDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.MediaEntry.ProgressiveJpegDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.MediaEntry.ProgressiveJpegDetails} ProgressiveJpegDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProgressiveJpegDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ProgressiveJpegDetails message. + * @function verify + * @memberof proto.MediaEntry.ProgressiveJpegDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ProgressiveJpegDetails.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.scanLengths != null && message.hasOwnProperty("scanLengths")) { + if (!Array.isArray(message.scanLengths)) + return "scanLengths: array expected"; + for (var i = 0; i < message.scanLengths.length; ++i) + if (!$util.isInteger(message.scanLengths[i]) && !(message.scanLengths[i] && $util.isInteger(message.scanLengths[i].low) && $util.isInteger(message.scanLengths[i].high))) + return "scanLengths: integer|Long[] expected"; } - } - return null; - }; + if (message.sidecar != null && message.hasOwnProperty("sidecar")) + if (!(message.sidecar && typeof message.sidecar.length === "number" || $util.isString(message.sidecar))) + return "sidecar: buffer expected"; + return null; + }; - /** - * Creates an InteractiveAnnotation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.InteractiveAnnotation - * @static - * @param {Object.} object Plain object - * @returns {proto.InteractiveAnnotation} InteractiveAnnotation - */ - InteractiveAnnotation.fromObject = function fromObject(object) { - if (object instanceof $root.proto.InteractiveAnnotation) - return object; - var message = new $root.proto.InteractiveAnnotation(); - if (object.polygonVertices) { - if (!Array.isArray(object.polygonVertices)) - throw TypeError(".proto.InteractiveAnnotation.polygonVertices: array expected"); - message.polygonVertices = []; - for (var i = 0; i < object.polygonVertices.length; ++i) { - if (typeof object.polygonVertices[i] !== "object") - throw TypeError(".proto.InteractiveAnnotation.polygonVertices: object expected"); - message.polygonVertices[i] = $root.proto.Point.fromObject(object.polygonVertices[i]); + /** + * Creates a ProgressiveJpegDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.MediaEntry.ProgressiveJpegDetails + * @static + * @param {Object.} object Plain object + * @returns {proto.MediaEntry.ProgressiveJpegDetails} ProgressiveJpegDetails + */ + ProgressiveJpegDetails.fromObject = function fromObject(object) { + if (object instanceof $root.proto.MediaEntry.ProgressiveJpegDetails) + return object; + var message = new $root.proto.MediaEntry.ProgressiveJpegDetails(); + if (object.scanLengths) { + if (!Array.isArray(object.scanLengths)) + throw TypeError(".proto.MediaEntry.ProgressiveJpegDetails.scanLengths: array expected"); + message.scanLengths = []; + for (var i = 0; i < object.scanLengths.length; ++i) + if ($util.Long) + (message.scanLengths[i] = $util.Long.fromValue(object.scanLengths[i])).unsigned = false; + else if (typeof object.scanLengths[i] === "string") + message.scanLengths[i] = parseInt(object.scanLengths[i], 10); + else if (typeof object.scanLengths[i] === "number") + message.scanLengths[i] = object.scanLengths[i]; + else if (typeof object.scanLengths[i] === "object") + message.scanLengths[i] = new $util.LongBits(object.scanLengths[i].low >>> 0, object.scanLengths[i].high >>> 0).toNumber(); + } + if (object.sidecar != null) + if (typeof object.sidecar === "string") + $util.base64.decode(object.sidecar, message.sidecar = $util.newBuffer($util.base64.length(object.sidecar)), 0); + else if (object.sidecar.length) + message.sidecar = object.sidecar; + return message; + }; + + /** + * Creates a plain object from a ProgressiveJpegDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.MediaEntry.ProgressiveJpegDetails + * @static + * @param {proto.MediaEntry.ProgressiveJpegDetails} message ProgressiveJpegDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ProgressiveJpegDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.scanLengths = []; + if (options.defaults) + if (options.bytes === String) + object.sidecar = ""; + else { + object.sidecar = []; + if (options.bytes !== Array) + object.sidecar = $util.newBuffer(object.sidecar); + } + if (message.scanLengths && message.scanLengths.length) { + object.scanLengths = []; + for (var j = 0; j < message.scanLengths.length; ++j) + if (typeof message.scanLengths[j] === "number") + object.scanLengths[j] = options.longs === String ? String(message.scanLengths[j]) : message.scanLengths[j]; + else + object.scanLengths[j] = options.longs === String ? $util.Long.prototype.toString.call(message.scanLengths[j]) : options.longs === Number ? new $util.LongBits(message.scanLengths[j].low >>> 0, message.scanLengths[j].high >>> 0).toNumber() : message.scanLengths[j]; } - } - if (object.location != null) { - if (typeof object.location !== "object") - throw TypeError(".proto.InteractiveAnnotation.location: object expected"); - message.location = $root.proto.Location.fromObject(object.location); - } - return message; - }; + if (message.sidecar != null && message.hasOwnProperty("sidecar")) + object.sidecar = options.bytes === String ? $util.base64.encode(message.sidecar, 0, message.sidecar.length) : options.bytes === Array ? Array.prototype.slice.call(message.sidecar) : message.sidecar; + return object; + }; - /** - * Creates a plain object from an InteractiveAnnotation message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.InteractiveAnnotation - * @static - * @param {proto.InteractiveAnnotation} message InteractiveAnnotation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InteractiveAnnotation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.polygonVertices = []; - if (message.polygonVertices && message.polygonVertices.length) { - object.polygonVertices = []; - for (var j = 0; j < message.polygonVertices.length; ++j) - object.polygonVertices[j] = $root.proto.Point.toObject(message.polygonVertices[j], options); - } - if (message.location != null && message.hasOwnProperty("location")) { - object.location = $root.proto.Location.toObject(message.location, options); - if (options.oneofs) - object.action = "location"; - } - return object; - }; + /** + * Converts this ProgressiveJpegDetails to JSON. + * @function toJSON + * @memberof proto.MediaEntry.ProgressiveJpegDetails + * @instance + * @returns {Object.} JSON object + */ + ProgressiveJpegDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this InteractiveAnnotation to JSON. - * @function toJSON - * @memberof proto.InteractiveAnnotation - * @instance - * @returns {Object.} JSON object - */ - InteractiveAnnotation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return ProgressiveJpegDetails; + })(); - return InteractiveAnnotation; + return MediaEntry; })(); - proto.KeepInChat = (function() { + proto.MediaNotifyMessage = (function() { /** - * Properties of a KeepInChat. + * Properties of a MediaNotifyMessage. * @memberof proto - * @interface IKeepInChat - * @property {proto.KeepType|null} [keepType] KeepInChat keepType - * @property {number|Long|null} [serverTimestamp] KeepInChat serverTimestamp - * @property {proto.IMessageKey|null} [key] KeepInChat key - * @property {string|null} [deviceJid] KeepInChat deviceJid - * @property {number|Long|null} [clientTimestampMs] KeepInChat clientTimestampMs - * @property {number|Long|null} [serverTimestampMs] KeepInChat serverTimestampMs + * @interface IMediaNotifyMessage + * @property {string|null} [expressPathUrl] MediaNotifyMessage expressPathUrl + * @property {Uint8Array|null} [fileEncSha256] MediaNotifyMessage fileEncSha256 + * @property {number|Long|null} [fileLength] MediaNotifyMessage fileLength */ /** - * Constructs a new KeepInChat. + * Constructs a new MediaNotifyMessage. * @memberof proto - * @classdesc Represents a KeepInChat. - * @implements IKeepInChat + * @classdesc Represents a MediaNotifyMessage. + * @implements IMediaNotifyMessage * @constructor - * @param {proto.IKeepInChat=} [properties] Properties to set + * @param {proto.IMediaNotifyMessage=} [properties] Properties to set */ - function KeepInChat(properties) { + function MediaNotifyMessage(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20143,140 +26031,101 @@ $root.proto = (function() { } /** - * KeepInChat keepType. - * @member {proto.KeepType} keepType - * @memberof proto.KeepInChat - * @instance - */ - KeepInChat.prototype.keepType = 0; - - /** - * KeepInChat serverTimestamp. - * @member {number|Long} serverTimestamp - * @memberof proto.KeepInChat - * @instance - */ - KeepInChat.prototype.serverTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * KeepInChat key. - * @member {proto.IMessageKey|null|undefined} key - * @memberof proto.KeepInChat - * @instance - */ - KeepInChat.prototype.key = null; - - /** - * KeepInChat deviceJid. - * @member {string} deviceJid - * @memberof proto.KeepInChat + * MediaNotifyMessage expressPathUrl. + * @member {string} expressPathUrl + * @memberof proto.MediaNotifyMessage * @instance */ - KeepInChat.prototype.deviceJid = ""; + MediaNotifyMessage.prototype.expressPathUrl = ""; /** - * KeepInChat clientTimestampMs. - * @member {number|Long} clientTimestampMs - * @memberof proto.KeepInChat + * MediaNotifyMessage fileEncSha256. + * @member {Uint8Array} fileEncSha256 + * @memberof proto.MediaNotifyMessage * @instance */ - KeepInChat.prototype.clientTimestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + MediaNotifyMessage.prototype.fileEncSha256 = $util.newBuffer([]); /** - * KeepInChat serverTimestampMs. - * @member {number|Long} serverTimestampMs - * @memberof proto.KeepInChat + * MediaNotifyMessage fileLength. + * @member {number|Long} fileLength + * @memberof proto.MediaNotifyMessage * @instance */ - KeepInChat.prototype.serverTimestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + MediaNotifyMessage.prototype.fileLength = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** - * Creates a new KeepInChat instance using the specified properties. + * Creates a new MediaNotifyMessage instance using the specified properties. * @function create - * @memberof proto.KeepInChat + * @memberof proto.MediaNotifyMessage * @static - * @param {proto.IKeepInChat=} [properties] Properties to set - * @returns {proto.KeepInChat} KeepInChat instance + * @param {proto.IMediaNotifyMessage=} [properties] Properties to set + * @returns {proto.MediaNotifyMessage} MediaNotifyMessage instance */ - KeepInChat.create = function create(properties) { - return new KeepInChat(properties); + MediaNotifyMessage.create = function create(properties) { + return new MediaNotifyMessage(properties); }; /** - * Encodes the specified KeepInChat message. Does not implicitly {@link proto.KeepInChat.verify|verify} messages. + * Encodes the specified MediaNotifyMessage message. Does not implicitly {@link proto.MediaNotifyMessage.verify|verify} messages. * @function encode - * @memberof proto.KeepInChat + * @memberof proto.MediaNotifyMessage * @static - * @param {proto.IKeepInChat} message KeepInChat message or plain object to encode + * @param {proto.IMediaNotifyMessage} message MediaNotifyMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - KeepInChat.encode = function encode(message, writer) { + MediaNotifyMessage.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.keepType != null && Object.hasOwnProperty.call(message, "keepType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.keepType); - if (message.serverTimestamp != null && Object.hasOwnProperty.call(message, "serverTimestamp")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.serverTimestamp); - if (message.key != null && Object.hasOwnProperty.call(message, "key")) - $root.proto.MessageKey.encode(message.key, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.deviceJid != null && Object.hasOwnProperty.call(message, "deviceJid")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.deviceJid); - if (message.clientTimestampMs != null && Object.hasOwnProperty.call(message, "clientTimestampMs")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.clientTimestampMs); - if (message.serverTimestampMs != null && Object.hasOwnProperty.call(message, "serverTimestampMs")) - writer.uint32(/* id 6, wireType 0 =*/48).int64(message.serverTimestampMs); + if (message.expressPathUrl != null && Object.hasOwnProperty.call(message, "expressPathUrl")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.expressPathUrl); + if (message.fileEncSha256 != null && Object.hasOwnProperty.call(message, "fileEncSha256")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.fileEncSha256); + if (message.fileLength != null && Object.hasOwnProperty.call(message, "fileLength")) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.fileLength); return writer; }; /** - * Encodes the specified KeepInChat message, length delimited. Does not implicitly {@link proto.KeepInChat.verify|verify} messages. + * Encodes the specified MediaNotifyMessage message, length delimited. Does not implicitly {@link proto.MediaNotifyMessage.verify|verify} messages. * @function encodeDelimited - * @memberof proto.KeepInChat + * @memberof proto.MediaNotifyMessage * @static - * @param {proto.IKeepInChat} message KeepInChat message or plain object to encode + * @param {proto.IMediaNotifyMessage} message MediaNotifyMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - KeepInChat.encodeDelimited = function encodeDelimited(message, writer) { + MediaNotifyMessage.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a KeepInChat message from the specified reader or buffer. + * Decodes a MediaNotifyMessage message from the specified reader or buffer. * @function decode - * @memberof proto.KeepInChat + * @memberof proto.MediaNotifyMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {proto.KeepInChat} KeepInChat + * @returns {proto.MediaNotifyMessage} MediaNotifyMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - KeepInChat.decode = function decode(reader, length) { + MediaNotifyMessage.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.KeepInChat(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.MediaNotifyMessage(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.keepType = reader.int32(); + message.expressPathUrl = reader.string(); break; case 2: - message.serverTimestamp = reader.int64(); + message.fileEncSha256 = reader.bytes(); break; case 3: - message.key = $root.proto.MessageKey.decode(reader, reader.uint32()); - break; - case 4: - message.deviceJid = reader.string(); - break; - case 5: - message.clientTimestampMs = reader.int64(); - break; - case 6: - message.serverTimestampMs = reader.int64(); + message.fileLength = reader.uint64(); break; default: reader.skipType(tag & 7); @@ -20287,233 +26136,149 @@ $root.proto = (function() { }; /** - * Decodes a KeepInChat message from the specified reader or buffer, length delimited. + * Decodes a MediaNotifyMessage message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof proto.KeepInChat + * @memberof proto.MediaNotifyMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.KeepInChat} KeepInChat + * @returns {proto.MediaNotifyMessage} MediaNotifyMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - KeepInChat.decodeDelimited = function decodeDelimited(reader) { + MediaNotifyMessage.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a KeepInChat message. + * Verifies a MediaNotifyMessage message. * @function verify - * @memberof proto.KeepInChat + * @memberof proto.MediaNotifyMessage * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - KeepInChat.verify = function verify(message) { + MediaNotifyMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keepType != null && message.hasOwnProperty("keepType")) - switch (message.keepType) { - default: - return "keepType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.serverTimestamp != null && message.hasOwnProperty("serverTimestamp")) - if (!$util.isInteger(message.serverTimestamp) && !(message.serverTimestamp && $util.isInteger(message.serverTimestamp.low) && $util.isInteger(message.serverTimestamp.high))) - return "serverTimestamp: integer|Long expected"; - if (message.key != null && message.hasOwnProperty("key")) { - var error = $root.proto.MessageKey.verify(message.key); - if (error) - return "key." + error; - } - if (message.deviceJid != null && message.hasOwnProperty("deviceJid")) - if (!$util.isString(message.deviceJid)) - return "deviceJid: string expected"; - if (message.clientTimestampMs != null && message.hasOwnProperty("clientTimestampMs")) - if (!$util.isInteger(message.clientTimestampMs) && !(message.clientTimestampMs && $util.isInteger(message.clientTimestampMs.low) && $util.isInteger(message.clientTimestampMs.high))) - return "clientTimestampMs: integer|Long expected"; - if (message.serverTimestampMs != null && message.hasOwnProperty("serverTimestampMs")) - if (!$util.isInteger(message.serverTimestampMs) && !(message.serverTimestampMs && $util.isInteger(message.serverTimestampMs.low) && $util.isInteger(message.serverTimestampMs.high))) - return "serverTimestampMs: integer|Long expected"; + if (message.expressPathUrl != null && message.hasOwnProperty("expressPathUrl")) + if (!$util.isString(message.expressPathUrl)) + return "expressPathUrl: string expected"; + if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) + if (!(message.fileEncSha256 && typeof message.fileEncSha256.length === "number" || $util.isString(message.fileEncSha256))) + return "fileEncSha256: buffer expected"; + if (message.fileLength != null && message.hasOwnProperty("fileLength")) + if (!$util.isInteger(message.fileLength) && !(message.fileLength && $util.isInteger(message.fileLength.low) && $util.isInteger(message.fileLength.high))) + return "fileLength: integer|Long expected"; return null; }; /** - * Creates a KeepInChat message from a plain object. Also converts values to their respective internal types. + * Creates a MediaNotifyMessage message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof proto.KeepInChat + * @memberof proto.MediaNotifyMessage * @static * @param {Object.} object Plain object - * @returns {proto.KeepInChat} KeepInChat + * @returns {proto.MediaNotifyMessage} MediaNotifyMessage */ - KeepInChat.fromObject = function fromObject(object) { - if (object instanceof $root.proto.KeepInChat) + MediaNotifyMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.MediaNotifyMessage) return object; - var message = new $root.proto.KeepInChat(); - switch (object.keepType) { - case "UNKNOWN": - case 0: - message.keepType = 0; - break; - case "KEEP_FOR_ALL": - case 1: - message.keepType = 1; - break; - case "UNDO_KEEP_FOR_ALL": - case 2: - message.keepType = 2; - break; - } - if (object.serverTimestamp != null) - if ($util.Long) - (message.serverTimestamp = $util.Long.fromValue(object.serverTimestamp)).unsigned = false; - else if (typeof object.serverTimestamp === "string") - message.serverTimestamp = parseInt(object.serverTimestamp, 10); - else if (typeof object.serverTimestamp === "number") - message.serverTimestamp = object.serverTimestamp; - else if (typeof object.serverTimestamp === "object") - message.serverTimestamp = new $util.LongBits(object.serverTimestamp.low >>> 0, object.serverTimestamp.high >>> 0).toNumber(); - if (object.key != null) { - if (typeof object.key !== "object") - throw TypeError(".proto.KeepInChat.key: object expected"); - message.key = $root.proto.MessageKey.fromObject(object.key); - } - if (object.deviceJid != null) - message.deviceJid = String(object.deviceJid); - if (object.clientTimestampMs != null) - if ($util.Long) - (message.clientTimestampMs = $util.Long.fromValue(object.clientTimestampMs)).unsigned = false; - else if (typeof object.clientTimestampMs === "string") - message.clientTimestampMs = parseInt(object.clientTimestampMs, 10); - else if (typeof object.clientTimestampMs === "number") - message.clientTimestampMs = object.clientTimestampMs; - else if (typeof object.clientTimestampMs === "object") - message.clientTimestampMs = new $util.LongBits(object.clientTimestampMs.low >>> 0, object.clientTimestampMs.high >>> 0).toNumber(); - if (object.serverTimestampMs != null) + var message = new $root.proto.MediaNotifyMessage(); + if (object.expressPathUrl != null) + message.expressPathUrl = String(object.expressPathUrl); + if (object.fileEncSha256 != null) + if (typeof object.fileEncSha256 === "string") + $util.base64.decode(object.fileEncSha256, message.fileEncSha256 = $util.newBuffer($util.base64.length(object.fileEncSha256)), 0); + else if (object.fileEncSha256.length) + message.fileEncSha256 = object.fileEncSha256; + if (object.fileLength != null) if ($util.Long) - (message.serverTimestampMs = $util.Long.fromValue(object.serverTimestampMs)).unsigned = false; - else if (typeof object.serverTimestampMs === "string") - message.serverTimestampMs = parseInt(object.serverTimestampMs, 10); - else if (typeof object.serverTimestampMs === "number") - message.serverTimestampMs = object.serverTimestampMs; - else if (typeof object.serverTimestampMs === "object") - message.serverTimestampMs = new $util.LongBits(object.serverTimestampMs.low >>> 0, object.serverTimestampMs.high >>> 0).toNumber(); + (message.fileLength = $util.Long.fromValue(object.fileLength)).unsigned = true; + else if (typeof object.fileLength === "string") + message.fileLength = parseInt(object.fileLength, 10); + else if (typeof object.fileLength === "number") + message.fileLength = object.fileLength; + else if (typeof object.fileLength === "object") + message.fileLength = new $util.LongBits(object.fileLength.low >>> 0, object.fileLength.high >>> 0).toNumber(true); return message; }; /** - * Creates a plain object from a KeepInChat message. Also converts values to other types if specified. + * Creates a plain object from a MediaNotifyMessage message. Also converts values to other types if specified. * @function toObject - * @memberof proto.KeepInChat + * @memberof proto.MediaNotifyMessage * @static - * @param {proto.KeepInChat} message KeepInChat + * @param {proto.MediaNotifyMessage} message MediaNotifyMessage * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - KeepInChat.toObject = function toObject(message, options) { + MediaNotifyMessage.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.keepType = options.enums === String ? "UNKNOWN" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.serverTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.serverTimestamp = options.longs === String ? "0" : 0; - object.key = null; - object.deviceJid = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.clientTimestampMs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.clientTimestampMs = options.longs === String ? "0" : 0; + object.expressPathUrl = ""; + if (options.bytes === String) + object.fileEncSha256 = ""; + else { + object.fileEncSha256 = []; + if (options.bytes !== Array) + object.fileEncSha256 = $util.newBuffer(object.fileEncSha256); + } if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.serverTimestampMs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.fileLength = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else - object.serverTimestampMs = options.longs === String ? "0" : 0; + object.fileLength = options.longs === String ? "0" : 0; } - if (message.keepType != null && message.hasOwnProperty("keepType")) - object.keepType = options.enums === String ? $root.proto.KeepType[message.keepType] : message.keepType; - if (message.serverTimestamp != null && message.hasOwnProperty("serverTimestamp")) - if (typeof message.serverTimestamp === "number") - object.serverTimestamp = options.longs === String ? String(message.serverTimestamp) : message.serverTimestamp; - else - object.serverTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.serverTimestamp) : options.longs === Number ? new $util.LongBits(message.serverTimestamp.low >>> 0, message.serverTimestamp.high >>> 0).toNumber() : message.serverTimestamp; - if (message.key != null && message.hasOwnProperty("key")) - object.key = $root.proto.MessageKey.toObject(message.key, options); - if (message.deviceJid != null && message.hasOwnProperty("deviceJid")) - object.deviceJid = message.deviceJid; - if (message.clientTimestampMs != null && message.hasOwnProperty("clientTimestampMs")) - if (typeof message.clientTimestampMs === "number") - object.clientTimestampMs = options.longs === String ? String(message.clientTimestampMs) : message.clientTimestampMs; - else - object.clientTimestampMs = options.longs === String ? $util.Long.prototype.toString.call(message.clientTimestampMs) : options.longs === Number ? new $util.LongBits(message.clientTimestampMs.low >>> 0, message.clientTimestampMs.high >>> 0).toNumber() : message.clientTimestampMs; - if (message.serverTimestampMs != null && message.hasOwnProperty("serverTimestampMs")) - if (typeof message.serverTimestampMs === "number") - object.serverTimestampMs = options.longs === String ? String(message.serverTimestampMs) : message.serverTimestampMs; + if (message.expressPathUrl != null && message.hasOwnProperty("expressPathUrl")) + object.expressPathUrl = message.expressPathUrl; + if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) + object.fileEncSha256 = options.bytes === String ? $util.base64.encode(message.fileEncSha256, 0, message.fileEncSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.fileEncSha256) : message.fileEncSha256; + if (message.fileLength != null && message.hasOwnProperty("fileLength")) + if (typeof message.fileLength === "number") + object.fileLength = options.longs === String ? String(message.fileLength) : message.fileLength; else - object.serverTimestampMs = options.longs === String ? $util.Long.prototype.toString.call(message.serverTimestampMs) : options.longs === Number ? new $util.LongBits(message.serverTimestampMs.low >>> 0, message.serverTimestampMs.high >>> 0).toNumber() : message.serverTimestampMs; + object.fileLength = options.longs === String ? $util.Long.prototype.toString.call(message.fileLength) : options.longs === Number ? new $util.LongBits(message.fileLength.low >>> 0, message.fileLength.high >>> 0).toNumber(true) : message.fileLength; return object; }; /** - * Converts this KeepInChat to JSON. + * Converts this MediaNotifyMessage to JSON. * @function toJSON - * @memberof proto.KeepInChat + * @memberof proto.MediaNotifyMessage * @instance * @returns {Object.} JSON object */ - KeepInChat.prototype.toJSON = function toJSON() { + MediaNotifyMessage.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return KeepInChat; - })(); - - /** - * KeepType enum. - * @name proto.KeepType - * @enum {number} - * @property {number} UNKNOWN=0 UNKNOWN value - * @property {number} KEEP_FOR_ALL=1 KEEP_FOR_ALL value - * @property {number} UNDO_KEEP_FOR_ALL=2 UNDO_KEEP_FOR_ALL value - */ - proto.KeepType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UNKNOWN"] = 0; - values[valuesById[1] = "KEEP_FOR_ALL"] = 1; - values[valuesById[2] = "UNDO_KEEP_FOR_ALL"] = 2; - return values; + return MediaNotifyMessage; })(); - proto.KeyExchangeMessage = (function() { + proto.MediaRetryNotification = (function() { /** - * Properties of a KeyExchangeMessage. + * Properties of a MediaRetryNotification. * @memberof proto - * @interface IKeyExchangeMessage - * @property {number|null} [id] KeyExchangeMessage id - * @property {Uint8Array|null} [baseKey] KeyExchangeMessage baseKey - * @property {Uint8Array|null} [ratchetKey] KeyExchangeMessage ratchetKey - * @property {Uint8Array|null} [identityKey] KeyExchangeMessage identityKey - * @property {Uint8Array|null} [baseKeySignature] KeyExchangeMessage baseKeySignature + * @interface IMediaRetryNotification + * @property {string|null} [stanzaId] MediaRetryNotification stanzaId + * @property {string|null} [directPath] MediaRetryNotification directPath + * @property {proto.MediaRetryNotification.ResultType|null} [result] MediaRetryNotification result */ /** - * Constructs a new KeyExchangeMessage. + * Constructs a new MediaRetryNotification. * @memberof proto - * @classdesc Represents a KeyExchangeMessage. - * @implements IKeyExchangeMessage + * @classdesc Represents a MediaRetryNotification. + * @implements IMediaRetryNotification * @constructor - * @param {proto.IKeyExchangeMessage=} [properties] Properties to set + * @param {proto.IMediaRetryNotification=} [properties] Properties to set */ - function KeyExchangeMessage(properties) { + function MediaRetryNotification(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20521,127 +26286,101 @@ $root.proto = (function() { } /** - * KeyExchangeMessage id. - * @member {number} id - * @memberof proto.KeyExchangeMessage - * @instance - */ - KeyExchangeMessage.prototype.id = 0; - - /** - * KeyExchangeMessage baseKey. - * @member {Uint8Array} baseKey - * @memberof proto.KeyExchangeMessage - * @instance - */ - KeyExchangeMessage.prototype.baseKey = $util.newBuffer([]); - - /** - * KeyExchangeMessage ratchetKey. - * @member {Uint8Array} ratchetKey - * @memberof proto.KeyExchangeMessage + * MediaRetryNotification stanzaId. + * @member {string} stanzaId + * @memberof proto.MediaRetryNotification * @instance */ - KeyExchangeMessage.prototype.ratchetKey = $util.newBuffer([]); + MediaRetryNotification.prototype.stanzaId = ""; /** - * KeyExchangeMessage identityKey. - * @member {Uint8Array} identityKey - * @memberof proto.KeyExchangeMessage + * MediaRetryNotification directPath. + * @member {string} directPath + * @memberof proto.MediaRetryNotification * @instance */ - KeyExchangeMessage.prototype.identityKey = $util.newBuffer([]); + MediaRetryNotification.prototype.directPath = ""; /** - * KeyExchangeMessage baseKeySignature. - * @member {Uint8Array} baseKeySignature - * @memberof proto.KeyExchangeMessage + * MediaRetryNotification result. + * @member {proto.MediaRetryNotification.ResultType} result + * @memberof proto.MediaRetryNotification * @instance */ - KeyExchangeMessage.prototype.baseKeySignature = $util.newBuffer([]); + MediaRetryNotification.prototype.result = 0; /** - * Creates a new KeyExchangeMessage instance using the specified properties. + * Creates a new MediaRetryNotification instance using the specified properties. * @function create - * @memberof proto.KeyExchangeMessage + * @memberof proto.MediaRetryNotification * @static - * @param {proto.IKeyExchangeMessage=} [properties] Properties to set - * @returns {proto.KeyExchangeMessage} KeyExchangeMessage instance + * @param {proto.IMediaRetryNotification=} [properties] Properties to set + * @returns {proto.MediaRetryNotification} MediaRetryNotification instance */ - KeyExchangeMessage.create = function create(properties) { - return new KeyExchangeMessage(properties); + MediaRetryNotification.create = function create(properties) { + return new MediaRetryNotification(properties); }; /** - * Encodes the specified KeyExchangeMessage message. Does not implicitly {@link proto.KeyExchangeMessage.verify|verify} messages. + * Encodes the specified MediaRetryNotification message. Does not implicitly {@link proto.MediaRetryNotification.verify|verify} messages. * @function encode - * @memberof proto.KeyExchangeMessage + * @memberof proto.MediaRetryNotification * @static - * @param {proto.IKeyExchangeMessage} message KeyExchangeMessage message or plain object to encode + * @param {proto.IMediaRetryNotification} message MediaRetryNotification message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - KeyExchangeMessage.encode = function encode(message, writer) { + MediaRetryNotification.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.id); - if (message.baseKey != null && Object.hasOwnProperty.call(message, "baseKey")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.baseKey); - if (message.ratchetKey != null && Object.hasOwnProperty.call(message, "ratchetKey")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.ratchetKey); - if (message.identityKey != null && Object.hasOwnProperty.call(message, "identityKey")) - writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.identityKey); - if (message.baseKeySignature != null && Object.hasOwnProperty.call(message, "baseKeySignature")) - writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.baseKeySignature); + if (message.stanzaId != null && Object.hasOwnProperty.call(message, "stanzaId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.stanzaId); + if (message.directPath != null && Object.hasOwnProperty.call(message, "directPath")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.directPath); + if (message.result != null && Object.hasOwnProperty.call(message, "result")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.result); return writer; }; /** - * Encodes the specified KeyExchangeMessage message, length delimited. Does not implicitly {@link proto.KeyExchangeMessage.verify|verify} messages. + * Encodes the specified MediaRetryNotification message, length delimited. Does not implicitly {@link proto.MediaRetryNotification.verify|verify} messages. * @function encodeDelimited - * @memberof proto.KeyExchangeMessage + * @memberof proto.MediaRetryNotification * @static - * @param {proto.IKeyExchangeMessage} message KeyExchangeMessage message or plain object to encode + * @param {proto.IMediaRetryNotification} message MediaRetryNotification message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - KeyExchangeMessage.encodeDelimited = function encodeDelimited(message, writer) { + MediaRetryNotification.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a KeyExchangeMessage message from the specified reader or buffer. + * Decodes a MediaRetryNotification message from the specified reader or buffer. * @function decode - * @memberof proto.KeyExchangeMessage + * @memberof proto.MediaRetryNotification * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {proto.KeyExchangeMessage} KeyExchangeMessage + * @returns {proto.MediaRetryNotification} MediaRetryNotification * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - KeyExchangeMessage.decode = function decode(reader, length) { + MediaRetryNotification.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.KeyExchangeMessage(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.MediaRetryNotification(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.id = reader.uint32(); + message.stanzaId = reader.string(); break; case 2: - message.baseKey = reader.bytes(); + message.directPath = reader.string(); break; case 3: - message.ratchetKey = reader.bytes(); - break; - case 4: - message.identityKey = reader.bytes(); - break; - case 5: - message.baseKeySignature = reader.bytes(); + message.result = reader.int32(); break; default: reader.skipType(tag & 7); @@ -20652,176 +26391,248 @@ $root.proto = (function() { }; /** - * Decodes a KeyExchangeMessage message from the specified reader or buffer, length delimited. + * Decodes a MediaRetryNotification message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof proto.KeyExchangeMessage + * @memberof proto.MediaRetryNotification * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.KeyExchangeMessage} KeyExchangeMessage + * @returns {proto.MediaRetryNotification} MediaRetryNotification * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - KeyExchangeMessage.decodeDelimited = function decodeDelimited(reader) { + MediaRetryNotification.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a KeyExchangeMessage message. + * Verifies a MediaRetryNotification message. * @function verify - * @memberof proto.KeyExchangeMessage + * @memberof proto.MediaRetryNotification * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - KeyExchangeMessage.verify = function verify(message) { + MediaRetryNotification.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isInteger(message.id)) - return "id: integer expected"; - if (message.baseKey != null && message.hasOwnProperty("baseKey")) - if (!(message.baseKey && typeof message.baseKey.length === "number" || $util.isString(message.baseKey))) - return "baseKey: buffer expected"; - if (message.ratchetKey != null && message.hasOwnProperty("ratchetKey")) - if (!(message.ratchetKey && typeof message.ratchetKey.length === "number" || $util.isString(message.ratchetKey))) - return "ratchetKey: buffer expected"; - if (message.identityKey != null && message.hasOwnProperty("identityKey")) - if (!(message.identityKey && typeof message.identityKey.length === "number" || $util.isString(message.identityKey))) - return "identityKey: buffer expected"; - if (message.baseKeySignature != null && message.hasOwnProperty("baseKeySignature")) - if (!(message.baseKeySignature && typeof message.baseKeySignature.length === "number" || $util.isString(message.baseKeySignature))) - return "baseKeySignature: buffer expected"; + if (message.stanzaId != null && message.hasOwnProperty("stanzaId")) + if (!$util.isString(message.stanzaId)) + return "stanzaId: string expected"; + if (message.directPath != null && message.hasOwnProperty("directPath")) + if (!$util.isString(message.directPath)) + return "directPath: string expected"; + if (message.result != null && message.hasOwnProperty("result")) + switch (message.result) { + default: + return "result: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } return null; }; /** - * Creates a KeyExchangeMessage message from a plain object. Also converts values to their respective internal types. + * Creates a MediaRetryNotification message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof proto.KeyExchangeMessage + * @memberof proto.MediaRetryNotification * @static * @param {Object.} object Plain object - * @returns {proto.KeyExchangeMessage} KeyExchangeMessage + * @returns {proto.MediaRetryNotification} MediaRetryNotification */ - KeyExchangeMessage.fromObject = function fromObject(object) { - if (object instanceof $root.proto.KeyExchangeMessage) + MediaRetryNotification.fromObject = function fromObject(object) { + if (object instanceof $root.proto.MediaRetryNotification) return object; - var message = new $root.proto.KeyExchangeMessage(); - if (object.id != null) - message.id = object.id >>> 0; - if (object.baseKey != null) - if (typeof object.baseKey === "string") - $util.base64.decode(object.baseKey, message.baseKey = $util.newBuffer($util.base64.length(object.baseKey)), 0); - else if (object.baseKey.length) - message.baseKey = object.baseKey; - if (object.ratchetKey != null) - if (typeof object.ratchetKey === "string") - $util.base64.decode(object.ratchetKey, message.ratchetKey = $util.newBuffer($util.base64.length(object.ratchetKey)), 0); - else if (object.ratchetKey.length) - message.ratchetKey = object.ratchetKey; - if (object.identityKey != null) - if (typeof object.identityKey === "string") - $util.base64.decode(object.identityKey, message.identityKey = $util.newBuffer($util.base64.length(object.identityKey)), 0); - else if (object.identityKey.length) - message.identityKey = object.identityKey; - if (object.baseKeySignature != null) - if (typeof object.baseKeySignature === "string") - $util.base64.decode(object.baseKeySignature, message.baseKeySignature = $util.newBuffer($util.base64.length(object.baseKeySignature)), 0); - else if (object.baseKeySignature.length) - message.baseKeySignature = object.baseKeySignature; + var message = new $root.proto.MediaRetryNotification(); + if (object.stanzaId != null) + message.stanzaId = String(object.stanzaId); + if (object.directPath != null) + message.directPath = String(object.directPath); + switch (object.result) { + case "GENERAL_ERROR": + case 0: + message.result = 0; + break; + case "SUCCESS": + case 1: + message.result = 1; + break; + case "NOT_FOUND": + case 2: + message.result = 2; + break; + case "DECRYPTION_ERROR": + case 3: + message.result = 3; + break; + } return message; }; /** - * Creates a plain object from a KeyExchangeMessage message. Also converts values to other types if specified. + * Creates a plain object from a MediaRetryNotification message. Also converts values to other types if specified. * @function toObject - * @memberof proto.KeyExchangeMessage + * @memberof proto.MediaRetryNotification * @static - * @param {proto.KeyExchangeMessage} message KeyExchangeMessage + * @param {proto.MediaRetryNotification} message MediaRetryNotification * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - KeyExchangeMessage.toObject = function toObject(message, options) { + MediaRetryNotification.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.id = 0; - if (options.bytes === String) - object.baseKey = ""; - else { - object.baseKey = []; - if (options.bytes !== Array) - object.baseKey = $util.newBuffer(object.baseKey); - } - if (options.bytes === String) - object.ratchetKey = ""; - else { - object.ratchetKey = []; - if (options.bytes !== Array) - object.ratchetKey = $util.newBuffer(object.ratchetKey); - } - if (options.bytes === String) - object.identityKey = ""; - else { - object.identityKey = []; - if (options.bytes !== Array) - object.identityKey = $util.newBuffer(object.identityKey); - } - if (options.bytes === String) - object.baseKeySignature = ""; - else { - object.baseKeySignature = []; - if (options.bytes !== Array) - object.baseKeySignature = $util.newBuffer(object.baseKeySignature); - } + object.stanzaId = ""; + object.directPath = ""; + object.result = options.enums === String ? "GENERAL_ERROR" : 0; } - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.baseKey != null && message.hasOwnProperty("baseKey")) - object.baseKey = options.bytes === String ? $util.base64.encode(message.baseKey, 0, message.baseKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.baseKey) : message.baseKey; - if (message.ratchetKey != null && message.hasOwnProperty("ratchetKey")) - object.ratchetKey = options.bytes === String ? $util.base64.encode(message.ratchetKey, 0, message.ratchetKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.ratchetKey) : message.ratchetKey; - if (message.identityKey != null && message.hasOwnProperty("identityKey")) - object.identityKey = options.bytes === String ? $util.base64.encode(message.identityKey, 0, message.identityKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.identityKey) : message.identityKey; - if (message.baseKeySignature != null && message.hasOwnProperty("baseKeySignature")) - object.baseKeySignature = options.bytes === String ? $util.base64.encode(message.baseKeySignature, 0, message.baseKeySignature.length) : options.bytes === Array ? Array.prototype.slice.call(message.baseKeySignature) : message.baseKeySignature; + if (message.stanzaId != null && message.hasOwnProperty("stanzaId")) + object.stanzaId = message.stanzaId; + if (message.directPath != null && message.hasOwnProperty("directPath")) + object.directPath = message.directPath; + if (message.result != null && message.hasOwnProperty("result")) + object.result = options.enums === String ? $root.proto.MediaRetryNotification.ResultType[message.result] : message.result; return object; }; /** - * Converts this KeyExchangeMessage to JSON. + * Converts this MediaRetryNotification to JSON. * @function toJSON - * @memberof proto.KeyExchangeMessage + * @memberof proto.MediaRetryNotification * @instance * @returns {Object.} JSON object */ - KeyExchangeMessage.prototype.toJSON = function toJSON() { + MediaRetryNotification.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return KeyExchangeMessage; + /** + * ResultType enum. + * @name proto.MediaRetryNotification.ResultType + * @enum {number} + * @property {number} GENERAL_ERROR=0 GENERAL_ERROR value + * @property {number} SUCCESS=1 SUCCESS value + * @property {number} NOT_FOUND=2 NOT_FOUND value + * @property {number} DECRYPTION_ERROR=3 DECRYPTION_ERROR value + */ + MediaRetryNotification.ResultType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "GENERAL_ERROR"] = 0; + values[valuesById[1] = "SUCCESS"] = 1; + values[valuesById[2] = "NOT_FOUND"] = 2; + values[valuesById[3] = "DECRYPTION_ERROR"] = 3; + return values; + })(); + + return MediaRetryNotification; })(); - proto.KeyId = (function() { + /** + * MediaVisibility enum. + * @name proto.MediaVisibility + * @enum {number} + * @property {number} DEFAULT=0 DEFAULT value + * @property {number} OFF=1 OFF value + * @property {number} ON=2 ON value + */ + proto.MediaVisibility = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DEFAULT"] = 0; + values[valuesById[1] = "OFF"] = 1; + values[valuesById[2] = "ON"] = 2; + return values; + })(); + + proto.Message = (function() { /** - * Properties of a KeyId. + * Properties of a Message. * @memberof proto - * @interface IKeyId - * @property {Uint8Array|null} [id] KeyId id + * @interface IMessage + * @property {string|null} [conversation] Message conversation + * @property {proto.Message.ISenderKeyDistributionMessage|null} [senderKeyDistributionMessage] Message senderKeyDistributionMessage + * @property {proto.Message.IImageMessage|null} [imageMessage] Message imageMessage + * @property {proto.Message.IContactMessage|null} [contactMessage] Message contactMessage + * @property {proto.Message.ILocationMessage|null} [locationMessage] Message locationMessage + * @property {proto.Message.IExtendedTextMessage|null} [extendedTextMessage] Message extendedTextMessage + * @property {proto.Message.IDocumentMessage|null} [documentMessage] Message documentMessage + * @property {proto.Message.IAudioMessage|null} [audioMessage] Message audioMessage + * @property {proto.Message.IVideoMessage|null} [videoMessage] Message videoMessage + * @property {proto.Message.ICall|null} [call] Message call + * @property {proto.Message.IChat|null} [chat] Message chat + * @property {proto.Message.IProtocolMessage|null} [protocolMessage] Message protocolMessage + * @property {proto.Message.IContactsArrayMessage|null} [contactsArrayMessage] Message contactsArrayMessage + * @property {proto.Message.IHighlyStructuredMessage|null} [highlyStructuredMessage] Message highlyStructuredMessage + * @property {proto.Message.ISenderKeyDistributionMessage|null} [fastRatchetKeySenderKeyDistributionMessage] Message fastRatchetKeySenderKeyDistributionMessage + * @property {proto.Message.ISendPaymentMessage|null} [sendPaymentMessage] Message sendPaymentMessage + * @property {proto.Message.ILiveLocationMessage|null} [liveLocationMessage] Message liveLocationMessage + * @property {proto.Message.IRequestPaymentMessage|null} [requestPaymentMessage] Message requestPaymentMessage + * @property {proto.Message.IDeclinePaymentRequestMessage|null} [declinePaymentRequestMessage] Message declinePaymentRequestMessage + * @property {proto.Message.ICancelPaymentRequestMessage|null} [cancelPaymentRequestMessage] Message cancelPaymentRequestMessage + * @property {proto.Message.ITemplateMessage|null} [templateMessage] Message templateMessage + * @property {proto.Message.IStickerMessage|null} [stickerMessage] Message stickerMessage + * @property {proto.Message.IGroupInviteMessage|null} [groupInviteMessage] Message groupInviteMessage + * @property {proto.Message.ITemplateButtonReplyMessage|null} [templateButtonReplyMessage] Message templateButtonReplyMessage + * @property {proto.Message.IProductMessage|null} [productMessage] Message productMessage + * @property {proto.Message.IDeviceSentMessage|null} [deviceSentMessage] Message deviceSentMessage + * @property {proto.IMessageContextInfo|null} [messageContextInfo] Message messageContextInfo + * @property {proto.Message.IListMessage|null} [listMessage] Message listMessage + * @property {proto.Message.IFutureProofMessage|null} [viewOnceMessage] Message viewOnceMessage + * @property {proto.Message.IOrderMessage|null} [orderMessage] Message orderMessage + * @property {proto.Message.IListResponseMessage|null} [listResponseMessage] Message listResponseMessage + * @property {proto.Message.IFutureProofMessage|null} [ephemeralMessage] Message ephemeralMessage + * @property {proto.Message.IInvoiceMessage|null} [invoiceMessage] Message invoiceMessage + * @property {proto.Message.IButtonsMessage|null} [buttonsMessage] Message buttonsMessage + * @property {proto.Message.IButtonsResponseMessage|null} [buttonsResponseMessage] Message buttonsResponseMessage + * @property {proto.Message.IPaymentInviteMessage|null} [paymentInviteMessage] Message paymentInviteMessage + * @property {proto.Message.IInteractiveMessage|null} [interactiveMessage] Message interactiveMessage + * @property {proto.Message.IReactionMessage|null} [reactionMessage] Message reactionMessage + * @property {proto.Message.IStickerSyncRMRMessage|null} [stickerSyncRmrMessage] Message stickerSyncRmrMessage + * @property {proto.Message.IInteractiveResponseMessage|null} [interactiveResponseMessage] Message interactiveResponseMessage + * @property {proto.Message.IPollCreationMessage|null} [pollCreationMessage] Message pollCreationMessage + * @property {proto.Message.IPollUpdateMessage|null} [pollUpdateMessage] Message pollUpdateMessage + * @property {proto.Message.IKeepInChatMessage|null} [keepInChatMessage] Message keepInChatMessage + * @property {proto.Message.IFutureProofMessage|null} [documentWithCaptionMessage] Message documentWithCaptionMessage + * @property {proto.Message.IRequestPhoneNumberMessage|null} [requestPhoneNumberMessage] Message requestPhoneNumberMessage + * @property {proto.Message.IFutureProofMessage|null} [viewOnceMessageV2] Message viewOnceMessageV2 + * @property {proto.Message.IEncReactionMessage|null} [encReactionMessage] Message encReactionMessage + * @property {proto.Message.IFutureProofMessage|null} [editedMessage] Message editedMessage + * @property {proto.Message.IFutureProofMessage|null} [viewOnceMessageV2Extension] Message viewOnceMessageV2Extension + * @property {proto.Message.IPollCreationMessage|null} [pollCreationMessageV2] Message pollCreationMessageV2 + * @property {proto.Message.IScheduledCallCreationMessage|null} [scheduledCallCreationMessage] Message scheduledCallCreationMessage + * @property {proto.Message.IFutureProofMessage|null} [groupMentionedMessage] Message groupMentionedMessage + * @property {proto.Message.IPinInChatMessage|null} [pinInChatMessage] Message pinInChatMessage + * @property {proto.Message.IPollCreationMessage|null} [pollCreationMessageV3] Message pollCreationMessageV3 + * @property {proto.Message.IScheduledCallEditMessage|null} [scheduledCallEditMessage] Message scheduledCallEditMessage + * @property {proto.Message.IVideoMessage|null} [ptvMessage] Message ptvMessage + * @property {proto.Message.IFutureProofMessage|null} [botInvokeMessage] Message botInvokeMessage + * @property {proto.Message.ICallLogMessage|null} [callLogMesssage] Message callLogMesssage + * @property {proto.Message.IMessageHistoryBundle|null} [messageHistoryBundle] Message messageHistoryBundle + * @property {proto.Message.IEncCommentMessage|null} [encCommentMessage] Message encCommentMessage + * @property {proto.Message.IBCallMessage|null} [bcallMessage] Message bcallMessage + * @property {proto.Message.IFutureProofMessage|null} [lottieStickerMessage] Message lottieStickerMessage + * @property {proto.Message.IEventMessage|null} [eventMessage] Message eventMessage + * @property {proto.Message.ICommentMessage|null} [commentMessage] Message commentMessage + * @property {proto.Message.INewsletterAdminInviteMessage|null} [newsletterAdminInviteMessage] Message newsletterAdminInviteMessage + * @property {proto.Message.IExtendedTextMessageWithParentKey|null} [extendedTextMessageWithParentKey] Message extendedTextMessageWithParentKey + * @property {proto.Message.IPlaceholderMessage|null} [placeholderMessage] Message placeholderMessage + * @property {proto.Message.IEncEventUpdateMessage|null} [encEventUpdateMessage] Message encEventUpdateMessage */ /** - * Constructs a new KeyId. + * Constructs a new Message. * @memberof proto - * @classdesc Represents a KeyId. - * @implements IKeyId + * @classdesc Represents a Message. + * @implements IMessage * @constructor - * @param {proto.IKeyId=} [properties] Properties to set + * @param {proto.IMessage=} [properties] Properties to set */ - function KeyId(properties) { + function Message(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20829,735 +26640,946 @@ $root.proto = (function() { } /** - * KeyId id. - * @member {Uint8Array} id - * @memberof proto.KeyId + * Message conversation. + * @member {string} conversation + * @memberof proto.Message + * @instance + */ + Message.prototype.conversation = ""; + + /** + * Message senderKeyDistributionMessage. + * @member {proto.Message.ISenderKeyDistributionMessage|null|undefined} senderKeyDistributionMessage + * @memberof proto.Message + * @instance + */ + Message.prototype.senderKeyDistributionMessage = null; + + /** + * Message imageMessage. + * @member {proto.Message.IImageMessage|null|undefined} imageMessage + * @memberof proto.Message + * @instance + */ + Message.prototype.imageMessage = null; + + /** + * Message contactMessage. + * @member {proto.Message.IContactMessage|null|undefined} contactMessage + * @memberof proto.Message + * @instance + */ + Message.prototype.contactMessage = null; + + /** + * Message locationMessage. + * @member {proto.Message.ILocationMessage|null|undefined} locationMessage + * @memberof proto.Message + * @instance + */ + Message.prototype.locationMessage = null; + + /** + * Message extendedTextMessage. + * @member {proto.Message.IExtendedTextMessage|null|undefined} extendedTextMessage + * @memberof proto.Message + * @instance + */ + Message.prototype.extendedTextMessage = null; + + /** + * Message documentMessage. + * @member {proto.Message.IDocumentMessage|null|undefined} documentMessage + * @memberof proto.Message + * @instance + */ + Message.prototype.documentMessage = null; + + /** + * Message audioMessage. + * @member {proto.Message.IAudioMessage|null|undefined} audioMessage + * @memberof proto.Message + * @instance + */ + Message.prototype.audioMessage = null; + + /** + * Message videoMessage. + * @member {proto.Message.IVideoMessage|null|undefined} videoMessage + * @memberof proto.Message + * @instance + */ + Message.prototype.videoMessage = null; + + /** + * Message call. + * @member {proto.Message.ICall|null|undefined} call + * @memberof proto.Message + * @instance + */ + Message.prototype.call = null; + + /** + * Message chat. + * @member {proto.Message.IChat|null|undefined} chat + * @memberof proto.Message + * @instance + */ + Message.prototype.chat = null; + + /** + * Message protocolMessage. + * @member {proto.Message.IProtocolMessage|null|undefined} protocolMessage + * @memberof proto.Message + * @instance + */ + Message.prototype.protocolMessage = null; + + /** + * Message contactsArrayMessage. + * @member {proto.Message.IContactsArrayMessage|null|undefined} contactsArrayMessage + * @memberof proto.Message + * @instance + */ + Message.prototype.contactsArrayMessage = null; + + /** + * Message highlyStructuredMessage. + * @member {proto.Message.IHighlyStructuredMessage|null|undefined} highlyStructuredMessage + * @memberof proto.Message + * @instance + */ + Message.prototype.highlyStructuredMessage = null; + + /** + * Message fastRatchetKeySenderKeyDistributionMessage. + * @member {proto.Message.ISenderKeyDistributionMessage|null|undefined} fastRatchetKeySenderKeyDistributionMessage + * @memberof proto.Message + * @instance + */ + Message.prototype.fastRatchetKeySenderKeyDistributionMessage = null; + + /** + * Message sendPaymentMessage. + * @member {proto.Message.ISendPaymentMessage|null|undefined} sendPaymentMessage + * @memberof proto.Message + * @instance + */ + Message.prototype.sendPaymentMessage = null; + + /** + * Message liveLocationMessage. + * @member {proto.Message.ILiveLocationMessage|null|undefined} liveLocationMessage + * @memberof proto.Message + * @instance + */ + Message.prototype.liveLocationMessage = null; + + /** + * Message requestPaymentMessage. + * @member {proto.Message.IRequestPaymentMessage|null|undefined} requestPaymentMessage + * @memberof proto.Message + * @instance + */ + Message.prototype.requestPaymentMessage = null; + + /** + * Message declinePaymentRequestMessage. + * @member {proto.Message.IDeclinePaymentRequestMessage|null|undefined} declinePaymentRequestMessage + * @memberof proto.Message + * @instance + */ + Message.prototype.declinePaymentRequestMessage = null; + + /** + * Message cancelPaymentRequestMessage. + * @member {proto.Message.ICancelPaymentRequestMessage|null|undefined} cancelPaymentRequestMessage + * @memberof proto.Message + * @instance + */ + Message.prototype.cancelPaymentRequestMessage = null; + + /** + * Message templateMessage. + * @member {proto.Message.ITemplateMessage|null|undefined} templateMessage + * @memberof proto.Message + * @instance + */ + Message.prototype.templateMessage = null; + + /** + * Message stickerMessage. + * @member {proto.Message.IStickerMessage|null|undefined} stickerMessage + * @memberof proto.Message + * @instance + */ + Message.prototype.stickerMessage = null; + + /** + * Message groupInviteMessage. + * @member {proto.Message.IGroupInviteMessage|null|undefined} groupInviteMessage + * @memberof proto.Message + * @instance + */ + Message.prototype.groupInviteMessage = null; + + /** + * Message templateButtonReplyMessage. + * @member {proto.Message.ITemplateButtonReplyMessage|null|undefined} templateButtonReplyMessage + * @memberof proto.Message + * @instance + */ + Message.prototype.templateButtonReplyMessage = null; + + /** + * Message productMessage. + * @member {proto.Message.IProductMessage|null|undefined} productMessage + * @memberof proto.Message + * @instance + */ + Message.prototype.productMessage = null; + + /** + * Message deviceSentMessage. + * @member {proto.Message.IDeviceSentMessage|null|undefined} deviceSentMessage + * @memberof proto.Message * @instance */ - KeyId.prototype.id = $util.newBuffer([]); + Message.prototype.deviceSentMessage = null; /** - * Creates a new KeyId instance using the specified properties. - * @function create - * @memberof proto.KeyId - * @static - * @param {proto.IKeyId=} [properties] Properties to set - * @returns {proto.KeyId} KeyId instance + * Message messageContextInfo. + * @member {proto.IMessageContextInfo|null|undefined} messageContextInfo + * @memberof proto.Message + * @instance */ - KeyId.create = function create(properties) { - return new KeyId(properties); - }; + Message.prototype.messageContextInfo = null; /** - * Encodes the specified KeyId message. Does not implicitly {@link proto.KeyId.verify|verify} messages. - * @function encode - * @memberof proto.KeyId - * @static - * @param {proto.IKeyId} message KeyId message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Message listMessage. + * @member {proto.Message.IListMessage|null|undefined} listMessage + * @memberof proto.Message + * @instance */ - KeyId.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.id); - return writer; - }; + Message.prototype.listMessage = null; /** - * Encodes the specified KeyId message, length delimited. Does not implicitly {@link proto.KeyId.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.KeyId - * @static - * @param {proto.IKeyId} message KeyId message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Message viewOnceMessage. + * @member {proto.Message.IFutureProofMessage|null|undefined} viewOnceMessage + * @memberof proto.Message + * @instance */ - KeyId.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Message.prototype.viewOnceMessage = null; /** - * Decodes a KeyId message from the specified reader or buffer. - * @function decode - * @memberof proto.KeyId - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.KeyId} KeyId - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Message orderMessage. + * @member {proto.Message.IOrderMessage|null|undefined} orderMessage + * @memberof proto.Message + * @instance */ - KeyId.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.KeyId(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.id = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + Message.prototype.orderMessage = null; /** - * Decodes a KeyId message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.KeyId - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.KeyId} KeyId - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Message listResponseMessage. + * @member {proto.Message.IListResponseMessage|null|undefined} listResponseMessage + * @memberof proto.Message + * @instance */ - KeyId.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + Message.prototype.listResponseMessage = null; /** - * Verifies a KeyId message. - * @function verify - * @memberof proto.KeyId - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Message ephemeralMessage. + * @member {proto.Message.IFutureProofMessage|null|undefined} ephemeralMessage + * @memberof proto.Message + * @instance */ - KeyId.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.id != null && message.hasOwnProperty("id")) - if (!(message.id && typeof message.id.length === "number" || $util.isString(message.id))) - return "id: buffer expected"; - return null; - }; + Message.prototype.ephemeralMessage = null; /** - * Creates a KeyId message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.KeyId - * @static - * @param {Object.} object Plain object - * @returns {proto.KeyId} KeyId + * Message invoiceMessage. + * @member {proto.Message.IInvoiceMessage|null|undefined} invoiceMessage + * @memberof proto.Message + * @instance */ - KeyId.fromObject = function fromObject(object) { - if (object instanceof $root.proto.KeyId) - return object; - var message = new $root.proto.KeyId(); - if (object.id != null) - if (typeof object.id === "string") - $util.base64.decode(object.id, message.id = $util.newBuffer($util.base64.length(object.id)), 0); - else if (object.id.length) - message.id = object.id; - return message; - }; + Message.prototype.invoiceMessage = null; /** - * Creates a plain object from a KeyId message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.KeyId - * @static - * @param {proto.KeyId} message KeyId - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Message buttonsMessage. + * @member {proto.Message.IButtonsMessage|null|undefined} buttonsMessage + * @memberof proto.Message + * @instance */ - KeyId.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - if (options.bytes === String) - object.id = ""; - else { - object.id = []; - if (options.bytes !== Array) - object.id = $util.newBuffer(object.id); - } - if (message.id != null && message.hasOwnProperty("id")) - object.id = options.bytes === String ? $util.base64.encode(message.id, 0, message.id.length) : options.bytes === Array ? Array.prototype.slice.call(message.id) : message.id; - return object; - }; + Message.prototype.buttonsMessage = null; /** - * Converts this KeyId to JSON. - * @function toJSON - * @memberof proto.KeyId + * Message buttonsResponseMessage. + * @member {proto.Message.IButtonsResponseMessage|null|undefined} buttonsResponseMessage + * @memberof proto.Message * @instance - * @returns {Object.} JSON object */ - KeyId.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return KeyId; - })(); - - proto.LocalizedName = (function() { + Message.prototype.buttonsResponseMessage = null; /** - * Properties of a LocalizedName. - * @memberof proto - * @interface ILocalizedName - * @property {string|null} [lg] LocalizedName lg - * @property {string|null} [lc] LocalizedName lc - * @property {string|null} [verifiedName] LocalizedName verifiedName + * Message paymentInviteMessage. + * @member {proto.Message.IPaymentInviteMessage|null|undefined} paymentInviteMessage + * @memberof proto.Message + * @instance */ + Message.prototype.paymentInviteMessage = null; /** - * Constructs a new LocalizedName. - * @memberof proto - * @classdesc Represents a LocalizedName. - * @implements ILocalizedName - * @constructor - * @param {proto.ILocalizedName=} [properties] Properties to set + * Message interactiveMessage. + * @member {proto.Message.IInteractiveMessage|null|undefined} interactiveMessage + * @memberof proto.Message + * @instance */ - function LocalizedName(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + Message.prototype.interactiveMessage = null; /** - * LocalizedName lg. - * @member {string} lg - * @memberof proto.LocalizedName + * Message reactionMessage. + * @member {proto.Message.IReactionMessage|null|undefined} reactionMessage + * @memberof proto.Message * @instance */ - LocalizedName.prototype.lg = ""; + Message.prototype.reactionMessage = null; /** - * LocalizedName lc. - * @member {string} lc - * @memberof proto.LocalizedName + * Message stickerSyncRmrMessage. + * @member {proto.Message.IStickerSyncRMRMessage|null|undefined} stickerSyncRmrMessage + * @memberof proto.Message * @instance */ - LocalizedName.prototype.lc = ""; + Message.prototype.stickerSyncRmrMessage = null; /** - * LocalizedName verifiedName. - * @member {string} verifiedName - * @memberof proto.LocalizedName + * Message interactiveResponseMessage. + * @member {proto.Message.IInteractiveResponseMessage|null|undefined} interactiveResponseMessage + * @memberof proto.Message * @instance */ - LocalizedName.prototype.verifiedName = ""; + Message.prototype.interactiveResponseMessage = null; /** - * Creates a new LocalizedName instance using the specified properties. - * @function create - * @memberof proto.LocalizedName - * @static - * @param {proto.ILocalizedName=} [properties] Properties to set - * @returns {proto.LocalizedName} LocalizedName instance + * Message pollCreationMessage. + * @member {proto.Message.IPollCreationMessage|null|undefined} pollCreationMessage + * @memberof proto.Message + * @instance */ - LocalizedName.create = function create(properties) { - return new LocalizedName(properties); - }; + Message.prototype.pollCreationMessage = null; /** - * Encodes the specified LocalizedName message. Does not implicitly {@link proto.LocalizedName.verify|verify} messages. - * @function encode - * @memberof proto.LocalizedName - * @static - * @param {proto.ILocalizedName} message LocalizedName message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Message pollUpdateMessage. + * @member {proto.Message.IPollUpdateMessage|null|undefined} pollUpdateMessage + * @memberof proto.Message + * @instance */ - LocalizedName.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.lg != null && Object.hasOwnProperty.call(message, "lg")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.lg); - if (message.lc != null && Object.hasOwnProperty.call(message, "lc")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.lc); - if (message.verifiedName != null && Object.hasOwnProperty.call(message, "verifiedName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.verifiedName); - return writer; - }; + Message.prototype.pollUpdateMessage = null; /** - * Encodes the specified LocalizedName message, length delimited. Does not implicitly {@link proto.LocalizedName.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.LocalizedName - * @static - * @param {proto.ILocalizedName} message LocalizedName message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Message keepInChatMessage. + * @member {proto.Message.IKeepInChatMessage|null|undefined} keepInChatMessage + * @memberof proto.Message + * @instance */ - LocalizedName.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Message.prototype.keepInChatMessage = null; /** - * Decodes a LocalizedName message from the specified reader or buffer. - * @function decode - * @memberof proto.LocalizedName - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.LocalizedName} LocalizedName - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Message documentWithCaptionMessage. + * @member {proto.Message.IFutureProofMessage|null|undefined} documentWithCaptionMessage + * @memberof proto.Message + * @instance */ - LocalizedName.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.LocalizedName(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.lg = reader.string(); - break; - case 2: - message.lc = reader.string(); - break; - case 3: - message.verifiedName = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + Message.prototype.documentWithCaptionMessage = null; /** - * Decodes a LocalizedName message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.LocalizedName - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.LocalizedName} LocalizedName - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Message requestPhoneNumberMessage. + * @member {proto.Message.IRequestPhoneNumberMessage|null|undefined} requestPhoneNumberMessage + * @memberof proto.Message + * @instance */ - LocalizedName.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + Message.prototype.requestPhoneNumberMessage = null; /** - * Verifies a LocalizedName message. - * @function verify - * @memberof proto.LocalizedName - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Message viewOnceMessageV2. + * @member {proto.Message.IFutureProofMessage|null|undefined} viewOnceMessageV2 + * @memberof proto.Message + * @instance */ - LocalizedName.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.lg != null && message.hasOwnProperty("lg")) - if (!$util.isString(message.lg)) - return "lg: string expected"; - if (message.lc != null && message.hasOwnProperty("lc")) - if (!$util.isString(message.lc)) - return "lc: string expected"; - if (message.verifiedName != null && message.hasOwnProperty("verifiedName")) - if (!$util.isString(message.verifiedName)) - return "verifiedName: string expected"; - return null; - }; + Message.prototype.viewOnceMessageV2 = null; /** - * Creates a LocalizedName message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.LocalizedName - * @static - * @param {Object.} object Plain object - * @returns {proto.LocalizedName} LocalizedName + * Message encReactionMessage. + * @member {proto.Message.IEncReactionMessage|null|undefined} encReactionMessage + * @memberof proto.Message + * @instance */ - LocalizedName.fromObject = function fromObject(object) { - if (object instanceof $root.proto.LocalizedName) - return object; - var message = new $root.proto.LocalizedName(); - if (object.lg != null) - message.lg = String(object.lg); - if (object.lc != null) - message.lc = String(object.lc); - if (object.verifiedName != null) - message.verifiedName = String(object.verifiedName); - return message; - }; + Message.prototype.encReactionMessage = null; /** - * Creates a plain object from a LocalizedName message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.LocalizedName - * @static - * @param {proto.LocalizedName} message LocalizedName - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Message editedMessage. + * @member {proto.Message.IFutureProofMessage|null|undefined} editedMessage + * @memberof proto.Message + * @instance */ - LocalizedName.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.lg = ""; - object.lc = ""; - object.verifiedName = ""; - } - if (message.lg != null && message.hasOwnProperty("lg")) - object.lg = message.lg; - if (message.lc != null && message.hasOwnProperty("lc")) - object.lc = message.lc; - if (message.verifiedName != null && message.hasOwnProperty("verifiedName")) - object.verifiedName = message.verifiedName; - return object; - }; + Message.prototype.editedMessage = null; /** - * Converts this LocalizedName to JSON. - * @function toJSON - * @memberof proto.LocalizedName + * Message viewOnceMessageV2Extension. + * @member {proto.Message.IFutureProofMessage|null|undefined} viewOnceMessageV2Extension + * @memberof proto.Message * @instance - * @returns {Object.} JSON object */ - LocalizedName.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return LocalizedName; - })(); - - proto.Location = (function() { + Message.prototype.viewOnceMessageV2Extension = null; /** - * Properties of a Location. - * @memberof proto - * @interface ILocation - * @property {number|null} [degreesLatitude] Location degreesLatitude - * @property {number|null} [degreesLongitude] Location degreesLongitude - * @property {string|null} [name] Location name + * Message pollCreationMessageV2. + * @member {proto.Message.IPollCreationMessage|null|undefined} pollCreationMessageV2 + * @memberof proto.Message + * @instance */ + Message.prototype.pollCreationMessageV2 = null; /** - * Constructs a new Location. - * @memberof proto - * @classdesc Represents a Location. - * @implements ILocation - * @constructor - * @param {proto.ILocation=} [properties] Properties to set + * Message scheduledCallCreationMessage. + * @member {proto.Message.IScheduledCallCreationMessage|null|undefined} scheduledCallCreationMessage + * @memberof proto.Message + * @instance */ - function Location(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + Message.prototype.scheduledCallCreationMessage = null; /** - * Location degreesLatitude. - * @member {number} degreesLatitude - * @memberof proto.Location + * Message groupMentionedMessage. + * @member {proto.Message.IFutureProofMessage|null|undefined} groupMentionedMessage + * @memberof proto.Message * @instance */ - Location.prototype.degreesLatitude = 0; + Message.prototype.groupMentionedMessage = null; /** - * Location degreesLongitude. - * @member {number} degreesLongitude - * @memberof proto.Location + * Message pinInChatMessage. + * @member {proto.Message.IPinInChatMessage|null|undefined} pinInChatMessage + * @memberof proto.Message * @instance */ - Location.prototype.degreesLongitude = 0; + Message.prototype.pinInChatMessage = null; /** - * Location name. - * @member {string} name - * @memberof proto.Location + * Message pollCreationMessageV3. + * @member {proto.Message.IPollCreationMessage|null|undefined} pollCreationMessageV3 + * @memberof proto.Message * @instance */ - Location.prototype.name = ""; + Message.prototype.pollCreationMessageV3 = null; /** - * Creates a new Location instance using the specified properties. - * @function create - * @memberof proto.Location - * @static - * @param {proto.ILocation=} [properties] Properties to set - * @returns {proto.Location} Location instance + * Message scheduledCallEditMessage. + * @member {proto.Message.IScheduledCallEditMessage|null|undefined} scheduledCallEditMessage + * @memberof proto.Message + * @instance */ - Location.create = function create(properties) { - return new Location(properties); - }; + Message.prototype.scheduledCallEditMessage = null; /** - * Encodes the specified Location message. Does not implicitly {@link proto.Location.verify|verify} messages. - * @function encode - * @memberof proto.Location - * @static - * @param {proto.ILocation} message Location message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Message ptvMessage. + * @member {proto.Message.IVideoMessage|null|undefined} ptvMessage + * @memberof proto.Message + * @instance */ - Location.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.degreesLatitude != null && Object.hasOwnProperty.call(message, "degreesLatitude")) - writer.uint32(/* id 1, wireType 1 =*/9).double(message.degreesLatitude); - if (message.degreesLongitude != null && Object.hasOwnProperty.call(message, "degreesLongitude")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.degreesLongitude); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); - return writer; - }; + Message.prototype.ptvMessage = null; /** - * Encodes the specified Location message, length delimited. Does not implicitly {@link proto.Location.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.Location - * @static - * @param {proto.ILocation} message Location message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Message botInvokeMessage. + * @member {proto.Message.IFutureProofMessage|null|undefined} botInvokeMessage + * @memberof proto.Message + * @instance */ - Location.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Message.prototype.botInvokeMessage = null; /** - * Decodes a Location message from the specified reader or buffer. - * @function decode - * @memberof proto.Location - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.Location} Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Message callLogMesssage. + * @member {proto.Message.ICallLogMessage|null|undefined} callLogMesssage + * @memberof proto.Message + * @instance */ - Location.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Location(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.degreesLatitude = reader.double(); - break; - case 2: - message.degreesLongitude = reader.double(); - break; - case 3: - message.name = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + Message.prototype.callLogMesssage = null; /** - * Decodes a Location message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.Location - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.Location} Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Message messageHistoryBundle. + * @member {proto.Message.IMessageHistoryBundle|null|undefined} messageHistoryBundle + * @memberof proto.Message + * @instance */ - Location.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + Message.prototype.messageHistoryBundle = null; /** - * Verifies a Location message. - * @function verify - * @memberof proto.Location - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Message encCommentMessage. + * @member {proto.Message.IEncCommentMessage|null|undefined} encCommentMessage + * @memberof proto.Message + * @instance */ - Location.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.degreesLatitude != null && message.hasOwnProperty("degreesLatitude")) - if (typeof message.degreesLatitude !== "number") - return "degreesLatitude: number expected"; - if (message.degreesLongitude != null && message.hasOwnProperty("degreesLongitude")) - if (typeof message.degreesLongitude !== "number") - return "degreesLongitude: number expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; + Message.prototype.encCommentMessage = null; /** - * Creates a Location message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.Location - * @static - * @param {Object.} object Plain object - * @returns {proto.Location} Location + * Message bcallMessage. + * @member {proto.Message.IBCallMessage|null|undefined} bcallMessage + * @memberof proto.Message + * @instance */ - Location.fromObject = function fromObject(object) { - if (object instanceof $root.proto.Location) - return object; - var message = new $root.proto.Location(); - if (object.degreesLatitude != null) - message.degreesLatitude = Number(object.degreesLatitude); - if (object.degreesLongitude != null) - message.degreesLongitude = Number(object.degreesLongitude); - if (object.name != null) - message.name = String(object.name); - return message; - }; + Message.prototype.bcallMessage = null; /** - * Creates a plain object from a Location message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.Location - * @static - * @param {proto.Location} message Location - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Message lottieStickerMessage. + * @member {proto.Message.IFutureProofMessage|null|undefined} lottieStickerMessage + * @memberof proto.Message + * @instance */ - Location.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.degreesLatitude = 0; - object.degreesLongitude = 0; - object.name = ""; - } - if (message.degreesLatitude != null && message.hasOwnProperty("degreesLatitude")) - object.degreesLatitude = options.json && !isFinite(message.degreesLatitude) ? String(message.degreesLatitude) : message.degreesLatitude; - if (message.degreesLongitude != null && message.hasOwnProperty("degreesLongitude")) - object.degreesLongitude = options.json && !isFinite(message.degreesLongitude) ? String(message.degreesLongitude) : message.degreesLongitude; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; + Message.prototype.lottieStickerMessage = null; /** - * Converts this Location to JSON. - * @function toJSON - * @memberof proto.Location + * Message eventMessage. + * @member {proto.Message.IEventMessage|null|undefined} eventMessage + * @memberof proto.Message * @instance - * @returns {Object.} JSON object */ - Location.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + Message.prototype.eventMessage = null; - return Location; - })(); + /** + * Message commentMessage. + * @member {proto.Message.ICommentMessage|null|undefined} commentMessage + * @memberof proto.Message + * @instance + */ + Message.prototype.commentMessage = null; - proto.MediaData = (function() { + /** + * Message newsletterAdminInviteMessage. + * @member {proto.Message.INewsletterAdminInviteMessage|null|undefined} newsletterAdminInviteMessage + * @memberof proto.Message + * @instance + */ + Message.prototype.newsletterAdminInviteMessage = null; /** - * Properties of a MediaData. - * @memberof proto - * @interface IMediaData - * @property {string|null} [localPath] MediaData localPath + * Message extendedTextMessageWithParentKey. + * @member {proto.Message.IExtendedTextMessageWithParentKey|null|undefined} extendedTextMessageWithParentKey + * @memberof proto.Message + * @instance */ + Message.prototype.extendedTextMessageWithParentKey = null; /** - * Constructs a new MediaData. - * @memberof proto - * @classdesc Represents a MediaData. - * @implements IMediaData - * @constructor - * @param {proto.IMediaData=} [properties] Properties to set + * Message placeholderMessage. + * @member {proto.Message.IPlaceholderMessage|null|undefined} placeholderMessage + * @memberof proto.Message + * @instance */ - function MediaData(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + Message.prototype.placeholderMessage = null; /** - * MediaData localPath. - * @member {string} localPath - * @memberof proto.MediaData + * Message encEventUpdateMessage. + * @member {proto.Message.IEncEventUpdateMessage|null|undefined} encEventUpdateMessage + * @memberof proto.Message * @instance */ - MediaData.prototype.localPath = ""; + Message.prototype.encEventUpdateMessage = null; /** - * Creates a new MediaData instance using the specified properties. + * Creates a new Message instance using the specified properties. * @function create - * @memberof proto.MediaData + * @memberof proto.Message * @static - * @param {proto.IMediaData=} [properties] Properties to set - * @returns {proto.MediaData} MediaData instance + * @param {proto.IMessage=} [properties] Properties to set + * @returns {proto.Message} Message instance */ - MediaData.create = function create(properties) { - return new MediaData(properties); + Message.create = function create(properties) { + return new Message(properties); }; /** - * Encodes the specified MediaData message. Does not implicitly {@link proto.MediaData.verify|verify} messages. + * Encodes the specified Message message. Does not implicitly {@link proto.Message.verify|verify} messages. * @function encode - * @memberof proto.MediaData + * @memberof proto.Message * @static - * @param {proto.IMediaData} message MediaData message or plain object to encode + * @param {proto.IMessage} message Message message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MediaData.encode = function encode(message, writer) { + Message.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.localPath != null && Object.hasOwnProperty.call(message, "localPath")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.localPath); + if (message.conversation != null && Object.hasOwnProperty.call(message, "conversation")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.conversation); + if (message.senderKeyDistributionMessage != null && Object.hasOwnProperty.call(message, "senderKeyDistributionMessage")) + $root.proto.Message.SenderKeyDistributionMessage.encode(message.senderKeyDistributionMessage, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.imageMessage != null && Object.hasOwnProperty.call(message, "imageMessage")) + $root.proto.Message.ImageMessage.encode(message.imageMessage, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.contactMessage != null && Object.hasOwnProperty.call(message, "contactMessage")) + $root.proto.Message.ContactMessage.encode(message.contactMessage, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.locationMessage != null && Object.hasOwnProperty.call(message, "locationMessage")) + $root.proto.Message.LocationMessage.encode(message.locationMessage, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.extendedTextMessage != null && Object.hasOwnProperty.call(message, "extendedTextMessage")) + $root.proto.Message.ExtendedTextMessage.encode(message.extendedTextMessage, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.documentMessage != null && Object.hasOwnProperty.call(message, "documentMessage")) + $root.proto.Message.DocumentMessage.encode(message.documentMessage, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.audioMessage != null && Object.hasOwnProperty.call(message, "audioMessage")) + $root.proto.Message.AudioMessage.encode(message.audioMessage, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.videoMessage != null && Object.hasOwnProperty.call(message, "videoMessage")) + $root.proto.Message.VideoMessage.encode(message.videoMessage, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.call != null && Object.hasOwnProperty.call(message, "call")) + $root.proto.Message.Call.encode(message.call, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.chat != null && Object.hasOwnProperty.call(message, "chat")) + $root.proto.Message.Chat.encode(message.chat, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.protocolMessage != null && Object.hasOwnProperty.call(message, "protocolMessage")) + $root.proto.Message.ProtocolMessage.encode(message.protocolMessage, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.contactsArrayMessage != null && Object.hasOwnProperty.call(message, "contactsArrayMessage")) + $root.proto.Message.ContactsArrayMessage.encode(message.contactsArrayMessage, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.highlyStructuredMessage != null && Object.hasOwnProperty.call(message, "highlyStructuredMessage")) + $root.proto.Message.HighlyStructuredMessage.encode(message.highlyStructuredMessage, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.fastRatchetKeySenderKeyDistributionMessage != null && Object.hasOwnProperty.call(message, "fastRatchetKeySenderKeyDistributionMessage")) + $root.proto.Message.SenderKeyDistributionMessage.encode(message.fastRatchetKeySenderKeyDistributionMessage, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.sendPaymentMessage != null && Object.hasOwnProperty.call(message, "sendPaymentMessage")) + $root.proto.Message.SendPaymentMessage.encode(message.sendPaymentMessage, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + if (message.liveLocationMessage != null && Object.hasOwnProperty.call(message, "liveLocationMessage")) + $root.proto.Message.LiveLocationMessage.encode(message.liveLocationMessage, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.requestPaymentMessage != null && Object.hasOwnProperty.call(message, "requestPaymentMessage")) + $root.proto.Message.RequestPaymentMessage.encode(message.requestPaymentMessage, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.declinePaymentRequestMessage != null && Object.hasOwnProperty.call(message, "declinePaymentRequestMessage")) + $root.proto.Message.DeclinePaymentRequestMessage.encode(message.declinePaymentRequestMessage, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.cancelPaymentRequestMessage != null && Object.hasOwnProperty.call(message, "cancelPaymentRequestMessage")) + $root.proto.Message.CancelPaymentRequestMessage.encode(message.cancelPaymentRequestMessage, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.templateMessage != null && Object.hasOwnProperty.call(message, "templateMessage")) + $root.proto.Message.TemplateMessage.encode(message.templateMessage, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); + if (message.stickerMessage != null && Object.hasOwnProperty.call(message, "stickerMessage")) + $root.proto.Message.StickerMessage.encode(message.stickerMessage, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); + if (message.groupInviteMessage != null && Object.hasOwnProperty.call(message, "groupInviteMessage")) + $root.proto.Message.GroupInviteMessage.encode(message.groupInviteMessage, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); + if (message.templateButtonReplyMessage != null && Object.hasOwnProperty.call(message, "templateButtonReplyMessage")) + $root.proto.Message.TemplateButtonReplyMessage.encode(message.templateButtonReplyMessage, writer.uint32(/* id 29, wireType 2 =*/234).fork()).ldelim(); + if (message.productMessage != null && Object.hasOwnProperty.call(message, "productMessage")) + $root.proto.Message.ProductMessage.encode(message.productMessage, writer.uint32(/* id 30, wireType 2 =*/242).fork()).ldelim(); + if (message.deviceSentMessage != null && Object.hasOwnProperty.call(message, "deviceSentMessage")) + $root.proto.Message.DeviceSentMessage.encode(message.deviceSentMessage, writer.uint32(/* id 31, wireType 2 =*/250).fork()).ldelim(); + if (message.messageContextInfo != null && Object.hasOwnProperty.call(message, "messageContextInfo")) + $root.proto.MessageContextInfo.encode(message.messageContextInfo, writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim(); + if (message.listMessage != null && Object.hasOwnProperty.call(message, "listMessage")) + $root.proto.Message.ListMessage.encode(message.listMessage, writer.uint32(/* id 36, wireType 2 =*/290).fork()).ldelim(); + if (message.viewOnceMessage != null && Object.hasOwnProperty.call(message, "viewOnceMessage")) + $root.proto.Message.FutureProofMessage.encode(message.viewOnceMessage, writer.uint32(/* id 37, wireType 2 =*/298).fork()).ldelim(); + if (message.orderMessage != null && Object.hasOwnProperty.call(message, "orderMessage")) + $root.proto.Message.OrderMessage.encode(message.orderMessage, writer.uint32(/* id 38, wireType 2 =*/306).fork()).ldelim(); + if (message.listResponseMessage != null && Object.hasOwnProperty.call(message, "listResponseMessage")) + $root.proto.Message.ListResponseMessage.encode(message.listResponseMessage, writer.uint32(/* id 39, wireType 2 =*/314).fork()).ldelim(); + if (message.ephemeralMessage != null && Object.hasOwnProperty.call(message, "ephemeralMessage")) + $root.proto.Message.FutureProofMessage.encode(message.ephemeralMessage, writer.uint32(/* id 40, wireType 2 =*/322).fork()).ldelim(); + if (message.invoiceMessage != null && Object.hasOwnProperty.call(message, "invoiceMessage")) + $root.proto.Message.InvoiceMessage.encode(message.invoiceMessage, writer.uint32(/* id 41, wireType 2 =*/330).fork()).ldelim(); + if (message.buttonsMessage != null && Object.hasOwnProperty.call(message, "buttonsMessage")) + $root.proto.Message.ButtonsMessage.encode(message.buttonsMessage, writer.uint32(/* id 42, wireType 2 =*/338).fork()).ldelim(); + if (message.buttonsResponseMessage != null && Object.hasOwnProperty.call(message, "buttonsResponseMessage")) + $root.proto.Message.ButtonsResponseMessage.encode(message.buttonsResponseMessage, writer.uint32(/* id 43, wireType 2 =*/346).fork()).ldelim(); + if (message.paymentInviteMessage != null && Object.hasOwnProperty.call(message, "paymentInviteMessage")) + $root.proto.Message.PaymentInviteMessage.encode(message.paymentInviteMessage, writer.uint32(/* id 44, wireType 2 =*/354).fork()).ldelim(); + if (message.interactiveMessage != null && Object.hasOwnProperty.call(message, "interactiveMessage")) + $root.proto.Message.InteractiveMessage.encode(message.interactiveMessage, writer.uint32(/* id 45, wireType 2 =*/362).fork()).ldelim(); + if (message.reactionMessage != null && Object.hasOwnProperty.call(message, "reactionMessage")) + $root.proto.Message.ReactionMessage.encode(message.reactionMessage, writer.uint32(/* id 46, wireType 2 =*/370).fork()).ldelim(); + if (message.stickerSyncRmrMessage != null && Object.hasOwnProperty.call(message, "stickerSyncRmrMessage")) + $root.proto.Message.StickerSyncRMRMessage.encode(message.stickerSyncRmrMessage, writer.uint32(/* id 47, wireType 2 =*/378).fork()).ldelim(); + if (message.interactiveResponseMessage != null && Object.hasOwnProperty.call(message, "interactiveResponseMessage")) + $root.proto.Message.InteractiveResponseMessage.encode(message.interactiveResponseMessage, writer.uint32(/* id 48, wireType 2 =*/386).fork()).ldelim(); + if (message.pollCreationMessage != null && Object.hasOwnProperty.call(message, "pollCreationMessage")) + $root.proto.Message.PollCreationMessage.encode(message.pollCreationMessage, writer.uint32(/* id 49, wireType 2 =*/394).fork()).ldelim(); + if (message.pollUpdateMessage != null && Object.hasOwnProperty.call(message, "pollUpdateMessage")) + $root.proto.Message.PollUpdateMessage.encode(message.pollUpdateMessage, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + if (message.keepInChatMessage != null && Object.hasOwnProperty.call(message, "keepInChatMessage")) + $root.proto.Message.KeepInChatMessage.encode(message.keepInChatMessage, writer.uint32(/* id 51, wireType 2 =*/410).fork()).ldelim(); + if (message.documentWithCaptionMessage != null && Object.hasOwnProperty.call(message, "documentWithCaptionMessage")) + $root.proto.Message.FutureProofMessage.encode(message.documentWithCaptionMessage, writer.uint32(/* id 53, wireType 2 =*/426).fork()).ldelim(); + if (message.requestPhoneNumberMessage != null && Object.hasOwnProperty.call(message, "requestPhoneNumberMessage")) + $root.proto.Message.RequestPhoneNumberMessage.encode(message.requestPhoneNumberMessage, writer.uint32(/* id 54, wireType 2 =*/434).fork()).ldelim(); + if (message.viewOnceMessageV2 != null && Object.hasOwnProperty.call(message, "viewOnceMessageV2")) + $root.proto.Message.FutureProofMessage.encode(message.viewOnceMessageV2, writer.uint32(/* id 55, wireType 2 =*/442).fork()).ldelim(); + if (message.encReactionMessage != null && Object.hasOwnProperty.call(message, "encReactionMessage")) + $root.proto.Message.EncReactionMessage.encode(message.encReactionMessage, writer.uint32(/* id 56, wireType 2 =*/450).fork()).ldelim(); + if (message.editedMessage != null && Object.hasOwnProperty.call(message, "editedMessage")) + $root.proto.Message.FutureProofMessage.encode(message.editedMessage, writer.uint32(/* id 58, wireType 2 =*/466).fork()).ldelim(); + if (message.viewOnceMessageV2Extension != null && Object.hasOwnProperty.call(message, "viewOnceMessageV2Extension")) + $root.proto.Message.FutureProofMessage.encode(message.viewOnceMessageV2Extension, writer.uint32(/* id 59, wireType 2 =*/474).fork()).ldelim(); + if (message.pollCreationMessageV2 != null && Object.hasOwnProperty.call(message, "pollCreationMessageV2")) + $root.proto.Message.PollCreationMessage.encode(message.pollCreationMessageV2, writer.uint32(/* id 60, wireType 2 =*/482).fork()).ldelim(); + if (message.scheduledCallCreationMessage != null && Object.hasOwnProperty.call(message, "scheduledCallCreationMessage")) + $root.proto.Message.ScheduledCallCreationMessage.encode(message.scheduledCallCreationMessage, writer.uint32(/* id 61, wireType 2 =*/490).fork()).ldelim(); + if (message.groupMentionedMessage != null && Object.hasOwnProperty.call(message, "groupMentionedMessage")) + $root.proto.Message.FutureProofMessage.encode(message.groupMentionedMessage, writer.uint32(/* id 62, wireType 2 =*/498).fork()).ldelim(); + if (message.pinInChatMessage != null && Object.hasOwnProperty.call(message, "pinInChatMessage")) + $root.proto.Message.PinInChatMessage.encode(message.pinInChatMessage, writer.uint32(/* id 63, wireType 2 =*/506).fork()).ldelim(); + if (message.pollCreationMessageV3 != null && Object.hasOwnProperty.call(message, "pollCreationMessageV3")) + $root.proto.Message.PollCreationMessage.encode(message.pollCreationMessageV3, writer.uint32(/* id 64, wireType 2 =*/514).fork()).ldelim(); + if (message.scheduledCallEditMessage != null && Object.hasOwnProperty.call(message, "scheduledCallEditMessage")) + $root.proto.Message.ScheduledCallEditMessage.encode(message.scheduledCallEditMessage, writer.uint32(/* id 65, wireType 2 =*/522).fork()).ldelim(); + if (message.ptvMessage != null && Object.hasOwnProperty.call(message, "ptvMessage")) + $root.proto.Message.VideoMessage.encode(message.ptvMessage, writer.uint32(/* id 66, wireType 2 =*/530).fork()).ldelim(); + if (message.botInvokeMessage != null && Object.hasOwnProperty.call(message, "botInvokeMessage")) + $root.proto.Message.FutureProofMessage.encode(message.botInvokeMessage, writer.uint32(/* id 67, wireType 2 =*/538).fork()).ldelim(); + if (message.callLogMesssage != null && Object.hasOwnProperty.call(message, "callLogMesssage")) + $root.proto.Message.CallLogMessage.encode(message.callLogMesssage, writer.uint32(/* id 69, wireType 2 =*/554).fork()).ldelim(); + if (message.messageHistoryBundle != null && Object.hasOwnProperty.call(message, "messageHistoryBundle")) + $root.proto.Message.MessageHistoryBundle.encode(message.messageHistoryBundle, writer.uint32(/* id 70, wireType 2 =*/562).fork()).ldelim(); + if (message.encCommentMessage != null && Object.hasOwnProperty.call(message, "encCommentMessage")) + $root.proto.Message.EncCommentMessage.encode(message.encCommentMessage, writer.uint32(/* id 71, wireType 2 =*/570).fork()).ldelim(); + if (message.bcallMessage != null && Object.hasOwnProperty.call(message, "bcallMessage")) + $root.proto.Message.BCallMessage.encode(message.bcallMessage, writer.uint32(/* id 72, wireType 2 =*/578).fork()).ldelim(); + if (message.lottieStickerMessage != null && Object.hasOwnProperty.call(message, "lottieStickerMessage")) + $root.proto.Message.FutureProofMessage.encode(message.lottieStickerMessage, writer.uint32(/* id 74, wireType 2 =*/594).fork()).ldelim(); + if (message.eventMessage != null && Object.hasOwnProperty.call(message, "eventMessage")) + $root.proto.Message.EventMessage.encode(message.eventMessage, writer.uint32(/* id 75, wireType 2 =*/602).fork()).ldelim(); + if (message.commentMessage != null && Object.hasOwnProperty.call(message, "commentMessage")) + $root.proto.Message.CommentMessage.encode(message.commentMessage, writer.uint32(/* id 77, wireType 2 =*/618).fork()).ldelim(); + if (message.newsletterAdminInviteMessage != null && Object.hasOwnProperty.call(message, "newsletterAdminInviteMessage")) + $root.proto.Message.NewsletterAdminInviteMessage.encode(message.newsletterAdminInviteMessage, writer.uint32(/* id 78, wireType 2 =*/626).fork()).ldelim(); + if (message.extendedTextMessageWithParentKey != null && Object.hasOwnProperty.call(message, "extendedTextMessageWithParentKey")) + $root.proto.Message.ExtendedTextMessageWithParentKey.encode(message.extendedTextMessageWithParentKey, writer.uint32(/* id 79, wireType 2 =*/634).fork()).ldelim(); + if (message.placeholderMessage != null && Object.hasOwnProperty.call(message, "placeholderMessage")) + $root.proto.Message.PlaceholderMessage.encode(message.placeholderMessage, writer.uint32(/* id 80, wireType 2 =*/642).fork()).ldelim(); + if (message.encEventUpdateMessage != null && Object.hasOwnProperty.call(message, "encEventUpdateMessage")) + $root.proto.Message.EncEventUpdateMessage.encode(message.encEventUpdateMessage, writer.uint32(/* id 81, wireType 2 =*/650).fork()).ldelim(); return writer; }; /** - * Encodes the specified MediaData message, length delimited. Does not implicitly {@link proto.MediaData.verify|verify} messages. + * Encodes the specified Message message, length delimited. Does not implicitly {@link proto.Message.verify|verify} messages. * @function encodeDelimited - * @memberof proto.MediaData + * @memberof proto.Message * @static - * @param {proto.IMediaData} message MediaData message or plain object to encode + * @param {proto.IMessage} message Message message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MediaData.encodeDelimited = function encodeDelimited(message, writer) { + Message.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MediaData message from the specified reader or buffer. + * Decodes a Message message from the specified reader or buffer. * @function decode - * @memberof proto.MediaData + * @memberof proto.Message * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {proto.MediaData} MediaData + * @returns {proto.Message} Message * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MediaData.decode = function decode(reader, length) { + Message.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.MediaData(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Message(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.localPath = reader.string(); + message.conversation = reader.string(); + break; + case 2: + message.senderKeyDistributionMessage = $root.proto.Message.SenderKeyDistributionMessage.decode(reader, reader.uint32()); + break; + case 3: + message.imageMessage = $root.proto.Message.ImageMessage.decode(reader, reader.uint32()); + break; + case 4: + message.contactMessage = $root.proto.Message.ContactMessage.decode(reader, reader.uint32()); + break; + case 5: + message.locationMessage = $root.proto.Message.LocationMessage.decode(reader, reader.uint32()); + break; + case 6: + message.extendedTextMessage = $root.proto.Message.ExtendedTextMessage.decode(reader, reader.uint32()); + break; + case 7: + message.documentMessage = $root.proto.Message.DocumentMessage.decode(reader, reader.uint32()); + break; + case 8: + message.audioMessage = $root.proto.Message.AudioMessage.decode(reader, reader.uint32()); + break; + case 9: + message.videoMessage = $root.proto.Message.VideoMessage.decode(reader, reader.uint32()); + break; + case 10: + message.call = $root.proto.Message.Call.decode(reader, reader.uint32()); + break; + case 11: + message.chat = $root.proto.Message.Chat.decode(reader, reader.uint32()); + break; + case 12: + message.protocolMessage = $root.proto.Message.ProtocolMessage.decode(reader, reader.uint32()); + break; + case 13: + message.contactsArrayMessage = $root.proto.Message.ContactsArrayMessage.decode(reader, reader.uint32()); + break; + case 14: + message.highlyStructuredMessage = $root.proto.Message.HighlyStructuredMessage.decode(reader, reader.uint32()); + break; + case 15: + message.fastRatchetKeySenderKeyDistributionMessage = $root.proto.Message.SenderKeyDistributionMessage.decode(reader, reader.uint32()); + break; + case 16: + message.sendPaymentMessage = $root.proto.Message.SendPaymentMessage.decode(reader, reader.uint32()); + break; + case 18: + message.liveLocationMessage = $root.proto.Message.LiveLocationMessage.decode(reader, reader.uint32()); + break; + case 22: + message.requestPaymentMessage = $root.proto.Message.RequestPaymentMessage.decode(reader, reader.uint32()); + break; + case 23: + message.declinePaymentRequestMessage = $root.proto.Message.DeclinePaymentRequestMessage.decode(reader, reader.uint32()); + break; + case 24: + message.cancelPaymentRequestMessage = $root.proto.Message.CancelPaymentRequestMessage.decode(reader, reader.uint32()); + break; + case 25: + message.templateMessage = $root.proto.Message.TemplateMessage.decode(reader, reader.uint32()); + break; + case 26: + message.stickerMessage = $root.proto.Message.StickerMessage.decode(reader, reader.uint32()); + break; + case 28: + message.groupInviteMessage = $root.proto.Message.GroupInviteMessage.decode(reader, reader.uint32()); + break; + case 29: + message.templateButtonReplyMessage = $root.proto.Message.TemplateButtonReplyMessage.decode(reader, reader.uint32()); + break; + case 30: + message.productMessage = $root.proto.Message.ProductMessage.decode(reader, reader.uint32()); + break; + case 31: + message.deviceSentMessage = $root.proto.Message.DeviceSentMessage.decode(reader, reader.uint32()); + break; + case 35: + message.messageContextInfo = $root.proto.MessageContextInfo.decode(reader, reader.uint32()); + break; + case 36: + message.listMessage = $root.proto.Message.ListMessage.decode(reader, reader.uint32()); + break; + case 37: + message.viewOnceMessage = $root.proto.Message.FutureProofMessage.decode(reader, reader.uint32()); + break; + case 38: + message.orderMessage = $root.proto.Message.OrderMessage.decode(reader, reader.uint32()); + break; + case 39: + message.listResponseMessage = $root.proto.Message.ListResponseMessage.decode(reader, reader.uint32()); + break; + case 40: + message.ephemeralMessage = $root.proto.Message.FutureProofMessage.decode(reader, reader.uint32()); + break; + case 41: + message.invoiceMessage = $root.proto.Message.InvoiceMessage.decode(reader, reader.uint32()); + break; + case 42: + message.buttonsMessage = $root.proto.Message.ButtonsMessage.decode(reader, reader.uint32()); + break; + case 43: + message.buttonsResponseMessage = $root.proto.Message.ButtonsResponseMessage.decode(reader, reader.uint32()); + break; + case 44: + message.paymentInviteMessage = $root.proto.Message.PaymentInviteMessage.decode(reader, reader.uint32()); + break; + case 45: + message.interactiveMessage = $root.proto.Message.InteractiveMessage.decode(reader, reader.uint32()); + break; + case 46: + message.reactionMessage = $root.proto.Message.ReactionMessage.decode(reader, reader.uint32()); + break; + case 47: + message.stickerSyncRmrMessage = $root.proto.Message.StickerSyncRMRMessage.decode(reader, reader.uint32()); + break; + case 48: + message.interactiveResponseMessage = $root.proto.Message.InteractiveResponseMessage.decode(reader, reader.uint32()); + break; + case 49: + message.pollCreationMessage = $root.proto.Message.PollCreationMessage.decode(reader, reader.uint32()); + break; + case 50: + message.pollUpdateMessage = $root.proto.Message.PollUpdateMessage.decode(reader, reader.uint32()); + break; + case 51: + message.keepInChatMessage = $root.proto.Message.KeepInChatMessage.decode(reader, reader.uint32()); + break; + case 53: + message.documentWithCaptionMessage = $root.proto.Message.FutureProofMessage.decode(reader, reader.uint32()); + break; + case 54: + message.requestPhoneNumberMessage = $root.proto.Message.RequestPhoneNumberMessage.decode(reader, reader.uint32()); + break; + case 55: + message.viewOnceMessageV2 = $root.proto.Message.FutureProofMessage.decode(reader, reader.uint32()); + break; + case 56: + message.encReactionMessage = $root.proto.Message.EncReactionMessage.decode(reader, reader.uint32()); + break; + case 58: + message.editedMessage = $root.proto.Message.FutureProofMessage.decode(reader, reader.uint32()); + break; + case 59: + message.viewOnceMessageV2Extension = $root.proto.Message.FutureProofMessage.decode(reader, reader.uint32()); + break; + case 60: + message.pollCreationMessageV2 = $root.proto.Message.PollCreationMessage.decode(reader, reader.uint32()); + break; + case 61: + message.scheduledCallCreationMessage = $root.proto.Message.ScheduledCallCreationMessage.decode(reader, reader.uint32()); + break; + case 62: + message.groupMentionedMessage = $root.proto.Message.FutureProofMessage.decode(reader, reader.uint32()); + break; + case 63: + message.pinInChatMessage = $root.proto.Message.PinInChatMessage.decode(reader, reader.uint32()); + break; + case 64: + message.pollCreationMessageV3 = $root.proto.Message.PollCreationMessage.decode(reader, reader.uint32()); + break; + case 65: + message.scheduledCallEditMessage = $root.proto.Message.ScheduledCallEditMessage.decode(reader, reader.uint32()); + break; + case 66: + message.ptvMessage = $root.proto.Message.VideoMessage.decode(reader, reader.uint32()); + break; + case 67: + message.botInvokeMessage = $root.proto.Message.FutureProofMessage.decode(reader, reader.uint32()); + break; + case 69: + message.callLogMesssage = $root.proto.Message.CallLogMessage.decode(reader, reader.uint32()); + break; + case 70: + message.messageHistoryBundle = $root.proto.Message.MessageHistoryBundle.decode(reader, reader.uint32()); + break; + case 71: + message.encCommentMessage = $root.proto.Message.EncCommentMessage.decode(reader, reader.uint32()); + break; + case 72: + message.bcallMessage = $root.proto.Message.BCallMessage.decode(reader, reader.uint32()); + break; + case 74: + message.lottieStickerMessage = $root.proto.Message.FutureProofMessage.decode(reader, reader.uint32()); + break; + case 75: + message.eventMessage = $root.proto.Message.EventMessage.decode(reader, reader.uint32()); + break; + case 77: + message.commentMessage = $root.proto.Message.CommentMessage.decode(reader, reader.uint32()); + break; + case 78: + message.newsletterAdminInviteMessage = $root.proto.Message.NewsletterAdminInviteMessage.decode(reader, reader.uint32()); + break; + case 79: + message.extendedTextMessageWithParentKey = $root.proto.Message.ExtendedTextMessageWithParentKey.decode(reader, reader.uint32()); + break; + case 80: + message.placeholderMessage = $root.proto.Message.PlaceholderMessage.decode(reader, reader.uint32()); + break; + case 81: + message.encEventUpdateMessage = $root.proto.Message.EncEventUpdateMessage.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -21568,2095 +27590,2358 @@ $root.proto = (function() { }; /** - * Decodes a MediaData message from the specified reader or buffer, length delimited. + * Decodes a Message message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof proto.MediaData + * @memberof proto.Message * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.MediaData} MediaData + * @returns {proto.Message} Message * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MediaData.decodeDelimited = function decodeDelimited(reader) { + Message.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MediaData message. + * Verifies a Message message. * @function verify - * @memberof proto.MediaData + * @memberof proto.Message * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MediaData.verify = function verify(message) { + Message.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.localPath != null && message.hasOwnProperty("localPath")) - if (!$util.isString(message.localPath)) - return "localPath: string expected"; - return null; - }; - - /** - * Creates a MediaData message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.MediaData - * @static - * @param {Object.} object Plain object - * @returns {proto.MediaData} MediaData - */ - MediaData.fromObject = function fromObject(object) { - if (object instanceof $root.proto.MediaData) - return object; - var message = new $root.proto.MediaData(); - if (object.localPath != null) - message.localPath = String(object.localPath); - return message; - }; - - /** - * Creates a plain object from a MediaData message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.MediaData - * @static - * @param {proto.MediaData} message MediaData - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MediaData.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.localPath = ""; - if (message.localPath != null && message.hasOwnProperty("localPath")) - object.localPath = message.localPath; - return object; - }; - - /** - * Converts this MediaData to JSON. - * @function toJSON - * @memberof proto.MediaData - * @instance - * @returns {Object.} JSON object - */ - MediaData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MediaData; - })(); - - proto.MediaRetryNotification = (function() { - - /** - * Properties of a MediaRetryNotification. - * @memberof proto - * @interface IMediaRetryNotification - * @property {string|null} [stanzaId] MediaRetryNotification stanzaId - * @property {string|null} [directPath] MediaRetryNotification directPath - * @property {proto.MediaRetryNotification.ResultType|null} [result] MediaRetryNotification result - */ - - /** - * Constructs a new MediaRetryNotification. - * @memberof proto - * @classdesc Represents a MediaRetryNotification. - * @implements IMediaRetryNotification - * @constructor - * @param {proto.IMediaRetryNotification=} [properties] Properties to set - */ - function MediaRetryNotification(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MediaRetryNotification stanzaId. - * @member {string} stanzaId - * @memberof proto.MediaRetryNotification - * @instance - */ - MediaRetryNotification.prototype.stanzaId = ""; - - /** - * MediaRetryNotification directPath. - * @member {string} directPath - * @memberof proto.MediaRetryNotification - * @instance - */ - MediaRetryNotification.prototype.directPath = ""; - - /** - * MediaRetryNotification result. - * @member {proto.MediaRetryNotification.ResultType} result - * @memberof proto.MediaRetryNotification - * @instance - */ - MediaRetryNotification.prototype.result = 0; - - /** - * Creates a new MediaRetryNotification instance using the specified properties. - * @function create - * @memberof proto.MediaRetryNotification - * @static - * @param {proto.IMediaRetryNotification=} [properties] Properties to set - * @returns {proto.MediaRetryNotification} MediaRetryNotification instance - */ - MediaRetryNotification.create = function create(properties) { - return new MediaRetryNotification(properties); - }; - - /** - * Encodes the specified MediaRetryNotification message. Does not implicitly {@link proto.MediaRetryNotification.verify|verify} messages. - * @function encode - * @memberof proto.MediaRetryNotification - * @static - * @param {proto.IMediaRetryNotification} message MediaRetryNotification message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MediaRetryNotification.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.stanzaId != null && Object.hasOwnProperty.call(message, "stanzaId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.stanzaId); - if (message.directPath != null && Object.hasOwnProperty.call(message, "directPath")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.directPath); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.result); - return writer; - }; - - /** - * Encodes the specified MediaRetryNotification message, length delimited. Does not implicitly {@link proto.MediaRetryNotification.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.MediaRetryNotification - * @static - * @param {proto.IMediaRetryNotification} message MediaRetryNotification message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MediaRetryNotification.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MediaRetryNotification message from the specified reader or buffer. - * @function decode - * @memberof proto.MediaRetryNotification - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.MediaRetryNotification} MediaRetryNotification - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MediaRetryNotification.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.MediaRetryNotification(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.stanzaId = reader.string(); - break; - case 2: - message.directPath = reader.string(); - break; - case 3: - message.result = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } + if (message.conversation != null && message.hasOwnProperty("conversation")) + if (!$util.isString(message.conversation)) + return "conversation: string expected"; + if (message.senderKeyDistributionMessage != null && message.hasOwnProperty("senderKeyDistributionMessage")) { + var error = $root.proto.Message.SenderKeyDistributionMessage.verify(message.senderKeyDistributionMessage); + if (error) + return "senderKeyDistributionMessage." + error; + } + if (message.imageMessage != null && message.hasOwnProperty("imageMessage")) { + var error = $root.proto.Message.ImageMessage.verify(message.imageMessage); + if (error) + return "imageMessage." + error; + } + if (message.contactMessage != null && message.hasOwnProperty("contactMessage")) { + var error = $root.proto.Message.ContactMessage.verify(message.contactMessage); + if (error) + return "contactMessage." + error; + } + if (message.locationMessage != null && message.hasOwnProperty("locationMessage")) { + var error = $root.proto.Message.LocationMessage.verify(message.locationMessage); + if (error) + return "locationMessage." + error; + } + if (message.extendedTextMessage != null && message.hasOwnProperty("extendedTextMessage")) { + var error = $root.proto.Message.ExtendedTextMessage.verify(message.extendedTextMessage); + if (error) + return "extendedTextMessage." + error; + } + if (message.documentMessage != null && message.hasOwnProperty("documentMessage")) { + var error = $root.proto.Message.DocumentMessage.verify(message.documentMessage); + if (error) + return "documentMessage." + error; + } + if (message.audioMessage != null && message.hasOwnProperty("audioMessage")) { + var error = $root.proto.Message.AudioMessage.verify(message.audioMessage); + if (error) + return "audioMessage." + error; + } + if (message.videoMessage != null && message.hasOwnProperty("videoMessage")) { + var error = $root.proto.Message.VideoMessage.verify(message.videoMessage); + if (error) + return "videoMessage." + error; + } + if (message.call != null && message.hasOwnProperty("call")) { + var error = $root.proto.Message.Call.verify(message.call); + if (error) + return "call." + error; + } + if (message.chat != null && message.hasOwnProperty("chat")) { + var error = $root.proto.Message.Chat.verify(message.chat); + if (error) + return "chat." + error; + } + if (message.protocolMessage != null && message.hasOwnProperty("protocolMessage")) { + var error = $root.proto.Message.ProtocolMessage.verify(message.protocolMessage); + if (error) + return "protocolMessage." + error; + } + if (message.contactsArrayMessage != null && message.hasOwnProperty("contactsArrayMessage")) { + var error = $root.proto.Message.ContactsArrayMessage.verify(message.contactsArrayMessage); + if (error) + return "contactsArrayMessage." + error; + } + if (message.highlyStructuredMessage != null && message.hasOwnProperty("highlyStructuredMessage")) { + var error = $root.proto.Message.HighlyStructuredMessage.verify(message.highlyStructuredMessage); + if (error) + return "highlyStructuredMessage." + error; + } + if (message.fastRatchetKeySenderKeyDistributionMessage != null && message.hasOwnProperty("fastRatchetKeySenderKeyDistributionMessage")) { + var error = $root.proto.Message.SenderKeyDistributionMessage.verify(message.fastRatchetKeySenderKeyDistributionMessage); + if (error) + return "fastRatchetKeySenderKeyDistributionMessage." + error; + } + if (message.sendPaymentMessage != null && message.hasOwnProperty("sendPaymentMessage")) { + var error = $root.proto.Message.SendPaymentMessage.verify(message.sendPaymentMessage); + if (error) + return "sendPaymentMessage." + error; + } + if (message.liveLocationMessage != null && message.hasOwnProperty("liveLocationMessage")) { + var error = $root.proto.Message.LiveLocationMessage.verify(message.liveLocationMessage); + if (error) + return "liveLocationMessage." + error; + } + if (message.requestPaymentMessage != null && message.hasOwnProperty("requestPaymentMessage")) { + var error = $root.proto.Message.RequestPaymentMessage.verify(message.requestPaymentMessage); + if (error) + return "requestPaymentMessage." + error; + } + if (message.declinePaymentRequestMessage != null && message.hasOwnProperty("declinePaymentRequestMessage")) { + var error = $root.proto.Message.DeclinePaymentRequestMessage.verify(message.declinePaymentRequestMessage); + if (error) + return "declinePaymentRequestMessage." + error; + } + if (message.cancelPaymentRequestMessage != null && message.hasOwnProperty("cancelPaymentRequestMessage")) { + var error = $root.proto.Message.CancelPaymentRequestMessage.verify(message.cancelPaymentRequestMessage); + if (error) + return "cancelPaymentRequestMessage." + error; + } + if (message.templateMessage != null && message.hasOwnProperty("templateMessage")) { + var error = $root.proto.Message.TemplateMessage.verify(message.templateMessage); + if (error) + return "templateMessage." + error; + } + if (message.stickerMessage != null && message.hasOwnProperty("stickerMessage")) { + var error = $root.proto.Message.StickerMessage.verify(message.stickerMessage); + if (error) + return "stickerMessage." + error; + } + if (message.groupInviteMessage != null && message.hasOwnProperty("groupInviteMessage")) { + var error = $root.proto.Message.GroupInviteMessage.verify(message.groupInviteMessage); + if (error) + return "groupInviteMessage." + error; + } + if (message.templateButtonReplyMessage != null && message.hasOwnProperty("templateButtonReplyMessage")) { + var error = $root.proto.Message.TemplateButtonReplyMessage.verify(message.templateButtonReplyMessage); + if (error) + return "templateButtonReplyMessage." + error; + } + if (message.productMessage != null && message.hasOwnProperty("productMessage")) { + var error = $root.proto.Message.ProductMessage.verify(message.productMessage); + if (error) + return "productMessage." + error; + } + if (message.deviceSentMessage != null && message.hasOwnProperty("deviceSentMessage")) { + var error = $root.proto.Message.DeviceSentMessage.verify(message.deviceSentMessage); + if (error) + return "deviceSentMessage." + error; + } + if (message.messageContextInfo != null && message.hasOwnProperty("messageContextInfo")) { + var error = $root.proto.MessageContextInfo.verify(message.messageContextInfo); + if (error) + return "messageContextInfo." + error; + } + if (message.listMessage != null && message.hasOwnProperty("listMessage")) { + var error = $root.proto.Message.ListMessage.verify(message.listMessage); + if (error) + return "listMessage." + error; + } + if (message.viewOnceMessage != null && message.hasOwnProperty("viewOnceMessage")) { + var error = $root.proto.Message.FutureProofMessage.verify(message.viewOnceMessage); + if (error) + return "viewOnceMessage." + error; + } + if (message.orderMessage != null && message.hasOwnProperty("orderMessage")) { + var error = $root.proto.Message.OrderMessage.verify(message.orderMessage); + if (error) + return "orderMessage." + error; + } + if (message.listResponseMessage != null && message.hasOwnProperty("listResponseMessage")) { + var error = $root.proto.Message.ListResponseMessage.verify(message.listResponseMessage); + if (error) + return "listResponseMessage." + error; + } + if (message.ephemeralMessage != null && message.hasOwnProperty("ephemeralMessage")) { + var error = $root.proto.Message.FutureProofMessage.verify(message.ephemeralMessage); + if (error) + return "ephemeralMessage." + error; + } + if (message.invoiceMessage != null && message.hasOwnProperty("invoiceMessage")) { + var error = $root.proto.Message.InvoiceMessage.verify(message.invoiceMessage); + if (error) + return "invoiceMessage." + error; + } + if (message.buttonsMessage != null && message.hasOwnProperty("buttonsMessage")) { + var error = $root.proto.Message.ButtonsMessage.verify(message.buttonsMessage); + if (error) + return "buttonsMessage." + error; + } + if (message.buttonsResponseMessage != null && message.hasOwnProperty("buttonsResponseMessage")) { + var error = $root.proto.Message.ButtonsResponseMessage.verify(message.buttonsResponseMessage); + if (error) + return "buttonsResponseMessage." + error; + } + if (message.paymentInviteMessage != null && message.hasOwnProperty("paymentInviteMessage")) { + var error = $root.proto.Message.PaymentInviteMessage.verify(message.paymentInviteMessage); + if (error) + return "paymentInviteMessage." + error; + } + if (message.interactiveMessage != null && message.hasOwnProperty("interactiveMessage")) { + var error = $root.proto.Message.InteractiveMessage.verify(message.interactiveMessage); + if (error) + return "interactiveMessage." + error; + } + if (message.reactionMessage != null && message.hasOwnProperty("reactionMessage")) { + var error = $root.proto.Message.ReactionMessage.verify(message.reactionMessage); + if (error) + return "reactionMessage." + error; + } + if (message.stickerSyncRmrMessage != null && message.hasOwnProperty("stickerSyncRmrMessage")) { + var error = $root.proto.Message.StickerSyncRMRMessage.verify(message.stickerSyncRmrMessage); + if (error) + return "stickerSyncRmrMessage." + error; + } + if (message.interactiveResponseMessage != null && message.hasOwnProperty("interactiveResponseMessage")) { + var error = $root.proto.Message.InteractiveResponseMessage.verify(message.interactiveResponseMessage); + if (error) + return "interactiveResponseMessage." + error; + } + if (message.pollCreationMessage != null && message.hasOwnProperty("pollCreationMessage")) { + var error = $root.proto.Message.PollCreationMessage.verify(message.pollCreationMessage); + if (error) + return "pollCreationMessage." + error; + } + if (message.pollUpdateMessage != null && message.hasOwnProperty("pollUpdateMessage")) { + var error = $root.proto.Message.PollUpdateMessage.verify(message.pollUpdateMessage); + if (error) + return "pollUpdateMessage." + error; + } + if (message.keepInChatMessage != null && message.hasOwnProperty("keepInChatMessage")) { + var error = $root.proto.Message.KeepInChatMessage.verify(message.keepInChatMessage); + if (error) + return "keepInChatMessage." + error; + } + if (message.documentWithCaptionMessage != null && message.hasOwnProperty("documentWithCaptionMessage")) { + var error = $root.proto.Message.FutureProofMessage.verify(message.documentWithCaptionMessage); + if (error) + return "documentWithCaptionMessage." + error; + } + if (message.requestPhoneNumberMessage != null && message.hasOwnProperty("requestPhoneNumberMessage")) { + var error = $root.proto.Message.RequestPhoneNumberMessage.verify(message.requestPhoneNumberMessage); + if (error) + return "requestPhoneNumberMessage." + error; + } + if (message.viewOnceMessageV2 != null && message.hasOwnProperty("viewOnceMessageV2")) { + var error = $root.proto.Message.FutureProofMessage.verify(message.viewOnceMessageV2); + if (error) + return "viewOnceMessageV2." + error; + } + if (message.encReactionMessage != null && message.hasOwnProperty("encReactionMessage")) { + var error = $root.proto.Message.EncReactionMessage.verify(message.encReactionMessage); + if (error) + return "encReactionMessage." + error; + } + if (message.editedMessage != null && message.hasOwnProperty("editedMessage")) { + var error = $root.proto.Message.FutureProofMessage.verify(message.editedMessage); + if (error) + return "editedMessage." + error; + } + if (message.viewOnceMessageV2Extension != null && message.hasOwnProperty("viewOnceMessageV2Extension")) { + var error = $root.proto.Message.FutureProofMessage.verify(message.viewOnceMessageV2Extension); + if (error) + return "viewOnceMessageV2Extension." + error; + } + if (message.pollCreationMessageV2 != null && message.hasOwnProperty("pollCreationMessageV2")) { + var error = $root.proto.Message.PollCreationMessage.verify(message.pollCreationMessageV2); + if (error) + return "pollCreationMessageV2." + error; + } + if (message.scheduledCallCreationMessage != null && message.hasOwnProperty("scheduledCallCreationMessage")) { + var error = $root.proto.Message.ScheduledCallCreationMessage.verify(message.scheduledCallCreationMessage); + if (error) + return "scheduledCallCreationMessage." + error; + } + if (message.groupMentionedMessage != null && message.hasOwnProperty("groupMentionedMessage")) { + var error = $root.proto.Message.FutureProofMessage.verify(message.groupMentionedMessage); + if (error) + return "groupMentionedMessage." + error; + } + if (message.pinInChatMessage != null && message.hasOwnProperty("pinInChatMessage")) { + var error = $root.proto.Message.PinInChatMessage.verify(message.pinInChatMessage); + if (error) + return "pinInChatMessage." + error; + } + if (message.pollCreationMessageV3 != null && message.hasOwnProperty("pollCreationMessageV3")) { + var error = $root.proto.Message.PollCreationMessage.verify(message.pollCreationMessageV3); + if (error) + return "pollCreationMessageV3." + error; + } + if (message.scheduledCallEditMessage != null && message.hasOwnProperty("scheduledCallEditMessage")) { + var error = $root.proto.Message.ScheduledCallEditMessage.verify(message.scheduledCallEditMessage); + if (error) + return "scheduledCallEditMessage." + error; + } + if (message.ptvMessage != null && message.hasOwnProperty("ptvMessage")) { + var error = $root.proto.Message.VideoMessage.verify(message.ptvMessage); + if (error) + return "ptvMessage." + error; + } + if (message.botInvokeMessage != null && message.hasOwnProperty("botInvokeMessage")) { + var error = $root.proto.Message.FutureProofMessage.verify(message.botInvokeMessage); + if (error) + return "botInvokeMessage." + error; + } + if (message.callLogMesssage != null && message.hasOwnProperty("callLogMesssage")) { + var error = $root.proto.Message.CallLogMessage.verify(message.callLogMesssage); + if (error) + return "callLogMesssage." + error; + } + if (message.messageHistoryBundle != null && message.hasOwnProperty("messageHistoryBundle")) { + var error = $root.proto.Message.MessageHistoryBundle.verify(message.messageHistoryBundle); + if (error) + return "messageHistoryBundle." + error; + } + if (message.encCommentMessage != null && message.hasOwnProperty("encCommentMessage")) { + var error = $root.proto.Message.EncCommentMessage.verify(message.encCommentMessage); + if (error) + return "encCommentMessage." + error; + } + if (message.bcallMessage != null && message.hasOwnProperty("bcallMessage")) { + var error = $root.proto.Message.BCallMessage.verify(message.bcallMessage); + if (error) + return "bcallMessage." + error; + } + if (message.lottieStickerMessage != null && message.hasOwnProperty("lottieStickerMessage")) { + var error = $root.proto.Message.FutureProofMessage.verify(message.lottieStickerMessage); + if (error) + return "lottieStickerMessage." + error; + } + if (message.eventMessage != null && message.hasOwnProperty("eventMessage")) { + var error = $root.proto.Message.EventMessage.verify(message.eventMessage); + if (error) + return "eventMessage." + error; + } + if (message.commentMessage != null && message.hasOwnProperty("commentMessage")) { + var error = $root.proto.Message.CommentMessage.verify(message.commentMessage); + if (error) + return "commentMessage." + error; + } + if (message.newsletterAdminInviteMessage != null && message.hasOwnProperty("newsletterAdminInviteMessage")) { + var error = $root.proto.Message.NewsletterAdminInviteMessage.verify(message.newsletterAdminInviteMessage); + if (error) + return "newsletterAdminInviteMessage." + error; + } + if (message.extendedTextMessageWithParentKey != null && message.hasOwnProperty("extendedTextMessageWithParentKey")) { + var error = $root.proto.Message.ExtendedTextMessageWithParentKey.verify(message.extendedTextMessageWithParentKey); + if (error) + return "extendedTextMessageWithParentKey." + error; + } + if (message.placeholderMessage != null && message.hasOwnProperty("placeholderMessage")) { + var error = $root.proto.Message.PlaceholderMessage.verify(message.placeholderMessage); + if (error) + return "placeholderMessage." + error; + } + if (message.encEventUpdateMessage != null && message.hasOwnProperty("encEventUpdateMessage")) { + var error = $root.proto.Message.EncEventUpdateMessage.verify(message.encEventUpdateMessage); + if (error) + return "encEventUpdateMessage." + error; } - return message; - }; - - /** - * Decodes a MediaRetryNotification message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.MediaRetryNotification - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.MediaRetryNotification} MediaRetryNotification - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MediaRetryNotification.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MediaRetryNotification message. - * @function verify - * @memberof proto.MediaRetryNotification - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MediaRetryNotification.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.stanzaId != null && message.hasOwnProperty("stanzaId")) - if (!$util.isString(message.stanzaId)) - return "stanzaId: string expected"; - if (message.directPath != null && message.hasOwnProperty("directPath")) - if (!$util.isString(message.directPath)) - return "directPath: string expected"; - if (message.result != null && message.hasOwnProperty("result")) - switch (message.result) { - default: - return "result: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } return null; }; /** - * Creates a MediaRetryNotification message from a plain object. Also converts values to their respective internal types. + * Creates a Message message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof proto.MediaRetryNotification + * @memberof proto.Message * @static * @param {Object.} object Plain object - * @returns {proto.MediaRetryNotification} MediaRetryNotification + * @returns {proto.Message} Message */ - MediaRetryNotification.fromObject = function fromObject(object) { - if (object instanceof $root.proto.MediaRetryNotification) + Message.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message) return object; - var message = new $root.proto.MediaRetryNotification(); - if (object.stanzaId != null) - message.stanzaId = String(object.stanzaId); - if (object.directPath != null) - message.directPath = String(object.directPath); - switch (object.result) { - case "GENERAL_ERROR": - case 0: - message.result = 0; - break; - case "SUCCESS": - case 1: - message.result = 1; - break; - case "NOT_FOUND": - case 2: - message.result = 2; - break; - case "DECRYPTION_ERROR": - case 3: - message.result = 3; - break; + var message = new $root.proto.Message(); + if (object.conversation != null) + message.conversation = String(object.conversation); + if (object.senderKeyDistributionMessage != null) { + if (typeof object.senderKeyDistributionMessage !== "object") + throw TypeError(".proto.Message.senderKeyDistributionMessage: object expected"); + message.senderKeyDistributionMessage = $root.proto.Message.SenderKeyDistributionMessage.fromObject(object.senderKeyDistributionMessage); + } + if (object.imageMessage != null) { + if (typeof object.imageMessage !== "object") + throw TypeError(".proto.Message.imageMessage: object expected"); + message.imageMessage = $root.proto.Message.ImageMessage.fromObject(object.imageMessage); + } + if (object.contactMessage != null) { + if (typeof object.contactMessage !== "object") + throw TypeError(".proto.Message.contactMessage: object expected"); + message.contactMessage = $root.proto.Message.ContactMessage.fromObject(object.contactMessage); + } + if (object.locationMessage != null) { + if (typeof object.locationMessage !== "object") + throw TypeError(".proto.Message.locationMessage: object expected"); + message.locationMessage = $root.proto.Message.LocationMessage.fromObject(object.locationMessage); + } + if (object.extendedTextMessage != null) { + if (typeof object.extendedTextMessage !== "object") + throw TypeError(".proto.Message.extendedTextMessage: object expected"); + message.extendedTextMessage = $root.proto.Message.ExtendedTextMessage.fromObject(object.extendedTextMessage); + } + if (object.documentMessage != null) { + if (typeof object.documentMessage !== "object") + throw TypeError(".proto.Message.documentMessage: object expected"); + message.documentMessage = $root.proto.Message.DocumentMessage.fromObject(object.documentMessage); + } + if (object.audioMessage != null) { + if (typeof object.audioMessage !== "object") + throw TypeError(".proto.Message.audioMessage: object expected"); + message.audioMessage = $root.proto.Message.AudioMessage.fromObject(object.audioMessage); + } + if (object.videoMessage != null) { + if (typeof object.videoMessage !== "object") + throw TypeError(".proto.Message.videoMessage: object expected"); + message.videoMessage = $root.proto.Message.VideoMessage.fromObject(object.videoMessage); + } + if (object.call != null) { + if (typeof object.call !== "object") + throw TypeError(".proto.Message.call: object expected"); + message.call = $root.proto.Message.Call.fromObject(object.call); + } + if (object.chat != null) { + if (typeof object.chat !== "object") + throw TypeError(".proto.Message.chat: object expected"); + message.chat = $root.proto.Message.Chat.fromObject(object.chat); + } + if (object.protocolMessage != null) { + if (typeof object.protocolMessage !== "object") + throw TypeError(".proto.Message.protocolMessage: object expected"); + message.protocolMessage = $root.proto.Message.ProtocolMessage.fromObject(object.protocolMessage); + } + if (object.contactsArrayMessage != null) { + if (typeof object.contactsArrayMessage !== "object") + throw TypeError(".proto.Message.contactsArrayMessage: object expected"); + message.contactsArrayMessage = $root.proto.Message.ContactsArrayMessage.fromObject(object.contactsArrayMessage); + } + if (object.highlyStructuredMessage != null) { + if (typeof object.highlyStructuredMessage !== "object") + throw TypeError(".proto.Message.highlyStructuredMessage: object expected"); + message.highlyStructuredMessage = $root.proto.Message.HighlyStructuredMessage.fromObject(object.highlyStructuredMessage); + } + if (object.fastRatchetKeySenderKeyDistributionMessage != null) { + if (typeof object.fastRatchetKeySenderKeyDistributionMessage !== "object") + throw TypeError(".proto.Message.fastRatchetKeySenderKeyDistributionMessage: object expected"); + message.fastRatchetKeySenderKeyDistributionMessage = $root.proto.Message.SenderKeyDistributionMessage.fromObject(object.fastRatchetKeySenderKeyDistributionMessage); + } + if (object.sendPaymentMessage != null) { + if (typeof object.sendPaymentMessage !== "object") + throw TypeError(".proto.Message.sendPaymentMessage: object expected"); + message.sendPaymentMessage = $root.proto.Message.SendPaymentMessage.fromObject(object.sendPaymentMessage); + } + if (object.liveLocationMessage != null) { + if (typeof object.liveLocationMessage !== "object") + throw TypeError(".proto.Message.liveLocationMessage: object expected"); + message.liveLocationMessage = $root.proto.Message.LiveLocationMessage.fromObject(object.liveLocationMessage); + } + if (object.requestPaymentMessage != null) { + if (typeof object.requestPaymentMessage !== "object") + throw TypeError(".proto.Message.requestPaymentMessage: object expected"); + message.requestPaymentMessage = $root.proto.Message.RequestPaymentMessage.fromObject(object.requestPaymentMessage); + } + if (object.declinePaymentRequestMessage != null) { + if (typeof object.declinePaymentRequestMessage !== "object") + throw TypeError(".proto.Message.declinePaymentRequestMessage: object expected"); + message.declinePaymentRequestMessage = $root.proto.Message.DeclinePaymentRequestMessage.fromObject(object.declinePaymentRequestMessage); + } + if (object.cancelPaymentRequestMessage != null) { + if (typeof object.cancelPaymentRequestMessage !== "object") + throw TypeError(".proto.Message.cancelPaymentRequestMessage: object expected"); + message.cancelPaymentRequestMessage = $root.proto.Message.CancelPaymentRequestMessage.fromObject(object.cancelPaymentRequestMessage); + } + if (object.templateMessage != null) { + if (typeof object.templateMessage !== "object") + throw TypeError(".proto.Message.templateMessage: object expected"); + message.templateMessage = $root.proto.Message.TemplateMessage.fromObject(object.templateMessage); + } + if (object.stickerMessage != null) { + if (typeof object.stickerMessage !== "object") + throw TypeError(".proto.Message.stickerMessage: object expected"); + message.stickerMessage = $root.proto.Message.StickerMessage.fromObject(object.stickerMessage); + } + if (object.groupInviteMessage != null) { + if (typeof object.groupInviteMessage !== "object") + throw TypeError(".proto.Message.groupInviteMessage: object expected"); + message.groupInviteMessage = $root.proto.Message.GroupInviteMessage.fromObject(object.groupInviteMessage); + } + if (object.templateButtonReplyMessage != null) { + if (typeof object.templateButtonReplyMessage !== "object") + throw TypeError(".proto.Message.templateButtonReplyMessage: object expected"); + message.templateButtonReplyMessage = $root.proto.Message.TemplateButtonReplyMessage.fromObject(object.templateButtonReplyMessage); + } + if (object.productMessage != null) { + if (typeof object.productMessage !== "object") + throw TypeError(".proto.Message.productMessage: object expected"); + message.productMessage = $root.proto.Message.ProductMessage.fromObject(object.productMessage); + } + if (object.deviceSentMessage != null) { + if (typeof object.deviceSentMessage !== "object") + throw TypeError(".proto.Message.deviceSentMessage: object expected"); + message.deviceSentMessage = $root.proto.Message.DeviceSentMessage.fromObject(object.deviceSentMessage); + } + if (object.messageContextInfo != null) { + if (typeof object.messageContextInfo !== "object") + throw TypeError(".proto.Message.messageContextInfo: object expected"); + message.messageContextInfo = $root.proto.MessageContextInfo.fromObject(object.messageContextInfo); + } + if (object.listMessage != null) { + if (typeof object.listMessage !== "object") + throw TypeError(".proto.Message.listMessage: object expected"); + message.listMessage = $root.proto.Message.ListMessage.fromObject(object.listMessage); + } + if (object.viewOnceMessage != null) { + if (typeof object.viewOnceMessage !== "object") + throw TypeError(".proto.Message.viewOnceMessage: object expected"); + message.viewOnceMessage = $root.proto.Message.FutureProofMessage.fromObject(object.viewOnceMessage); + } + if (object.orderMessage != null) { + if (typeof object.orderMessage !== "object") + throw TypeError(".proto.Message.orderMessage: object expected"); + message.orderMessage = $root.proto.Message.OrderMessage.fromObject(object.orderMessage); + } + if (object.listResponseMessage != null) { + if (typeof object.listResponseMessage !== "object") + throw TypeError(".proto.Message.listResponseMessage: object expected"); + message.listResponseMessage = $root.proto.Message.ListResponseMessage.fromObject(object.listResponseMessage); + } + if (object.ephemeralMessage != null) { + if (typeof object.ephemeralMessage !== "object") + throw TypeError(".proto.Message.ephemeralMessage: object expected"); + message.ephemeralMessage = $root.proto.Message.FutureProofMessage.fromObject(object.ephemeralMessage); + } + if (object.invoiceMessage != null) { + if (typeof object.invoiceMessage !== "object") + throw TypeError(".proto.Message.invoiceMessage: object expected"); + message.invoiceMessage = $root.proto.Message.InvoiceMessage.fromObject(object.invoiceMessage); + } + if (object.buttonsMessage != null) { + if (typeof object.buttonsMessage !== "object") + throw TypeError(".proto.Message.buttonsMessage: object expected"); + message.buttonsMessage = $root.proto.Message.ButtonsMessage.fromObject(object.buttonsMessage); + } + if (object.buttonsResponseMessage != null) { + if (typeof object.buttonsResponseMessage !== "object") + throw TypeError(".proto.Message.buttonsResponseMessage: object expected"); + message.buttonsResponseMessage = $root.proto.Message.ButtonsResponseMessage.fromObject(object.buttonsResponseMessage); + } + if (object.paymentInviteMessage != null) { + if (typeof object.paymentInviteMessage !== "object") + throw TypeError(".proto.Message.paymentInviteMessage: object expected"); + message.paymentInviteMessage = $root.proto.Message.PaymentInviteMessage.fromObject(object.paymentInviteMessage); + } + if (object.interactiveMessage != null) { + if (typeof object.interactiveMessage !== "object") + throw TypeError(".proto.Message.interactiveMessage: object expected"); + message.interactiveMessage = $root.proto.Message.InteractiveMessage.fromObject(object.interactiveMessage); + } + if (object.reactionMessage != null) { + if (typeof object.reactionMessage !== "object") + throw TypeError(".proto.Message.reactionMessage: object expected"); + message.reactionMessage = $root.proto.Message.ReactionMessage.fromObject(object.reactionMessage); + } + if (object.stickerSyncRmrMessage != null) { + if (typeof object.stickerSyncRmrMessage !== "object") + throw TypeError(".proto.Message.stickerSyncRmrMessage: object expected"); + message.stickerSyncRmrMessage = $root.proto.Message.StickerSyncRMRMessage.fromObject(object.stickerSyncRmrMessage); + } + if (object.interactiveResponseMessage != null) { + if (typeof object.interactiveResponseMessage !== "object") + throw TypeError(".proto.Message.interactiveResponseMessage: object expected"); + message.interactiveResponseMessage = $root.proto.Message.InteractiveResponseMessage.fromObject(object.interactiveResponseMessage); + } + if (object.pollCreationMessage != null) { + if (typeof object.pollCreationMessage !== "object") + throw TypeError(".proto.Message.pollCreationMessage: object expected"); + message.pollCreationMessage = $root.proto.Message.PollCreationMessage.fromObject(object.pollCreationMessage); + } + if (object.pollUpdateMessage != null) { + if (typeof object.pollUpdateMessage !== "object") + throw TypeError(".proto.Message.pollUpdateMessage: object expected"); + message.pollUpdateMessage = $root.proto.Message.PollUpdateMessage.fromObject(object.pollUpdateMessage); + } + if (object.keepInChatMessage != null) { + if (typeof object.keepInChatMessage !== "object") + throw TypeError(".proto.Message.keepInChatMessage: object expected"); + message.keepInChatMessage = $root.proto.Message.KeepInChatMessage.fromObject(object.keepInChatMessage); + } + if (object.documentWithCaptionMessage != null) { + if (typeof object.documentWithCaptionMessage !== "object") + throw TypeError(".proto.Message.documentWithCaptionMessage: object expected"); + message.documentWithCaptionMessage = $root.proto.Message.FutureProofMessage.fromObject(object.documentWithCaptionMessage); + } + if (object.requestPhoneNumberMessage != null) { + if (typeof object.requestPhoneNumberMessage !== "object") + throw TypeError(".proto.Message.requestPhoneNumberMessage: object expected"); + message.requestPhoneNumberMessage = $root.proto.Message.RequestPhoneNumberMessage.fromObject(object.requestPhoneNumberMessage); + } + if (object.viewOnceMessageV2 != null) { + if (typeof object.viewOnceMessageV2 !== "object") + throw TypeError(".proto.Message.viewOnceMessageV2: object expected"); + message.viewOnceMessageV2 = $root.proto.Message.FutureProofMessage.fromObject(object.viewOnceMessageV2); + } + if (object.encReactionMessage != null) { + if (typeof object.encReactionMessage !== "object") + throw TypeError(".proto.Message.encReactionMessage: object expected"); + message.encReactionMessage = $root.proto.Message.EncReactionMessage.fromObject(object.encReactionMessage); + } + if (object.editedMessage != null) { + if (typeof object.editedMessage !== "object") + throw TypeError(".proto.Message.editedMessage: object expected"); + message.editedMessage = $root.proto.Message.FutureProofMessage.fromObject(object.editedMessage); + } + if (object.viewOnceMessageV2Extension != null) { + if (typeof object.viewOnceMessageV2Extension !== "object") + throw TypeError(".proto.Message.viewOnceMessageV2Extension: object expected"); + message.viewOnceMessageV2Extension = $root.proto.Message.FutureProofMessage.fromObject(object.viewOnceMessageV2Extension); + } + if (object.pollCreationMessageV2 != null) { + if (typeof object.pollCreationMessageV2 !== "object") + throw TypeError(".proto.Message.pollCreationMessageV2: object expected"); + message.pollCreationMessageV2 = $root.proto.Message.PollCreationMessage.fromObject(object.pollCreationMessageV2); + } + if (object.scheduledCallCreationMessage != null) { + if (typeof object.scheduledCallCreationMessage !== "object") + throw TypeError(".proto.Message.scheduledCallCreationMessage: object expected"); + message.scheduledCallCreationMessage = $root.proto.Message.ScheduledCallCreationMessage.fromObject(object.scheduledCallCreationMessage); + } + if (object.groupMentionedMessage != null) { + if (typeof object.groupMentionedMessage !== "object") + throw TypeError(".proto.Message.groupMentionedMessage: object expected"); + message.groupMentionedMessage = $root.proto.Message.FutureProofMessage.fromObject(object.groupMentionedMessage); + } + if (object.pinInChatMessage != null) { + if (typeof object.pinInChatMessage !== "object") + throw TypeError(".proto.Message.pinInChatMessage: object expected"); + message.pinInChatMessage = $root.proto.Message.PinInChatMessage.fromObject(object.pinInChatMessage); + } + if (object.pollCreationMessageV3 != null) { + if (typeof object.pollCreationMessageV3 !== "object") + throw TypeError(".proto.Message.pollCreationMessageV3: object expected"); + message.pollCreationMessageV3 = $root.proto.Message.PollCreationMessage.fromObject(object.pollCreationMessageV3); + } + if (object.scheduledCallEditMessage != null) { + if (typeof object.scheduledCallEditMessage !== "object") + throw TypeError(".proto.Message.scheduledCallEditMessage: object expected"); + message.scheduledCallEditMessage = $root.proto.Message.ScheduledCallEditMessage.fromObject(object.scheduledCallEditMessage); + } + if (object.ptvMessage != null) { + if (typeof object.ptvMessage !== "object") + throw TypeError(".proto.Message.ptvMessage: object expected"); + message.ptvMessage = $root.proto.Message.VideoMessage.fromObject(object.ptvMessage); + } + if (object.botInvokeMessage != null) { + if (typeof object.botInvokeMessage !== "object") + throw TypeError(".proto.Message.botInvokeMessage: object expected"); + message.botInvokeMessage = $root.proto.Message.FutureProofMessage.fromObject(object.botInvokeMessage); + } + if (object.callLogMesssage != null) { + if (typeof object.callLogMesssage !== "object") + throw TypeError(".proto.Message.callLogMesssage: object expected"); + message.callLogMesssage = $root.proto.Message.CallLogMessage.fromObject(object.callLogMesssage); + } + if (object.messageHistoryBundle != null) { + if (typeof object.messageHistoryBundle !== "object") + throw TypeError(".proto.Message.messageHistoryBundle: object expected"); + message.messageHistoryBundle = $root.proto.Message.MessageHistoryBundle.fromObject(object.messageHistoryBundle); + } + if (object.encCommentMessage != null) { + if (typeof object.encCommentMessage !== "object") + throw TypeError(".proto.Message.encCommentMessage: object expected"); + message.encCommentMessage = $root.proto.Message.EncCommentMessage.fromObject(object.encCommentMessage); + } + if (object.bcallMessage != null) { + if (typeof object.bcallMessage !== "object") + throw TypeError(".proto.Message.bcallMessage: object expected"); + message.bcallMessage = $root.proto.Message.BCallMessage.fromObject(object.bcallMessage); + } + if (object.lottieStickerMessage != null) { + if (typeof object.lottieStickerMessage !== "object") + throw TypeError(".proto.Message.lottieStickerMessage: object expected"); + message.lottieStickerMessage = $root.proto.Message.FutureProofMessage.fromObject(object.lottieStickerMessage); + } + if (object.eventMessage != null) { + if (typeof object.eventMessage !== "object") + throw TypeError(".proto.Message.eventMessage: object expected"); + message.eventMessage = $root.proto.Message.EventMessage.fromObject(object.eventMessage); + } + if (object.commentMessage != null) { + if (typeof object.commentMessage !== "object") + throw TypeError(".proto.Message.commentMessage: object expected"); + message.commentMessage = $root.proto.Message.CommentMessage.fromObject(object.commentMessage); + } + if (object.newsletterAdminInviteMessage != null) { + if (typeof object.newsletterAdminInviteMessage !== "object") + throw TypeError(".proto.Message.newsletterAdminInviteMessage: object expected"); + message.newsletterAdminInviteMessage = $root.proto.Message.NewsletterAdminInviteMessage.fromObject(object.newsletterAdminInviteMessage); + } + if (object.extendedTextMessageWithParentKey != null) { + if (typeof object.extendedTextMessageWithParentKey !== "object") + throw TypeError(".proto.Message.extendedTextMessageWithParentKey: object expected"); + message.extendedTextMessageWithParentKey = $root.proto.Message.ExtendedTextMessageWithParentKey.fromObject(object.extendedTextMessageWithParentKey); + } + if (object.placeholderMessage != null) { + if (typeof object.placeholderMessage !== "object") + throw TypeError(".proto.Message.placeholderMessage: object expected"); + message.placeholderMessage = $root.proto.Message.PlaceholderMessage.fromObject(object.placeholderMessage); + } + if (object.encEventUpdateMessage != null) { + if (typeof object.encEventUpdateMessage !== "object") + throw TypeError(".proto.Message.encEventUpdateMessage: object expected"); + message.encEventUpdateMessage = $root.proto.Message.EncEventUpdateMessage.fromObject(object.encEventUpdateMessage); } return message; }; /** - * Creates a plain object from a MediaRetryNotification message. Also converts values to other types if specified. + * Creates a plain object from a Message message. Also converts values to other types if specified. * @function toObject - * @memberof proto.MediaRetryNotification + * @memberof proto.Message * @static - * @param {proto.MediaRetryNotification} message MediaRetryNotification + * @param {proto.Message} message Message * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MediaRetryNotification.toObject = function toObject(message, options) { + Message.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.stanzaId = ""; - object.directPath = ""; - object.result = options.enums === String ? "GENERAL_ERROR" : 0; + object.conversation = ""; + object.senderKeyDistributionMessage = null; + object.imageMessage = null; + object.contactMessage = null; + object.locationMessage = null; + object.extendedTextMessage = null; + object.documentMessage = null; + object.audioMessage = null; + object.videoMessage = null; + object.call = null; + object.chat = null; + object.protocolMessage = null; + object.contactsArrayMessage = null; + object.highlyStructuredMessage = null; + object.fastRatchetKeySenderKeyDistributionMessage = null; + object.sendPaymentMessage = null; + object.liveLocationMessage = null; + object.requestPaymentMessage = null; + object.declinePaymentRequestMessage = null; + object.cancelPaymentRequestMessage = null; + object.templateMessage = null; + object.stickerMessage = null; + object.groupInviteMessage = null; + object.templateButtonReplyMessage = null; + object.productMessage = null; + object.deviceSentMessage = null; + object.messageContextInfo = null; + object.listMessage = null; + object.viewOnceMessage = null; + object.orderMessage = null; + object.listResponseMessage = null; + object.ephemeralMessage = null; + object.invoiceMessage = null; + object.buttonsMessage = null; + object.buttonsResponseMessage = null; + object.paymentInviteMessage = null; + object.interactiveMessage = null; + object.reactionMessage = null; + object.stickerSyncRmrMessage = null; + object.interactiveResponseMessage = null; + object.pollCreationMessage = null; + object.pollUpdateMessage = null; + object.keepInChatMessage = null; + object.documentWithCaptionMessage = null; + object.requestPhoneNumberMessage = null; + object.viewOnceMessageV2 = null; + object.encReactionMessage = null; + object.editedMessage = null; + object.viewOnceMessageV2Extension = null; + object.pollCreationMessageV2 = null; + object.scheduledCallCreationMessage = null; + object.groupMentionedMessage = null; + object.pinInChatMessage = null; + object.pollCreationMessageV3 = null; + object.scheduledCallEditMessage = null; + object.ptvMessage = null; + object.botInvokeMessage = null; + object.callLogMesssage = null; + object.messageHistoryBundle = null; + object.encCommentMessage = null; + object.bcallMessage = null; + object.lottieStickerMessage = null; + object.eventMessage = null; + object.commentMessage = null; + object.newsletterAdminInviteMessage = null; + object.extendedTextMessageWithParentKey = null; + object.placeholderMessage = null; + object.encEventUpdateMessage = null; } - if (message.stanzaId != null && message.hasOwnProperty("stanzaId")) - object.stanzaId = message.stanzaId; - if (message.directPath != null && message.hasOwnProperty("directPath")) - object.directPath = message.directPath; - if (message.result != null && message.hasOwnProperty("result")) - object.result = options.enums === String ? $root.proto.MediaRetryNotification.ResultType[message.result] : message.result; + if (message.conversation != null && message.hasOwnProperty("conversation")) + object.conversation = message.conversation; + if (message.senderKeyDistributionMessage != null && message.hasOwnProperty("senderKeyDistributionMessage")) + object.senderKeyDistributionMessage = $root.proto.Message.SenderKeyDistributionMessage.toObject(message.senderKeyDistributionMessage, options); + if (message.imageMessage != null && message.hasOwnProperty("imageMessage")) + object.imageMessage = $root.proto.Message.ImageMessage.toObject(message.imageMessage, options); + if (message.contactMessage != null && message.hasOwnProperty("contactMessage")) + object.contactMessage = $root.proto.Message.ContactMessage.toObject(message.contactMessage, options); + if (message.locationMessage != null && message.hasOwnProperty("locationMessage")) + object.locationMessage = $root.proto.Message.LocationMessage.toObject(message.locationMessage, options); + if (message.extendedTextMessage != null && message.hasOwnProperty("extendedTextMessage")) + object.extendedTextMessage = $root.proto.Message.ExtendedTextMessage.toObject(message.extendedTextMessage, options); + if (message.documentMessage != null && message.hasOwnProperty("documentMessage")) + object.documentMessage = $root.proto.Message.DocumentMessage.toObject(message.documentMessage, options); + if (message.audioMessage != null && message.hasOwnProperty("audioMessage")) + object.audioMessage = $root.proto.Message.AudioMessage.toObject(message.audioMessage, options); + if (message.videoMessage != null && message.hasOwnProperty("videoMessage")) + object.videoMessage = $root.proto.Message.VideoMessage.toObject(message.videoMessage, options); + if (message.call != null && message.hasOwnProperty("call")) + object.call = $root.proto.Message.Call.toObject(message.call, options); + if (message.chat != null && message.hasOwnProperty("chat")) + object.chat = $root.proto.Message.Chat.toObject(message.chat, options); + if (message.protocolMessage != null && message.hasOwnProperty("protocolMessage")) + object.protocolMessage = $root.proto.Message.ProtocolMessage.toObject(message.protocolMessage, options); + if (message.contactsArrayMessage != null && message.hasOwnProperty("contactsArrayMessage")) + object.contactsArrayMessage = $root.proto.Message.ContactsArrayMessage.toObject(message.contactsArrayMessage, options); + if (message.highlyStructuredMessage != null && message.hasOwnProperty("highlyStructuredMessage")) + object.highlyStructuredMessage = $root.proto.Message.HighlyStructuredMessage.toObject(message.highlyStructuredMessage, options); + if (message.fastRatchetKeySenderKeyDistributionMessage != null && message.hasOwnProperty("fastRatchetKeySenderKeyDistributionMessage")) + object.fastRatchetKeySenderKeyDistributionMessage = $root.proto.Message.SenderKeyDistributionMessage.toObject(message.fastRatchetKeySenderKeyDistributionMessage, options); + if (message.sendPaymentMessage != null && message.hasOwnProperty("sendPaymentMessage")) + object.sendPaymentMessage = $root.proto.Message.SendPaymentMessage.toObject(message.sendPaymentMessage, options); + if (message.liveLocationMessage != null && message.hasOwnProperty("liveLocationMessage")) + object.liveLocationMessage = $root.proto.Message.LiveLocationMessage.toObject(message.liveLocationMessage, options); + if (message.requestPaymentMessage != null && message.hasOwnProperty("requestPaymentMessage")) + object.requestPaymentMessage = $root.proto.Message.RequestPaymentMessage.toObject(message.requestPaymentMessage, options); + if (message.declinePaymentRequestMessage != null && message.hasOwnProperty("declinePaymentRequestMessage")) + object.declinePaymentRequestMessage = $root.proto.Message.DeclinePaymentRequestMessage.toObject(message.declinePaymentRequestMessage, options); + if (message.cancelPaymentRequestMessage != null && message.hasOwnProperty("cancelPaymentRequestMessage")) + object.cancelPaymentRequestMessage = $root.proto.Message.CancelPaymentRequestMessage.toObject(message.cancelPaymentRequestMessage, options); + if (message.templateMessage != null && message.hasOwnProperty("templateMessage")) + object.templateMessage = $root.proto.Message.TemplateMessage.toObject(message.templateMessage, options); + if (message.stickerMessage != null && message.hasOwnProperty("stickerMessage")) + object.stickerMessage = $root.proto.Message.StickerMessage.toObject(message.stickerMessage, options); + if (message.groupInviteMessage != null && message.hasOwnProperty("groupInviteMessage")) + object.groupInviteMessage = $root.proto.Message.GroupInviteMessage.toObject(message.groupInviteMessage, options); + if (message.templateButtonReplyMessage != null && message.hasOwnProperty("templateButtonReplyMessage")) + object.templateButtonReplyMessage = $root.proto.Message.TemplateButtonReplyMessage.toObject(message.templateButtonReplyMessage, options); + if (message.productMessage != null && message.hasOwnProperty("productMessage")) + object.productMessage = $root.proto.Message.ProductMessage.toObject(message.productMessage, options); + if (message.deviceSentMessage != null && message.hasOwnProperty("deviceSentMessage")) + object.deviceSentMessage = $root.proto.Message.DeviceSentMessage.toObject(message.deviceSentMessage, options); + if (message.messageContextInfo != null && message.hasOwnProperty("messageContextInfo")) + object.messageContextInfo = $root.proto.MessageContextInfo.toObject(message.messageContextInfo, options); + if (message.listMessage != null && message.hasOwnProperty("listMessage")) + object.listMessage = $root.proto.Message.ListMessage.toObject(message.listMessage, options); + if (message.viewOnceMessage != null && message.hasOwnProperty("viewOnceMessage")) + object.viewOnceMessage = $root.proto.Message.FutureProofMessage.toObject(message.viewOnceMessage, options); + if (message.orderMessage != null && message.hasOwnProperty("orderMessage")) + object.orderMessage = $root.proto.Message.OrderMessage.toObject(message.orderMessage, options); + if (message.listResponseMessage != null && message.hasOwnProperty("listResponseMessage")) + object.listResponseMessage = $root.proto.Message.ListResponseMessage.toObject(message.listResponseMessage, options); + if (message.ephemeralMessage != null && message.hasOwnProperty("ephemeralMessage")) + object.ephemeralMessage = $root.proto.Message.FutureProofMessage.toObject(message.ephemeralMessage, options); + if (message.invoiceMessage != null && message.hasOwnProperty("invoiceMessage")) + object.invoiceMessage = $root.proto.Message.InvoiceMessage.toObject(message.invoiceMessage, options); + if (message.buttonsMessage != null && message.hasOwnProperty("buttonsMessage")) + object.buttonsMessage = $root.proto.Message.ButtonsMessage.toObject(message.buttonsMessage, options); + if (message.buttonsResponseMessage != null && message.hasOwnProperty("buttonsResponseMessage")) + object.buttonsResponseMessage = $root.proto.Message.ButtonsResponseMessage.toObject(message.buttonsResponseMessage, options); + if (message.paymentInviteMessage != null && message.hasOwnProperty("paymentInviteMessage")) + object.paymentInviteMessage = $root.proto.Message.PaymentInviteMessage.toObject(message.paymentInviteMessage, options); + if (message.interactiveMessage != null && message.hasOwnProperty("interactiveMessage")) + object.interactiveMessage = $root.proto.Message.InteractiveMessage.toObject(message.interactiveMessage, options); + if (message.reactionMessage != null && message.hasOwnProperty("reactionMessage")) + object.reactionMessage = $root.proto.Message.ReactionMessage.toObject(message.reactionMessage, options); + if (message.stickerSyncRmrMessage != null && message.hasOwnProperty("stickerSyncRmrMessage")) + object.stickerSyncRmrMessage = $root.proto.Message.StickerSyncRMRMessage.toObject(message.stickerSyncRmrMessage, options); + if (message.interactiveResponseMessage != null && message.hasOwnProperty("interactiveResponseMessage")) + object.interactiveResponseMessage = $root.proto.Message.InteractiveResponseMessage.toObject(message.interactiveResponseMessage, options); + if (message.pollCreationMessage != null && message.hasOwnProperty("pollCreationMessage")) + object.pollCreationMessage = $root.proto.Message.PollCreationMessage.toObject(message.pollCreationMessage, options); + if (message.pollUpdateMessage != null && message.hasOwnProperty("pollUpdateMessage")) + object.pollUpdateMessage = $root.proto.Message.PollUpdateMessage.toObject(message.pollUpdateMessage, options); + if (message.keepInChatMessage != null && message.hasOwnProperty("keepInChatMessage")) + object.keepInChatMessage = $root.proto.Message.KeepInChatMessage.toObject(message.keepInChatMessage, options); + if (message.documentWithCaptionMessage != null && message.hasOwnProperty("documentWithCaptionMessage")) + object.documentWithCaptionMessage = $root.proto.Message.FutureProofMessage.toObject(message.documentWithCaptionMessage, options); + if (message.requestPhoneNumberMessage != null && message.hasOwnProperty("requestPhoneNumberMessage")) + object.requestPhoneNumberMessage = $root.proto.Message.RequestPhoneNumberMessage.toObject(message.requestPhoneNumberMessage, options); + if (message.viewOnceMessageV2 != null && message.hasOwnProperty("viewOnceMessageV2")) + object.viewOnceMessageV2 = $root.proto.Message.FutureProofMessage.toObject(message.viewOnceMessageV2, options); + if (message.encReactionMessage != null && message.hasOwnProperty("encReactionMessage")) + object.encReactionMessage = $root.proto.Message.EncReactionMessage.toObject(message.encReactionMessage, options); + if (message.editedMessage != null && message.hasOwnProperty("editedMessage")) + object.editedMessage = $root.proto.Message.FutureProofMessage.toObject(message.editedMessage, options); + if (message.viewOnceMessageV2Extension != null && message.hasOwnProperty("viewOnceMessageV2Extension")) + object.viewOnceMessageV2Extension = $root.proto.Message.FutureProofMessage.toObject(message.viewOnceMessageV2Extension, options); + if (message.pollCreationMessageV2 != null && message.hasOwnProperty("pollCreationMessageV2")) + object.pollCreationMessageV2 = $root.proto.Message.PollCreationMessage.toObject(message.pollCreationMessageV2, options); + if (message.scheduledCallCreationMessage != null && message.hasOwnProperty("scheduledCallCreationMessage")) + object.scheduledCallCreationMessage = $root.proto.Message.ScheduledCallCreationMessage.toObject(message.scheduledCallCreationMessage, options); + if (message.groupMentionedMessage != null && message.hasOwnProperty("groupMentionedMessage")) + object.groupMentionedMessage = $root.proto.Message.FutureProofMessage.toObject(message.groupMentionedMessage, options); + if (message.pinInChatMessage != null && message.hasOwnProperty("pinInChatMessage")) + object.pinInChatMessage = $root.proto.Message.PinInChatMessage.toObject(message.pinInChatMessage, options); + if (message.pollCreationMessageV3 != null && message.hasOwnProperty("pollCreationMessageV3")) + object.pollCreationMessageV3 = $root.proto.Message.PollCreationMessage.toObject(message.pollCreationMessageV3, options); + if (message.scheduledCallEditMessage != null && message.hasOwnProperty("scheduledCallEditMessage")) + object.scheduledCallEditMessage = $root.proto.Message.ScheduledCallEditMessage.toObject(message.scheduledCallEditMessage, options); + if (message.ptvMessage != null && message.hasOwnProperty("ptvMessage")) + object.ptvMessage = $root.proto.Message.VideoMessage.toObject(message.ptvMessage, options); + if (message.botInvokeMessage != null && message.hasOwnProperty("botInvokeMessage")) + object.botInvokeMessage = $root.proto.Message.FutureProofMessage.toObject(message.botInvokeMessage, options); + if (message.callLogMesssage != null && message.hasOwnProperty("callLogMesssage")) + object.callLogMesssage = $root.proto.Message.CallLogMessage.toObject(message.callLogMesssage, options); + if (message.messageHistoryBundle != null && message.hasOwnProperty("messageHistoryBundle")) + object.messageHistoryBundle = $root.proto.Message.MessageHistoryBundle.toObject(message.messageHistoryBundle, options); + if (message.encCommentMessage != null && message.hasOwnProperty("encCommentMessage")) + object.encCommentMessage = $root.proto.Message.EncCommentMessage.toObject(message.encCommentMessage, options); + if (message.bcallMessage != null && message.hasOwnProperty("bcallMessage")) + object.bcallMessage = $root.proto.Message.BCallMessage.toObject(message.bcallMessage, options); + if (message.lottieStickerMessage != null && message.hasOwnProperty("lottieStickerMessage")) + object.lottieStickerMessage = $root.proto.Message.FutureProofMessage.toObject(message.lottieStickerMessage, options); + if (message.eventMessage != null && message.hasOwnProperty("eventMessage")) + object.eventMessage = $root.proto.Message.EventMessage.toObject(message.eventMessage, options); + if (message.commentMessage != null && message.hasOwnProperty("commentMessage")) + object.commentMessage = $root.proto.Message.CommentMessage.toObject(message.commentMessage, options); + if (message.newsletterAdminInviteMessage != null && message.hasOwnProperty("newsletterAdminInviteMessage")) + object.newsletterAdminInviteMessage = $root.proto.Message.NewsletterAdminInviteMessage.toObject(message.newsletterAdminInviteMessage, options); + if (message.extendedTextMessageWithParentKey != null && message.hasOwnProperty("extendedTextMessageWithParentKey")) + object.extendedTextMessageWithParentKey = $root.proto.Message.ExtendedTextMessageWithParentKey.toObject(message.extendedTextMessageWithParentKey, options); + if (message.placeholderMessage != null && message.hasOwnProperty("placeholderMessage")) + object.placeholderMessage = $root.proto.Message.PlaceholderMessage.toObject(message.placeholderMessage, options); + if (message.encEventUpdateMessage != null && message.hasOwnProperty("encEventUpdateMessage")) + object.encEventUpdateMessage = $root.proto.Message.EncEventUpdateMessage.toObject(message.encEventUpdateMessage, options); return object; }; /** - * Converts this MediaRetryNotification to JSON. + * Converts this Message to JSON. * @function toJSON - * @memberof proto.MediaRetryNotification + * @memberof proto.Message * @instance * @returns {Object.} JSON object */ - MediaRetryNotification.prototype.toJSON = function toJSON() { + Message.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * ResultType enum. - * @name proto.MediaRetryNotification.ResultType - * @enum {number} - * @property {number} GENERAL_ERROR=0 GENERAL_ERROR value - * @property {number} SUCCESS=1 SUCCESS value - * @property {number} NOT_FOUND=2 NOT_FOUND value - * @property {number} DECRYPTION_ERROR=3 DECRYPTION_ERROR value - */ - MediaRetryNotification.ResultType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "GENERAL_ERROR"] = 0; - values[valuesById[1] = "SUCCESS"] = 1; - values[valuesById[2] = "NOT_FOUND"] = 2; - values[valuesById[3] = "DECRYPTION_ERROR"] = 3; - return values; - })(); - - return MediaRetryNotification; - })(); - - /** - * MediaVisibility enum. - * @name proto.MediaVisibility - * @enum {number} - * @property {number} DEFAULT=0 DEFAULT value - * @property {number} OFF=1 OFF value - * @property {number} ON=2 ON value - */ - proto.MediaVisibility = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DEFAULT"] = 0; - values[valuesById[1] = "OFF"] = 1; - values[valuesById[2] = "ON"] = 2; - return values; - })(); - - proto.Message = (function() { - - /** - * Properties of a Message. - * @memberof proto - * @interface IMessage - * @property {string|null} [conversation] Message conversation - * @property {proto.Message.ISenderKeyDistributionMessage|null} [senderKeyDistributionMessage] Message senderKeyDistributionMessage - * @property {proto.Message.IImageMessage|null} [imageMessage] Message imageMessage - * @property {proto.Message.IContactMessage|null} [contactMessage] Message contactMessage - * @property {proto.Message.ILocationMessage|null} [locationMessage] Message locationMessage - * @property {proto.Message.IExtendedTextMessage|null} [extendedTextMessage] Message extendedTextMessage - * @property {proto.Message.IDocumentMessage|null} [documentMessage] Message documentMessage - * @property {proto.Message.IAudioMessage|null} [audioMessage] Message audioMessage - * @property {proto.Message.IVideoMessage|null} [videoMessage] Message videoMessage - * @property {proto.Message.ICall|null} [call] Message call - * @property {proto.Message.IChat|null} [chat] Message chat - * @property {proto.Message.IProtocolMessage|null} [protocolMessage] Message protocolMessage - * @property {proto.Message.IContactsArrayMessage|null} [contactsArrayMessage] Message contactsArrayMessage - * @property {proto.Message.IHighlyStructuredMessage|null} [highlyStructuredMessage] Message highlyStructuredMessage - * @property {proto.Message.ISenderKeyDistributionMessage|null} [fastRatchetKeySenderKeyDistributionMessage] Message fastRatchetKeySenderKeyDistributionMessage - * @property {proto.Message.ISendPaymentMessage|null} [sendPaymentMessage] Message sendPaymentMessage - * @property {proto.Message.ILiveLocationMessage|null} [liveLocationMessage] Message liveLocationMessage - * @property {proto.Message.IRequestPaymentMessage|null} [requestPaymentMessage] Message requestPaymentMessage - * @property {proto.Message.IDeclinePaymentRequestMessage|null} [declinePaymentRequestMessage] Message declinePaymentRequestMessage - * @property {proto.Message.ICancelPaymentRequestMessage|null} [cancelPaymentRequestMessage] Message cancelPaymentRequestMessage - * @property {proto.Message.ITemplateMessage|null} [templateMessage] Message templateMessage - * @property {proto.Message.IStickerMessage|null} [stickerMessage] Message stickerMessage - * @property {proto.Message.IGroupInviteMessage|null} [groupInviteMessage] Message groupInviteMessage - * @property {proto.Message.ITemplateButtonReplyMessage|null} [templateButtonReplyMessage] Message templateButtonReplyMessage - * @property {proto.Message.IProductMessage|null} [productMessage] Message productMessage - * @property {proto.Message.IDeviceSentMessage|null} [deviceSentMessage] Message deviceSentMessage - * @property {proto.IMessageContextInfo|null} [messageContextInfo] Message messageContextInfo - * @property {proto.Message.IListMessage|null} [listMessage] Message listMessage - * @property {proto.Message.IFutureProofMessage|null} [viewOnceMessage] Message viewOnceMessage - * @property {proto.Message.IOrderMessage|null} [orderMessage] Message orderMessage - * @property {proto.Message.IListResponseMessage|null} [listResponseMessage] Message listResponseMessage - * @property {proto.Message.IFutureProofMessage|null} [ephemeralMessage] Message ephemeralMessage - * @property {proto.Message.IInvoiceMessage|null} [invoiceMessage] Message invoiceMessage - * @property {proto.Message.IButtonsMessage|null} [buttonsMessage] Message buttonsMessage - * @property {proto.Message.IButtonsResponseMessage|null} [buttonsResponseMessage] Message buttonsResponseMessage - * @property {proto.Message.IPaymentInviteMessage|null} [paymentInviteMessage] Message paymentInviteMessage - * @property {proto.Message.IInteractiveMessage|null} [interactiveMessage] Message interactiveMessage - * @property {proto.Message.IReactionMessage|null} [reactionMessage] Message reactionMessage - * @property {proto.Message.IStickerSyncRMRMessage|null} [stickerSyncRmrMessage] Message stickerSyncRmrMessage - * @property {proto.Message.IInteractiveResponseMessage|null} [interactiveResponseMessage] Message interactiveResponseMessage - * @property {proto.Message.IPollCreationMessage|null} [pollCreationMessage] Message pollCreationMessage - * @property {proto.Message.IPollUpdateMessage|null} [pollUpdateMessage] Message pollUpdateMessage - * @property {proto.Message.IKeepInChatMessage|null} [keepInChatMessage] Message keepInChatMessage - * @property {proto.Message.IFutureProofMessage|null} [documentWithCaptionMessage] Message documentWithCaptionMessage - * @property {proto.Message.IRequestPhoneNumberMessage|null} [requestPhoneNumberMessage] Message requestPhoneNumberMessage - * @property {proto.Message.IFutureProofMessage|null} [viewOnceMessageV2] Message viewOnceMessageV2 - * @property {proto.Message.IEncReactionMessage|null} [encReactionMessage] Message encReactionMessage - * @property {proto.Message.IFutureProofMessage|null} [editedMessage] Message editedMessage - * @property {proto.Message.IFutureProofMessage|null} [viewOnceMessageV2Extension] Message viewOnceMessageV2Extension - * @property {proto.Message.IPollCreationMessage|null} [pollCreationMessageV2] Message pollCreationMessageV2 - * @property {proto.Message.IScheduledCallCreationMessage|null} [scheduledCallCreationMessage] Message scheduledCallCreationMessage - * @property {proto.Message.IFutureProofMessage|null} [groupMentionedMessage] Message groupMentionedMessage - * @property {proto.Message.IPinInChatMessage|null} [pinInChatMessage] Message pinInChatMessage - * @property {proto.Message.IPollCreationMessage|null} [pollCreationMessageV3] Message pollCreationMessageV3 - * @property {proto.Message.IScheduledCallEditMessage|null} [scheduledCallEditMessage] Message scheduledCallEditMessage - * @property {proto.Message.IVideoMessage|null} [ptvMessage] Message ptvMessage - * @property {proto.Message.IFutureProofMessage|null} [botInvokeMessage] Message botInvokeMessage - */ - - /** - * Constructs a new Message. - * @memberof proto - * @classdesc Represents a Message. - * @implements IMessage - * @constructor - * @param {proto.IMessage=} [properties] Properties to set - */ - function Message(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Message conversation. - * @member {string} conversation - * @memberof proto.Message - * @instance - */ - Message.prototype.conversation = ""; - - /** - * Message senderKeyDistributionMessage. - * @member {proto.Message.ISenderKeyDistributionMessage|null|undefined} senderKeyDistributionMessage - * @memberof proto.Message - * @instance - */ - Message.prototype.senderKeyDistributionMessage = null; - - /** - * Message imageMessage. - * @member {proto.Message.IImageMessage|null|undefined} imageMessage - * @memberof proto.Message - * @instance - */ - Message.prototype.imageMessage = null; - - /** - * Message contactMessage. - * @member {proto.Message.IContactMessage|null|undefined} contactMessage - * @memberof proto.Message - * @instance - */ - Message.prototype.contactMessage = null; - - /** - * Message locationMessage. - * @member {proto.Message.ILocationMessage|null|undefined} locationMessage - * @memberof proto.Message - * @instance - */ - Message.prototype.locationMessage = null; - - /** - * Message extendedTextMessage. - * @member {proto.Message.IExtendedTextMessage|null|undefined} extendedTextMessage - * @memberof proto.Message - * @instance - */ - Message.prototype.extendedTextMessage = null; - - /** - * Message documentMessage. - * @member {proto.Message.IDocumentMessage|null|undefined} documentMessage - * @memberof proto.Message - * @instance - */ - Message.prototype.documentMessage = null; - - /** - * Message audioMessage. - * @member {proto.Message.IAudioMessage|null|undefined} audioMessage - * @memberof proto.Message - * @instance - */ - Message.prototype.audioMessage = null; - - /** - * Message videoMessage. - * @member {proto.Message.IVideoMessage|null|undefined} videoMessage - * @memberof proto.Message - * @instance - */ - Message.prototype.videoMessage = null; - - /** - * Message call. - * @member {proto.Message.ICall|null|undefined} call - * @memberof proto.Message - * @instance - */ - Message.prototype.call = null; - - /** - * Message chat. - * @member {proto.Message.IChat|null|undefined} chat - * @memberof proto.Message - * @instance - */ - Message.prototype.chat = null; - - /** - * Message protocolMessage. - * @member {proto.Message.IProtocolMessage|null|undefined} protocolMessage - * @memberof proto.Message - * @instance - */ - Message.prototype.protocolMessage = null; - - /** - * Message contactsArrayMessage. - * @member {proto.Message.IContactsArrayMessage|null|undefined} contactsArrayMessage - * @memberof proto.Message - * @instance - */ - Message.prototype.contactsArrayMessage = null; - - /** - * Message highlyStructuredMessage. - * @member {proto.Message.IHighlyStructuredMessage|null|undefined} highlyStructuredMessage - * @memberof proto.Message - * @instance - */ - Message.prototype.highlyStructuredMessage = null; - - /** - * Message fastRatchetKeySenderKeyDistributionMessage. - * @member {proto.Message.ISenderKeyDistributionMessage|null|undefined} fastRatchetKeySenderKeyDistributionMessage - * @memberof proto.Message - * @instance - */ - Message.prototype.fastRatchetKeySenderKeyDistributionMessage = null; - - /** - * Message sendPaymentMessage. - * @member {proto.Message.ISendPaymentMessage|null|undefined} sendPaymentMessage - * @memberof proto.Message - * @instance - */ - Message.prototype.sendPaymentMessage = null; - - /** - * Message liveLocationMessage. - * @member {proto.Message.ILiveLocationMessage|null|undefined} liveLocationMessage - * @memberof proto.Message - * @instance - */ - Message.prototype.liveLocationMessage = null; - - /** - * Message requestPaymentMessage. - * @member {proto.Message.IRequestPaymentMessage|null|undefined} requestPaymentMessage - * @memberof proto.Message - * @instance - */ - Message.prototype.requestPaymentMessage = null; - - /** - * Message declinePaymentRequestMessage. - * @member {proto.Message.IDeclinePaymentRequestMessage|null|undefined} declinePaymentRequestMessage - * @memberof proto.Message - * @instance - */ - Message.prototype.declinePaymentRequestMessage = null; - - /** - * Message cancelPaymentRequestMessage. - * @member {proto.Message.ICancelPaymentRequestMessage|null|undefined} cancelPaymentRequestMessage - * @memberof proto.Message - * @instance - */ - Message.prototype.cancelPaymentRequestMessage = null; + Message.AppStateFatalExceptionNotification = (function() { - /** - * Message templateMessage. - * @member {proto.Message.ITemplateMessage|null|undefined} templateMessage - * @memberof proto.Message - * @instance - */ - Message.prototype.templateMessage = null; + /** + * Properties of an AppStateFatalExceptionNotification. + * @memberof proto.Message + * @interface IAppStateFatalExceptionNotification + * @property {Array.|null} [collectionNames] AppStateFatalExceptionNotification collectionNames + * @property {number|Long|null} [timestamp] AppStateFatalExceptionNotification timestamp + */ - /** - * Message stickerMessage. - * @member {proto.Message.IStickerMessage|null|undefined} stickerMessage - * @memberof proto.Message - * @instance - */ - Message.prototype.stickerMessage = null; + /** + * Constructs a new AppStateFatalExceptionNotification. + * @memberof proto.Message + * @classdesc Represents an AppStateFatalExceptionNotification. + * @implements IAppStateFatalExceptionNotification + * @constructor + * @param {proto.Message.IAppStateFatalExceptionNotification=} [properties] Properties to set + */ + function AppStateFatalExceptionNotification(properties) { + this.collectionNames = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Message groupInviteMessage. - * @member {proto.Message.IGroupInviteMessage|null|undefined} groupInviteMessage - * @memberof proto.Message - * @instance - */ - Message.prototype.groupInviteMessage = null; + /** + * AppStateFatalExceptionNotification collectionNames. + * @member {Array.} collectionNames + * @memberof proto.Message.AppStateFatalExceptionNotification + * @instance + */ + AppStateFatalExceptionNotification.prototype.collectionNames = $util.emptyArray; - /** - * Message templateButtonReplyMessage. - * @member {proto.Message.ITemplateButtonReplyMessage|null|undefined} templateButtonReplyMessage - * @memberof proto.Message - * @instance - */ - Message.prototype.templateButtonReplyMessage = null; + /** + * AppStateFatalExceptionNotification timestamp. + * @member {number|Long} timestamp + * @memberof proto.Message.AppStateFatalExceptionNotification + * @instance + */ + AppStateFatalExceptionNotification.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * Message productMessage. - * @member {proto.Message.IProductMessage|null|undefined} productMessage - * @memberof proto.Message - * @instance - */ - Message.prototype.productMessage = null; + /** + * Creates a new AppStateFatalExceptionNotification instance using the specified properties. + * @function create + * @memberof proto.Message.AppStateFatalExceptionNotification + * @static + * @param {proto.Message.IAppStateFatalExceptionNotification=} [properties] Properties to set + * @returns {proto.Message.AppStateFatalExceptionNotification} AppStateFatalExceptionNotification instance + */ + AppStateFatalExceptionNotification.create = function create(properties) { + return new AppStateFatalExceptionNotification(properties); + }; - /** - * Message deviceSentMessage. - * @member {proto.Message.IDeviceSentMessage|null|undefined} deviceSentMessage - * @memberof proto.Message - * @instance - */ - Message.prototype.deviceSentMessage = null; + /** + * Encodes the specified AppStateFatalExceptionNotification message. Does not implicitly {@link proto.Message.AppStateFatalExceptionNotification.verify|verify} messages. + * @function encode + * @memberof proto.Message.AppStateFatalExceptionNotification + * @static + * @param {proto.Message.IAppStateFatalExceptionNotification} message AppStateFatalExceptionNotification message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AppStateFatalExceptionNotification.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.collectionNames != null && message.collectionNames.length) + for (var i = 0; i < message.collectionNames.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.collectionNames[i]); + if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.timestamp); + return writer; + }; - /** - * Message messageContextInfo. - * @member {proto.IMessageContextInfo|null|undefined} messageContextInfo - * @memberof proto.Message - * @instance - */ - Message.prototype.messageContextInfo = null; + /** + * Encodes the specified AppStateFatalExceptionNotification message, length delimited. Does not implicitly {@link proto.Message.AppStateFatalExceptionNotification.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.AppStateFatalExceptionNotification + * @static + * @param {proto.Message.IAppStateFatalExceptionNotification} message AppStateFatalExceptionNotification message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AppStateFatalExceptionNotification.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Message listMessage. - * @member {proto.Message.IListMessage|null|undefined} listMessage - * @memberof proto.Message - * @instance - */ - Message.prototype.listMessage = null; + /** + * Decodes an AppStateFatalExceptionNotification message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.AppStateFatalExceptionNotification + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.AppStateFatalExceptionNotification} AppStateFatalExceptionNotification + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AppStateFatalExceptionNotification.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Message.AppStateFatalExceptionNotification(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.collectionNames && message.collectionNames.length)) + message.collectionNames = []; + message.collectionNames.push(reader.string()); + break; + case 2: + message.timestamp = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Message viewOnceMessage. - * @member {proto.Message.IFutureProofMessage|null|undefined} viewOnceMessage - * @memberof proto.Message - * @instance - */ - Message.prototype.viewOnceMessage = null; + /** + * Decodes an AppStateFatalExceptionNotification message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.AppStateFatalExceptionNotification + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.AppStateFatalExceptionNotification} AppStateFatalExceptionNotification + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AppStateFatalExceptionNotification.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Message orderMessage. - * @member {proto.Message.IOrderMessage|null|undefined} orderMessage - * @memberof proto.Message - * @instance - */ - Message.prototype.orderMessage = null; + /** + * Verifies an AppStateFatalExceptionNotification message. + * @function verify + * @memberof proto.Message.AppStateFatalExceptionNotification + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AppStateFatalExceptionNotification.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.collectionNames != null && message.hasOwnProperty("collectionNames")) { + if (!Array.isArray(message.collectionNames)) + return "collectionNames: array expected"; + for (var i = 0; i < message.collectionNames.length; ++i) + if (!$util.isString(message.collectionNames[i])) + return "collectionNames: string[] expected"; + } + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high))) + return "timestamp: integer|Long expected"; + return null; + }; - /** - * Message listResponseMessage. - * @member {proto.Message.IListResponseMessage|null|undefined} listResponseMessage - * @memberof proto.Message - * @instance - */ - Message.prototype.listResponseMessage = null; + /** + * Creates an AppStateFatalExceptionNotification message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.AppStateFatalExceptionNotification + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.AppStateFatalExceptionNotification} AppStateFatalExceptionNotification + */ + AppStateFatalExceptionNotification.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.AppStateFatalExceptionNotification) + return object; + var message = new $root.proto.Message.AppStateFatalExceptionNotification(); + if (object.collectionNames) { + if (!Array.isArray(object.collectionNames)) + throw TypeError(".proto.Message.AppStateFatalExceptionNotification.collectionNames: array expected"); + message.collectionNames = []; + for (var i = 0; i < object.collectionNames.length; ++i) + message.collectionNames[i] = String(object.collectionNames[i]); + } + if (object.timestamp != null) + if ($util.Long) + (message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = false; + else if (typeof object.timestamp === "string") + message.timestamp = parseInt(object.timestamp, 10); + else if (typeof object.timestamp === "number") + message.timestamp = object.timestamp; + else if (typeof object.timestamp === "object") + message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber(); + return message; + }; - /** - * Message ephemeralMessage. - * @member {proto.Message.IFutureProofMessage|null|undefined} ephemeralMessage - * @memberof proto.Message - * @instance - */ - Message.prototype.ephemeralMessage = null; + /** + * Creates a plain object from an AppStateFatalExceptionNotification message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.AppStateFatalExceptionNotification + * @static + * @param {proto.Message.AppStateFatalExceptionNotification} message AppStateFatalExceptionNotification + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AppStateFatalExceptionNotification.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.collectionNames = []; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.timestamp = options.longs === String ? "0" : 0; + if (message.collectionNames && message.collectionNames.length) { + object.collectionNames = []; + for (var j = 0; j < message.collectionNames.length; ++j) + object.collectionNames[j] = message.collectionNames[j]; + } + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + if (typeof message.timestamp === "number") + object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp; + else + object.timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber() : message.timestamp; + return object; + }; - /** - * Message invoiceMessage. - * @member {proto.Message.IInvoiceMessage|null|undefined} invoiceMessage - * @memberof proto.Message - * @instance - */ - Message.prototype.invoiceMessage = null; + /** + * Converts this AppStateFatalExceptionNotification to JSON. + * @function toJSON + * @memberof proto.Message.AppStateFatalExceptionNotification + * @instance + * @returns {Object.} JSON object + */ + AppStateFatalExceptionNotification.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Message buttonsMessage. - * @member {proto.Message.IButtonsMessage|null|undefined} buttonsMessage - * @memberof proto.Message - * @instance - */ - Message.prototype.buttonsMessage = null; + return AppStateFatalExceptionNotification; + })(); - /** - * Message buttonsResponseMessage. - * @member {proto.Message.IButtonsResponseMessage|null|undefined} buttonsResponseMessage - * @memberof proto.Message - * @instance - */ - Message.prototype.buttonsResponseMessage = null; + Message.AppStateSyncKey = (function() { - /** - * Message paymentInviteMessage. - * @member {proto.Message.IPaymentInviteMessage|null|undefined} paymentInviteMessage - * @memberof proto.Message - * @instance - */ - Message.prototype.paymentInviteMessage = null; + /** + * Properties of an AppStateSyncKey. + * @memberof proto.Message + * @interface IAppStateSyncKey + * @property {proto.Message.IAppStateSyncKeyId|null} [keyId] AppStateSyncKey keyId + * @property {proto.Message.IAppStateSyncKeyData|null} [keyData] AppStateSyncKey keyData + */ - /** - * Message interactiveMessage. - * @member {proto.Message.IInteractiveMessage|null|undefined} interactiveMessage - * @memberof proto.Message - * @instance - */ - Message.prototype.interactiveMessage = null; + /** + * Constructs a new AppStateSyncKey. + * @memberof proto.Message + * @classdesc Represents an AppStateSyncKey. + * @implements IAppStateSyncKey + * @constructor + * @param {proto.Message.IAppStateSyncKey=} [properties] Properties to set + */ + function AppStateSyncKey(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Message reactionMessage. - * @member {proto.Message.IReactionMessage|null|undefined} reactionMessage - * @memberof proto.Message - * @instance - */ - Message.prototype.reactionMessage = null; + /** + * AppStateSyncKey keyId. + * @member {proto.Message.IAppStateSyncKeyId|null|undefined} keyId + * @memberof proto.Message.AppStateSyncKey + * @instance + */ + AppStateSyncKey.prototype.keyId = null; - /** - * Message stickerSyncRmrMessage. - * @member {proto.Message.IStickerSyncRMRMessage|null|undefined} stickerSyncRmrMessage - * @memberof proto.Message - * @instance - */ - Message.prototype.stickerSyncRmrMessage = null; + /** + * AppStateSyncKey keyData. + * @member {proto.Message.IAppStateSyncKeyData|null|undefined} keyData + * @memberof proto.Message.AppStateSyncKey + * @instance + */ + AppStateSyncKey.prototype.keyData = null; - /** - * Message interactiveResponseMessage. - * @member {proto.Message.IInteractiveResponseMessage|null|undefined} interactiveResponseMessage - * @memberof proto.Message - * @instance - */ - Message.prototype.interactiveResponseMessage = null; + /** + * Creates a new AppStateSyncKey instance using the specified properties. + * @function create + * @memberof proto.Message.AppStateSyncKey + * @static + * @param {proto.Message.IAppStateSyncKey=} [properties] Properties to set + * @returns {proto.Message.AppStateSyncKey} AppStateSyncKey instance + */ + AppStateSyncKey.create = function create(properties) { + return new AppStateSyncKey(properties); + }; - /** - * Message pollCreationMessage. - * @member {proto.Message.IPollCreationMessage|null|undefined} pollCreationMessage - * @memberof proto.Message - * @instance - */ - Message.prototype.pollCreationMessage = null; + /** + * Encodes the specified AppStateSyncKey message. Does not implicitly {@link proto.Message.AppStateSyncKey.verify|verify} messages. + * @function encode + * @memberof proto.Message.AppStateSyncKey + * @static + * @param {proto.Message.IAppStateSyncKey} message AppStateSyncKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AppStateSyncKey.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.keyId != null && Object.hasOwnProperty.call(message, "keyId")) + $root.proto.Message.AppStateSyncKeyId.encode(message.keyId, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.keyData != null && Object.hasOwnProperty.call(message, "keyData")) + $root.proto.Message.AppStateSyncKeyData.encode(message.keyData, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; - /** - * Message pollUpdateMessage. - * @member {proto.Message.IPollUpdateMessage|null|undefined} pollUpdateMessage - * @memberof proto.Message - * @instance - */ - Message.prototype.pollUpdateMessage = null; + /** + * Encodes the specified AppStateSyncKey message, length delimited. Does not implicitly {@link proto.Message.AppStateSyncKey.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.AppStateSyncKey + * @static + * @param {proto.Message.IAppStateSyncKey} message AppStateSyncKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AppStateSyncKey.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Message keepInChatMessage. - * @member {proto.Message.IKeepInChatMessage|null|undefined} keepInChatMessage - * @memberof proto.Message - * @instance - */ - Message.prototype.keepInChatMessage = null; + /** + * Decodes an AppStateSyncKey message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.AppStateSyncKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.AppStateSyncKey} AppStateSyncKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AppStateSyncKey.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Message.AppStateSyncKey(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.keyId = $root.proto.Message.AppStateSyncKeyId.decode(reader, reader.uint32()); + break; + case 2: + message.keyData = $root.proto.Message.AppStateSyncKeyData.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Message documentWithCaptionMessage. - * @member {proto.Message.IFutureProofMessage|null|undefined} documentWithCaptionMessage - * @memberof proto.Message - * @instance - */ - Message.prototype.documentWithCaptionMessage = null; + /** + * Decodes an AppStateSyncKey message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.AppStateSyncKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.AppStateSyncKey} AppStateSyncKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AppStateSyncKey.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Message requestPhoneNumberMessage. - * @member {proto.Message.IRequestPhoneNumberMessage|null|undefined} requestPhoneNumberMessage - * @memberof proto.Message - * @instance - */ - Message.prototype.requestPhoneNumberMessage = null; + /** + * Verifies an AppStateSyncKey message. + * @function verify + * @memberof proto.Message.AppStateSyncKey + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AppStateSyncKey.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.keyId != null && message.hasOwnProperty("keyId")) { + var error = $root.proto.Message.AppStateSyncKeyId.verify(message.keyId); + if (error) + return "keyId." + error; + } + if (message.keyData != null && message.hasOwnProperty("keyData")) { + var error = $root.proto.Message.AppStateSyncKeyData.verify(message.keyData); + if (error) + return "keyData." + error; + } + return null; + }; - /** - * Message viewOnceMessageV2. - * @member {proto.Message.IFutureProofMessage|null|undefined} viewOnceMessageV2 - * @memberof proto.Message - * @instance - */ - Message.prototype.viewOnceMessageV2 = null; + /** + * Creates an AppStateSyncKey message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.AppStateSyncKey + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.AppStateSyncKey} AppStateSyncKey + */ + AppStateSyncKey.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.AppStateSyncKey) + return object; + var message = new $root.proto.Message.AppStateSyncKey(); + if (object.keyId != null) { + if (typeof object.keyId !== "object") + throw TypeError(".proto.Message.AppStateSyncKey.keyId: object expected"); + message.keyId = $root.proto.Message.AppStateSyncKeyId.fromObject(object.keyId); + } + if (object.keyData != null) { + if (typeof object.keyData !== "object") + throw TypeError(".proto.Message.AppStateSyncKey.keyData: object expected"); + message.keyData = $root.proto.Message.AppStateSyncKeyData.fromObject(object.keyData); + } + return message; + }; - /** - * Message encReactionMessage. - * @member {proto.Message.IEncReactionMessage|null|undefined} encReactionMessage - * @memberof proto.Message - * @instance - */ - Message.prototype.encReactionMessage = null; + /** + * Creates a plain object from an AppStateSyncKey message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.AppStateSyncKey + * @static + * @param {proto.Message.AppStateSyncKey} message AppStateSyncKey + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AppStateSyncKey.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.keyId = null; + object.keyData = null; + } + if (message.keyId != null && message.hasOwnProperty("keyId")) + object.keyId = $root.proto.Message.AppStateSyncKeyId.toObject(message.keyId, options); + if (message.keyData != null && message.hasOwnProperty("keyData")) + object.keyData = $root.proto.Message.AppStateSyncKeyData.toObject(message.keyData, options); + return object; + }; - /** - * Message editedMessage. - * @member {proto.Message.IFutureProofMessage|null|undefined} editedMessage - * @memberof proto.Message - * @instance - */ - Message.prototype.editedMessage = null; + /** + * Converts this AppStateSyncKey to JSON. + * @function toJSON + * @memberof proto.Message.AppStateSyncKey + * @instance + * @returns {Object.} JSON object + */ + AppStateSyncKey.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Message viewOnceMessageV2Extension. - * @member {proto.Message.IFutureProofMessage|null|undefined} viewOnceMessageV2Extension - * @memberof proto.Message - * @instance - */ - Message.prototype.viewOnceMessageV2Extension = null; + return AppStateSyncKey; + })(); - /** - * Message pollCreationMessageV2. - * @member {proto.Message.IPollCreationMessage|null|undefined} pollCreationMessageV2 - * @memberof proto.Message - * @instance - */ - Message.prototype.pollCreationMessageV2 = null; + Message.AppStateSyncKeyData = (function() { - /** - * Message scheduledCallCreationMessage. - * @member {proto.Message.IScheduledCallCreationMessage|null|undefined} scheduledCallCreationMessage - * @memberof proto.Message - * @instance - */ - Message.prototype.scheduledCallCreationMessage = null; + /** + * Properties of an AppStateSyncKeyData. + * @memberof proto.Message + * @interface IAppStateSyncKeyData + * @property {Uint8Array|null} [keyData] AppStateSyncKeyData keyData + * @property {proto.Message.IAppStateSyncKeyFingerprint|null} [fingerprint] AppStateSyncKeyData fingerprint + * @property {number|Long|null} [timestamp] AppStateSyncKeyData timestamp + */ - /** - * Message groupMentionedMessage. - * @member {proto.Message.IFutureProofMessage|null|undefined} groupMentionedMessage - * @memberof proto.Message - * @instance - */ - Message.prototype.groupMentionedMessage = null; + /** + * Constructs a new AppStateSyncKeyData. + * @memberof proto.Message + * @classdesc Represents an AppStateSyncKeyData. + * @implements IAppStateSyncKeyData + * @constructor + * @param {proto.Message.IAppStateSyncKeyData=} [properties] Properties to set + */ + function AppStateSyncKeyData(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Message pinInChatMessage. - * @member {proto.Message.IPinInChatMessage|null|undefined} pinInChatMessage - * @memberof proto.Message - * @instance - */ - Message.prototype.pinInChatMessage = null; + /** + * AppStateSyncKeyData keyData. + * @member {Uint8Array} keyData + * @memberof proto.Message.AppStateSyncKeyData + * @instance + */ + AppStateSyncKeyData.prototype.keyData = $util.newBuffer([]); - /** - * Message pollCreationMessageV3. - * @member {proto.Message.IPollCreationMessage|null|undefined} pollCreationMessageV3 - * @memberof proto.Message - * @instance - */ - Message.prototype.pollCreationMessageV3 = null; + /** + * AppStateSyncKeyData fingerprint. + * @member {proto.Message.IAppStateSyncKeyFingerprint|null|undefined} fingerprint + * @memberof proto.Message.AppStateSyncKeyData + * @instance + */ + AppStateSyncKeyData.prototype.fingerprint = null; - /** - * Message scheduledCallEditMessage. - * @member {proto.Message.IScheduledCallEditMessage|null|undefined} scheduledCallEditMessage - * @memberof proto.Message - * @instance - */ - Message.prototype.scheduledCallEditMessage = null; + /** + * AppStateSyncKeyData timestamp. + * @member {number|Long} timestamp + * @memberof proto.Message.AppStateSyncKeyData + * @instance + */ + AppStateSyncKeyData.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * Message ptvMessage. - * @member {proto.Message.IVideoMessage|null|undefined} ptvMessage - * @memberof proto.Message - * @instance - */ - Message.prototype.ptvMessage = null; + /** + * Creates a new AppStateSyncKeyData instance using the specified properties. + * @function create + * @memberof proto.Message.AppStateSyncKeyData + * @static + * @param {proto.Message.IAppStateSyncKeyData=} [properties] Properties to set + * @returns {proto.Message.AppStateSyncKeyData} AppStateSyncKeyData instance + */ + AppStateSyncKeyData.create = function create(properties) { + return new AppStateSyncKeyData(properties); + }; - /** - * Message botInvokeMessage. - * @member {proto.Message.IFutureProofMessage|null|undefined} botInvokeMessage - * @memberof proto.Message - * @instance - */ - Message.prototype.botInvokeMessage = null; + /** + * Encodes the specified AppStateSyncKeyData message. Does not implicitly {@link proto.Message.AppStateSyncKeyData.verify|verify} messages. + * @function encode + * @memberof proto.Message.AppStateSyncKeyData + * @static + * @param {proto.Message.IAppStateSyncKeyData} message AppStateSyncKeyData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AppStateSyncKeyData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.keyData != null && Object.hasOwnProperty.call(message, "keyData")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.keyData); + if (message.fingerprint != null && Object.hasOwnProperty.call(message, "fingerprint")) + $root.proto.Message.AppStateSyncKeyFingerprint.encode(message.fingerprint, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.timestamp); + return writer; + }; - /** - * Creates a new Message instance using the specified properties. - * @function create - * @memberof proto.Message - * @static - * @param {proto.IMessage=} [properties] Properties to set - * @returns {proto.Message} Message instance - */ - Message.create = function create(properties) { - return new Message(properties); - }; + /** + * Encodes the specified AppStateSyncKeyData message, length delimited. Does not implicitly {@link proto.Message.AppStateSyncKeyData.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.AppStateSyncKeyData + * @static + * @param {proto.Message.IAppStateSyncKeyData} message AppStateSyncKeyData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AppStateSyncKeyData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Encodes the specified Message message. Does not implicitly {@link proto.Message.verify|verify} messages. - * @function encode - * @memberof proto.Message - * @static - * @param {proto.IMessage} message Message message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Message.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.conversation != null && Object.hasOwnProperty.call(message, "conversation")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.conversation); - if (message.senderKeyDistributionMessage != null && Object.hasOwnProperty.call(message, "senderKeyDistributionMessage")) - $root.proto.Message.SenderKeyDistributionMessage.encode(message.senderKeyDistributionMessage, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.imageMessage != null && Object.hasOwnProperty.call(message, "imageMessage")) - $root.proto.Message.ImageMessage.encode(message.imageMessage, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.contactMessage != null && Object.hasOwnProperty.call(message, "contactMessage")) - $root.proto.Message.ContactMessage.encode(message.contactMessage, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.locationMessage != null && Object.hasOwnProperty.call(message, "locationMessage")) - $root.proto.Message.LocationMessage.encode(message.locationMessage, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.extendedTextMessage != null && Object.hasOwnProperty.call(message, "extendedTextMessage")) - $root.proto.Message.ExtendedTextMessage.encode(message.extendedTextMessage, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.documentMessage != null && Object.hasOwnProperty.call(message, "documentMessage")) - $root.proto.Message.DocumentMessage.encode(message.documentMessage, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.audioMessage != null && Object.hasOwnProperty.call(message, "audioMessage")) - $root.proto.Message.AudioMessage.encode(message.audioMessage, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.videoMessage != null && Object.hasOwnProperty.call(message, "videoMessage")) - $root.proto.Message.VideoMessage.encode(message.videoMessage, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.call != null && Object.hasOwnProperty.call(message, "call")) - $root.proto.Message.Call.encode(message.call, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.chat != null && Object.hasOwnProperty.call(message, "chat")) - $root.proto.Message.Chat.encode(message.chat, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.protocolMessage != null && Object.hasOwnProperty.call(message, "protocolMessage")) - $root.proto.Message.ProtocolMessage.encode(message.protocolMessage, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.contactsArrayMessage != null && Object.hasOwnProperty.call(message, "contactsArrayMessage")) - $root.proto.Message.ContactsArrayMessage.encode(message.contactsArrayMessage, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.highlyStructuredMessage != null && Object.hasOwnProperty.call(message, "highlyStructuredMessage")) - $root.proto.Message.HighlyStructuredMessage.encode(message.highlyStructuredMessage, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.fastRatchetKeySenderKeyDistributionMessage != null && Object.hasOwnProperty.call(message, "fastRatchetKeySenderKeyDistributionMessage")) - $root.proto.Message.SenderKeyDistributionMessage.encode(message.fastRatchetKeySenderKeyDistributionMessage, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - if (message.sendPaymentMessage != null && Object.hasOwnProperty.call(message, "sendPaymentMessage")) - $root.proto.Message.SendPaymentMessage.encode(message.sendPaymentMessage, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); - if (message.liveLocationMessage != null && Object.hasOwnProperty.call(message, "liveLocationMessage")) - $root.proto.Message.LiveLocationMessage.encode(message.liveLocationMessage, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); - if (message.requestPaymentMessage != null && Object.hasOwnProperty.call(message, "requestPaymentMessage")) - $root.proto.Message.RequestPaymentMessage.encode(message.requestPaymentMessage, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); - if (message.declinePaymentRequestMessage != null && Object.hasOwnProperty.call(message, "declinePaymentRequestMessage")) - $root.proto.Message.DeclinePaymentRequestMessage.encode(message.declinePaymentRequestMessage, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); - if (message.cancelPaymentRequestMessage != null && Object.hasOwnProperty.call(message, "cancelPaymentRequestMessage")) - $root.proto.Message.CancelPaymentRequestMessage.encode(message.cancelPaymentRequestMessage, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); - if (message.templateMessage != null && Object.hasOwnProperty.call(message, "templateMessage")) - $root.proto.Message.TemplateMessage.encode(message.templateMessage, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); - if (message.stickerMessage != null && Object.hasOwnProperty.call(message, "stickerMessage")) - $root.proto.Message.StickerMessage.encode(message.stickerMessage, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); - if (message.groupInviteMessage != null && Object.hasOwnProperty.call(message, "groupInviteMessage")) - $root.proto.Message.GroupInviteMessage.encode(message.groupInviteMessage, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); - if (message.templateButtonReplyMessage != null && Object.hasOwnProperty.call(message, "templateButtonReplyMessage")) - $root.proto.Message.TemplateButtonReplyMessage.encode(message.templateButtonReplyMessage, writer.uint32(/* id 29, wireType 2 =*/234).fork()).ldelim(); - if (message.productMessage != null && Object.hasOwnProperty.call(message, "productMessage")) - $root.proto.Message.ProductMessage.encode(message.productMessage, writer.uint32(/* id 30, wireType 2 =*/242).fork()).ldelim(); - if (message.deviceSentMessage != null && Object.hasOwnProperty.call(message, "deviceSentMessage")) - $root.proto.Message.DeviceSentMessage.encode(message.deviceSentMessage, writer.uint32(/* id 31, wireType 2 =*/250).fork()).ldelim(); - if (message.messageContextInfo != null && Object.hasOwnProperty.call(message, "messageContextInfo")) - $root.proto.MessageContextInfo.encode(message.messageContextInfo, writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim(); - if (message.listMessage != null && Object.hasOwnProperty.call(message, "listMessage")) - $root.proto.Message.ListMessage.encode(message.listMessage, writer.uint32(/* id 36, wireType 2 =*/290).fork()).ldelim(); - if (message.viewOnceMessage != null && Object.hasOwnProperty.call(message, "viewOnceMessage")) - $root.proto.Message.FutureProofMessage.encode(message.viewOnceMessage, writer.uint32(/* id 37, wireType 2 =*/298).fork()).ldelim(); - if (message.orderMessage != null && Object.hasOwnProperty.call(message, "orderMessage")) - $root.proto.Message.OrderMessage.encode(message.orderMessage, writer.uint32(/* id 38, wireType 2 =*/306).fork()).ldelim(); - if (message.listResponseMessage != null && Object.hasOwnProperty.call(message, "listResponseMessage")) - $root.proto.Message.ListResponseMessage.encode(message.listResponseMessage, writer.uint32(/* id 39, wireType 2 =*/314).fork()).ldelim(); - if (message.ephemeralMessage != null && Object.hasOwnProperty.call(message, "ephemeralMessage")) - $root.proto.Message.FutureProofMessage.encode(message.ephemeralMessage, writer.uint32(/* id 40, wireType 2 =*/322).fork()).ldelim(); - if (message.invoiceMessage != null && Object.hasOwnProperty.call(message, "invoiceMessage")) - $root.proto.Message.InvoiceMessage.encode(message.invoiceMessage, writer.uint32(/* id 41, wireType 2 =*/330).fork()).ldelim(); - if (message.buttonsMessage != null && Object.hasOwnProperty.call(message, "buttonsMessage")) - $root.proto.Message.ButtonsMessage.encode(message.buttonsMessage, writer.uint32(/* id 42, wireType 2 =*/338).fork()).ldelim(); - if (message.buttonsResponseMessage != null && Object.hasOwnProperty.call(message, "buttonsResponseMessage")) - $root.proto.Message.ButtonsResponseMessage.encode(message.buttonsResponseMessage, writer.uint32(/* id 43, wireType 2 =*/346).fork()).ldelim(); - if (message.paymentInviteMessage != null && Object.hasOwnProperty.call(message, "paymentInviteMessage")) - $root.proto.Message.PaymentInviteMessage.encode(message.paymentInviteMessage, writer.uint32(/* id 44, wireType 2 =*/354).fork()).ldelim(); - if (message.interactiveMessage != null && Object.hasOwnProperty.call(message, "interactiveMessage")) - $root.proto.Message.InteractiveMessage.encode(message.interactiveMessage, writer.uint32(/* id 45, wireType 2 =*/362).fork()).ldelim(); - if (message.reactionMessage != null && Object.hasOwnProperty.call(message, "reactionMessage")) - $root.proto.Message.ReactionMessage.encode(message.reactionMessage, writer.uint32(/* id 46, wireType 2 =*/370).fork()).ldelim(); - if (message.stickerSyncRmrMessage != null && Object.hasOwnProperty.call(message, "stickerSyncRmrMessage")) - $root.proto.Message.StickerSyncRMRMessage.encode(message.stickerSyncRmrMessage, writer.uint32(/* id 47, wireType 2 =*/378).fork()).ldelim(); - if (message.interactiveResponseMessage != null && Object.hasOwnProperty.call(message, "interactiveResponseMessage")) - $root.proto.Message.InteractiveResponseMessage.encode(message.interactiveResponseMessage, writer.uint32(/* id 48, wireType 2 =*/386).fork()).ldelim(); - if (message.pollCreationMessage != null && Object.hasOwnProperty.call(message, "pollCreationMessage")) - $root.proto.Message.PollCreationMessage.encode(message.pollCreationMessage, writer.uint32(/* id 49, wireType 2 =*/394).fork()).ldelim(); - if (message.pollUpdateMessage != null && Object.hasOwnProperty.call(message, "pollUpdateMessage")) - $root.proto.Message.PollUpdateMessage.encode(message.pollUpdateMessage, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); - if (message.keepInChatMessage != null && Object.hasOwnProperty.call(message, "keepInChatMessage")) - $root.proto.Message.KeepInChatMessage.encode(message.keepInChatMessage, writer.uint32(/* id 51, wireType 2 =*/410).fork()).ldelim(); - if (message.documentWithCaptionMessage != null && Object.hasOwnProperty.call(message, "documentWithCaptionMessage")) - $root.proto.Message.FutureProofMessage.encode(message.documentWithCaptionMessage, writer.uint32(/* id 53, wireType 2 =*/426).fork()).ldelim(); - if (message.requestPhoneNumberMessage != null && Object.hasOwnProperty.call(message, "requestPhoneNumberMessage")) - $root.proto.Message.RequestPhoneNumberMessage.encode(message.requestPhoneNumberMessage, writer.uint32(/* id 54, wireType 2 =*/434).fork()).ldelim(); - if (message.viewOnceMessageV2 != null && Object.hasOwnProperty.call(message, "viewOnceMessageV2")) - $root.proto.Message.FutureProofMessage.encode(message.viewOnceMessageV2, writer.uint32(/* id 55, wireType 2 =*/442).fork()).ldelim(); - if (message.encReactionMessage != null && Object.hasOwnProperty.call(message, "encReactionMessage")) - $root.proto.Message.EncReactionMessage.encode(message.encReactionMessage, writer.uint32(/* id 56, wireType 2 =*/450).fork()).ldelim(); - if (message.editedMessage != null && Object.hasOwnProperty.call(message, "editedMessage")) - $root.proto.Message.FutureProofMessage.encode(message.editedMessage, writer.uint32(/* id 58, wireType 2 =*/466).fork()).ldelim(); - if (message.viewOnceMessageV2Extension != null && Object.hasOwnProperty.call(message, "viewOnceMessageV2Extension")) - $root.proto.Message.FutureProofMessage.encode(message.viewOnceMessageV2Extension, writer.uint32(/* id 59, wireType 2 =*/474).fork()).ldelim(); - if (message.pollCreationMessageV2 != null && Object.hasOwnProperty.call(message, "pollCreationMessageV2")) - $root.proto.Message.PollCreationMessage.encode(message.pollCreationMessageV2, writer.uint32(/* id 60, wireType 2 =*/482).fork()).ldelim(); - if (message.scheduledCallCreationMessage != null && Object.hasOwnProperty.call(message, "scheduledCallCreationMessage")) - $root.proto.Message.ScheduledCallCreationMessage.encode(message.scheduledCallCreationMessage, writer.uint32(/* id 61, wireType 2 =*/490).fork()).ldelim(); - if (message.groupMentionedMessage != null && Object.hasOwnProperty.call(message, "groupMentionedMessage")) - $root.proto.Message.FutureProofMessage.encode(message.groupMentionedMessage, writer.uint32(/* id 62, wireType 2 =*/498).fork()).ldelim(); - if (message.pinInChatMessage != null && Object.hasOwnProperty.call(message, "pinInChatMessage")) - $root.proto.Message.PinInChatMessage.encode(message.pinInChatMessage, writer.uint32(/* id 63, wireType 2 =*/506).fork()).ldelim(); - if (message.pollCreationMessageV3 != null && Object.hasOwnProperty.call(message, "pollCreationMessageV3")) - $root.proto.Message.PollCreationMessage.encode(message.pollCreationMessageV3, writer.uint32(/* id 64, wireType 2 =*/514).fork()).ldelim(); - if (message.scheduledCallEditMessage != null && Object.hasOwnProperty.call(message, "scheduledCallEditMessage")) - $root.proto.Message.ScheduledCallEditMessage.encode(message.scheduledCallEditMessage, writer.uint32(/* id 65, wireType 2 =*/522).fork()).ldelim(); - if (message.ptvMessage != null && Object.hasOwnProperty.call(message, "ptvMessage")) - $root.proto.Message.VideoMessage.encode(message.ptvMessage, writer.uint32(/* id 66, wireType 2 =*/530).fork()).ldelim(); - if (message.botInvokeMessage != null && Object.hasOwnProperty.call(message, "botInvokeMessage")) - $root.proto.Message.FutureProofMessage.encode(message.botInvokeMessage, writer.uint32(/* id 67, wireType 2 =*/538).fork()).ldelim(); - return writer; - }; + /** + * Decodes an AppStateSyncKeyData message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.AppStateSyncKeyData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.AppStateSyncKeyData} AppStateSyncKeyData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AppStateSyncKeyData.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Message.AppStateSyncKeyData(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.keyData = reader.bytes(); + break; + case 2: + message.fingerprint = $root.proto.Message.AppStateSyncKeyFingerprint.decode(reader, reader.uint32()); + break; + case 3: + message.timestamp = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Encodes the specified Message message, length delimited. Does not implicitly {@link proto.Message.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.Message - * @static - * @param {proto.IMessage} message Message message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Message.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Decodes an AppStateSyncKeyData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.AppStateSyncKeyData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.AppStateSyncKeyData} AppStateSyncKeyData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AppStateSyncKeyData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Decodes a Message message from the specified reader or buffer. - * @function decode - * @memberof proto.Message - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.Message} Message - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Message.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Message(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.conversation = reader.string(); - break; - case 2: - message.senderKeyDistributionMessage = $root.proto.Message.SenderKeyDistributionMessage.decode(reader, reader.uint32()); - break; - case 3: - message.imageMessage = $root.proto.Message.ImageMessage.decode(reader, reader.uint32()); - break; - case 4: - message.contactMessage = $root.proto.Message.ContactMessage.decode(reader, reader.uint32()); - break; - case 5: - message.locationMessage = $root.proto.Message.LocationMessage.decode(reader, reader.uint32()); - break; - case 6: - message.extendedTextMessage = $root.proto.Message.ExtendedTextMessage.decode(reader, reader.uint32()); - break; - case 7: - message.documentMessage = $root.proto.Message.DocumentMessage.decode(reader, reader.uint32()); - break; - case 8: - message.audioMessage = $root.proto.Message.AudioMessage.decode(reader, reader.uint32()); - break; - case 9: - message.videoMessage = $root.proto.Message.VideoMessage.decode(reader, reader.uint32()); - break; - case 10: - message.call = $root.proto.Message.Call.decode(reader, reader.uint32()); - break; - case 11: - message.chat = $root.proto.Message.Chat.decode(reader, reader.uint32()); - break; - case 12: - message.protocolMessage = $root.proto.Message.ProtocolMessage.decode(reader, reader.uint32()); - break; - case 13: - message.contactsArrayMessage = $root.proto.Message.ContactsArrayMessage.decode(reader, reader.uint32()); - break; - case 14: - message.highlyStructuredMessage = $root.proto.Message.HighlyStructuredMessage.decode(reader, reader.uint32()); - break; - case 15: - message.fastRatchetKeySenderKeyDistributionMessage = $root.proto.Message.SenderKeyDistributionMessage.decode(reader, reader.uint32()); - break; - case 16: - message.sendPaymentMessage = $root.proto.Message.SendPaymentMessage.decode(reader, reader.uint32()); - break; - case 18: - message.liveLocationMessage = $root.proto.Message.LiveLocationMessage.decode(reader, reader.uint32()); - break; - case 22: - message.requestPaymentMessage = $root.proto.Message.RequestPaymentMessage.decode(reader, reader.uint32()); - break; - case 23: - message.declinePaymentRequestMessage = $root.proto.Message.DeclinePaymentRequestMessage.decode(reader, reader.uint32()); - break; - case 24: - message.cancelPaymentRequestMessage = $root.proto.Message.CancelPaymentRequestMessage.decode(reader, reader.uint32()); - break; - case 25: - message.templateMessage = $root.proto.Message.TemplateMessage.decode(reader, reader.uint32()); - break; - case 26: - message.stickerMessage = $root.proto.Message.StickerMessage.decode(reader, reader.uint32()); - break; - case 28: - message.groupInviteMessage = $root.proto.Message.GroupInviteMessage.decode(reader, reader.uint32()); - break; - case 29: - message.templateButtonReplyMessage = $root.proto.Message.TemplateButtonReplyMessage.decode(reader, reader.uint32()); - break; - case 30: - message.productMessage = $root.proto.Message.ProductMessage.decode(reader, reader.uint32()); - break; - case 31: - message.deviceSentMessage = $root.proto.Message.DeviceSentMessage.decode(reader, reader.uint32()); - break; - case 35: - message.messageContextInfo = $root.proto.MessageContextInfo.decode(reader, reader.uint32()); - break; - case 36: - message.listMessage = $root.proto.Message.ListMessage.decode(reader, reader.uint32()); - break; - case 37: - message.viewOnceMessage = $root.proto.Message.FutureProofMessage.decode(reader, reader.uint32()); - break; - case 38: - message.orderMessage = $root.proto.Message.OrderMessage.decode(reader, reader.uint32()); - break; - case 39: - message.listResponseMessage = $root.proto.Message.ListResponseMessage.decode(reader, reader.uint32()); - break; - case 40: - message.ephemeralMessage = $root.proto.Message.FutureProofMessage.decode(reader, reader.uint32()); - break; - case 41: - message.invoiceMessage = $root.proto.Message.InvoiceMessage.decode(reader, reader.uint32()); - break; - case 42: - message.buttonsMessage = $root.proto.Message.ButtonsMessage.decode(reader, reader.uint32()); - break; - case 43: - message.buttonsResponseMessage = $root.proto.Message.ButtonsResponseMessage.decode(reader, reader.uint32()); - break; - case 44: - message.paymentInviteMessage = $root.proto.Message.PaymentInviteMessage.decode(reader, reader.uint32()); - break; - case 45: - message.interactiveMessage = $root.proto.Message.InteractiveMessage.decode(reader, reader.uint32()); - break; - case 46: - message.reactionMessage = $root.proto.Message.ReactionMessage.decode(reader, reader.uint32()); - break; - case 47: - message.stickerSyncRmrMessage = $root.proto.Message.StickerSyncRMRMessage.decode(reader, reader.uint32()); - break; - case 48: - message.interactiveResponseMessage = $root.proto.Message.InteractiveResponseMessage.decode(reader, reader.uint32()); - break; - case 49: - message.pollCreationMessage = $root.proto.Message.PollCreationMessage.decode(reader, reader.uint32()); - break; - case 50: - message.pollUpdateMessage = $root.proto.Message.PollUpdateMessage.decode(reader, reader.uint32()); - break; - case 51: - message.keepInChatMessage = $root.proto.Message.KeepInChatMessage.decode(reader, reader.uint32()); - break; - case 53: - message.documentWithCaptionMessage = $root.proto.Message.FutureProofMessage.decode(reader, reader.uint32()); - break; - case 54: - message.requestPhoneNumberMessage = $root.proto.Message.RequestPhoneNumberMessage.decode(reader, reader.uint32()); - break; - case 55: - message.viewOnceMessageV2 = $root.proto.Message.FutureProofMessage.decode(reader, reader.uint32()); - break; - case 56: - message.encReactionMessage = $root.proto.Message.EncReactionMessage.decode(reader, reader.uint32()); - break; - case 58: - message.editedMessage = $root.proto.Message.FutureProofMessage.decode(reader, reader.uint32()); - break; - case 59: - message.viewOnceMessageV2Extension = $root.proto.Message.FutureProofMessage.decode(reader, reader.uint32()); - break; - case 60: - message.pollCreationMessageV2 = $root.proto.Message.PollCreationMessage.decode(reader, reader.uint32()); - break; - case 61: - message.scheduledCallCreationMessage = $root.proto.Message.ScheduledCallCreationMessage.decode(reader, reader.uint32()); - break; - case 62: - message.groupMentionedMessage = $root.proto.Message.FutureProofMessage.decode(reader, reader.uint32()); - break; - case 63: - message.pinInChatMessage = $root.proto.Message.PinInChatMessage.decode(reader, reader.uint32()); - break; - case 64: - message.pollCreationMessageV3 = $root.proto.Message.PollCreationMessage.decode(reader, reader.uint32()); - break; - case 65: - message.scheduledCallEditMessage = $root.proto.Message.ScheduledCallEditMessage.decode(reader, reader.uint32()); - break; - case 66: - message.ptvMessage = $root.proto.Message.VideoMessage.decode(reader, reader.uint32()); - break; - case 67: - message.botInvokeMessage = $root.proto.Message.FutureProofMessage.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Verifies an AppStateSyncKeyData message. + * @function verify + * @memberof proto.Message.AppStateSyncKeyData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AppStateSyncKeyData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.keyData != null && message.hasOwnProperty("keyData")) + if (!(message.keyData && typeof message.keyData.length === "number" || $util.isString(message.keyData))) + return "keyData: buffer expected"; + if (message.fingerprint != null && message.hasOwnProperty("fingerprint")) { + var error = $root.proto.Message.AppStateSyncKeyFingerprint.verify(message.fingerprint); + if (error) + return "fingerprint." + error; + } + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high))) + return "timestamp: integer|Long expected"; + return null; + }; + + /** + * Creates an AppStateSyncKeyData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.AppStateSyncKeyData + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.AppStateSyncKeyData} AppStateSyncKeyData + */ + AppStateSyncKeyData.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.AppStateSyncKeyData) + return object; + var message = new $root.proto.Message.AppStateSyncKeyData(); + if (object.keyData != null) + if (typeof object.keyData === "string") + $util.base64.decode(object.keyData, message.keyData = $util.newBuffer($util.base64.length(object.keyData)), 0); + else if (object.keyData.length) + message.keyData = object.keyData; + if (object.fingerprint != null) { + if (typeof object.fingerprint !== "object") + throw TypeError(".proto.Message.AppStateSyncKeyData.fingerprint: object expected"); + message.fingerprint = $root.proto.Message.AppStateSyncKeyFingerprint.fromObject(object.fingerprint); } - } - return message; - }; + if (object.timestamp != null) + if ($util.Long) + (message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = false; + else if (typeof object.timestamp === "string") + message.timestamp = parseInt(object.timestamp, 10); + else if (typeof object.timestamp === "number") + message.timestamp = object.timestamp; + else if (typeof object.timestamp === "object") + message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber(); + return message; + }; - /** - * Decodes a Message message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.Message - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.Message} Message - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Message.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a plain object from an AppStateSyncKeyData message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.AppStateSyncKeyData + * @static + * @param {proto.Message.AppStateSyncKeyData} message AppStateSyncKeyData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AppStateSyncKeyData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.keyData = ""; + else { + object.keyData = []; + if (options.bytes !== Array) + object.keyData = $util.newBuffer(object.keyData); + } + object.fingerprint = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.timestamp = options.longs === String ? "0" : 0; + } + if (message.keyData != null && message.hasOwnProperty("keyData")) + object.keyData = options.bytes === String ? $util.base64.encode(message.keyData, 0, message.keyData.length) : options.bytes === Array ? Array.prototype.slice.call(message.keyData) : message.keyData; + if (message.fingerprint != null && message.hasOwnProperty("fingerprint")) + object.fingerprint = $root.proto.Message.AppStateSyncKeyFingerprint.toObject(message.fingerprint, options); + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + if (typeof message.timestamp === "number") + object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp; + else + object.timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber() : message.timestamp; + return object; + }; - /** - * Verifies a Message message. - * @function verify - * @memberof proto.Message - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Message.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.conversation != null && message.hasOwnProperty("conversation")) - if (!$util.isString(message.conversation)) - return "conversation: string expected"; - if (message.senderKeyDistributionMessage != null && message.hasOwnProperty("senderKeyDistributionMessage")) { - var error = $root.proto.Message.SenderKeyDistributionMessage.verify(message.senderKeyDistributionMessage); - if (error) - return "senderKeyDistributionMessage." + error; - } - if (message.imageMessage != null && message.hasOwnProperty("imageMessage")) { - var error = $root.proto.Message.ImageMessage.verify(message.imageMessage); - if (error) - return "imageMessage." + error; - } - if (message.contactMessage != null && message.hasOwnProperty("contactMessage")) { - var error = $root.proto.Message.ContactMessage.verify(message.contactMessage); - if (error) - return "contactMessage." + error; - } - if (message.locationMessage != null && message.hasOwnProperty("locationMessage")) { - var error = $root.proto.Message.LocationMessage.verify(message.locationMessage); - if (error) - return "locationMessage." + error; - } - if (message.extendedTextMessage != null && message.hasOwnProperty("extendedTextMessage")) { - var error = $root.proto.Message.ExtendedTextMessage.verify(message.extendedTextMessage); - if (error) - return "extendedTextMessage." + error; - } - if (message.documentMessage != null && message.hasOwnProperty("documentMessage")) { - var error = $root.proto.Message.DocumentMessage.verify(message.documentMessage); - if (error) - return "documentMessage." + error; - } - if (message.audioMessage != null && message.hasOwnProperty("audioMessage")) { - var error = $root.proto.Message.AudioMessage.verify(message.audioMessage); - if (error) - return "audioMessage." + error; - } - if (message.videoMessage != null && message.hasOwnProperty("videoMessage")) { - var error = $root.proto.Message.VideoMessage.verify(message.videoMessage); - if (error) - return "videoMessage." + error; - } - if (message.call != null && message.hasOwnProperty("call")) { - var error = $root.proto.Message.Call.verify(message.call); - if (error) - return "call." + error; - } - if (message.chat != null && message.hasOwnProperty("chat")) { - var error = $root.proto.Message.Chat.verify(message.chat); - if (error) - return "chat." + error; - } - if (message.protocolMessage != null && message.hasOwnProperty("protocolMessage")) { - var error = $root.proto.Message.ProtocolMessage.verify(message.protocolMessage); - if (error) - return "protocolMessage." + error; - } - if (message.contactsArrayMessage != null && message.hasOwnProperty("contactsArrayMessage")) { - var error = $root.proto.Message.ContactsArrayMessage.verify(message.contactsArrayMessage); - if (error) - return "contactsArrayMessage." + error; - } - if (message.highlyStructuredMessage != null && message.hasOwnProperty("highlyStructuredMessage")) { - var error = $root.proto.Message.HighlyStructuredMessage.verify(message.highlyStructuredMessage); - if (error) - return "highlyStructuredMessage." + error; - } - if (message.fastRatchetKeySenderKeyDistributionMessage != null && message.hasOwnProperty("fastRatchetKeySenderKeyDistributionMessage")) { - var error = $root.proto.Message.SenderKeyDistributionMessage.verify(message.fastRatchetKeySenderKeyDistributionMessage); - if (error) - return "fastRatchetKeySenderKeyDistributionMessage." + error; - } - if (message.sendPaymentMessage != null && message.hasOwnProperty("sendPaymentMessage")) { - var error = $root.proto.Message.SendPaymentMessage.verify(message.sendPaymentMessage); - if (error) - return "sendPaymentMessage." + error; - } - if (message.liveLocationMessage != null && message.hasOwnProperty("liveLocationMessage")) { - var error = $root.proto.Message.LiveLocationMessage.verify(message.liveLocationMessage); - if (error) - return "liveLocationMessage." + error; - } - if (message.requestPaymentMessage != null && message.hasOwnProperty("requestPaymentMessage")) { - var error = $root.proto.Message.RequestPaymentMessage.verify(message.requestPaymentMessage); - if (error) - return "requestPaymentMessage." + error; - } - if (message.declinePaymentRequestMessage != null && message.hasOwnProperty("declinePaymentRequestMessage")) { - var error = $root.proto.Message.DeclinePaymentRequestMessage.verify(message.declinePaymentRequestMessage); - if (error) - return "declinePaymentRequestMessage." + error; - } - if (message.cancelPaymentRequestMessage != null && message.hasOwnProperty("cancelPaymentRequestMessage")) { - var error = $root.proto.Message.CancelPaymentRequestMessage.verify(message.cancelPaymentRequestMessage); - if (error) - return "cancelPaymentRequestMessage." + error; - } - if (message.templateMessage != null && message.hasOwnProperty("templateMessage")) { - var error = $root.proto.Message.TemplateMessage.verify(message.templateMessage); - if (error) - return "templateMessage." + error; - } - if (message.stickerMessage != null && message.hasOwnProperty("stickerMessage")) { - var error = $root.proto.Message.StickerMessage.verify(message.stickerMessage); - if (error) - return "stickerMessage." + error; - } - if (message.groupInviteMessage != null && message.hasOwnProperty("groupInviteMessage")) { - var error = $root.proto.Message.GroupInviteMessage.verify(message.groupInviteMessage); - if (error) - return "groupInviteMessage." + error; - } - if (message.templateButtonReplyMessage != null && message.hasOwnProperty("templateButtonReplyMessage")) { - var error = $root.proto.Message.TemplateButtonReplyMessage.verify(message.templateButtonReplyMessage); - if (error) - return "templateButtonReplyMessage." + error; - } - if (message.productMessage != null && message.hasOwnProperty("productMessage")) { - var error = $root.proto.Message.ProductMessage.verify(message.productMessage); - if (error) - return "productMessage." + error; - } - if (message.deviceSentMessage != null && message.hasOwnProperty("deviceSentMessage")) { - var error = $root.proto.Message.DeviceSentMessage.verify(message.deviceSentMessage); - if (error) - return "deviceSentMessage." + error; - } - if (message.messageContextInfo != null && message.hasOwnProperty("messageContextInfo")) { - var error = $root.proto.MessageContextInfo.verify(message.messageContextInfo); - if (error) - return "messageContextInfo." + error; - } - if (message.listMessage != null && message.hasOwnProperty("listMessage")) { - var error = $root.proto.Message.ListMessage.verify(message.listMessage); - if (error) - return "listMessage." + error; - } - if (message.viewOnceMessage != null && message.hasOwnProperty("viewOnceMessage")) { - var error = $root.proto.Message.FutureProofMessage.verify(message.viewOnceMessage); - if (error) - return "viewOnceMessage." + error; - } - if (message.orderMessage != null && message.hasOwnProperty("orderMessage")) { - var error = $root.proto.Message.OrderMessage.verify(message.orderMessage); - if (error) - return "orderMessage." + error; - } - if (message.listResponseMessage != null && message.hasOwnProperty("listResponseMessage")) { - var error = $root.proto.Message.ListResponseMessage.verify(message.listResponseMessage); - if (error) - return "listResponseMessage." + error; - } - if (message.ephemeralMessage != null && message.hasOwnProperty("ephemeralMessage")) { - var error = $root.proto.Message.FutureProofMessage.verify(message.ephemeralMessage); - if (error) - return "ephemeralMessage." + error; - } - if (message.invoiceMessage != null && message.hasOwnProperty("invoiceMessage")) { - var error = $root.proto.Message.InvoiceMessage.verify(message.invoiceMessage); - if (error) - return "invoiceMessage." + error; - } - if (message.buttonsMessage != null && message.hasOwnProperty("buttonsMessage")) { - var error = $root.proto.Message.ButtonsMessage.verify(message.buttonsMessage); - if (error) - return "buttonsMessage." + error; - } - if (message.buttonsResponseMessage != null && message.hasOwnProperty("buttonsResponseMessage")) { - var error = $root.proto.Message.ButtonsResponseMessage.verify(message.buttonsResponseMessage); - if (error) - return "buttonsResponseMessage." + error; - } - if (message.paymentInviteMessage != null && message.hasOwnProperty("paymentInviteMessage")) { - var error = $root.proto.Message.PaymentInviteMessage.verify(message.paymentInviteMessage); - if (error) - return "paymentInviteMessage." + error; - } - if (message.interactiveMessage != null && message.hasOwnProperty("interactiveMessage")) { - var error = $root.proto.Message.InteractiveMessage.verify(message.interactiveMessage); - if (error) - return "interactiveMessage." + error; - } - if (message.reactionMessage != null && message.hasOwnProperty("reactionMessage")) { - var error = $root.proto.Message.ReactionMessage.verify(message.reactionMessage); - if (error) - return "reactionMessage." + error; - } - if (message.stickerSyncRmrMessage != null && message.hasOwnProperty("stickerSyncRmrMessage")) { - var error = $root.proto.Message.StickerSyncRMRMessage.verify(message.stickerSyncRmrMessage); - if (error) - return "stickerSyncRmrMessage." + error; - } - if (message.interactiveResponseMessage != null && message.hasOwnProperty("interactiveResponseMessage")) { - var error = $root.proto.Message.InteractiveResponseMessage.verify(message.interactiveResponseMessage); - if (error) - return "interactiveResponseMessage." + error; - } - if (message.pollCreationMessage != null && message.hasOwnProperty("pollCreationMessage")) { - var error = $root.proto.Message.PollCreationMessage.verify(message.pollCreationMessage); - if (error) - return "pollCreationMessage." + error; - } - if (message.pollUpdateMessage != null && message.hasOwnProperty("pollUpdateMessage")) { - var error = $root.proto.Message.PollUpdateMessage.verify(message.pollUpdateMessage); - if (error) - return "pollUpdateMessage." + error; - } - if (message.keepInChatMessage != null && message.hasOwnProperty("keepInChatMessage")) { - var error = $root.proto.Message.KeepInChatMessage.verify(message.keepInChatMessage); - if (error) - return "keepInChatMessage." + error; - } - if (message.documentWithCaptionMessage != null && message.hasOwnProperty("documentWithCaptionMessage")) { - var error = $root.proto.Message.FutureProofMessage.verify(message.documentWithCaptionMessage); - if (error) - return "documentWithCaptionMessage." + error; - } - if (message.requestPhoneNumberMessage != null && message.hasOwnProperty("requestPhoneNumberMessage")) { - var error = $root.proto.Message.RequestPhoneNumberMessage.verify(message.requestPhoneNumberMessage); - if (error) - return "requestPhoneNumberMessage." + error; - } - if (message.viewOnceMessageV2 != null && message.hasOwnProperty("viewOnceMessageV2")) { - var error = $root.proto.Message.FutureProofMessage.verify(message.viewOnceMessageV2); - if (error) - return "viewOnceMessageV2." + error; - } - if (message.encReactionMessage != null && message.hasOwnProperty("encReactionMessage")) { - var error = $root.proto.Message.EncReactionMessage.verify(message.encReactionMessage); - if (error) - return "encReactionMessage." + error; - } - if (message.editedMessage != null && message.hasOwnProperty("editedMessage")) { - var error = $root.proto.Message.FutureProofMessage.verify(message.editedMessage); - if (error) - return "editedMessage." + error; - } - if (message.viewOnceMessageV2Extension != null && message.hasOwnProperty("viewOnceMessageV2Extension")) { - var error = $root.proto.Message.FutureProofMessage.verify(message.viewOnceMessageV2Extension); - if (error) - return "viewOnceMessageV2Extension." + error; - } - if (message.pollCreationMessageV2 != null && message.hasOwnProperty("pollCreationMessageV2")) { - var error = $root.proto.Message.PollCreationMessage.verify(message.pollCreationMessageV2); - if (error) - return "pollCreationMessageV2." + error; - } - if (message.scheduledCallCreationMessage != null && message.hasOwnProperty("scheduledCallCreationMessage")) { - var error = $root.proto.Message.ScheduledCallCreationMessage.verify(message.scheduledCallCreationMessage); - if (error) - return "scheduledCallCreationMessage." + error; - } - if (message.groupMentionedMessage != null && message.hasOwnProperty("groupMentionedMessage")) { - var error = $root.proto.Message.FutureProofMessage.verify(message.groupMentionedMessage); - if (error) - return "groupMentionedMessage." + error; - } - if (message.pinInChatMessage != null && message.hasOwnProperty("pinInChatMessage")) { - var error = $root.proto.Message.PinInChatMessage.verify(message.pinInChatMessage); - if (error) - return "pinInChatMessage." + error; - } - if (message.pollCreationMessageV3 != null && message.hasOwnProperty("pollCreationMessageV3")) { - var error = $root.proto.Message.PollCreationMessage.verify(message.pollCreationMessageV3); - if (error) - return "pollCreationMessageV3." + error; - } - if (message.scheduledCallEditMessage != null && message.hasOwnProperty("scheduledCallEditMessage")) { - var error = $root.proto.Message.ScheduledCallEditMessage.verify(message.scheduledCallEditMessage); - if (error) - return "scheduledCallEditMessage." + error; - } - if (message.ptvMessage != null && message.hasOwnProperty("ptvMessage")) { - var error = $root.proto.Message.VideoMessage.verify(message.ptvMessage); - if (error) - return "ptvMessage." + error; - } - if (message.botInvokeMessage != null && message.hasOwnProperty("botInvokeMessage")) { - var error = $root.proto.Message.FutureProofMessage.verify(message.botInvokeMessage); - if (error) - return "botInvokeMessage." + error; + /** + * Converts this AppStateSyncKeyData to JSON. + * @function toJSON + * @memberof proto.Message.AppStateSyncKeyData + * @instance + * @returns {Object.} JSON object + */ + AppStateSyncKeyData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AppStateSyncKeyData; + })(); + + Message.AppStateSyncKeyFingerprint = (function() { + + /** + * Properties of an AppStateSyncKeyFingerprint. + * @memberof proto.Message + * @interface IAppStateSyncKeyFingerprint + * @property {number|null} [rawId] AppStateSyncKeyFingerprint rawId + * @property {number|null} [currentIndex] AppStateSyncKeyFingerprint currentIndex + * @property {Array.|null} [deviceIndexes] AppStateSyncKeyFingerprint deviceIndexes + */ + + /** + * Constructs a new AppStateSyncKeyFingerprint. + * @memberof proto.Message + * @classdesc Represents an AppStateSyncKeyFingerprint. + * @implements IAppStateSyncKeyFingerprint + * @constructor + * @param {proto.Message.IAppStateSyncKeyFingerprint=} [properties] Properties to set + */ + function AppStateSyncKeyFingerprint(properties) { + this.deviceIndexes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - return null; - }; - /** - * Creates a Message message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.Message - * @static - * @param {Object.} object Plain object - * @returns {proto.Message} Message - */ - Message.fromObject = function fromObject(object) { - if (object instanceof $root.proto.Message) + /** + * AppStateSyncKeyFingerprint rawId. + * @member {number} rawId + * @memberof proto.Message.AppStateSyncKeyFingerprint + * @instance + */ + AppStateSyncKeyFingerprint.prototype.rawId = 0; + + /** + * AppStateSyncKeyFingerprint currentIndex. + * @member {number} currentIndex + * @memberof proto.Message.AppStateSyncKeyFingerprint + * @instance + */ + AppStateSyncKeyFingerprint.prototype.currentIndex = 0; + + /** + * AppStateSyncKeyFingerprint deviceIndexes. + * @member {Array.} deviceIndexes + * @memberof proto.Message.AppStateSyncKeyFingerprint + * @instance + */ + AppStateSyncKeyFingerprint.prototype.deviceIndexes = $util.emptyArray; + + /** + * Creates a new AppStateSyncKeyFingerprint instance using the specified properties. + * @function create + * @memberof proto.Message.AppStateSyncKeyFingerprint + * @static + * @param {proto.Message.IAppStateSyncKeyFingerprint=} [properties] Properties to set + * @returns {proto.Message.AppStateSyncKeyFingerprint} AppStateSyncKeyFingerprint instance + */ + AppStateSyncKeyFingerprint.create = function create(properties) { + return new AppStateSyncKeyFingerprint(properties); + }; + + /** + * Encodes the specified AppStateSyncKeyFingerprint message. Does not implicitly {@link proto.Message.AppStateSyncKeyFingerprint.verify|verify} messages. + * @function encode + * @memberof proto.Message.AppStateSyncKeyFingerprint + * @static + * @param {proto.Message.IAppStateSyncKeyFingerprint} message AppStateSyncKeyFingerprint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AppStateSyncKeyFingerprint.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rawId != null && Object.hasOwnProperty.call(message, "rawId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.rawId); + if (message.currentIndex != null && Object.hasOwnProperty.call(message, "currentIndex")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.currentIndex); + if (message.deviceIndexes != null && message.deviceIndexes.length) { + writer.uint32(/* id 3, wireType 2 =*/26).fork(); + for (var i = 0; i < message.deviceIndexes.length; ++i) + writer.uint32(message.deviceIndexes[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified AppStateSyncKeyFingerprint message, length delimited. Does not implicitly {@link proto.Message.AppStateSyncKeyFingerprint.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.AppStateSyncKeyFingerprint + * @static + * @param {proto.Message.IAppStateSyncKeyFingerprint} message AppStateSyncKeyFingerprint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AppStateSyncKeyFingerprint.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AppStateSyncKeyFingerprint message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.AppStateSyncKeyFingerprint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.AppStateSyncKeyFingerprint} AppStateSyncKeyFingerprint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AppStateSyncKeyFingerprint.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Message.AppStateSyncKeyFingerprint(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.rawId = reader.uint32(); + break; + case 2: + message.currentIndex = reader.uint32(); + break; + case 3: + if (!(message.deviceIndexes && message.deviceIndexes.length)) + message.deviceIndexes = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.deviceIndexes.push(reader.uint32()); + } else + message.deviceIndexes.push(reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AppStateSyncKeyFingerprint message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.AppStateSyncKeyFingerprint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.AppStateSyncKeyFingerprint} AppStateSyncKeyFingerprint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AppStateSyncKeyFingerprint.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AppStateSyncKeyFingerprint message. + * @function verify + * @memberof proto.Message.AppStateSyncKeyFingerprint + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AppStateSyncKeyFingerprint.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rawId != null && message.hasOwnProperty("rawId")) + if (!$util.isInteger(message.rawId)) + return "rawId: integer expected"; + if (message.currentIndex != null && message.hasOwnProperty("currentIndex")) + if (!$util.isInteger(message.currentIndex)) + return "currentIndex: integer expected"; + if (message.deviceIndexes != null && message.hasOwnProperty("deviceIndexes")) { + if (!Array.isArray(message.deviceIndexes)) + return "deviceIndexes: array expected"; + for (var i = 0; i < message.deviceIndexes.length; ++i) + if (!$util.isInteger(message.deviceIndexes[i])) + return "deviceIndexes: integer[] expected"; + } + return null; + }; + + /** + * Creates an AppStateSyncKeyFingerprint message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.AppStateSyncKeyFingerprint + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.AppStateSyncKeyFingerprint} AppStateSyncKeyFingerprint + */ + AppStateSyncKeyFingerprint.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.AppStateSyncKeyFingerprint) + return object; + var message = new $root.proto.Message.AppStateSyncKeyFingerprint(); + if (object.rawId != null) + message.rawId = object.rawId >>> 0; + if (object.currentIndex != null) + message.currentIndex = object.currentIndex >>> 0; + if (object.deviceIndexes) { + if (!Array.isArray(object.deviceIndexes)) + throw TypeError(".proto.Message.AppStateSyncKeyFingerprint.deviceIndexes: array expected"); + message.deviceIndexes = []; + for (var i = 0; i < object.deviceIndexes.length; ++i) + message.deviceIndexes[i] = object.deviceIndexes[i] >>> 0; + } + return message; + }; + + /** + * Creates a plain object from an AppStateSyncKeyFingerprint message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.AppStateSyncKeyFingerprint + * @static + * @param {proto.Message.AppStateSyncKeyFingerprint} message AppStateSyncKeyFingerprint + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AppStateSyncKeyFingerprint.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.deviceIndexes = []; + if (options.defaults) { + object.rawId = 0; + object.currentIndex = 0; + } + if (message.rawId != null && message.hasOwnProperty("rawId")) + object.rawId = message.rawId; + if (message.currentIndex != null && message.hasOwnProperty("currentIndex")) + object.currentIndex = message.currentIndex; + if (message.deviceIndexes && message.deviceIndexes.length) { + object.deviceIndexes = []; + for (var j = 0; j < message.deviceIndexes.length; ++j) + object.deviceIndexes[j] = message.deviceIndexes[j]; + } return object; - var message = new $root.proto.Message(); - if (object.conversation != null) - message.conversation = String(object.conversation); - if (object.senderKeyDistributionMessage != null) { - if (typeof object.senderKeyDistributionMessage !== "object") - throw TypeError(".proto.Message.senderKeyDistributionMessage: object expected"); - message.senderKeyDistributionMessage = $root.proto.Message.SenderKeyDistributionMessage.fromObject(object.senderKeyDistributionMessage); - } - if (object.imageMessage != null) { - if (typeof object.imageMessage !== "object") - throw TypeError(".proto.Message.imageMessage: object expected"); - message.imageMessage = $root.proto.Message.ImageMessage.fromObject(object.imageMessage); - } - if (object.contactMessage != null) { - if (typeof object.contactMessage !== "object") - throw TypeError(".proto.Message.contactMessage: object expected"); - message.contactMessage = $root.proto.Message.ContactMessage.fromObject(object.contactMessage); - } - if (object.locationMessage != null) { - if (typeof object.locationMessage !== "object") - throw TypeError(".proto.Message.locationMessage: object expected"); - message.locationMessage = $root.proto.Message.LocationMessage.fromObject(object.locationMessage); - } - if (object.extendedTextMessage != null) { - if (typeof object.extendedTextMessage !== "object") - throw TypeError(".proto.Message.extendedTextMessage: object expected"); - message.extendedTextMessage = $root.proto.Message.ExtendedTextMessage.fromObject(object.extendedTextMessage); - } - if (object.documentMessage != null) { - if (typeof object.documentMessage !== "object") - throw TypeError(".proto.Message.documentMessage: object expected"); - message.documentMessage = $root.proto.Message.DocumentMessage.fromObject(object.documentMessage); - } - if (object.audioMessage != null) { - if (typeof object.audioMessage !== "object") - throw TypeError(".proto.Message.audioMessage: object expected"); - message.audioMessage = $root.proto.Message.AudioMessage.fromObject(object.audioMessage); - } - if (object.videoMessage != null) { - if (typeof object.videoMessage !== "object") - throw TypeError(".proto.Message.videoMessage: object expected"); - message.videoMessage = $root.proto.Message.VideoMessage.fromObject(object.videoMessage); - } - if (object.call != null) { - if (typeof object.call !== "object") - throw TypeError(".proto.Message.call: object expected"); - message.call = $root.proto.Message.Call.fromObject(object.call); - } - if (object.chat != null) { - if (typeof object.chat !== "object") - throw TypeError(".proto.Message.chat: object expected"); - message.chat = $root.proto.Message.Chat.fromObject(object.chat); - } - if (object.protocolMessage != null) { - if (typeof object.protocolMessage !== "object") - throw TypeError(".proto.Message.protocolMessage: object expected"); - message.protocolMessage = $root.proto.Message.ProtocolMessage.fromObject(object.protocolMessage); - } - if (object.contactsArrayMessage != null) { - if (typeof object.contactsArrayMessage !== "object") - throw TypeError(".proto.Message.contactsArrayMessage: object expected"); - message.contactsArrayMessage = $root.proto.Message.ContactsArrayMessage.fromObject(object.contactsArrayMessage); - } - if (object.highlyStructuredMessage != null) { - if (typeof object.highlyStructuredMessage !== "object") - throw TypeError(".proto.Message.highlyStructuredMessage: object expected"); - message.highlyStructuredMessage = $root.proto.Message.HighlyStructuredMessage.fromObject(object.highlyStructuredMessage); - } - if (object.fastRatchetKeySenderKeyDistributionMessage != null) { - if (typeof object.fastRatchetKeySenderKeyDistributionMessage !== "object") - throw TypeError(".proto.Message.fastRatchetKeySenderKeyDistributionMessage: object expected"); - message.fastRatchetKeySenderKeyDistributionMessage = $root.proto.Message.SenderKeyDistributionMessage.fromObject(object.fastRatchetKeySenderKeyDistributionMessage); - } - if (object.sendPaymentMessage != null) { - if (typeof object.sendPaymentMessage !== "object") - throw TypeError(".proto.Message.sendPaymentMessage: object expected"); - message.sendPaymentMessage = $root.proto.Message.SendPaymentMessage.fromObject(object.sendPaymentMessage); - } - if (object.liveLocationMessage != null) { - if (typeof object.liveLocationMessage !== "object") - throw TypeError(".proto.Message.liveLocationMessage: object expected"); - message.liveLocationMessage = $root.proto.Message.LiveLocationMessage.fromObject(object.liveLocationMessage); - } - if (object.requestPaymentMessage != null) { - if (typeof object.requestPaymentMessage !== "object") - throw TypeError(".proto.Message.requestPaymentMessage: object expected"); - message.requestPaymentMessage = $root.proto.Message.RequestPaymentMessage.fromObject(object.requestPaymentMessage); - } - if (object.declinePaymentRequestMessage != null) { - if (typeof object.declinePaymentRequestMessage !== "object") - throw TypeError(".proto.Message.declinePaymentRequestMessage: object expected"); - message.declinePaymentRequestMessage = $root.proto.Message.DeclinePaymentRequestMessage.fromObject(object.declinePaymentRequestMessage); - } - if (object.cancelPaymentRequestMessage != null) { - if (typeof object.cancelPaymentRequestMessage !== "object") - throw TypeError(".proto.Message.cancelPaymentRequestMessage: object expected"); - message.cancelPaymentRequestMessage = $root.proto.Message.CancelPaymentRequestMessage.fromObject(object.cancelPaymentRequestMessage); - } - if (object.templateMessage != null) { - if (typeof object.templateMessage !== "object") - throw TypeError(".proto.Message.templateMessage: object expected"); - message.templateMessage = $root.proto.Message.TemplateMessage.fromObject(object.templateMessage); - } - if (object.stickerMessage != null) { - if (typeof object.stickerMessage !== "object") - throw TypeError(".proto.Message.stickerMessage: object expected"); - message.stickerMessage = $root.proto.Message.StickerMessage.fromObject(object.stickerMessage); - } - if (object.groupInviteMessage != null) { - if (typeof object.groupInviteMessage !== "object") - throw TypeError(".proto.Message.groupInviteMessage: object expected"); - message.groupInviteMessage = $root.proto.Message.GroupInviteMessage.fromObject(object.groupInviteMessage); - } - if (object.templateButtonReplyMessage != null) { - if (typeof object.templateButtonReplyMessage !== "object") - throw TypeError(".proto.Message.templateButtonReplyMessage: object expected"); - message.templateButtonReplyMessage = $root.proto.Message.TemplateButtonReplyMessage.fromObject(object.templateButtonReplyMessage); - } - if (object.productMessage != null) { - if (typeof object.productMessage !== "object") - throw TypeError(".proto.Message.productMessage: object expected"); - message.productMessage = $root.proto.Message.ProductMessage.fromObject(object.productMessage); - } - if (object.deviceSentMessage != null) { - if (typeof object.deviceSentMessage !== "object") - throw TypeError(".proto.Message.deviceSentMessage: object expected"); - message.deviceSentMessage = $root.proto.Message.DeviceSentMessage.fromObject(object.deviceSentMessage); - } - if (object.messageContextInfo != null) { - if (typeof object.messageContextInfo !== "object") - throw TypeError(".proto.Message.messageContextInfo: object expected"); - message.messageContextInfo = $root.proto.MessageContextInfo.fromObject(object.messageContextInfo); - } - if (object.listMessage != null) { - if (typeof object.listMessage !== "object") - throw TypeError(".proto.Message.listMessage: object expected"); - message.listMessage = $root.proto.Message.ListMessage.fromObject(object.listMessage); - } - if (object.viewOnceMessage != null) { - if (typeof object.viewOnceMessage !== "object") - throw TypeError(".proto.Message.viewOnceMessage: object expected"); - message.viewOnceMessage = $root.proto.Message.FutureProofMessage.fromObject(object.viewOnceMessage); - } - if (object.orderMessage != null) { - if (typeof object.orderMessage !== "object") - throw TypeError(".proto.Message.orderMessage: object expected"); - message.orderMessage = $root.proto.Message.OrderMessage.fromObject(object.orderMessage); - } - if (object.listResponseMessage != null) { - if (typeof object.listResponseMessage !== "object") - throw TypeError(".proto.Message.listResponseMessage: object expected"); - message.listResponseMessage = $root.proto.Message.ListResponseMessage.fromObject(object.listResponseMessage); - } - if (object.ephemeralMessage != null) { - if (typeof object.ephemeralMessage !== "object") - throw TypeError(".proto.Message.ephemeralMessage: object expected"); - message.ephemeralMessage = $root.proto.Message.FutureProofMessage.fromObject(object.ephemeralMessage); - } - if (object.invoiceMessage != null) { - if (typeof object.invoiceMessage !== "object") - throw TypeError(".proto.Message.invoiceMessage: object expected"); - message.invoiceMessage = $root.proto.Message.InvoiceMessage.fromObject(object.invoiceMessage); - } - if (object.buttonsMessage != null) { - if (typeof object.buttonsMessage !== "object") - throw TypeError(".proto.Message.buttonsMessage: object expected"); - message.buttonsMessage = $root.proto.Message.ButtonsMessage.fromObject(object.buttonsMessage); - } - if (object.buttonsResponseMessage != null) { - if (typeof object.buttonsResponseMessage !== "object") - throw TypeError(".proto.Message.buttonsResponseMessage: object expected"); - message.buttonsResponseMessage = $root.proto.Message.ButtonsResponseMessage.fromObject(object.buttonsResponseMessage); - } - if (object.paymentInviteMessage != null) { - if (typeof object.paymentInviteMessage !== "object") - throw TypeError(".proto.Message.paymentInviteMessage: object expected"); - message.paymentInviteMessage = $root.proto.Message.PaymentInviteMessage.fromObject(object.paymentInviteMessage); - } - if (object.interactiveMessage != null) { - if (typeof object.interactiveMessage !== "object") - throw TypeError(".proto.Message.interactiveMessage: object expected"); - message.interactiveMessage = $root.proto.Message.InteractiveMessage.fromObject(object.interactiveMessage); - } - if (object.reactionMessage != null) { - if (typeof object.reactionMessage !== "object") - throw TypeError(".proto.Message.reactionMessage: object expected"); - message.reactionMessage = $root.proto.Message.ReactionMessage.fromObject(object.reactionMessage); - } - if (object.stickerSyncRmrMessage != null) { - if (typeof object.stickerSyncRmrMessage !== "object") - throw TypeError(".proto.Message.stickerSyncRmrMessage: object expected"); - message.stickerSyncRmrMessage = $root.proto.Message.StickerSyncRMRMessage.fromObject(object.stickerSyncRmrMessage); - } - if (object.interactiveResponseMessage != null) { - if (typeof object.interactiveResponseMessage !== "object") - throw TypeError(".proto.Message.interactiveResponseMessage: object expected"); - message.interactiveResponseMessage = $root.proto.Message.InteractiveResponseMessage.fromObject(object.interactiveResponseMessage); - } - if (object.pollCreationMessage != null) { - if (typeof object.pollCreationMessage !== "object") - throw TypeError(".proto.Message.pollCreationMessage: object expected"); - message.pollCreationMessage = $root.proto.Message.PollCreationMessage.fromObject(object.pollCreationMessage); - } - if (object.pollUpdateMessage != null) { - if (typeof object.pollUpdateMessage !== "object") - throw TypeError(".proto.Message.pollUpdateMessage: object expected"); - message.pollUpdateMessage = $root.proto.Message.PollUpdateMessage.fromObject(object.pollUpdateMessage); - } - if (object.keepInChatMessage != null) { - if (typeof object.keepInChatMessage !== "object") - throw TypeError(".proto.Message.keepInChatMessage: object expected"); - message.keepInChatMessage = $root.proto.Message.KeepInChatMessage.fromObject(object.keepInChatMessage); - } - if (object.documentWithCaptionMessage != null) { - if (typeof object.documentWithCaptionMessage !== "object") - throw TypeError(".proto.Message.documentWithCaptionMessage: object expected"); - message.documentWithCaptionMessage = $root.proto.Message.FutureProofMessage.fromObject(object.documentWithCaptionMessage); - } - if (object.requestPhoneNumberMessage != null) { - if (typeof object.requestPhoneNumberMessage !== "object") - throw TypeError(".proto.Message.requestPhoneNumberMessage: object expected"); - message.requestPhoneNumberMessage = $root.proto.Message.RequestPhoneNumberMessage.fromObject(object.requestPhoneNumberMessage); - } - if (object.viewOnceMessageV2 != null) { - if (typeof object.viewOnceMessageV2 !== "object") - throw TypeError(".proto.Message.viewOnceMessageV2: object expected"); - message.viewOnceMessageV2 = $root.proto.Message.FutureProofMessage.fromObject(object.viewOnceMessageV2); - } - if (object.encReactionMessage != null) { - if (typeof object.encReactionMessage !== "object") - throw TypeError(".proto.Message.encReactionMessage: object expected"); - message.encReactionMessage = $root.proto.Message.EncReactionMessage.fromObject(object.encReactionMessage); - } - if (object.editedMessage != null) { - if (typeof object.editedMessage !== "object") - throw TypeError(".proto.Message.editedMessage: object expected"); - message.editedMessage = $root.proto.Message.FutureProofMessage.fromObject(object.editedMessage); - } - if (object.viewOnceMessageV2Extension != null) { - if (typeof object.viewOnceMessageV2Extension !== "object") - throw TypeError(".proto.Message.viewOnceMessageV2Extension: object expected"); - message.viewOnceMessageV2Extension = $root.proto.Message.FutureProofMessage.fromObject(object.viewOnceMessageV2Extension); - } - if (object.pollCreationMessageV2 != null) { - if (typeof object.pollCreationMessageV2 !== "object") - throw TypeError(".proto.Message.pollCreationMessageV2: object expected"); - message.pollCreationMessageV2 = $root.proto.Message.PollCreationMessage.fromObject(object.pollCreationMessageV2); - } - if (object.scheduledCallCreationMessage != null) { - if (typeof object.scheduledCallCreationMessage !== "object") - throw TypeError(".proto.Message.scheduledCallCreationMessage: object expected"); - message.scheduledCallCreationMessage = $root.proto.Message.ScheduledCallCreationMessage.fromObject(object.scheduledCallCreationMessage); - } - if (object.groupMentionedMessage != null) { - if (typeof object.groupMentionedMessage !== "object") - throw TypeError(".proto.Message.groupMentionedMessage: object expected"); - message.groupMentionedMessage = $root.proto.Message.FutureProofMessage.fromObject(object.groupMentionedMessage); - } - if (object.pinInChatMessage != null) { - if (typeof object.pinInChatMessage !== "object") - throw TypeError(".proto.Message.pinInChatMessage: object expected"); - message.pinInChatMessage = $root.proto.Message.PinInChatMessage.fromObject(object.pinInChatMessage); - } - if (object.pollCreationMessageV3 != null) { - if (typeof object.pollCreationMessageV3 !== "object") - throw TypeError(".proto.Message.pollCreationMessageV3: object expected"); - message.pollCreationMessageV3 = $root.proto.Message.PollCreationMessage.fromObject(object.pollCreationMessageV3); - } - if (object.scheduledCallEditMessage != null) { - if (typeof object.scheduledCallEditMessage !== "object") - throw TypeError(".proto.Message.scheduledCallEditMessage: object expected"); - message.scheduledCallEditMessage = $root.proto.Message.ScheduledCallEditMessage.fromObject(object.scheduledCallEditMessage); - } - if (object.ptvMessage != null) { - if (typeof object.ptvMessage !== "object") - throw TypeError(".proto.Message.ptvMessage: object expected"); - message.ptvMessage = $root.proto.Message.VideoMessage.fromObject(object.ptvMessage); - } - if (object.botInvokeMessage != null) { - if (typeof object.botInvokeMessage !== "object") - throw TypeError(".proto.Message.botInvokeMessage: object expected"); - message.botInvokeMessage = $root.proto.Message.FutureProofMessage.fromObject(object.botInvokeMessage); + }; + + /** + * Converts this AppStateSyncKeyFingerprint to JSON. + * @function toJSON + * @memberof proto.Message.AppStateSyncKeyFingerprint + * @instance + * @returns {Object.} JSON object + */ + AppStateSyncKeyFingerprint.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AppStateSyncKeyFingerprint; + })(); + + Message.AppStateSyncKeyId = (function() { + + /** + * Properties of an AppStateSyncKeyId. + * @memberof proto.Message + * @interface IAppStateSyncKeyId + * @property {Uint8Array|null} [keyId] AppStateSyncKeyId keyId + */ + + /** + * Constructs a new AppStateSyncKeyId. + * @memberof proto.Message + * @classdesc Represents an AppStateSyncKeyId. + * @implements IAppStateSyncKeyId + * @constructor + * @param {proto.Message.IAppStateSyncKeyId=} [properties] Properties to set + */ + function AppStateSyncKeyId(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - return message; - }; - /** - * Creates a plain object from a Message message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.Message - * @static - * @param {proto.Message} message Message - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Message.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.conversation = ""; - object.senderKeyDistributionMessage = null; - object.imageMessage = null; - object.contactMessage = null; - object.locationMessage = null; - object.extendedTextMessage = null; - object.documentMessage = null; - object.audioMessage = null; - object.videoMessage = null; - object.call = null; - object.chat = null; - object.protocolMessage = null; - object.contactsArrayMessage = null; - object.highlyStructuredMessage = null; - object.fastRatchetKeySenderKeyDistributionMessage = null; - object.sendPaymentMessage = null; - object.liveLocationMessage = null; - object.requestPaymentMessage = null; - object.declinePaymentRequestMessage = null; - object.cancelPaymentRequestMessage = null; - object.templateMessage = null; - object.stickerMessage = null; - object.groupInviteMessage = null; - object.templateButtonReplyMessage = null; - object.productMessage = null; - object.deviceSentMessage = null; - object.messageContextInfo = null; - object.listMessage = null; - object.viewOnceMessage = null; - object.orderMessage = null; - object.listResponseMessage = null; - object.ephemeralMessage = null; - object.invoiceMessage = null; - object.buttonsMessage = null; - object.buttonsResponseMessage = null; - object.paymentInviteMessage = null; - object.interactiveMessage = null; - object.reactionMessage = null; - object.stickerSyncRmrMessage = null; - object.interactiveResponseMessage = null; - object.pollCreationMessage = null; - object.pollUpdateMessage = null; - object.keepInChatMessage = null; - object.documentWithCaptionMessage = null; - object.requestPhoneNumberMessage = null; - object.viewOnceMessageV2 = null; - object.encReactionMessage = null; - object.editedMessage = null; - object.viewOnceMessageV2Extension = null; - object.pollCreationMessageV2 = null; - object.scheduledCallCreationMessage = null; - object.groupMentionedMessage = null; - object.pinInChatMessage = null; - object.pollCreationMessageV3 = null; - object.scheduledCallEditMessage = null; - object.ptvMessage = null; - object.botInvokeMessage = null; + /** + * AppStateSyncKeyId keyId. + * @member {Uint8Array} keyId + * @memberof proto.Message.AppStateSyncKeyId + * @instance + */ + AppStateSyncKeyId.prototype.keyId = $util.newBuffer([]); + + /** + * Creates a new AppStateSyncKeyId instance using the specified properties. + * @function create + * @memberof proto.Message.AppStateSyncKeyId + * @static + * @param {proto.Message.IAppStateSyncKeyId=} [properties] Properties to set + * @returns {proto.Message.AppStateSyncKeyId} AppStateSyncKeyId instance + */ + AppStateSyncKeyId.create = function create(properties) { + return new AppStateSyncKeyId(properties); + }; + + /** + * Encodes the specified AppStateSyncKeyId message. Does not implicitly {@link proto.Message.AppStateSyncKeyId.verify|verify} messages. + * @function encode + * @memberof proto.Message.AppStateSyncKeyId + * @static + * @param {proto.Message.IAppStateSyncKeyId} message AppStateSyncKeyId message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AppStateSyncKeyId.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.keyId != null && Object.hasOwnProperty.call(message, "keyId")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.keyId); + return writer; + }; + + /** + * Encodes the specified AppStateSyncKeyId message, length delimited. Does not implicitly {@link proto.Message.AppStateSyncKeyId.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.AppStateSyncKeyId + * @static + * @param {proto.Message.IAppStateSyncKeyId} message AppStateSyncKeyId message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AppStateSyncKeyId.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AppStateSyncKeyId message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.AppStateSyncKeyId + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.AppStateSyncKeyId} AppStateSyncKeyId + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AppStateSyncKeyId.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Message.AppStateSyncKeyId(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.keyId = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AppStateSyncKeyId message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.AppStateSyncKeyId + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.AppStateSyncKeyId} AppStateSyncKeyId + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AppStateSyncKeyId.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AppStateSyncKeyId message. + * @function verify + * @memberof proto.Message.AppStateSyncKeyId + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AppStateSyncKeyId.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.keyId != null && message.hasOwnProperty("keyId")) + if (!(message.keyId && typeof message.keyId.length === "number" || $util.isString(message.keyId))) + return "keyId: buffer expected"; + return null; + }; + + /** + * Creates an AppStateSyncKeyId message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.AppStateSyncKeyId + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.AppStateSyncKeyId} AppStateSyncKeyId + */ + AppStateSyncKeyId.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.AppStateSyncKeyId) + return object; + var message = new $root.proto.Message.AppStateSyncKeyId(); + if (object.keyId != null) + if (typeof object.keyId === "string") + $util.base64.decode(object.keyId, message.keyId = $util.newBuffer($util.base64.length(object.keyId)), 0); + else if (object.keyId.length) + message.keyId = object.keyId; + return message; + }; + + /** + * Creates a plain object from an AppStateSyncKeyId message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.AppStateSyncKeyId + * @static + * @param {proto.Message.AppStateSyncKeyId} message AppStateSyncKeyId + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AppStateSyncKeyId.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if (options.bytes === String) + object.keyId = ""; + else { + object.keyId = []; + if (options.bytes !== Array) + object.keyId = $util.newBuffer(object.keyId); + } + if (message.keyId != null && message.hasOwnProperty("keyId")) + object.keyId = options.bytes === String ? $util.base64.encode(message.keyId, 0, message.keyId.length) : options.bytes === Array ? Array.prototype.slice.call(message.keyId) : message.keyId; + return object; + }; + + /** + * Converts this AppStateSyncKeyId to JSON. + * @function toJSON + * @memberof proto.Message.AppStateSyncKeyId + * @instance + * @returns {Object.} JSON object + */ + AppStateSyncKeyId.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AppStateSyncKeyId; + })(); + + Message.AppStateSyncKeyRequest = (function() { + + /** + * Properties of an AppStateSyncKeyRequest. + * @memberof proto.Message + * @interface IAppStateSyncKeyRequest + * @property {Array.|null} [keyIds] AppStateSyncKeyRequest keyIds + */ + + /** + * Constructs a new AppStateSyncKeyRequest. + * @memberof proto.Message + * @classdesc Represents an AppStateSyncKeyRequest. + * @implements IAppStateSyncKeyRequest + * @constructor + * @param {proto.Message.IAppStateSyncKeyRequest=} [properties] Properties to set + */ + function AppStateSyncKeyRequest(properties) { + this.keyIds = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - if (message.conversation != null && message.hasOwnProperty("conversation")) - object.conversation = message.conversation; - if (message.senderKeyDistributionMessage != null && message.hasOwnProperty("senderKeyDistributionMessage")) - object.senderKeyDistributionMessage = $root.proto.Message.SenderKeyDistributionMessage.toObject(message.senderKeyDistributionMessage, options); - if (message.imageMessage != null && message.hasOwnProperty("imageMessage")) - object.imageMessage = $root.proto.Message.ImageMessage.toObject(message.imageMessage, options); - if (message.contactMessage != null && message.hasOwnProperty("contactMessage")) - object.contactMessage = $root.proto.Message.ContactMessage.toObject(message.contactMessage, options); - if (message.locationMessage != null && message.hasOwnProperty("locationMessage")) - object.locationMessage = $root.proto.Message.LocationMessage.toObject(message.locationMessage, options); - if (message.extendedTextMessage != null && message.hasOwnProperty("extendedTextMessage")) - object.extendedTextMessage = $root.proto.Message.ExtendedTextMessage.toObject(message.extendedTextMessage, options); - if (message.documentMessage != null && message.hasOwnProperty("documentMessage")) - object.documentMessage = $root.proto.Message.DocumentMessage.toObject(message.documentMessage, options); - if (message.audioMessage != null && message.hasOwnProperty("audioMessage")) - object.audioMessage = $root.proto.Message.AudioMessage.toObject(message.audioMessage, options); - if (message.videoMessage != null && message.hasOwnProperty("videoMessage")) - object.videoMessage = $root.proto.Message.VideoMessage.toObject(message.videoMessage, options); - if (message.call != null && message.hasOwnProperty("call")) - object.call = $root.proto.Message.Call.toObject(message.call, options); - if (message.chat != null && message.hasOwnProperty("chat")) - object.chat = $root.proto.Message.Chat.toObject(message.chat, options); - if (message.protocolMessage != null && message.hasOwnProperty("protocolMessage")) - object.protocolMessage = $root.proto.Message.ProtocolMessage.toObject(message.protocolMessage, options); - if (message.contactsArrayMessage != null && message.hasOwnProperty("contactsArrayMessage")) - object.contactsArrayMessage = $root.proto.Message.ContactsArrayMessage.toObject(message.contactsArrayMessage, options); - if (message.highlyStructuredMessage != null && message.hasOwnProperty("highlyStructuredMessage")) - object.highlyStructuredMessage = $root.proto.Message.HighlyStructuredMessage.toObject(message.highlyStructuredMessage, options); - if (message.fastRatchetKeySenderKeyDistributionMessage != null && message.hasOwnProperty("fastRatchetKeySenderKeyDistributionMessage")) - object.fastRatchetKeySenderKeyDistributionMessage = $root.proto.Message.SenderKeyDistributionMessage.toObject(message.fastRatchetKeySenderKeyDistributionMessage, options); - if (message.sendPaymentMessage != null && message.hasOwnProperty("sendPaymentMessage")) - object.sendPaymentMessage = $root.proto.Message.SendPaymentMessage.toObject(message.sendPaymentMessage, options); - if (message.liveLocationMessage != null && message.hasOwnProperty("liveLocationMessage")) - object.liveLocationMessage = $root.proto.Message.LiveLocationMessage.toObject(message.liveLocationMessage, options); - if (message.requestPaymentMessage != null && message.hasOwnProperty("requestPaymentMessage")) - object.requestPaymentMessage = $root.proto.Message.RequestPaymentMessage.toObject(message.requestPaymentMessage, options); - if (message.declinePaymentRequestMessage != null && message.hasOwnProperty("declinePaymentRequestMessage")) - object.declinePaymentRequestMessage = $root.proto.Message.DeclinePaymentRequestMessage.toObject(message.declinePaymentRequestMessage, options); - if (message.cancelPaymentRequestMessage != null && message.hasOwnProperty("cancelPaymentRequestMessage")) - object.cancelPaymentRequestMessage = $root.proto.Message.CancelPaymentRequestMessage.toObject(message.cancelPaymentRequestMessage, options); - if (message.templateMessage != null && message.hasOwnProperty("templateMessage")) - object.templateMessage = $root.proto.Message.TemplateMessage.toObject(message.templateMessage, options); - if (message.stickerMessage != null && message.hasOwnProperty("stickerMessage")) - object.stickerMessage = $root.proto.Message.StickerMessage.toObject(message.stickerMessage, options); - if (message.groupInviteMessage != null && message.hasOwnProperty("groupInviteMessage")) - object.groupInviteMessage = $root.proto.Message.GroupInviteMessage.toObject(message.groupInviteMessage, options); - if (message.templateButtonReplyMessage != null && message.hasOwnProperty("templateButtonReplyMessage")) - object.templateButtonReplyMessage = $root.proto.Message.TemplateButtonReplyMessage.toObject(message.templateButtonReplyMessage, options); - if (message.productMessage != null && message.hasOwnProperty("productMessage")) - object.productMessage = $root.proto.Message.ProductMessage.toObject(message.productMessage, options); - if (message.deviceSentMessage != null && message.hasOwnProperty("deviceSentMessage")) - object.deviceSentMessage = $root.proto.Message.DeviceSentMessage.toObject(message.deviceSentMessage, options); - if (message.messageContextInfo != null && message.hasOwnProperty("messageContextInfo")) - object.messageContextInfo = $root.proto.MessageContextInfo.toObject(message.messageContextInfo, options); - if (message.listMessage != null && message.hasOwnProperty("listMessage")) - object.listMessage = $root.proto.Message.ListMessage.toObject(message.listMessage, options); - if (message.viewOnceMessage != null && message.hasOwnProperty("viewOnceMessage")) - object.viewOnceMessage = $root.proto.Message.FutureProofMessage.toObject(message.viewOnceMessage, options); - if (message.orderMessage != null && message.hasOwnProperty("orderMessage")) - object.orderMessage = $root.proto.Message.OrderMessage.toObject(message.orderMessage, options); - if (message.listResponseMessage != null && message.hasOwnProperty("listResponseMessage")) - object.listResponseMessage = $root.proto.Message.ListResponseMessage.toObject(message.listResponseMessage, options); - if (message.ephemeralMessage != null && message.hasOwnProperty("ephemeralMessage")) - object.ephemeralMessage = $root.proto.Message.FutureProofMessage.toObject(message.ephemeralMessage, options); - if (message.invoiceMessage != null && message.hasOwnProperty("invoiceMessage")) - object.invoiceMessage = $root.proto.Message.InvoiceMessage.toObject(message.invoiceMessage, options); - if (message.buttonsMessage != null && message.hasOwnProperty("buttonsMessage")) - object.buttonsMessage = $root.proto.Message.ButtonsMessage.toObject(message.buttonsMessage, options); - if (message.buttonsResponseMessage != null && message.hasOwnProperty("buttonsResponseMessage")) - object.buttonsResponseMessage = $root.proto.Message.ButtonsResponseMessage.toObject(message.buttonsResponseMessage, options); - if (message.paymentInviteMessage != null && message.hasOwnProperty("paymentInviteMessage")) - object.paymentInviteMessage = $root.proto.Message.PaymentInviteMessage.toObject(message.paymentInviteMessage, options); - if (message.interactiveMessage != null && message.hasOwnProperty("interactiveMessage")) - object.interactiveMessage = $root.proto.Message.InteractiveMessage.toObject(message.interactiveMessage, options); - if (message.reactionMessage != null && message.hasOwnProperty("reactionMessage")) - object.reactionMessage = $root.proto.Message.ReactionMessage.toObject(message.reactionMessage, options); - if (message.stickerSyncRmrMessage != null && message.hasOwnProperty("stickerSyncRmrMessage")) - object.stickerSyncRmrMessage = $root.proto.Message.StickerSyncRMRMessage.toObject(message.stickerSyncRmrMessage, options); - if (message.interactiveResponseMessage != null && message.hasOwnProperty("interactiveResponseMessage")) - object.interactiveResponseMessage = $root.proto.Message.InteractiveResponseMessage.toObject(message.interactiveResponseMessage, options); - if (message.pollCreationMessage != null && message.hasOwnProperty("pollCreationMessage")) - object.pollCreationMessage = $root.proto.Message.PollCreationMessage.toObject(message.pollCreationMessage, options); - if (message.pollUpdateMessage != null && message.hasOwnProperty("pollUpdateMessage")) - object.pollUpdateMessage = $root.proto.Message.PollUpdateMessage.toObject(message.pollUpdateMessage, options); - if (message.keepInChatMessage != null && message.hasOwnProperty("keepInChatMessage")) - object.keepInChatMessage = $root.proto.Message.KeepInChatMessage.toObject(message.keepInChatMessage, options); - if (message.documentWithCaptionMessage != null && message.hasOwnProperty("documentWithCaptionMessage")) - object.documentWithCaptionMessage = $root.proto.Message.FutureProofMessage.toObject(message.documentWithCaptionMessage, options); - if (message.requestPhoneNumberMessage != null && message.hasOwnProperty("requestPhoneNumberMessage")) - object.requestPhoneNumberMessage = $root.proto.Message.RequestPhoneNumberMessage.toObject(message.requestPhoneNumberMessage, options); - if (message.viewOnceMessageV2 != null && message.hasOwnProperty("viewOnceMessageV2")) - object.viewOnceMessageV2 = $root.proto.Message.FutureProofMessage.toObject(message.viewOnceMessageV2, options); - if (message.encReactionMessage != null && message.hasOwnProperty("encReactionMessage")) - object.encReactionMessage = $root.proto.Message.EncReactionMessage.toObject(message.encReactionMessage, options); - if (message.editedMessage != null && message.hasOwnProperty("editedMessage")) - object.editedMessage = $root.proto.Message.FutureProofMessage.toObject(message.editedMessage, options); - if (message.viewOnceMessageV2Extension != null && message.hasOwnProperty("viewOnceMessageV2Extension")) - object.viewOnceMessageV2Extension = $root.proto.Message.FutureProofMessage.toObject(message.viewOnceMessageV2Extension, options); - if (message.pollCreationMessageV2 != null && message.hasOwnProperty("pollCreationMessageV2")) - object.pollCreationMessageV2 = $root.proto.Message.PollCreationMessage.toObject(message.pollCreationMessageV2, options); - if (message.scheduledCallCreationMessage != null && message.hasOwnProperty("scheduledCallCreationMessage")) - object.scheduledCallCreationMessage = $root.proto.Message.ScheduledCallCreationMessage.toObject(message.scheduledCallCreationMessage, options); - if (message.groupMentionedMessage != null && message.hasOwnProperty("groupMentionedMessage")) - object.groupMentionedMessage = $root.proto.Message.FutureProofMessage.toObject(message.groupMentionedMessage, options); - if (message.pinInChatMessage != null && message.hasOwnProperty("pinInChatMessage")) - object.pinInChatMessage = $root.proto.Message.PinInChatMessage.toObject(message.pinInChatMessage, options); - if (message.pollCreationMessageV3 != null && message.hasOwnProperty("pollCreationMessageV3")) - object.pollCreationMessageV3 = $root.proto.Message.PollCreationMessage.toObject(message.pollCreationMessageV3, options); - if (message.scheduledCallEditMessage != null && message.hasOwnProperty("scheduledCallEditMessage")) - object.scheduledCallEditMessage = $root.proto.Message.ScheduledCallEditMessage.toObject(message.scheduledCallEditMessage, options); - if (message.ptvMessage != null && message.hasOwnProperty("ptvMessage")) - object.ptvMessage = $root.proto.Message.VideoMessage.toObject(message.ptvMessage, options); - if (message.botInvokeMessage != null && message.hasOwnProperty("botInvokeMessage")) - object.botInvokeMessage = $root.proto.Message.FutureProofMessage.toObject(message.botInvokeMessage, options); - return object; - }; - /** - * Converts this Message to JSON. - * @function toJSON - * @memberof proto.Message - * @instance - * @returns {Object.} JSON object - */ - Message.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * AppStateSyncKeyRequest keyIds. + * @member {Array.} keyIds + * @memberof proto.Message.AppStateSyncKeyRequest + * @instance + */ + AppStateSyncKeyRequest.prototype.keyIds = $util.emptyArray; - Message.AppStateFatalExceptionNotification = (function() { + /** + * Creates a new AppStateSyncKeyRequest instance using the specified properties. + * @function create + * @memberof proto.Message.AppStateSyncKeyRequest + * @static + * @param {proto.Message.IAppStateSyncKeyRequest=} [properties] Properties to set + * @returns {proto.Message.AppStateSyncKeyRequest} AppStateSyncKeyRequest instance + */ + AppStateSyncKeyRequest.create = function create(properties) { + return new AppStateSyncKeyRequest(properties); + }; /** - * Properties of an AppStateFatalExceptionNotification. + * Encodes the specified AppStateSyncKeyRequest message. Does not implicitly {@link proto.Message.AppStateSyncKeyRequest.verify|verify} messages. + * @function encode + * @memberof proto.Message.AppStateSyncKeyRequest + * @static + * @param {proto.Message.IAppStateSyncKeyRequest} message AppStateSyncKeyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AppStateSyncKeyRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.keyIds != null && message.keyIds.length) + for (var i = 0; i < message.keyIds.length; ++i) + $root.proto.Message.AppStateSyncKeyId.encode(message.keyIds[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AppStateSyncKeyRequest message, length delimited. Does not implicitly {@link proto.Message.AppStateSyncKeyRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.AppStateSyncKeyRequest + * @static + * @param {proto.Message.IAppStateSyncKeyRequest} message AppStateSyncKeyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AppStateSyncKeyRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AppStateSyncKeyRequest message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.AppStateSyncKeyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.AppStateSyncKeyRequest} AppStateSyncKeyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AppStateSyncKeyRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Message.AppStateSyncKeyRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.keyIds && message.keyIds.length)) + message.keyIds = []; + message.keyIds.push($root.proto.Message.AppStateSyncKeyId.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AppStateSyncKeyRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.AppStateSyncKeyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.AppStateSyncKeyRequest} AppStateSyncKeyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AppStateSyncKeyRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AppStateSyncKeyRequest message. + * @function verify + * @memberof proto.Message.AppStateSyncKeyRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AppStateSyncKeyRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.keyIds != null && message.hasOwnProperty("keyIds")) { + if (!Array.isArray(message.keyIds)) + return "keyIds: array expected"; + for (var i = 0; i < message.keyIds.length; ++i) { + var error = $root.proto.Message.AppStateSyncKeyId.verify(message.keyIds[i]); + if (error) + return "keyIds." + error; + } + } + return null; + }; + + /** + * Creates an AppStateSyncKeyRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.AppStateSyncKeyRequest + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.AppStateSyncKeyRequest} AppStateSyncKeyRequest + */ + AppStateSyncKeyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.AppStateSyncKeyRequest) + return object; + var message = new $root.proto.Message.AppStateSyncKeyRequest(); + if (object.keyIds) { + if (!Array.isArray(object.keyIds)) + throw TypeError(".proto.Message.AppStateSyncKeyRequest.keyIds: array expected"); + message.keyIds = []; + for (var i = 0; i < object.keyIds.length; ++i) { + if (typeof object.keyIds[i] !== "object") + throw TypeError(".proto.Message.AppStateSyncKeyRequest.keyIds: object expected"); + message.keyIds[i] = $root.proto.Message.AppStateSyncKeyId.fromObject(object.keyIds[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an AppStateSyncKeyRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.AppStateSyncKeyRequest + * @static + * @param {proto.Message.AppStateSyncKeyRequest} message AppStateSyncKeyRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AppStateSyncKeyRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.keyIds = []; + if (message.keyIds && message.keyIds.length) { + object.keyIds = []; + for (var j = 0; j < message.keyIds.length; ++j) + object.keyIds[j] = $root.proto.Message.AppStateSyncKeyId.toObject(message.keyIds[j], options); + } + return object; + }; + + /** + * Converts this AppStateSyncKeyRequest to JSON. + * @function toJSON + * @memberof proto.Message.AppStateSyncKeyRequest + * @instance + * @returns {Object.} JSON object + */ + AppStateSyncKeyRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AppStateSyncKeyRequest; + })(); + + Message.AppStateSyncKeyShare = (function() { + + /** + * Properties of an AppStateSyncKeyShare. * @memberof proto.Message - * @interface IAppStateFatalExceptionNotification - * @property {Array.|null} [collectionNames] AppStateFatalExceptionNotification collectionNames - * @property {number|Long|null} [timestamp] AppStateFatalExceptionNotification timestamp + * @interface IAppStateSyncKeyShare + * @property {Array.|null} [keys] AppStateSyncKeyShare keys */ /** - * Constructs a new AppStateFatalExceptionNotification. + * Constructs a new AppStateSyncKeyShare. * @memberof proto.Message - * @classdesc Represents an AppStateFatalExceptionNotification. - * @implements IAppStateFatalExceptionNotification + * @classdesc Represents an AppStateSyncKeyShare. + * @implements IAppStateSyncKeyShare * @constructor - * @param {proto.Message.IAppStateFatalExceptionNotification=} [properties] Properties to set + * @param {proto.Message.IAppStateSyncKeyShare=} [properties] Properties to set */ - function AppStateFatalExceptionNotification(properties) { - this.collectionNames = []; + function AppStateSyncKeyShare(properties) { + this.keys = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -23664,91 +29949,78 @@ $root.proto = (function() { } /** - * AppStateFatalExceptionNotification collectionNames. - * @member {Array.} collectionNames - * @memberof proto.Message.AppStateFatalExceptionNotification - * @instance - */ - AppStateFatalExceptionNotification.prototype.collectionNames = $util.emptyArray; - - /** - * AppStateFatalExceptionNotification timestamp. - * @member {number|Long} timestamp - * @memberof proto.Message.AppStateFatalExceptionNotification + * AppStateSyncKeyShare keys. + * @member {Array.} keys + * @memberof proto.Message.AppStateSyncKeyShare * @instance */ - AppStateFatalExceptionNotification.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + AppStateSyncKeyShare.prototype.keys = $util.emptyArray; /** - * Creates a new AppStateFatalExceptionNotification instance using the specified properties. + * Creates a new AppStateSyncKeyShare instance using the specified properties. * @function create - * @memberof proto.Message.AppStateFatalExceptionNotification + * @memberof proto.Message.AppStateSyncKeyShare * @static - * @param {proto.Message.IAppStateFatalExceptionNotification=} [properties] Properties to set - * @returns {proto.Message.AppStateFatalExceptionNotification} AppStateFatalExceptionNotification instance + * @param {proto.Message.IAppStateSyncKeyShare=} [properties] Properties to set + * @returns {proto.Message.AppStateSyncKeyShare} AppStateSyncKeyShare instance */ - AppStateFatalExceptionNotification.create = function create(properties) { - return new AppStateFatalExceptionNotification(properties); + AppStateSyncKeyShare.create = function create(properties) { + return new AppStateSyncKeyShare(properties); }; /** - * Encodes the specified AppStateFatalExceptionNotification message. Does not implicitly {@link proto.Message.AppStateFatalExceptionNotification.verify|verify} messages. + * Encodes the specified AppStateSyncKeyShare message. Does not implicitly {@link proto.Message.AppStateSyncKeyShare.verify|verify} messages. * @function encode - * @memberof proto.Message.AppStateFatalExceptionNotification + * @memberof proto.Message.AppStateSyncKeyShare * @static - * @param {proto.Message.IAppStateFatalExceptionNotification} message AppStateFatalExceptionNotification message or plain object to encode + * @param {proto.Message.IAppStateSyncKeyShare} message AppStateSyncKeyShare message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AppStateFatalExceptionNotification.encode = function encode(message, writer) { + AppStateSyncKeyShare.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.collectionNames != null && message.collectionNames.length) - for (var i = 0; i < message.collectionNames.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.collectionNames[i]); - if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.timestamp); + if (message.keys != null && message.keys.length) + for (var i = 0; i < message.keys.length; ++i) + $root.proto.Message.AppStateSyncKey.encode(message.keys[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified AppStateFatalExceptionNotification message, length delimited. Does not implicitly {@link proto.Message.AppStateFatalExceptionNotification.verify|verify} messages. + * Encodes the specified AppStateSyncKeyShare message, length delimited. Does not implicitly {@link proto.Message.AppStateSyncKeyShare.verify|verify} messages. * @function encodeDelimited - * @memberof proto.Message.AppStateFatalExceptionNotification + * @memberof proto.Message.AppStateSyncKeyShare * @static - * @param {proto.Message.IAppStateFatalExceptionNotification} message AppStateFatalExceptionNotification message or plain object to encode + * @param {proto.Message.IAppStateSyncKeyShare} message AppStateSyncKeyShare message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AppStateFatalExceptionNotification.encodeDelimited = function encodeDelimited(message, writer) { + AppStateSyncKeyShare.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AppStateFatalExceptionNotification message from the specified reader or buffer. + * Decodes an AppStateSyncKeyShare message from the specified reader or buffer. * @function decode - * @memberof proto.Message.AppStateFatalExceptionNotification + * @memberof proto.Message.AppStateSyncKeyShare * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {proto.Message.AppStateFatalExceptionNotification} AppStateFatalExceptionNotification + * @returns {proto.Message.AppStateSyncKeyShare} AppStateSyncKeyShare * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AppStateFatalExceptionNotification.decode = function decode(reader, length) { + AppStateSyncKeyShare.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Message.AppStateFatalExceptionNotification(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Message.AppStateSyncKeyShare(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.collectionNames && message.collectionNames.length)) - message.collectionNames = []; - message.collectionNames.push(reader.string()); - break; - case 2: - message.timestamp = reader.int64(); + if (!(message.keys && message.keys.length)) + message.keys = []; + message.keys.push($root.proto.Message.AppStateSyncKey.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -23759,143 +30031,138 @@ $root.proto = (function() { }; /** - * Decodes an AppStateFatalExceptionNotification message from the specified reader or buffer, length delimited. + * Decodes an AppStateSyncKeyShare message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof proto.Message.AppStateFatalExceptionNotification + * @memberof proto.Message.AppStateSyncKeyShare * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.Message.AppStateFatalExceptionNotification} AppStateFatalExceptionNotification + * @returns {proto.Message.AppStateSyncKeyShare} AppStateSyncKeyShare * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AppStateFatalExceptionNotification.decodeDelimited = function decodeDelimited(reader) { + AppStateSyncKeyShare.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AppStateFatalExceptionNotification message. + * Verifies an AppStateSyncKeyShare message. * @function verify - * @memberof proto.Message.AppStateFatalExceptionNotification + * @memberof proto.Message.AppStateSyncKeyShare * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AppStateFatalExceptionNotification.verify = function verify(message) { + AppStateSyncKeyShare.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.collectionNames != null && message.hasOwnProperty("collectionNames")) { - if (!Array.isArray(message.collectionNames)) - return "collectionNames: array expected"; - for (var i = 0; i < message.collectionNames.length; ++i) - if (!$util.isString(message.collectionNames[i])) - return "collectionNames: string[] expected"; + if (message.keys != null && message.hasOwnProperty("keys")) { + if (!Array.isArray(message.keys)) + return "keys: array expected"; + for (var i = 0; i < message.keys.length; ++i) { + var error = $root.proto.Message.AppStateSyncKey.verify(message.keys[i]); + if (error) + return "keys." + error; + } } - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high))) - return "timestamp: integer|Long expected"; return null; }; /** - * Creates an AppStateFatalExceptionNotification message from a plain object. Also converts values to their respective internal types. + * Creates an AppStateSyncKeyShare message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof proto.Message.AppStateFatalExceptionNotification + * @memberof proto.Message.AppStateSyncKeyShare * @static * @param {Object.} object Plain object - * @returns {proto.Message.AppStateFatalExceptionNotification} AppStateFatalExceptionNotification + * @returns {proto.Message.AppStateSyncKeyShare} AppStateSyncKeyShare */ - AppStateFatalExceptionNotification.fromObject = function fromObject(object) { - if (object instanceof $root.proto.Message.AppStateFatalExceptionNotification) + AppStateSyncKeyShare.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.AppStateSyncKeyShare) return object; - var message = new $root.proto.Message.AppStateFatalExceptionNotification(); - if (object.collectionNames) { - if (!Array.isArray(object.collectionNames)) - throw TypeError(".proto.Message.AppStateFatalExceptionNotification.collectionNames: array expected"); - message.collectionNames = []; - for (var i = 0; i < object.collectionNames.length; ++i) - message.collectionNames[i] = String(object.collectionNames[i]); + var message = new $root.proto.Message.AppStateSyncKeyShare(); + if (object.keys) { + if (!Array.isArray(object.keys)) + throw TypeError(".proto.Message.AppStateSyncKeyShare.keys: array expected"); + message.keys = []; + for (var i = 0; i < object.keys.length; ++i) { + if (typeof object.keys[i] !== "object") + throw TypeError(".proto.Message.AppStateSyncKeyShare.keys: object expected"); + message.keys[i] = $root.proto.Message.AppStateSyncKey.fromObject(object.keys[i]); + } } - if (object.timestamp != null) - if ($util.Long) - (message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = false; - else if (typeof object.timestamp === "string") - message.timestamp = parseInt(object.timestamp, 10); - else if (typeof object.timestamp === "number") - message.timestamp = object.timestamp; - else if (typeof object.timestamp === "object") - message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from an AppStateFatalExceptionNotification message. Also converts values to other types if specified. + * Creates a plain object from an AppStateSyncKeyShare message. Also converts values to other types if specified. * @function toObject - * @memberof proto.Message.AppStateFatalExceptionNotification + * @memberof proto.Message.AppStateSyncKeyShare * @static - * @param {proto.Message.AppStateFatalExceptionNotification} message AppStateFatalExceptionNotification + * @param {proto.Message.AppStateSyncKeyShare} message AppStateSyncKeyShare * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AppStateFatalExceptionNotification.toObject = function toObject(message, options) { + AppStateSyncKeyShare.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.collectionNames = []; - if (options.defaults) - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.timestamp = options.longs === String ? "0" : 0; - if (message.collectionNames && message.collectionNames.length) { - object.collectionNames = []; - for (var j = 0; j < message.collectionNames.length; ++j) - object.collectionNames[j] = message.collectionNames[j]; + object.keys = []; + if (message.keys && message.keys.length) { + object.keys = []; + for (var j = 0; j < message.keys.length; ++j) + object.keys[j] = $root.proto.Message.AppStateSyncKey.toObject(message.keys[j], options); } - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - if (typeof message.timestamp === "number") - object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp; - else - object.timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber() : message.timestamp; return object; }; /** - * Converts this AppStateFatalExceptionNotification to JSON. + * Converts this AppStateSyncKeyShare to JSON. * @function toJSON - * @memberof proto.Message.AppStateFatalExceptionNotification + * @memberof proto.Message.AppStateSyncKeyShare * @instance * @returns {Object.} JSON object */ - AppStateFatalExceptionNotification.prototype.toJSON = function toJSON() { + AppStateSyncKeyShare.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return AppStateFatalExceptionNotification; + return AppStateSyncKeyShare; })(); - Message.AppStateSyncKey = (function() { + Message.AudioMessage = (function() { /** - * Properties of an AppStateSyncKey. + * Properties of an AudioMessage. * @memberof proto.Message - * @interface IAppStateSyncKey - * @property {proto.Message.IAppStateSyncKeyId|null} [keyId] AppStateSyncKey keyId - * @property {proto.Message.IAppStateSyncKeyData|null} [keyData] AppStateSyncKey keyData + * @interface IAudioMessage + * @property {string|null} [url] AudioMessage url + * @property {string|null} [mimetype] AudioMessage mimetype + * @property {Uint8Array|null} [fileSha256] AudioMessage fileSha256 + * @property {number|Long|null} [fileLength] AudioMessage fileLength + * @property {number|null} [seconds] AudioMessage seconds + * @property {boolean|null} [ptt] AudioMessage ptt + * @property {Uint8Array|null} [mediaKey] AudioMessage mediaKey + * @property {Uint8Array|null} [fileEncSha256] AudioMessage fileEncSha256 + * @property {string|null} [directPath] AudioMessage directPath + * @property {number|Long|null} [mediaKeyTimestamp] AudioMessage mediaKeyTimestamp + * @property {proto.IContextInfo|null} [contextInfo] AudioMessage contextInfo + * @property {Uint8Array|null} [streamingSidecar] AudioMessage streamingSidecar + * @property {Uint8Array|null} [waveform] AudioMessage waveform + * @property {number|null} [backgroundArgb] AudioMessage backgroundArgb + * @property {boolean|null} [viewOnce] AudioMessage viewOnce */ /** - * Constructs a new AppStateSyncKey. + * Constructs a new AudioMessage. * @memberof proto.Message - * @classdesc Represents an AppStateSyncKey. - * @implements IAppStateSyncKey + * @classdesc Represents an AudioMessage. + * @implements IAudioMessage * @constructor - * @param {proto.Message.IAppStateSyncKey=} [properties] Properties to set + * @param {proto.Message.IAudioMessage=} [properties] Properties to set */ - function AppStateSyncKey(properties) { + function AudioMessage(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -23903,88 +30170,257 @@ $root.proto = (function() { } /** - * AppStateSyncKey keyId. - * @member {proto.Message.IAppStateSyncKeyId|null|undefined} keyId - * @memberof proto.Message.AppStateSyncKey + * AudioMessage url. + * @member {string} url + * @memberof proto.Message.AudioMessage * @instance */ - AppStateSyncKey.prototype.keyId = null; + AudioMessage.prototype.url = ""; /** - * AppStateSyncKey keyData. - * @member {proto.Message.IAppStateSyncKeyData|null|undefined} keyData - * @memberof proto.Message.AppStateSyncKey + * AudioMessage mimetype. + * @member {string} mimetype + * @memberof proto.Message.AudioMessage * @instance */ - AppStateSyncKey.prototype.keyData = null; + AudioMessage.prototype.mimetype = ""; /** - * Creates a new AppStateSyncKey instance using the specified properties. + * AudioMessage fileSha256. + * @member {Uint8Array} fileSha256 + * @memberof proto.Message.AudioMessage + * @instance + */ + AudioMessage.prototype.fileSha256 = $util.newBuffer([]); + + /** + * AudioMessage fileLength. + * @member {number|Long} fileLength + * @memberof proto.Message.AudioMessage + * @instance + */ + AudioMessage.prototype.fileLength = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * AudioMessage seconds. + * @member {number} seconds + * @memberof proto.Message.AudioMessage + * @instance + */ + AudioMessage.prototype.seconds = 0; + + /** + * AudioMessage ptt. + * @member {boolean} ptt + * @memberof proto.Message.AudioMessage + * @instance + */ + AudioMessage.prototype.ptt = false; + + /** + * AudioMessage mediaKey. + * @member {Uint8Array} mediaKey + * @memberof proto.Message.AudioMessage + * @instance + */ + AudioMessage.prototype.mediaKey = $util.newBuffer([]); + + /** + * AudioMessage fileEncSha256. + * @member {Uint8Array} fileEncSha256 + * @memberof proto.Message.AudioMessage + * @instance + */ + AudioMessage.prototype.fileEncSha256 = $util.newBuffer([]); + + /** + * AudioMessage directPath. + * @member {string} directPath + * @memberof proto.Message.AudioMessage + * @instance + */ + AudioMessage.prototype.directPath = ""; + + /** + * AudioMessage mediaKeyTimestamp. + * @member {number|Long} mediaKeyTimestamp + * @memberof proto.Message.AudioMessage + * @instance + */ + AudioMessage.prototype.mediaKeyTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * AudioMessage contextInfo. + * @member {proto.IContextInfo|null|undefined} contextInfo + * @memberof proto.Message.AudioMessage + * @instance + */ + AudioMessage.prototype.contextInfo = null; + + /** + * AudioMessage streamingSidecar. + * @member {Uint8Array} streamingSidecar + * @memberof proto.Message.AudioMessage + * @instance + */ + AudioMessage.prototype.streamingSidecar = $util.newBuffer([]); + + /** + * AudioMessage waveform. + * @member {Uint8Array} waveform + * @memberof proto.Message.AudioMessage + * @instance + */ + AudioMessage.prototype.waveform = $util.newBuffer([]); + + /** + * AudioMessage backgroundArgb. + * @member {number} backgroundArgb + * @memberof proto.Message.AudioMessage + * @instance + */ + AudioMessage.prototype.backgroundArgb = 0; + + /** + * AudioMessage viewOnce. + * @member {boolean} viewOnce + * @memberof proto.Message.AudioMessage + * @instance + */ + AudioMessage.prototype.viewOnce = false; + + /** + * Creates a new AudioMessage instance using the specified properties. * @function create - * @memberof proto.Message.AppStateSyncKey + * @memberof proto.Message.AudioMessage * @static - * @param {proto.Message.IAppStateSyncKey=} [properties] Properties to set - * @returns {proto.Message.AppStateSyncKey} AppStateSyncKey instance + * @param {proto.Message.IAudioMessage=} [properties] Properties to set + * @returns {proto.Message.AudioMessage} AudioMessage instance */ - AppStateSyncKey.create = function create(properties) { - return new AppStateSyncKey(properties); + AudioMessage.create = function create(properties) { + return new AudioMessage(properties); }; /** - * Encodes the specified AppStateSyncKey message. Does not implicitly {@link proto.Message.AppStateSyncKey.verify|verify} messages. + * Encodes the specified AudioMessage message. Does not implicitly {@link proto.Message.AudioMessage.verify|verify} messages. * @function encode - * @memberof proto.Message.AppStateSyncKey + * @memberof proto.Message.AudioMessage * @static - * @param {proto.Message.IAppStateSyncKey} message AppStateSyncKey message or plain object to encode + * @param {proto.Message.IAudioMessage} message AudioMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AppStateSyncKey.encode = function encode(message, writer) { + AudioMessage.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.keyId != null && Object.hasOwnProperty.call(message, "keyId")) - $root.proto.Message.AppStateSyncKeyId.encode(message.keyId, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.keyData != null && Object.hasOwnProperty.call(message, "keyData")) - $root.proto.Message.AppStateSyncKeyData.encode(message.keyData, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.url != null && Object.hasOwnProperty.call(message, "url")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.url); + if (message.mimetype != null && Object.hasOwnProperty.call(message, "mimetype")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.mimetype); + if (message.fileSha256 != null && Object.hasOwnProperty.call(message, "fileSha256")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.fileSha256); + if (message.fileLength != null && Object.hasOwnProperty.call(message, "fileLength")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.fileLength); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.seconds); + if (message.ptt != null && Object.hasOwnProperty.call(message, "ptt")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.ptt); + if (message.mediaKey != null && Object.hasOwnProperty.call(message, "mediaKey")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.mediaKey); + if (message.fileEncSha256 != null && Object.hasOwnProperty.call(message, "fileEncSha256")) + writer.uint32(/* id 8, wireType 2 =*/66).bytes(message.fileEncSha256); + if (message.directPath != null && Object.hasOwnProperty.call(message, "directPath")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.directPath); + if (message.mediaKeyTimestamp != null && Object.hasOwnProperty.call(message, "mediaKeyTimestamp")) + writer.uint32(/* id 10, wireType 0 =*/80).int64(message.mediaKeyTimestamp); + if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo")) + $root.proto.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.streamingSidecar != null && Object.hasOwnProperty.call(message, "streamingSidecar")) + writer.uint32(/* id 18, wireType 2 =*/146).bytes(message.streamingSidecar); + if (message.waveform != null && Object.hasOwnProperty.call(message, "waveform")) + writer.uint32(/* id 19, wireType 2 =*/154).bytes(message.waveform); + if (message.backgroundArgb != null && Object.hasOwnProperty.call(message, "backgroundArgb")) + writer.uint32(/* id 20, wireType 5 =*/165).fixed32(message.backgroundArgb); + if (message.viewOnce != null && Object.hasOwnProperty.call(message, "viewOnce")) + writer.uint32(/* id 21, wireType 0 =*/168).bool(message.viewOnce); return writer; }; /** - * Encodes the specified AppStateSyncKey message, length delimited. Does not implicitly {@link proto.Message.AppStateSyncKey.verify|verify} messages. + * Encodes the specified AudioMessage message, length delimited. Does not implicitly {@link proto.Message.AudioMessage.verify|verify} messages. * @function encodeDelimited - * @memberof proto.Message.AppStateSyncKey + * @memberof proto.Message.AudioMessage * @static - * @param {proto.Message.IAppStateSyncKey} message AppStateSyncKey message or plain object to encode + * @param {proto.Message.IAudioMessage} message AudioMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AppStateSyncKey.encodeDelimited = function encodeDelimited(message, writer) { + AudioMessage.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AppStateSyncKey message from the specified reader or buffer. + * Decodes an AudioMessage message from the specified reader or buffer. * @function decode - * @memberof proto.Message.AppStateSyncKey + * @memberof proto.Message.AudioMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {proto.Message.AppStateSyncKey} AppStateSyncKey + * @returns {proto.Message.AudioMessage} AudioMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AppStateSyncKey.decode = function decode(reader, length) { + AudioMessage.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Message.AppStateSyncKey(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Message.AudioMessage(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.keyId = $root.proto.Message.AppStateSyncKeyId.decode(reader, reader.uint32()); + message.url = reader.string(); break; case 2: - message.keyData = $root.proto.Message.AppStateSyncKeyData.decode(reader, reader.uint32()); + message.mimetype = reader.string(); + break; + case 3: + message.fileSha256 = reader.bytes(); + break; + case 4: + message.fileLength = reader.uint64(); + break; + case 5: + message.seconds = reader.uint32(); + break; + case 6: + message.ptt = reader.bool(); + break; + case 7: + message.mediaKey = reader.bytes(); + break; + case 8: + message.fileEncSha256 = reader.bytes(); + break; + case 9: + message.directPath = reader.string(); + break; + case 10: + message.mediaKeyTimestamp = reader.int64(); + break; + case 17: + message.contextInfo = $root.proto.ContextInfo.decode(reader, reader.uint32()); + break; + case 18: + message.streamingSidecar = reader.bytes(); + break; + case 19: + message.waveform = reader.bytes(); + break; + case 20: + message.backgroundArgb = reader.fixed32(); + break; + case 21: + message.viewOnce = reader.bool(); break; default: reader.skipType(tag & 7); @@ -23995,128 +30431,301 @@ $root.proto = (function() { }; /** - * Decodes an AppStateSyncKey message from the specified reader or buffer, length delimited. + * Decodes an AudioMessage message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof proto.Message.AppStateSyncKey + * @memberof proto.Message.AudioMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.Message.AppStateSyncKey} AppStateSyncKey + * @returns {proto.Message.AudioMessage} AudioMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AppStateSyncKey.decodeDelimited = function decodeDelimited(reader) { + AudioMessage.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AppStateSyncKey message. + * Verifies an AudioMessage message. * @function verify - * @memberof proto.Message.AppStateSyncKey + * @memberof proto.Message.AudioMessage * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AppStateSyncKey.verify = function verify(message) { + AudioMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keyId != null && message.hasOwnProperty("keyId")) { - var error = $root.proto.Message.AppStateSyncKeyId.verify(message.keyId); - if (error) - return "keyId." + error; - } - if (message.keyData != null && message.hasOwnProperty("keyData")) { - var error = $root.proto.Message.AppStateSyncKeyData.verify(message.keyData); + if (message.url != null && message.hasOwnProperty("url")) + if (!$util.isString(message.url)) + return "url: string expected"; + if (message.mimetype != null && message.hasOwnProperty("mimetype")) + if (!$util.isString(message.mimetype)) + return "mimetype: string expected"; + if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) + if (!(message.fileSha256 && typeof message.fileSha256.length === "number" || $util.isString(message.fileSha256))) + return "fileSha256: buffer expected"; + if (message.fileLength != null && message.hasOwnProperty("fileLength")) + if (!$util.isInteger(message.fileLength) && !(message.fileLength && $util.isInteger(message.fileLength.low) && $util.isInteger(message.fileLength.high))) + return "fileLength: integer|Long expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds)) + return "seconds: integer expected"; + if (message.ptt != null && message.hasOwnProperty("ptt")) + if (typeof message.ptt !== "boolean") + return "ptt: boolean expected"; + if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) + if (!(message.mediaKey && typeof message.mediaKey.length === "number" || $util.isString(message.mediaKey))) + return "mediaKey: buffer expected"; + if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) + if (!(message.fileEncSha256 && typeof message.fileEncSha256.length === "number" || $util.isString(message.fileEncSha256))) + return "fileEncSha256: buffer expected"; + if (message.directPath != null && message.hasOwnProperty("directPath")) + if (!$util.isString(message.directPath)) + return "directPath: string expected"; + if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp")) + if (!$util.isInteger(message.mediaKeyTimestamp) && !(message.mediaKeyTimestamp && $util.isInteger(message.mediaKeyTimestamp.low) && $util.isInteger(message.mediaKeyTimestamp.high))) + return "mediaKeyTimestamp: integer|Long expected"; + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { + var error = $root.proto.ContextInfo.verify(message.contextInfo); if (error) - return "keyData." + error; + return "contextInfo." + error; } + if (message.streamingSidecar != null && message.hasOwnProperty("streamingSidecar")) + if (!(message.streamingSidecar && typeof message.streamingSidecar.length === "number" || $util.isString(message.streamingSidecar))) + return "streamingSidecar: buffer expected"; + if (message.waveform != null && message.hasOwnProperty("waveform")) + if (!(message.waveform && typeof message.waveform.length === "number" || $util.isString(message.waveform))) + return "waveform: buffer expected"; + if (message.backgroundArgb != null && message.hasOwnProperty("backgroundArgb")) + if (!$util.isInteger(message.backgroundArgb)) + return "backgroundArgb: integer expected"; + if (message.viewOnce != null && message.hasOwnProperty("viewOnce")) + if (typeof message.viewOnce !== "boolean") + return "viewOnce: boolean expected"; return null; }; /** - * Creates an AppStateSyncKey message from a plain object. Also converts values to their respective internal types. + * Creates an AudioMessage message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof proto.Message.AppStateSyncKey + * @memberof proto.Message.AudioMessage * @static * @param {Object.} object Plain object - * @returns {proto.Message.AppStateSyncKey} AppStateSyncKey + * @returns {proto.Message.AudioMessage} AudioMessage */ - AppStateSyncKey.fromObject = function fromObject(object) { - if (object instanceof $root.proto.Message.AppStateSyncKey) + AudioMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.AudioMessage) return object; - var message = new $root.proto.Message.AppStateSyncKey(); - if (object.keyId != null) { - if (typeof object.keyId !== "object") - throw TypeError(".proto.Message.AppStateSyncKey.keyId: object expected"); - message.keyId = $root.proto.Message.AppStateSyncKeyId.fromObject(object.keyId); - } - if (object.keyData != null) { - if (typeof object.keyData !== "object") - throw TypeError(".proto.Message.AppStateSyncKey.keyData: object expected"); - message.keyData = $root.proto.Message.AppStateSyncKeyData.fromObject(object.keyData); + var message = new $root.proto.Message.AudioMessage(); + if (object.url != null) + message.url = String(object.url); + if (object.mimetype != null) + message.mimetype = String(object.mimetype); + if (object.fileSha256 != null) + if (typeof object.fileSha256 === "string") + $util.base64.decode(object.fileSha256, message.fileSha256 = $util.newBuffer($util.base64.length(object.fileSha256)), 0); + else if (object.fileSha256.length) + message.fileSha256 = object.fileSha256; + if (object.fileLength != null) + if ($util.Long) + (message.fileLength = $util.Long.fromValue(object.fileLength)).unsigned = true; + else if (typeof object.fileLength === "string") + message.fileLength = parseInt(object.fileLength, 10); + else if (typeof object.fileLength === "number") + message.fileLength = object.fileLength; + else if (typeof object.fileLength === "object") + message.fileLength = new $util.LongBits(object.fileLength.low >>> 0, object.fileLength.high >>> 0).toNumber(true); + if (object.seconds != null) + message.seconds = object.seconds >>> 0; + if (object.ptt != null) + message.ptt = Boolean(object.ptt); + if (object.mediaKey != null) + if (typeof object.mediaKey === "string") + $util.base64.decode(object.mediaKey, message.mediaKey = $util.newBuffer($util.base64.length(object.mediaKey)), 0); + else if (object.mediaKey.length) + message.mediaKey = object.mediaKey; + if (object.fileEncSha256 != null) + if (typeof object.fileEncSha256 === "string") + $util.base64.decode(object.fileEncSha256, message.fileEncSha256 = $util.newBuffer($util.base64.length(object.fileEncSha256)), 0); + else if (object.fileEncSha256.length) + message.fileEncSha256 = object.fileEncSha256; + if (object.directPath != null) + message.directPath = String(object.directPath); + if (object.mediaKeyTimestamp != null) + if ($util.Long) + (message.mediaKeyTimestamp = $util.Long.fromValue(object.mediaKeyTimestamp)).unsigned = false; + else if (typeof object.mediaKeyTimestamp === "string") + message.mediaKeyTimestamp = parseInt(object.mediaKeyTimestamp, 10); + else if (typeof object.mediaKeyTimestamp === "number") + message.mediaKeyTimestamp = object.mediaKeyTimestamp; + else if (typeof object.mediaKeyTimestamp === "object") + message.mediaKeyTimestamp = new $util.LongBits(object.mediaKeyTimestamp.low >>> 0, object.mediaKeyTimestamp.high >>> 0).toNumber(); + if (object.contextInfo != null) { + if (typeof object.contextInfo !== "object") + throw TypeError(".proto.Message.AudioMessage.contextInfo: object expected"); + message.contextInfo = $root.proto.ContextInfo.fromObject(object.contextInfo); } + if (object.streamingSidecar != null) + if (typeof object.streamingSidecar === "string") + $util.base64.decode(object.streamingSidecar, message.streamingSidecar = $util.newBuffer($util.base64.length(object.streamingSidecar)), 0); + else if (object.streamingSidecar.length) + message.streamingSidecar = object.streamingSidecar; + if (object.waveform != null) + if (typeof object.waveform === "string") + $util.base64.decode(object.waveform, message.waveform = $util.newBuffer($util.base64.length(object.waveform)), 0); + else if (object.waveform.length) + message.waveform = object.waveform; + if (object.backgroundArgb != null) + message.backgroundArgb = object.backgroundArgb >>> 0; + if (object.viewOnce != null) + message.viewOnce = Boolean(object.viewOnce); return message; }; /** - * Creates a plain object from an AppStateSyncKey message. Also converts values to other types if specified. + * Creates a plain object from an AudioMessage message. Also converts values to other types if specified. * @function toObject - * @memberof proto.Message.AppStateSyncKey + * @memberof proto.Message.AudioMessage * @static - * @param {proto.Message.AppStateSyncKey} message AppStateSyncKey + * @param {proto.Message.AudioMessage} message AudioMessage * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AppStateSyncKey.toObject = function toObject(message, options) { + AudioMessage.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.keyId = null; - object.keyData = null; + object.url = ""; + object.mimetype = ""; + if (options.bytes === String) + object.fileSha256 = ""; + else { + object.fileSha256 = []; + if (options.bytes !== Array) + object.fileSha256 = $util.newBuffer(object.fileSha256); + } + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.fileLength = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.fileLength = options.longs === String ? "0" : 0; + object.seconds = 0; + object.ptt = false; + if (options.bytes === String) + object.mediaKey = ""; + else { + object.mediaKey = []; + if (options.bytes !== Array) + object.mediaKey = $util.newBuffer(object.mediaKey); + } + if (options.bytes === String) + object.fileEncSha256 = ""; + else { + object.fileEncSha256 = []; + if (options.bytes !== Array) + object.fileEncSha256 = $util.newBuffer(object.fileEncSha256); + } + object.directPath = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.mediaKeyTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.mediaKeyTimestamp = options.longs === String ? "0" : 0; + object.contextInfo = null; + if (options.bytes === String) + object.streamingSidecar = ""; + else { + object.streamingSidecar = []; + if (options.bytes !== Array) + object.streamingSidecar = $util.newBuffer(object.streamingSidecar); + } + if (options.bytes === String) + object.waveform = ""; + else { + object.waveform = []; + if (options.bytes !== Array) + object.waveform = $util.newBuffer(object.waveform); + } + object.backgroundArgb = 0; + object.viewOnce = false; } - if (message.keyId != null && message.hasOwnProperty("keyId")) - object.keyId = $root.proto.Message.AppStateSyncKeyId.toObject(message.keyId, options); - if (message.keyData != null && message.hasOwnProperty("keyData")) - object.keyData = $root.proto.Message.AppStateSyncKeyData.toObject(message.keyData, options); + if (message.url != null && message.hasOwnProperty("url")) + object.url = message.url; + if (message.mimetype != null && message.hasOwnProperty("mimetype")) + object.mimetype = message.mimetype; + if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) + object.fileSha256 = options.bytes === String ? $util.base64.encode(message.fileSha256, 0, message.fileSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.fileSha256) : message.fileSha256; + if (message.fileLength != null && message.hasOwnProperty("fileLength")) + if (typeof message.fileLength === "number") + object.fileLength = options.longs === String ? String(message.fileLength) : message.fileLength; + else + object.fileLength = options.longs === String ? $util.Long.prototype.toString.call(message.fileLength) : options.longs === Number ? new $util.LongBits(message.fileLength.low >>> 0, message.fileLength.high >>> 0).toNumber(true) : message.fileLength; + if (message.seconds != null && message.hasOwnProperty("seconds")) + object.seconds = message.seconds; + if (message.ptt != null && message.hasOwnProperty("ptt")) + object.ptt = message.ptt; + if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) + object.mediaKey = options.bytes === String ? $util.base64.encode(message.mediaKey, 0, message.mediaKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.mediaKey) : message.mediaKey; + if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) + object.fileEncSha256 = options.bytes === String ? $util.base64.encode(message.fileEncSha256, 0, message.fileEncSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.fileEncSha256) : message.fileEncSha256; + if (message.directPath != null && message.hasOwnProperty("directPath")) + object.directPath = message.directPath; + if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp")) + if (typeof message.mediaKeyTimestamp === "number") + object.mediaKeyTimestamp = options.longs === String ? String(message.mediaKeyTimestamp) : message.mediaKeyTimestamp; + else + object.mediaKeyTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.mediaKeyTimestamp) : options.longs === Number ? new $util.LongBits(message.mediaKeyTimestamp.low >>> 0, message.mediaKeyTimestamp.high >>> 0).toNumber() : message.mediaKeyTimestamp; + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) + object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); + if (message.streamingSidecar != null && message.hasOwnProperty("streamingSidecar")) + object.streamingSidecar = options.bytes === String ? $util.base64.encode(message.streamingSidecar, 0, message.streamingSidecar.length) : options.bytes === Array ? Array.prototype.slice.call(message.streamingSidecar) : message.streamingSidecar; + if (message.waveform != null && message.hasOwnProperty("waveform")) + object.waveform = options.bytes === String ? $util.base64.encode(message.waveform, 0, message.waveform.length) : options.bytes === Array ? Array.prototype.slice.call(message.waveform) : message.waveform; + if (message.backgroundArgb != null && message.hasOwnProperty("backgroundArgb")) + object.backgroundArgb = message.backgroundArgb; + if (message.viewOnce != null && message.hasOwnProperty("viewOnce")) + object.viewOnce = message.viewOnce; return object; }; /** - * Converts this AppStateSyncKey to JSON. + * Converts this AudioMessage to JSON. * @function toJSON - * @memberof proto.Message.AppStateSyncKey + * @memberof proto.Message.AudioMessage * @instance * @returns {Object.} JSON object */ - AppStateSyncKey.prototype.toJSON = function toJSON() { + AudioMessage.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return AppStateSyncKey; + return AudioMessage; })(); - Message.AppStateSyncKeyData = (function() { + Message.BCallMessage = (function() { /** - * Properties of an AppStateSyncKeyData. + * Properties of a BCallMessage. * @memberof proto.Message - * @interface IAppStateSyncKeyData - * @property {Uint8Array|null} [keyData] AppStateSyncKeyData keyData - * @property {proto.Message.IAppStateSyncKeyFingerprint|null} [fingerprint] AppStateSyncKeyData fingerprint - * @property {number|Long|null} [timestamp] AppStateSyncKeyData timestamp + * @interface IBCallMessage + * @property {string|null} [sessionId] BCallMessage sessionId + * @property {proto.Message.BCallMessage.MediaType|null} [mediaType] BCallMessage mediaType + * @property {Uint8Array|null} [masterKey] BCallMessage masterKey + * @property {string|null} [caption] BCallMessage caption */ /** - * Constructs a new AppStateSyncKeyData. + * Constructs a new BCallMessage. * @memberof proto.Message - * @classdesc Represents an AppStateSyncKeyData. - * @implements IAppStateSyncKeyData + * @classdesc Represents a BCallMessage. + * @implements IBCallMessage * @constructor - * @param {proto.Message.IAppStateSyncKeyData=} [properties] Properties to set + * @param {proto.Message.IBCallMessage=} [properties] Properties to set */ - function AppStateSyncKeyData(properties) { + function BCallMessage(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -24124,101 +30733,114 @@ $root.proto = (function() { } /** - * AppStateSyncKeyData keyData. - * @member {Uint8Array} keyData - * @memberof proto.Message.AppStateSyncKeyData + * BCallMessage sessionId. + * @member {string} sessionId + * @memberof proto.Message.BCallMessage * @instance */ - AppStateSyncKeyData.prototype.keyData = $util.newBuffer([]); + BCallMessage.prototype.sessionId = ""; /** - * AppStateSyncKeyData fingerprint. - * @member {proto.Message.IAppStateSyncKeyFingerprint|null|undefined} fingerprint - * @memberof proto.Message.AppStateSyncKeyData + * BCallMessage mediaType. + * @member {proto.Message.BCallMessage.MediaType} mediaType + * @memberof proto.Message.BCallMessage * @instance */ - AppStateSyncKeyData.prototype.fingerprint = null; + BCallMessage.prototype.mediaType = 0; /** - * AppStateSyncKeyData timestamp. - * @member {number|Long} timestamp - * @memberof proto.Message.AppStateSyncKeyData + * BCallMessage masterKey. + * @member {Uint8Array} masterKey + * @memberof proto.Message.BCallMessage * @instance */ - AppStateSyncKeyData.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + BCallMessage.prototype.masterKey = $util.newBuffer([]); /** - * Creates a new AppStateSyncKeyData instance using the specified properties. + * BCallMessage caption. + * @member {string} caption + * @memberof proto.Message.BCallMessage + * @instance + */ + BCallMessage.prototype.caption = ""; + + /** + * Creates a new BCallMessage instance using the specified properties. * @function create - * @memberof proto.Message.AppStateSyncKeyData + * @memberof proto.Message.BCallMessage * @static - * @param {proto.Message.IAppStateSyncKeyData=} [properties] Properties to set - * @returns {proto.Message.AppStateSyncKeyData} AppStateSyncKeyData instance + * @param {proto.Message.IBCallMessage=} [properties] Properties to set + * @returns {proto.Message.BCallMessage} BCallMessage instance */ - AppStateSyncKeyData.create = function create(properties) { - return new AppStateSyncKeyData(properties); + BCallMessage.create = function create(properties) { + return new BCallMessage(properties); }; /** - * Encodes the specified AppStateSyncKeyData message. Does not implicitly {@link proto.Message.AppStateSyncKeyData.verify|verify} messages. + * Encodes the specified BCallMessage message. Does not implicitly {@link proto.Message.BCallMessage.verify|verify} messages. * @function encode - * @memberof proto.Message.AppStateSyncKeyData + * @memberof proto.Message.BCallMessage * @static - * @param {proto.Message.IAppStateSyncKeyData} message AppStateSyncKeyData message or plain object to encode + * @param {proto.Message.IBCallMessage} message BCallMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AppStateSyncKeyData.encode = function encode(message, writer) { + BCallMessage.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.keyData != null && Object.hasOwnProperty.call(message, "keyData")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.keyData); - if (message.fingerprint != null && Object.hasOwnProperty.call(message, "fingerprint")) - $root.proto.Message.AppStateSyncKeyFingerprint.encode(message.fingerprint, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.timestamp); + if (message.sessionId != null && Object.hasOwnProperty.call(message, "sessionId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sessionId); + if (message.mediaType != null && Object.hasOwnProperty.call(message, "mediaType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.mediaType); + if (message.masterKey != null && Object.hasOwnProperty.call(message, "masterKey")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.masterKey); + if (message.caption != null && Object.hasOwnProperty.call(message, "caption")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.caption); return writer; }; /** - * Encodes the specified AppStateSyncKeyData message, length delimited. Does not implicitly {@link proto.Message.AppStateSyncKeyData.verify|verify} messages. + * Encodes the specified BCallMessage message, length delimited. Does not implicitly {@link proto.Message.BCallMessage.verify|verify} messages. * @function encodeDelimited - * @memberof proto.Message.AppStateSyncKeyData + * @memberof proto.Message.BCallMessage * @static - * @param {proto.Message.IAppStateSyncKeyData} message AppStateSyncKeyData message or plain object to encode + * @param {proto.Message.IBCallMessage} message BCallMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AppStateSyncKeyData.encodeDelimited = function encodeDelimited(message, writer) { + BCallMessage.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AppStateSyncKeyData message from the specified reader or buffer. + * Decodes a BCallMessage message from the specified reader or buffer. * @function decode - * @memberof proto.Message.AppStateSyncKeyData + * @memberof proto.Message.BCallMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {proto.Message.AppStateSyncKeyData} AppStateSyncKeyData + * @returns {proto.Message.BCallMessage} BCallMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AppStateSyncKeyData.decode = function decode(reader, length) { + BCallMessage.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Message.AppStateSyncKeyData(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Message.BCallMessage(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.keyData = reader.bytes(); + message.sessionId = reader.string(); break; case 2: - message.fingerprint = $root.proto.Message.AppStateSyncKeyFingerprint.decode(reader, reader.uint32()); + message.mediaType = reader.int32(); break; case 3: - message.timestamp = reader.int64(); + message.masterKey = reader.bytes(); + break; + case 4: + message.caption = reader.string(); break; default: reader.skipType(tag & 7); @@ -24229,155 +30851,179 @@ $root.proto = (function() { }; /** - * Decodes an AppStateSyncKeyData message from the specified reader or buffer, length delimited. + * Decodes a BCallMessage message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof proto.Message.AppStateSyncKeyData + * @memberof proto.Message.BCallMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.Message.AppStateSyncKeyData} AppStateSyncKeyData + * @returns {proto.Message.BCallMessage} BCallMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AppStateSyncKeyData.decodeDelimited = function decodeDelimited(reader) { + BCallMessage.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AppStateSyncKeyData message. + * Verifies a BCallMessage message. * @function verify - * @memberof proto.Message.AppStateSyncKeyData + * @memberof proto.Message.BCallMessage * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AppStateSyncKeyData.verify = function verify(message) { + BCallMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keyData != null && message.hasOwnProperty("keyData")) - if (!(message.keyData && typeof message.keyData.length === "number" || $util.isString(message.keyData))) - return "keyData: buffer expected"; - if (message.fingerprint != null && message.hasOwnProperty("fingerprint")) { - var error = $root.proto.Message.AppStateSyncKeyFingerprint.verify(message.fingerprint); - if (error) - return "fingerprint." + error; - } - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high))) - return "timestamp: integer|Long expected"; + if (message.sessionId != null && message.hasOwnProperty("sessionId")) + if (!$util.isString(message.sessionId)) + return "sessionId: string expected"; + if (message.mediaType != null && message.hasOwnProperty("mediaType")) + switch (message.mediaType) { + default: + return "mediaType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.masterKey != null && message.hasOwnProperty("masterKey")) + if (!(message.masterKey && typeof message.masterKey.length === "number" || $util.isString(message.masterKey))) + return "masterKey: buffer expected"; + if (message.caption != null && message.hasOwnProperty("caption")) + if (!$util.isString(message.caption)) + return "caption: string expected"; return null; }; /** - * Creates an AppStateSyncKeyData message from a plain object. Also converts values to their respective internal types. + * Creates a BCallMessage message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof proto.Message.AppStateSyncKeyData + * @memberof proto.Message.BCallMessage * @static * @param {Object.} object Plain object - * @returns {proto.Message.AppStateSyncKeyData} AppStateSyncKeyData + * @returns {proto.Message.BCallMessage} BCallMessage */ - AppStateSyncKeyData.fromObject = function fromObject(object) { - if (object instanceof $root.proto.Message.AppStateSyncKeyData) + BCallMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.BCallMessage) return object; - var message = new $root.proto.Message.AppStateSyncKeyData(); - if (object.keyData != null) - if (typeof object.keyData === "string") - $util.base64.decode(object.keyData, message.keyData = $util.newBuffer($util.base64.length(object.keyData)), 0); - else if (object.keyData.length) - message.keyData = object.keyData; - if (object.fingerprint != null) { - if (typeof object.fingerprint !== "object") - throw TypeError(".proto.Message.AppStateSyncKeyData.fingerprint: object expected"); - message.fingerprint = $root.proto.Message.AppStateSyncKeyFingerprint.fromObject(object.fingerprint); + var message = new $root.proto.Message.BCallMessage(); + if (object.sessionId != null) + message.sessionId = String(object.sessionId); + switch (object.mediaType) { + case "UNKNOWN": + case 0: + message.mediaType = 0; + break; + case "AUDIO": + case 1: + message.mediaType = 1; + break; + case "VIDEO": + case 2: + message.mediaType = 2; + break; } - if (object.timestamp != null) - if ($util.Long) - (message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = false; - else if (typeof object.timestamp === "string") - message.timestamp = parseInt(object.timestamp, 10); - else if (typeof object.timestamp === "number") - message.timestamp = object.timestamp; - else if (typeof object.timestamp === "object") - message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber(); + if (object.masterKey != null) + if (typeof object.masterKey === "string") + $util.base64.decode(object.masterKey, message.masterKey = $util.newBuffer($util.base64.length(object.masterKey)), 0); + else if (object.masterKey.length) + message.masterKey = object.masterKey; + if (object.caption != null) + message.caption = String(object.caption); return message; }; /** - * Creates a plain object from an AppStateSyncKeyData message. Also converts values to other types if specified. + * Creates a plain object from a BCallMessage message. Also converts values to other types if specified. * @function toObject - * @memberof proto.Message.AppStateSyncKeyData + * @memberof proto.Message.BCallMessage * @static - * @param {proto.Message.AppStateSyncKeyData} message AppStateSyncKeyData + * @param {proto.Message.BCallMessage} message BCallMessage * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AppStateSyncKeyData.toObject = function toObject(message, options) { + BCallMessage.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { + object.sessionId = ""; + object.mediaType = options.enums === String ? "UNKNOWN" : 0; if (options.bytes === String) - object.keyData = ""; + object.masterKey = ""; else { - object.keyData = []; + object.masterKey = []; if (options.bytes !== Array) - object.keyData = $util.newBuffer(object.keyData); + object.masterKey = $util.newBuffer(object.masterKey); } - object.fingerprint = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.timestamp = options.longs === String ? "0" : 0; + object.caption = ""; } - if (message.keyData != null && message.hasOwnProperty("keyData")) - object.keyData = options.bytes === String ? $util.base64.encode(message.keyData, 0, message.keyData.length) : options.bytes === Array ? Array.prototype.slice.call(message.keyData) : message.keyData; - if (message.fingerprint != null && message.hasOwnProperty("fingerprint")) - object.fingerprint = $root.proto.Message.AppStateSyncKeyFingerprint.toObject(message.fingerprint, options); - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - if (typeof message.timestamp === "number") - object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp; - else - object.timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber() : message.timestamp; + if (message.sessionId != null && message.hasOwnProperty("sessionId")) + object.sessionId = message.sessionId; + if (message.mediaType != null && message.hasOwnProperty("mediaType")) + object.mediaType = options.enums === String ? $root.proto.Message.BCallMessage.MediaType[message.mediaType] : message.mediaType; + if (message.masterKey != null && message.hasOwnProperty("masterKey")) + object.masterKey = options.bytes === String ? $util.base64.encode(message.masterKey, 0, message.masterKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.masterKey) : message.masterKey; + if (message.caption != null && message.hasOwnProperty("caption")) + object.caption = message.caption; return object; }; /** - * Converts this AppStateSyncKeyData to JSON. + * Converts this BCallMessage to JSON. * @function toJSON - * @memberof proto.Message.AppStateSyncKeyData + * @memberof proto.Message.BCallMessage * @instance * @returns {Object.} JSON object */ - AppStateSyncKeyData.prototype.toJSON = function toJSON() { + BCallMessage.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return AppStateSyncKeyData; + /** + * MediaType enum. + * @name proto.Message.BCallMessage.MediaType + * @enum {number} + * @property {number} UNKNOWN=0 UNKNOWN value + * @property {number} AUDIO=1 AUDIO value + * @property {number} VIDEO=2 VIDEO value + */ + BCallMessage.MediaType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN"] = 0; + values[valuesById[1] = "AUDIO"] = 1; + values[valuesById[2] = "VIDEO"] = 2; + return values; + })(); + + return BCallMessage; })(); - Message.AppStateSyncKeyFingerprint = (function() { + Message.BotFeedbackMessage = (function() { /** - * Properties of an AppStateSyncKeyFingerprint. + * Properties of a BotFeedbackMessage. * @memberof proto.Message - * @interface IAppStateSyncKeyFingerprint - * @property {number|null} [rawId] AppStateSyncKeyFingerprint rawId - * @property {number|null} [currentIndex] AppStateSyncKeyFingerprint currentIndex - * @property {Array.|null} [deviceIndexes] AppStateSyncKeyFingerprint deviceIndexes + * @interface IBotFeedbackMessage + * @property {proto.IMessageKey|null} [messageKey] BotFeedbackMessage messageKey + * @property {proto.Message.BotFeedbackMessage.BotFeedbackKind|null} [kind] BotFeedbackMessage kind + * @property {string|null} [text] BotFeedbackMessage text + * @property {number|Long|null} [kindNegative] BotFeedbackMessage kindNegative + * @property {number|Long|null} [kindPositive] BotFeedbackMessage kindPositive */ /** - * Constructs a new AppStateSyncKeyFingerprint. + * Constructs a new BotFeedbackMessage. * @memberof proto.Message - * @classdesc Represents an AppStateSyncKeyFingerprint. - * @implements IAppStateSyncKeyFingerprint + * @classdesc Represents a BotFeedbackMessage. + * @implements IBotFeedbackMessage * @constructor - * @param {proto.Message.IAppStateSyncKeyFingerprint=} [properties] Properties to set + * @param {proto.Message.IBotFeedbackMessage=} [properties] Properties to set */ - function AppStateSyncKeyFingerprint(properties) { - this.deviceIndexes = []; + function BotFeedbackMessage(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -24385,112 +31031,127 @@ $root.proto = (function() { } /** - * AppStateSyncKeyFingerprint rawId. - * @member {number} rawId - * @memberof proto.Message.AppStateSyncKeyFingerprint + * BotFeedbackMessage messageKey. + * @member {proto.IMessageKey|null|undefined} messageKey + * @memberof proto.Message.BotFeedbackMessage * @instance */ - AppStateSyncKeyFingerprint.prototype.rawId = 0; + BotFeedbackMessage.prototype.messageKey = null; /** - * AppStateSyncKeyFingerprint currentIndex. - * @member {number} currentIndex - * @memberof proto.Message.AppStateSyncKeyFingerprint + * BotFeedbackMessage kind. + * @member {proto.Message.BotFeedbackMessage.BotFeedbackKind} kind + * @memberof proto.Message.BotFeedbackMessage * @instance */ - AppStateSyncKeyFingerprint.prototype.currentIndex = 0; + BotFeedbackMessage.prototype.kind = 0; /** - * AppStateSyncKeyFingerprint deviceIndexes. - * @member {Array.} deviceIndexes - * @memberof proto.Message.AppStateSyncKeyFingerprint + * BotFeedbackMessage text. + * @member {string} text + * @memberof proto.Message.BotFeedbackMessage * @instance */ - AppStateSyncKeyFingerprint.prototype.deviceIndexes = $util.emptyArray; + BotFeedbackMessage.prototype.text = ""; /** - * Creates a new AppStateSyncKeyFingerprint instance using the specified properties. + * BotFeedbackMessage kindNegative. + * @member {number|Long} kindNegative + * @memberof proto.Message.BotFeedbackMessage + * @instance + */ + BotFeedbackMessage.prototype.kindNegative = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * BotFeedbackMessage kindPositive. + * @member {number|Long} kindPositive + * @memberof proto.Message.BotFeedbackMessage + * @instance + */ + BotFeedbackMessage.prototype.kindPositive = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new BotFeedbackMessage instance using the specified properties. * @function create - * @memberof proto.Message.AppStateSyncKeyFingerprint + * @memberof proto.Message.BotFeedbackMessage * @static - * @param {proto.Message.IAppStateSyncKeyFingerprint=} [properties] Properties to set - * @returns {proto.Message.AppStateSyncKeyFingerprint} AppStateSyncKeyFingerprint instance + * @param {proto.Message.IBotFeedbackMessage=} [properties] Properties to set + * @returns {proto.Message.BotFeedbackMessage} BotFeedbackMessage instance */ - AppStateSyncKeyFingerprint.create = function create(properties) { - return new AppStateSyncKeyFingerprint(properties); + BotFeedbackMessage.create = function create(properties) { + return new BotFeedbackMessage(properties); }; /** - * Encodes the specified AppStateSyncKeyFingerprint message. Does not implicitly {@link proto.Message.AppStateSyncKeyFingerprint.verify|verify} messages. + * Encodes the specified BotFeedbackMessage message. Does not implicitly {@link proto.Message.BotFeedbackMessage.verify|verify} messages. * @function encode - * @memberof proto.Message.AppStateSyncKeyFingerprint + * @memberof proto.Message.BotFeedbackMessage * @static - * @param {proto.Message.IAppStateSyncKeyFingerprint} message AppStateSyncKeyFingerprint message or plain object to encode + * @param {proto.Message.IBotFeedbackMessage} message BotFeedbackMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AppStateSyncKeyFingerprint.encode = function encode(message, writer) { + BotFeedbackMessage.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.rawId != null && Object.hasOwnProperty.call(message, "rawId")) - writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.rawId); - if (message.currentIndex != null && Object.hasOwnProperty.call(message, "currentIndex")) - writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.currentIndex); - if (message.deviceIndexes != null && message.deviceIndexes.length) { - writer.uint32(/* id 3, wireType 2 =*/26).fork(); - for (var i = 0; i < message.deviceIndexes.length; ++i) - writer.uint32(message.deviceIndexes[i]); - writer.ldelim(); - } + if (message.messageKey != null && Object.hasOwnProperty.call(message, "messageKey")) + $root.proto.MessageKey.encode(message.messageKey, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.kind); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.text); + if (message.kindNegative != null && Object.hasOwnProperty.call(message, "kindNegative")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.kindNegative); + if (message.kindPositive != null && Object.hasOwnProperty.call(message, "kindPositive")) + writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.kindPositive); return writer; }; /** - * Encodes the specified AppStateSyncKeyFingerprint message, length delimited. Does not implicitly {@link proto.Message.AppStateSyncKeyFingerprint.verify|verify} messages. + * Encodes the specified BotFeedbackMessage message, length delimited. Does not implicitly {@link proto.Message.BotFeedbackMessage.verify|verify} messages. * @function encodeDelimited - * @memberof proto.Message.AppStateSyncKeyFingerprint + * @memberof proto.Message.BotFeedbackMessage * @static - * @param {proto.Message.IAppStateSyncKeyFingerprint} message AppStateSyncKeyFingerprint message or plain object to encode + * @param {proto.Message.IBotFeedbackMessage} message BotFeedbackMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AppStateSyncKeyFingerprint.encodeDelimited = function encodeDelimited(message, writer) { + BotFeedbackMessage.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AppStateSyncKeyFingerprint message from the specified reader or buffer. + * Decodes a BotFeedbackMessage message from the specified reader or buffer. * @function decode - * @memberof proto.Message.AppStateSyncKeyFingerprint + * @memberof proto.Message.BotFeedbackMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {proto.Message.AppStateSyncKeyFingerprint} AppStateSyncKeyFingerprint + * @returns {proto.Message.BotFeedbackMessage} BotFeedbackMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AppStateSyncKeyFingerprint.decode = function decode(reader, length) { + BotFeedbackMessage.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Message.AppStateSyncKeyFingerprint(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Message.BotFeedbackMessage(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.rawId = reader.uint32(); + message.messageKey = $root.proto.MessageKey.decode(reader, reader.uint32()); break; case 2: - message.currentIndex = reader.uint32(); + message.kind = reader.int32(); break; case 3: - if (!(message.deviceIndexes && message.deviceIndexes.length)) - message.deviceIndexes = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.deviceIndexes.push(reader.uint32()); - } else - message.deviceIndexes.push(reader.uint32()); + message.text = reader.string(); + break; + case 4: + message.kindNegative = reader.uint64(); + break; + case 5: + message.kindPositive = reader.uint64(); break; default: reader.skipType(tag & 7); @@ -24501,137 +31162,306 @@ $root.proto = (function() { }; /** - * Decodes an AppStateSyncKeyFingerprint message from the specified reader or buffer, length delimited. + * Decodes a BotFeedbackMessage message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof proto.Message.AppStateSyncKeyFingerprint + * @memberof proto.Message.BotFeedbackMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.Message.AppStateSyncKeyFingerprint} AppStateSyncKeyFingerprint + * @returns {proto.Message.BotFeedbackMessage} BotFeedbackMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AppStateSyncKeyFingerprint.decodeDelimited = function decodeDelimited(reader) { + BotFeedbackMessage.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AppStateSyncKeyFingerprint message. + * Verifies a BotFeedbackMessage message. * @function verify - * @memberof proto.Message.AppStateSyncKeyFingerprint + * @memberof proto.Message.BotFeedbackMessage * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AppStateSyncKeyFingerprint.verify = function verify(message) { + BotFeedbackMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.rawId != null && message.hasOwnProperty("rawId")) - if (!$util.isInteger(message.rawId)) - return "rawId: integer expected"; - if (message.currentIndex != null && message.hasOwnProperty("currentIndex")) - if (!$util.isInteger(message.currentIndex)) - return "currentIndex: integer expected"; - if (message.deviceIndexes != null && message.hasOwnProperty("deviceIndexes")) { - if (!Array.isArray(message.deviceIndexes)) - return "deviceIndexes: array expected"; - for (var i = 0; i < message.deviceIndexes.length; ++i) - if (!$util.isInteger(message.deviceIndexes[i])) - return "deviceIndexes: integer[] expected"; + if (message.messageKey != null && message.hasOwnProperty("messageKey")) { + var error = $root.proto.MessageKey.verify(message.messageKey); + if (error) + return "messageKey." + error; } + if (message.kind != null && message.hasOwnProperty("kind")) + switch (message.kind) { + default: + return "kind: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + break; + } + if (message.text != null && message.hasOwnProperty("text")) + if (!$util.isString(message.text)) + return "text: string expected"; + if (message.kindNegative != null && message.hasOwnProperty("kindNegative")) + if (!$util.isInteger(message.kindNegative) && !(message.kindNegative && $util.isInteger(message.kindNegative.low) && $util.isInteger(message.kindNegative.high))) + return "kindNegative: integer|Long expected"; + if (message.kindPositive != null && message.hasOwnProperty("kindPositive")) + if (!$util.isInteger(message.kindPositive) && !(message.kindPositive && $util.isInteger(message.kindPositive.low) && $util.isInteger(message.kindPositive.high))) + return "kindPositive: integer|Long expected"; return null; }; /** - * Creates an AppStateSyncKeyFingerprint message from a plain object. Also converts values to their respective internal types. + * Creates a BotFeedbackMessage message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof proto.Message.AppStateSyncKeyFingerprint + * @memberof proto.Message.BotFeedbackMessage * @static * @param {Object.} object Plain object - * @returns {proto.Message.AppStateSyncKeyFingerprint} AppStateSyncKeyFingerprint + * @returns {proto.Message.BotFeedbackMessage} BotFeedbackMessage */ - AppStateSyncKeyFingerprint.fromObject = function fromObject(object) { - if (object instanceof $root.proto.Message.AppStateSyncKeyFingerprint) + BotFeedbackMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.BotFeedbackMessage) return object; - var message = new $root.proto.Message.AppStateSyncKeyFingerprint(); - if (object.rawId != null) - message.rawId = object.rawId >>> 0; - if (object.currentIndex != null) - message.currentIndex = object.currentIndex >>> 0; - if (object.deviceIndexes) { - if (!Array.isArray(object.deviceIndexes)) - throw TypeError(".proto.Message.AppStateSyncKeyFingerprint.deviceIndexes: array expected"); - message.deviceIndexes = []; - for (var i = 0; i < object.deviceIndexes.length; ++i) - message.deviceIndexes[i] = object.deviceIndexes[i] >>> 0; + var message = new $root.proto.Message.BotFeedbackMessage(); + if (object.messageKey != null) { + if (typeof object.messageKey !== "object") + throw TypeError(".proto.Message.BotFeedbackMessage.messageKey: object expected"); + message.messageKey = $root.proto.MessageKey.fromObject(object.messageKey); + } + switch (object.kind) { + case "BOT_FEEDBACK_POSITIVE": + case 0: + message.kind = 0; + break; + case "BOT_FEEDBACK_NEGATIVE_GENERIC": + case 1: + message.kind = 1; + break; + case "BOT_FEEDBACK_NEGATIVE_HELPFUL": + case 2: + message.kind = 2; + break; + case "BOT_FEEDBACK_NEGATIVE_INTERESTING": + case 3: + message.kind = 3; + break; + case "BOT_FEEDBACK_NEGATIVE_ACCURATE": + case 4: + message.kind = 4; + break; + case "BOT_FEEDBACK_NEGATIVE_SAFE": + case 5: + message.kind = 5; + break; + case "BOT_FEEDBACK_NEGATIVE_OTHER": + case 6: + message.kind = 6; + break; + case "BOT_FEEDBACK_NEGATIVE_REFUSED": + case 7: + message.kind = 7; + break; + case "BOT_FEEDBACK_NEGATIVE_NOT_VISUALLY_APPEALING": + case 8: + message.kind = 8; + break; + case "BOT_FEEDBACK_NEGATIVE_NOT_RELEVANT_TO_TEXT": + case 9: + message.kind = 9; + break; } + if (object.text != null) + message.text = String(object.text); + if (object.kindNegative != null) + if ($util.Long) + (message.kindNegative = $util.Long.fromValue(object.kindNegative)).unsigned = true; + else if (typeof object.kindNegative === "string") + message.kindNegative = parseInt(object.kindNegative, 10); + else if (typeof object.kindNegative === "number") + message.kindNegative = object.kindNegative; + else if (typeof object.kindNegative === "object") + message.kindNegative = new $util.LongBits(object.kindNegative.low >>> 0, object.kindNegative.high >>> 0).toNumber(true); + if (object.kindPositive != null) + if ($util.Long) + (message.kindPositive = $util.Long.fromValue(object.kindPositive)).unsigned = true; + else if (typeof object.kindPositive === "string") + message.kindPositive = parseInt(object.kindPositive, 10); + else if (typeof object.kindPositive === "number") + message.kindPositive = object.kindPositive; + else if (typeof object.kindPositive === "object") + message.kindPositive = new $util.LongBits(object.kindPositive.low >>> 0, object.kindPositive.high >>> 0).toNumber(true); return message; }; /** - * Creates a plain object from an AppStateSyncKeyFingerprint message. Also converts values to other types if specified. + * Creates a plain object from a BotFeedbackMessage message. Also converts values to other types if specified. * @function toObject - * @memberof proto.Message.AppStateSyncKeyFingerprint + * @memberof proto.Message.BotFeedbackMessage * @static - * @param {proto.Message.AppStateSyncKeyFingerprint} message AppStateSyncKeyFingerprint + * @param {proto.Message.BotFeedbackMessage} message BotFeedbackMessage * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AppStateSyncKeyFingerprint.toObject = function toObject(message, options) { + BotFeedbackMessage.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.deviceIndexes = []; if (options.defaults) { - object.rawId = 0; - object.currentIndex = 0; - } - if (message.rawId != null && message.hasOwnProperty("rawId")) - object.rawId = message.rawId; - if (message.currentIndex != null && message.hasOwnProperty("currentIndex")) - object.currentIndex = message.currentIndex; - if (message.deviceIndexes && message.deviceIndexes.length) { - object.deviceIndexes = []; - for (var j = 0; j < message.deviceIndexes.length; ++j) - object.deviceIndexes[j] = message.deviceIndexes[j]; + object.messageKey = null; + object.kind = options.enums === String ? "BOT_FEEDBACK_POSITIVE" : 0; + object.text = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.kindNegative = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.kindNegative = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.kindPositive = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.kindPositive = options.longs === String ? "0" : 0; } + if (message.messageKey != null && message.hasOwnProperty("messageKey")) + object.messageKey = $root.proto.MessageKey.toObject(message.messageKey, options); + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = options.enums === String ? $root.proto.Message.BotFeedbackMessage.BotFeedbackKind[message.kind] : message.kind; + if (message.text != null && message.hasOwnProperty("text")) + object.text = message.text; + if (message.kindNegative != null && message.hasOwnProperty("kindNegative")) + if (typeof message.kindNegative === "number") + object.kindNegative = options.longs === String ? String(message.kindNegative) : message.kindNegative; + else + object.kindNegative = options.longs === String ? $util.Long.prototype.toString.call(message.kindNegative) : options.longs === Number ? new $util.LongBits(message.kindNegative.low >>> 0, message.kindNegative.high >>> 0).toNumber(true) : message.kindNegative; + if (message.kindPositive != null && message.hasOwnProperty("kindPositive")) + if (typeof message.kindPositive === "number") + object.kindPositive = options.longs === String ? String(message.kindPositive) : message.kindPositive; + else + object.kindPositive = options.longs === String ? $util.Long.prototype.toString.call(message.kindPositive) : options.longs === Number ? new $util.LongBits(message.kindPositive.low >>> 0, message.kindPositive.high >>> 0).toNumber(true) : message.kindPositive; return object; }; /** - * Converts this AppStateSyncKeyFingerprint to JSON. + * Converts this BotFeedbackMessage to JSON. * @function toJSON - * @memberof proto.Message.AppStateSyncKeyFingerprint + * @memberof proto.Message.BotFeedbackMessage * @instance * @returns {Object.} JSON object */ - AppStateSyncKeyFingerprint.prototype.toJSON = function toJSON() { + BotFeedbackMessage.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return AppStateSyncKeyFingerprint; + /** + * BotFeedbackKind enum. + * @name proto.Message.BotFeedbackMessage.BotFeedbackKind + * @enum {number} + * @property {number} BOT_FEEDBACK_POSITIVE=0 BOT_FEEDBACK_POSITIVE value + * @property {number} BOT_FEEDBACK_NEGATIVE_GENERIC=1 BOT_FEEDBACK_NEGATIVE_GENERIC value + * @property {number} BOT_FEEDBACK_NEGATIVE_HELPFUL=2 BOT_FEEDBACK_NEGATIVE_HELPFUL value + * @property {number} BOT_FEEDBACK_NEGATIVE_INTERESTING=3 BOT_FEEDBACK_NEGATIVE_INTERESTING value + * @property {number} BOT_FEEDBACK_NEGATIVE_ACCURATE=4 BOT_FEEDBACK_NEGATIVE_ACCURATE value + * @property {number} BOT_FEEDBACK_NEGATIVE_SAFE=5 BOT_FEEDBACK_NEGATIVE_SAFE value + * @property {number} BOT_FEEDBACK_NEGATIVE_OTHER=6 BOT_FEEDBACK_NEGATIVE_OTHER value + * @property {number} BOT_FEEDBACK_NEGATIVE_REFUSED=7 BOT_FEEDBACK_NEGATIVE_REFUSED value + * @property {number} BOT_FEEDBACK_NEGATIVE_NOT_VISUALLY_APPEALING=8 BOT_FEEDBACK_NEGATIVE_NOT_VISUALLY_APPEALING value + * @property {number} BOT_FEEDBACK_NEGATIVE_NOT_RELEVANT_TO_TEXT=9 BOT_FEEDBACK_NEGATIVE_NOT_RELEVANT_TO_TEXT value + */ + BotFeedbackMessage.BotFeedbackKind = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "BOT_FEEDBACK_POSITIVE"] = 0; + values[valuesById[1] = "BOT_FEEDBACK_NEGATIVE_GENERIC"] = 1; + values[valuesById[2] = "BOT_FEEDBACK_NEGATIVE_HELPFUL"] = 2; + values[valuesById[3] = "BOT_FEEDBACK_NEGATIVE_INTERESTING"] = 3; + values[valuesById[4] = "BOT_FEEDBACK_NEGATIVE_ACCURATE"] = 4; + values[valuesById[5] = "BOT_FEEDBACK_NEGATIVE_SAFE"] = 5; + values[valuesById[6] = "BOT_FEEDBACK_NEGATIVE_OTHER"] = 6; + values[valuesById[7] = "BOT_FEEDBACK_NEGATIVE_REFUSED"] = 7; + values[valuesById[8] = "BOT_FEEDBACK_NEGATIVE_NOT_VISUALLY_APPEALING"] = 8; + values[valuesById[9] = "BOT_FEEDBACK_NEGATIVE_NOT_RELEVANT_TO_TEXT"] = 9; + return values; + })(); + + /** + * BotFeedbackKindMultipleNegative enum. + * @name proto.Message.BotFeedbackMessage.BotFeedbackKindMultipleNegative + * @enum {number} + * @property {number} BOT_FEEDBACK_MULTIPLE_NEGATIVE_GENERIC=1 BOT_FEEDBACK_MULTIPLE_NEGATIVE_GENERIC value + * @property {number} BOT_FEEDBACK_MULTIPLE_NEGATIVE_HELPFUL=2 BOT_FEEDBACK_MULTIPLE_NEGATIVE_HELPFUL value + * @property {number} BOT_FEEDBACK_MULTIPLE_NEGATIVE_INTERESTING=4 BOT_FEEDBACK_MULTIPLE_NEGATIVE_INTERESTING value + * @property {number} BOT_FEEDBACK_MULTIPLE_NEGATIVE_ACCURATE=8 BOT_FEEDBACK_MULTIPLE_NEGATIVE_ACCURATE value + * @property {number} BOT_FEEDBACK_MULTIPLE_NEGATIVE_SAFE=16 BOT_FEEDBACK_MULTIPLE_NEGATIVE_SAFE value + * @property {number} BOT_FEEDBACK_MULTIPLE_NEGATIVE_OTHER=32 BOT_FEEDBACK_MULTIPLE_NEGATIVE_OTHER value + * @property {number} BOT_FEEDBACK_MULTIPLE_NEGATIVE_REFUSED=64 BOT_FEEDBACK_MULTIPLE_NEGATIVE_REFUSED value + * @property {number} BOT_FEEDBACK_MULTIPLE_NEGATIVE_NOT_VISUALLY_APPEALING=128 BOT_FEEDBACK_MULTIPLE_NEGATIVE_NOT_VISUALLY_APPEALING value + * @property {number} BOT_FEEDBACK_MULTIPLE_NEGATIVE_NOT_RELEVANT_TO_TEXT=256 BOT_FEEDBACK_MULTIPLE_NEGATIVE_NOT_RELEVANT_TO_TEXT value + */ + BotFeedbackMessage.BotFeedbackKindMultipleNegative = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "BOT_FEEDBACK_MULTIPLE_NEGATIVE_GENERIC"] = 1; + values[valuesById[2] = "BOT_FEEDBACK_MULTIPLE_NEGATIVE_HELPFUL"] = 2; + values[valuesById[4] = "BOT_FEEDBACK_MULTIPLE_NEGATIVE_INTERESTING"] = 4; + values[valuesById[8] = "BOT_FEEDBACK_MULTIPLE_NEGATIVE_ACCURATE"] = 8; + values[valuesById[16] = "BOT_FEEDBACK_MULTIPLE_NEGATIVE_SAFE"] = 16; + values[valuesById[32] = "BOT_FEEDBACK_MULTIPLE_NEGATIVE_OTHER"] = 32; + values[valuesById[64] = "BOT_FEEDBACK_MULTIPLE_NEGATIVE_REFUSED"] = 64; + values[valuesById[128] = "BOT_FEEDBACK_MULTIPLE_NEGATIVE_NOT_VISUALLY_APPEALING"] = 128; + values[valuesById[256] = "BOT_FEEDBACK_MULTIPLE_NEGATIVE_NOT_RELEVANT_TO_TEXT"] = 256; + return values; + })(); + + /** + * BotFeedbackKindMultiplePositive enum. + * @name proto.Message.BotFeedbackMessage.BotFeedbackKindMultiplePositive + * @enum {number} + * @property {number} BOT_FEEDBACK_MULTIPLE_POSITIVE_GENERIC=1 BOT_FEEDBACK_MULTIPLE_POSITIVE_GENERIC value + */ + BotFeedbackMessage.BotFeedbackKindMultiplePositive = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "BOT_FEEDBACK_MULTIPLE_POSITIVE_GENERIC"] = 1; + return values; + })(); + + return BotFeedbackMessage; })(); - Message.AppStateSyncKeyId = (function() { + Message.ButtonsMessage = (function() { /** - * Properties of an AppStateSyncKeyId. + * Properties of a ButtonsMessage. * @memberof proto.Message - * @interface IAppStateSyncKeyId - * @property {Uint8Array|null} [keyId] AppStateSyncKeyId keyId + * @interface IButtonsMessage + * @property {string|null} [contentText] ButtonsMessage contentText + * @property {string|null} [footerText] ButtonsMessage footerText + * @property {proto.IContextInfo|null} [contextInfo] ButtonsMessage contextInfo + * @property {Array.|null} [buttons] ButtonsMessage buttons + * @property {proto.Message.ButtonsMessage.HeaderType|null} [headerType] ButtonsMessage headerType + * @property {string|null} [text] ButtonsMessage text + * @property {proto.Message.IDocumentMessage|null} [documentMessage] ButtonsMessage documentMessage + * @property {proto.Message.IImageMessage|null} [imageMessage] ButtonsMessage imageMessage + * @property {proto.Message.IVideoMessage|null} [videoMessage] ButtonsMessage videoMessage + * @property {proto.Message.ILocationMessage|null} [locationMessage] ButtonsMessage locationMessage */ /** - * Constructs a new AppStateSyncKeyId. + * Constructs a new ButtonsMessage. * @memberof proto.Message - * @classdesc Represents an AppStateSyncKeyId. - * @implements IAppStateSyncKeyId + * @classdesc Represents a ButtonsMessage. + * @implements IButtonsMessage * @constructor - * @param {proto.Message.IAppStateSyncKeyId=} [properties] Properties to set + * @param {proto.Message.IButtonsMessage=} [properties] Properties to set */ - function AppStateSyncKeyId(properties) { + function ButtonsMessage(properties) { + this.buttons = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -24639,625 +31469,1229 @@ $root.proto = (function() { } /** - * AppStateSyncKeyId keyId. - * @member {Uint8Array} keyId - * @memberof proto.Message.AppStateSyncKeyId + * ButtonsMessage contentText. + * @member {string} contentText + * @memberof proto.Message.ButtonsMessage * @instance */ - AppStateSyncKeyId.prototype.keyId = $util.newBuffer([]); + ButtonsMessage.prototype.contentText = ""; /** - * Creates a new AppStateSyncKeyId instance using the specified properties. + * ButtonsMessage footerText. + * @member {string} footerText + * @memberof proto.Message.ButtonsMessage + * @instance + */ + ButtonsMessage.prototype.footerText = ""; + + /** + * ButtonsMessage contextInfo. + * @member {proto.IContextInfo|null|undefined} contextInfo + * @memberof proto.Message.ButtonsMessage + * @instance + */ + ButtonsMessage.prototype.contextInfo = null; + + /** + * ButtonsMessage buttons. + * @member {Array.} buttons + * @memberof proto.Message.ButtonsMessage + * @instance + */ + ButtonsMessage.prototype.buttons = $util.emptyArray; + + /** + * ButtonsMessage headerType. + * @member {proto.Message.ButtonsMessage.HeaderType} headerType + * @memberof proto.Message.ButtonsMessage + * @instance + */ + ButtonsMessage.prototype.headerType = 0; + + /** + * ButtonsMessage text. + * @member {string|null|undefined} text + * @memberof proto.Message.ButtonsMessage + * @instance + */ + ButtonsMessage.prototype.text = null; + + /** + * ButtonsMessage documentMessage. + * @member {proto.Message.IDocumentMessage|null|undefined} documentMessage + * @memberof proto.Message.ButtonsMessage + * @instance + */ + ButtonsMessage.prototype.documentMessage = null; + + /** + * ButtonsMessage imageMessage. + * @member {proto.Message.IImageMessage|null|undefined} imageMessage + * @memberof proto.Message.ButtonsMessage + * @instance + */ + ButtonsMessage.prototype.imageMessage = null; + + /** + * ButtonsMessage videoMessage. + * @member {proto.Message.IVideoMessage|null|undefined} videoMessage + * @memberof proto.Message.ButtonsMessage + * @instance + */ + ButtonsMessage.prototype.videoMessage = null; + + /** + * ButtonsMessage locationMessage. + * @member {proto.Message.ILocationMessage|null|undefined} locationMessage + * @memberof proto.Message.ButtonsMessage + * @instance + */ + ButtonsMessage.prototype.locationMessage = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ButtonsMessage header. + * @member {"text"|"documentMessage"|"imageMessage"|"videoMessage"|"locationMessage"|undefined} header + * @memberof proto.Message.ButtonsMessage + * @instance + */ + Object.defineProperty(ButtonsMessage.prototype, "header", { + get: $util.oneOfGetter($oneOfFields = ["text", "documentMessage", "imageMessage", "videoMessage", "locationMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ButtonsMessage instance using the specified properties. * @function create - * @memberof proto.Message.AppStateSyncKeyId + * @memberof proto.Message.ButtonsMessage * @static - * @param {proto.Message.IAppStateSyncKeyId=} [properties] Properties to set - * @returns {proto.Message.AppStateSyncKeyId} AppStateSyncKeyId instance + * @param {proto.Message.IButtonsMessage=} [properties] Properties to set + * @returns {proto.Message.ButtonsMessage} ButtonsMessage instance */ - AppStateSyncKeyId.create = function create(properties) { - return new AppStateSyncKeyId(properties); + ButtonsMessage.create = function create(properties) { + return new ButtonsMessage(properties); }; /** - * Encodes the specified AppStateSyncKeyId message. Does not implicitly {@link proto.Message.AppStateSyncKeyId.verify|verify} messages. + * Encodes the specified ButtonsMessage message. Does not implicitly {@link proto.Message.ButtonsMessage.verify|verify} messages. * @function encode - * @memberof proto.Message.AppStateSyncKeyId + * @memberof proto.Message.ButtonsMessage * @static - * @param {proto.Message.IAppStateSyncKeyId} message AppStateSyncKeyId message or plain object to encode + * @param {proto.Message.IButtonsMessage} message ButtonsMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AppStateSyncKeyId.encode = function encode(message, writer) { + ButtonsMessage.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.keyId != null && Object.hasOwnProperty.call(message, "keyId")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.keyId); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); + if (message.documentMessage != null && Object.hasOwnProperty.call(message, "documentMessage")) + $root.proto.Message.DocumentMessage.encode(message.documentMessage, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.imageMessage != null && Object.hasOwnProperty.call(message, "imageMessage")) + $root.proto.Message.ImageMessage.encode(message.imageMessage, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.videoMessage != null && Object.hasOwnProperty.call(message, "videoMessage")) + $root.proto.Message.VideoMessage.encode(message.videoMessage, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.locationMessage != null && Object.hasOwnProperty.call(message, "locationMessage")) + $root.proto.Message.LocationMessage.encode(message.locationMessage, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.contentText != null && Object.hasOwnProperty.call(message, "contentText")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.contentText); + if (message.footerText != null && Object.hasOwnProperty.call(message, "footerText")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.footerText); + if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo")) + $root.proto.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.buttons != null && message.buttons.length) + for (var i = 0; i < message.buttons.length; ++i) + $root.proto.Message.ButtonsMessage.Button.encode(message.buttons[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.headerType != null && Object.hasOwnProperty.call(message, "headerType")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.headerType); return writer; }; /** - * Encodes the specified AppStateSyncKeyId message, length delimited. Does not implicitly {@link proto.Message.AppStateSyncKeyId.verify|verify} messages. + * Encodes the specified ButtonsMessage message, length delimited. Does not implicitly {@link proto.Message.ButtonsMessage.verify|verify} messages. * @function encodeDelimited - * @memberof proto.Message.AppStateSyncKeyId + * @memberof proto.Message.ButtonsMessage * @static - * @param {proto.Message.IAppStateSyncKeyId} message AppStateSyncKeyId message or plain object to encode + * @param {proto.Message.IButtonsMessage} message ButtonsMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AppStateSyncKeyId.encodeDelimited = function encodeDelimited(message, writer) { + ButtonsMessage.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AppStateSyncKeyId message from the specified reader or buffer. + * Decodes a ButtonsMessage message from the specified reader or buffer. * @function decode - * @memberof proto.Message.AppStateSyncKeyId + * @memberof proto.Message.ButtonsMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {proto.Message.AppStateSyncKeyId} AppStateSyncKeyId + * @returns {proto.Message.ButtonsMessage} ButtonsMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AppStateSyncKeyId.decode = function decode(reader, length) { + ButtonsMessage.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Message.AppStateSyncKeyId(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Message.ButtonsMessage(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 6: + message.contentText = reader.string(); + break; + case 7: + message.footerText = reader.string(); + break; + case 8: + message.contextInfo = $root.proto.ContextInfo.decode(reader, reader.uint32()); + break; + case 9: + if (!(message.buttons && message.buttons.length)) + message.buttons = []; + message.buttons.push($root.proto.Message.ButtonsMessage.Button.decode(reader, reader.uint32())); + break; + case 10: + message.headerType = reader.int32(); + break; case 1: - message.keyId = reader.bytes(); + message.text = reader.string(); + break; + case 2: + message.documentMessage = $root.proto.Message.DocumentMessage.decode(reader, reader.uint32()); + break; + case 3: + message.imageMessage = $root.proto.Message.ImageMessage.decode(reader, reader.uint32()); + break; + case 4: + message.videoMessage = $root.proto.Message.VideoMessage.decode(reader, reader.uint32()); + break; + case 5: + message.locationMessage = $root.proto.Message.LocationMessage.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); break; } } - return message; - }; - - /** - * Decodes an AppStateSyncKeyId message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.Message.AppStateSyncKeyId - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.Message.AppStateSyncKeyId} AppStateSyncKeyId - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AppStateSyncKeyId.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AppStateSyncKeyId message. - * @function verify - * @memberof proto.Message.AppStateSyncKeyId - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AppStateSyncKeyId.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.keyId != null && message.hasOwnProperty("keyId")) - if (!(message.keyId && typeof message.keyId.length === "number" || $util.isString(message.keyId))) - return "keyId: buffer expected"; + return message; + }; + + /** + * Decodes a ButtonsMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.ButtonsMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.ButtonsMessage} ButtonsMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ButtonsMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ButtonsMessage message. + * @function verify + * @memberof proto.Message.ButtonsMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ButtonsMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.contentText != null && message.hasOwnProperty("contentText")) + if (!$util.isString(message.contentText)) + return "contentText: string expected"; + if (message.footerText != null && message.hasOwnProperty("footerText")) + if (!$util.isString(message.footerText)) + return "footerText: string expected"; + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { + var error = $root.proto.ContextInfo.verify(message.contextInfo); + if (error) + return "contextInfo." + error; + } + if (message.buttons != null && message.hasOwnProperty("buttons")) { + if (!Array.isArray(message.buttons)) + return "buttons: array expected"; + for (var i = 0; i < message.buttons.length; ++i) { + var error = $root.proto.Message.ButtonsMessage.Button.verify(message.buttons[i]); + if (error) + return "buttons." + error; + } + } + if (message.headerType != null && message.hasOwnProperty("headerType")) + switch (message.headerType) { + default: + return "headerType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.text != null && message.hasOwnProperty("text")) { + properties.header = 1; + if (!$util.isString(message.text)) + return "text: string expected"; + } + if (message.documentMessage != null && message.hasOwnProperty("documentMessage")) { + if (properties.header === 1) + return "header: multiple values"; + properties.header = 1; + { + var error = $root.proto.Message.DocumentMessage.verify(message.documentMessage); + if (error) + return "documentMessage." + error; + } + } + if (message.imageMessage != null && message.hasOwnProperty("imageMessage")) { + if (properties.header === 1) + return "header: multiple values"; + properties.header = 1; + { + var error = $root.proto.Message.ImageMessage.verify(message.imageMessage); + if (error) + return "imageMessage." + error; + } + } + if (message.videoMessage != null && message.hasOwnProperty("videoMessage")) { + if (properties.header === 1) + return "header: multiple values"; + properties.header = 1; + { + var error = $root.proto.Message.VideoMessage.verify(message.videoMessage); + if (error) + return "videoMessage." + error; + } + } + if (message.locationMessage != null && message.hasOwnProperty("locationMessage")) { + if (properties.header === 1) + return "header: multiple values"; + properties.header = 1; + { + var error = $root.proto.Message.LocationMessage.verify(message.locationMessage); + if (error) + return "locationMessage." + error; + } + } return null; }; /** - * Creates an AppStateSyncKeyId message from a plain object. Also converts values to their respective internal types. + * Creates a ButtonsMessage message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof proto.Message.AppStateSyncKeyId + * @memberof proto.Message.ButtonsMessage * @static * @param {Object.} object Plain object - * @returns {proto.Message.AppStateSyncKeyId} AppStateSyncKeyId + * @returns {proto.Message.ButtonsMessage} ButtonsMessage */ - AppStateSyncKeyId.fromObject = function fromObject(object) { - if (object instanceof $root.proto.Message.AppStateSyncKeyId) + ButtonsMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.ButtonsMessage) return object; - var message = new $root.proto.Message.AppStateSyncKeyId(); - if (object.keyId != null) - if (typeof object.keyId === "string") - $util.base64.decode(object.keyId, message.keyId = $util.newBuffer($util.base64.length(object.keyId)), 0); - else if (object.keyId.length) - message.keyId = object.keyId; + var message = new $root.proto.Message.ButtonsMessage(); + if (object.contentText != null) + message.contentText = String(object.contentText); + if (object.footerText != null) + message.footerText = String(object.footerText); + if (object.contextInfo != null) { + if (typeof object.contextInfo !== "object") + throw TypeError(".proto.Message.ButtonsMessage.contextInfo: object expected"); + message.contextInfo = $root.proto.ContextInfo.fromObject(object.contextInfo); + } + if (object.buttons) { + if (!Array.isArray(object.buttons)) + throw TypeError(".proto.Message.ButtonsMessage.buttons: array expected"); + message.buttons = []; + for (var i = 0; i < object.buttons.length; ++i) { + if (typeof object.buttons[i] !== "object") + throw TypeError(".proto.Message.ButtonsMessage.buttons: object expected"); + message.buttons[i] = $root.proto.Message.ButtonsMessage.Button.fromObject(object.buttons[i]); + } + } + switch (object.headerType) { + case "UNKNOWN": + case 0: + message.headerType = 0; + break; + case "EMPTY": + case 1: + message.headerType = 1; + break; + case "TEXT": + case 2: + message.headerType = 2; + break; + case "DOCUMENT": + case 3: + message.headerType = 3; + break; + case "IMAGE": + case 4: + message.headerType = 4; + break; + case "VIDEO": + case 5: + message.headerType = 5; + break; + case "LOCATION": + case 6: + message.headerType = 6; + break; + } + if (object.text != null) + message.text = String(object.text); + if (object.documentMessage != null) { + if (typeof object.documentMessage !== "object") + throw TypeError(".proto.Message.ButtonsMessage.documentMessage: object expected"); + message.documentMessage = $root.proto.Message.DocumentMessage.fromObject(object.documentMessage); + } + if (object.imageMessage != null) { + if (typeof object.imageMessage !== "object") + throw TypeError(".proto.Message.ButtonsMessage.imageMessage: object expected"); + message.imageMessage = $root.proto.Message.ImageMessage.fromObject(object.imageMessage); + } + if (object.videoMessage != null) { + if (typeof object.videoMessage !== "object") + throw TypeError(".proto.Message.ButtonsMessage.videoMessage: object expected"); + message.videoMessage = $root.proto.Message.VideoMessage.fromObject(object.videoMessage); + } + if (object.locationMessage != null) { + if (typeof object.locationMessage !== "object") + throw TypeError(".proto.Message.ButtonsMessage.locationMessage: object expected"); + message.locationMessage = $root.proto.Message.LocationMessage.fromObject(object.locationMessage); + } return message; }; /** - * Creates a plain object from an AppStateSyncKeyId message. Also converts values to other types if specified. + * Creates a plain object from a ButtonsMessage message. Also converts values to other types if specified. * @function toObject - * @memberof proto.Message.AppStateSyncKeyId + * @memberof proto.Message.ButtonsMessage * @static - * @param {proto.Message.AppStateSyncKeyId} message AppStateSyncKeyId + * @param {proto.Message.ButtonsMessage} message ButtonsMessage * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AppStateSyncKeyId.toObject = function toObject(message, options) { + ButtonsMessage.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - if (options.bytes === String) - object.keyId = ""; - else { - object.keyId = []; - if (options.bytes !== Array) - object.keyId = $util.newBuffer(object.keyId); - } - if (message.keyId != null && message.hasOwnProperty("keyId")) - object.keyId = options.bytes === String ? $util.base64.encode(message.keyId, 0, message.keyId.length) : options.bytes === Array ? Array.prototype.slice.call(message.keyId) : message.keyId; + if (options.arrays || options.defaults) + object.buttons = []; + if (options.defaults) { + object.contentText = ""; + object.footerText = ""; + object.contextInfo = null; + object.headerType = options.enums === String ? "UNKNOWN" : 0; + } + if (message.text != null && message.hasOwnProperty("text")) { + object.text = message.text; + if (options.oneofs) + object.header = "text"; + } + if (message.documentMessage != null && message.hasOwnProperty("documentMessage")) { + object.documentMessage = $root.proto.Message.DocumentMessage.toObject(message.documentMessage, options); + if (options.oneofs) + object.header = "documentMessage"; + } + if (message.imageMessage != null && message.hasOwnProperty("imageMessage")) { + object.imageMessage = $root.proto.Message.ImageMessage.toObject(message.imageMessage, options); + if (options.oneofs) + object.header = "imageMessage"; + } + if (message.videoMessage != null && message.hasOwnProperty("videoMessage")) { + object.videoMessage = $root.proto.Message.VideoMessage.toObject(message.videoMessage, options); + if (options.oneofs) + object.header = "videoMessage"; + } + if (message.locationMessage != null && message.hasOwnProperty("locationMessage")) { + object.locationMessage = $root.proto.Message.LocationMessage.toObject(message.locationMessage, options); + if (options.oneofs) + object.header = "locationMessage"; + } + if (message.contentText != null && message.hasOwnProperty("contentText")) + object.contentText = message.contentText; + if (message.footerText != null && message.hasOwnProperty("footerText")) + object.footerText = message.footerText; + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) + object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); + if (message.buttons && message.buttons.length) { + object.buttons = []; + for (var j = 0; j < message.buttons.length; ++j) + object.buttons[j] = $root.proto.Message.ButtonsMessage.Button.toObject(message.buttons[j], options); + } + if (message.headerType != null && message.hasOwnProperty("headerType")) + object.headerType = options.enums === String ? $root.proto.Message.ButtonsMessage.HeaderType[message.headerType] : message.headerType; return object; }; /** - * Converts this AppStateSyncKeyId to JSON. + * Converts this ButtonsMessage to JSON. * @function toJSON - * @memberof proto.Message.AppStateSyncKeyId + * @memberof proto.Message.ButtonsMessage * @instance * @returns {Object.} JSON object */ - AppStateSyncKeyId.prototype.toJSON = function toJSON() { + ButtonsMessage.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return AppStateSyncKeyId; - })(); + ButtonsMessage.Button = (function() { + + /** + * Properties of a Button. + * @memberof proto.Message.ButtonsMessage + * @interface IButton + * @property {string|null} [buttonId] Button buttonId + * @property {proto.Message.ButtonsMessage.Button.IButtonText|null} [buttonText] Button buttonText + * @property {proto.Message.ButtonsMessage.Button.Type|null} [type] Button type + * @property {proto.Message.ButtonsMessage.Button.INativeFlowInfo|null} [nativeFlowInfo] Button nativeFlowInfo + */ + + /** + * Constructs a new Button. + * @memberof proto.Message.ButtonsMessage + * @classdesc Represents a Button. + * @implements IButton + * @constructor + * @param {proto.Message.ButtonsMessage.IButton=} [properties] Properties to set + */ + function Button(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Button buttonId. + * @member {string} buttonId + * @memberof proto.Message.ButtonsMessage.Button + * @instance + */ + Button.prototype.buttonId = ""; + + /** + * Button buttonText. + * @member {proto.Message.ButtonsMessage.Button.IButtonText|null|undefined} buttonText + * @memberof proto.Message.ButtonsMessage.Button + * @instance + */ + Button.prototype.buttonText = null; + + /** + * Button type. + * @member {proto.Message.ButtonsMessage.Button.Type} type + * @memberof proto.Message.ButtonsMessage.Button + * @instance + */ + Button.prototype.type = 0; + + /** + * Button nativeFlowInfo. + * @member {proto.Message.ButtonsMessage.Button.INativeFlowInfo|null|undefined} nativeFlowInfo + * @memberof proto.Message.ButtonsMessage.Button + * @instance + */ + Button.prototype.nativeFlowInfo = null; + + /** + * Creates a new Button instance using the specified properties. + * @function create + * @memberof proto.Message.ButtonsMessage.Button + * @static + * @param {proto.Message.ButtonsMessage.IButton=} [properties] Properties to set + * @returns {proto.Message.ButtonsMessage.Button} Button instance + */ + Button.create = function create(properties) { + return new Button(properties); + }; + + /** + * Encodes the specified Button message. Does not implicitly {@link proto.Message.ButtonsMessage.Button.verify|verify} messages. + * @function encode + * @memberof proto.Message.ButtonsMessage.Button + * @static + * @param {proto.Message.ButtonsMessage.IButton} message Button message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Button.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.buttonId != null && Object.hasOwnProperty.call(message, "buttonId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.buttonId); + if (message.buttonText != null && Object.hasOwnProperty.call(message, "buttonText")) + $root.proto.Message.ButtonsMessage.Button.ButtonText.encode(message.buttonText, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.type); + if (message.nativeFlowInfo != null && Object.hasOwnProperty.call(message, "nativeFlowInfo")) + $root.proto.Message.ButtonsMessage.Button.NativeFlowInfo.encode(message.nativeFlowInfo, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Button message, length delimited. Does not implicitly {@link proto.Message.ButtonsMessage.Button.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.ButtonsMessage.Button + * @static + * @param {proto.Message.ButtonsMessage.IButton} message Button message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Button.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Button message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.ButtonsMessage.Button + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.ButtonsMessage.Button} Button + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Button.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Message.ButtonsMessage.Button(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.buttonId = reader.string(); + break; + case 2: + message.buttonText = $root.proto.Message.ButtonsMessage.Button.ButtonText.decode(reader, reader.uint32()); + break; + case 3: + message.type = reader.int32(); + break; + case 4: + message.nativeFlowInfo = $root.proto.Message.ButtonsMessage.Button.NativeFlowInfo.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Button message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.ButtonsMessage.Button + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.ButtonsMessage.Button} Button + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Button.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Button message. + * @function verify + * @memberof proto.Message.ButtonsMessage.Button + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Button.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.buttonId != null && message.hasOwnProperty("buttonId")) + if (!$util.isString(message.buttonId)) + return "buttonId: string expected"; + if (message.buttonText != null && message.hasOwnProperty("buttonText")) { + var error = $root.proto.Message.ButtonsMessage.Button.ButtonText.verify(message.buttonText); + if (error) + return "buttonText." + error; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.nativeFlowInfo != null && message.hasOwnProperty("nativeFlowInfo")) { + var error = $root.proto.Message.ButtonsMessage.Button.NativeFlowInfo.verify(message.nativeFlowInfo); + if (error) + return "nativeFlowInfo." + error; + } + return null; + }; + + /** + * Creates a Button message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.ButtonsMessage.Button + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.ButtonsMessage.Button} Button + */ + Button.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.ButtonsMessage.Button) + return object; + var message = new $root.proto.Message.ButtonsMessage.Button(); + if (object.buttonId != null) + message.buttonId = String(object.buttonId); + if (object.buttonText != null) { + if (typeof object.buttonText !== "object") + throw TypeError(".proto.Message.ButtonsMessage.Button.buttonText: object expected"); + message.buttonText = $root.proto.Message.ButtonsMessage.Button.ButtonText.fromObject(object.buttonText); + } + switch (object.type) { + case "UNKNOWN": + case 0: + message.type = 0; + break; + case "RESPONSE": + case 1: + message.type = 1; + break; + case "NATIVE_FLOW": + case 2: + message.type = 2; + break; + } + if (object.nativeFlowInfo != null) { + if (typeof object.nativeFlowInfo !== "object") + throw TypeError(".proto.Message.ButtonsMessage.Button.nativeFlowInfo: object expected"); + message.nativeFlowInfo = $root.proto.Message.ButtonsMessage.Button.NativeFlowInfo.fromObject(object.nativeFlowInfo); + } + return message; + }; + + /** + * Creates a plain object from a Button message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.ButtonsMessage.Button + * @static + * @param {proto.Message.ButtonsMessage.Button} message Button + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Button.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.buttonId = ""; + object.buttonText = null; + object.type = options.enums === String ? "UNKNOWN" : 0; + object.nativeFlowInfo = null; + } + if (message.buttonId != null && message.hasOwnProperty("buttonId")) + object.buttonId = message.buttonId; + if (message.buttonText != null && message.hasOwnProperty("buttonText")) + object.buttonText = $root.proto.Message.ButtonsMessage.Button.ButtonText.toObject(message.buttonText, options); + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.proto.Message.ButtonsMessage.Button.Type[message.type] : message.type; + if (message.nativeFlowInfo != null && message.hasOwnProperty("nativeFlowInfo")) + object.nativeFlowInfo = $root.proto.Message.ButtonsMessage.Button.NativeFlowInfo.toObject(message.nativeFlowInfo, options); + return object; + }; + + /** + * Converts this Button to JSON. + * @function toJSON + * @memberof proto.Message.ButtonsMessage.Button + * @instance + * @returns {Object.} JSON object + */ + Button.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + Button.ButtonText = (function() { + + /** + * Properties of a ButtonText. + * @memberof proto.Message.ButtonsMessage.Button + * @interface IButtonText + * @property {string|null} [displayText] ButtonText displayText + */ + + /** + * Constructs a new ButtonText. + * @memberof proto.Message.ButtonsMessage.Button + * @classdesc Represents a ButtonText. + * @implements IButtonText + * @constructor + * @param {proto.Message.ButtonsMessage.Button.IButtonText=} [properties] Properties to set + */ + function ButtonText(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ButtonText displayText. + * @member {string} displayText + * @memberof proto.Message.ButtonsMessage.Button.ButtonText + * @instance + */ + ButtonText.prototype.displayText = ""; + + /** + * Creates a new ButtonText instance using the specified properties. + * @function create + * @memberof proto.Message.ButtonsMessage.Button.ButtonText + * @static + * @param {proto.Message.ButtonsMessage.Button.IButtonText=} [properties] Properties to set + * @returns {proto.Message.ButtonsMessage.Button.ButtonText} ButtonText instance + */ + ButtonText.create = function create(properties) { + return new ButtonText(properties); + }; + + /** + * Encodes the specified ButtonText message. Does not implicitly {@link proto.Message.ButtonsMessage.Button.ButtonText.verify|verify} messages. + * @function encode + * @memberof proto.Message.ButtonsMessage.Button.ButtonText + * @static + * @param {proto.Message.ButtonsMessage.Button.IButtonText} message ButtonText message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ButtonText.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayText != null && Object.hasOwnProperty.call(message, "displayText")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayText); + return writer; + }; - Message.AppStateSyncKeyRequest = (function() { + /** + * Encodes the specified ButtonText message, length delimited. Does not implicitly {@link proto.Message.ButtonsMessage.Button.ButtonText.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.ButtonsMessage.Button.ButtonText + * @static + * @param {proto.Message.ButtonsMessage.Button.IButtonText} message ButtonText message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ButtonText.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Properties of an AppStateSyncKeyRequest. - * @memberof proto.Message - * @interface IAppStateSyncKeyRequest - * @property {Array.|null} [keyIds] AppStateSyncKeyRequest keyIds - */ + /** + * Decodes a ButtonText message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.ButtonsMessage.Button.ButtonText + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.ButtonsMessage.Button.ButtonText} ButtonText + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ButtonText.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Message.ButtonsMessage.Button.ButtonText(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.displayText = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Constructs a new AppStateSyncKeyRequest. - * @memberof proto.Message - * @classdesc Represents an AppStateSyncKeyRequest. - * @implements IAppStateSyncKeyRequest - * @constructor - * @param {proto.Message.IAppStateSyncKeyRequest=} [properties] Properties to set - */ - function AppStateSyncKeyRequest(properties) { - this.keyIds = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Decodes a ButtonText message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.ButtonsMessage.Button.ButtonText + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.ButtonsMessage.Button.ButtonText} ButtonText + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ButtonText.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * AppStateSyncKeyRequest keyIds. - * @member {Array.} keyIds - * @memberof proto.Message.AppStateSyncKeyRequest - * @instance - */ - AppStateSyncKeyRequest.prototype.keyIds = $util.emptyArray; + /** + * Verifies a ButtonText message. + * @function verify + * @memberof proto.Message.ButtonsMessage.Button.ButtonText + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ButtonText.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayText != null && message.hasOwnProperty("displayText")) + if (!$util.isString(message.displayText)) + return "displayText: string expected"; + return null; + }; - /** - * Creates a new AppStateSyncKeyRequest instance using the specified properties. - * @function create - * @memberof proto.Message.AppStateSyncKeyRequest - * @static - * @param {proto.Message.IAppStateSyncKeyRequest=} [properties] Properties to set - * @returns {proto.Message.AppStateSyncKeyRequest} AppStateSyncKeyRequest instance - */ - AppStateSyncKeyRequest.create = function create(properties) { - return new AppStateSyncKeyRequest(properties); - }; + /** + * Creates a ButtonText message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.ButtonsMessage.Button.ButtonText + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.ButtonsMessage.Button.ButtonText} ButtonText + */ + ButtonText.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.ButtonsMessage.Button.ButtonText) + return object; + var message = new $root.proto.Message.ButtonsMessage.Button.ButtonText(); + if (object.displayText != null) + message.displayText = String(object.displayText); + return message; + }; - /** - * Encodes the specified AppStateSyncKeyRequest message. Does not implicitly {@link proto.Message.AppStateSyncKeyRequest.verify|verify} messages. - * @function encode - * @memberof proto.Message.AppStateSyncKeyRequest - * @static - * @param {proto.Message.IAppStateSyncKeyRequest} message AppStateSyncKeyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AppStateSyncKeyRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.keyIds != null && message.keyIds.length) - for (var i = 0; i < message.keyIds.length; ++i) - $root.proto.Message.AppStateSyncKeyId.encode(message.keyIds[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; + /** + * Creates a plain object from a ButtonText message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.ButtonsMessage.Button.ButtonText + * @static + * @param {proto.Message.ButtonsMessage.Button.ButtonText} message ButtonText + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ButtonText.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.displayText = ""; + if (message.displayText != null && message.hasOwnProperty("displayText")) + object.displayText = message.displayText; + return object; + }; - /** - * Encodes the specified AppStateSyncKeyRequest message, length delimited. Does not implicitly {@link proto.Message.AppStateSyncKeyRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.Message.AppStateSyncKeyRequest - * @static - * @param {proto.Message.IAppStateSyncKeyRequest} message AppStateSyncKeyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AppStateSyncKeyRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Converts this ButtonText to JSON. + * @function toJSON + * @memberof proto.Message.ButtonsMessage.Button.ButtonText + * @instance + * @returns {Object.} JSON object + */ + ButtonText.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Decodes an AppStateSyncKeyRequest message from the specified reader or buffer. - * @function decode - * @memberof proto.Message.AppStateSyncKeyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.Message.AppStateSyncKeyRequest} AppStateSyncKeyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AppStateSyncKeyRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Message.AppStateSyncKeyRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.keyIds && message.keyIds.length)) - message.keyIds = []; - message.keyIds.push($root.proto.Message.AppStateSyncKeyId.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + return ButtonText; + })(); - /** - * Decodes an AppStateSyncKeyRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.Message.AppStateSyncKeyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.Message.AppStateSyncKeyRequest} AppStateSyncKeyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AppStateSyncKeyRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + Button.NativeFlowInfo = (function() { - /** - * Verifies an AppStateSyncKeyRequest message. - * @function verify - * @memberof proto.Message.AppStateSyncKeyRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AppStateSyncKeyRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.keyIds != null && message.hasOwnProperty("keyIds")) { - if (!Array.isArray(message.keyIds)) - return "keyIds: array expected"; - for (var i = 0; i < message.keyIds.length; ++i) { - var error = $root.proto.Message.AppStateSyncKeyId.verify(message.keyIds[i]); - if (error) - return "keyIds." + error; - } - } - return null; - }; + /** + * Properties of a NativeFlowInfo. + * @memberof proto.Message.ButtonsMessage.Button + * @interface INativeFlowInfo + * @property {string|null} [name] NativeFlowInfo name + * @property {string|null} [paramsJson] NativeFlowInfo paramsJson + */ - /** - * Creates an AppStateSyncKeyRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.Message.AppStateSyncKeyRequest - * @static - * @param {Object.} object Plain object - * @returns {proto.Message.AppStateSyncKeyRequest} AppStateSyncKeyRequest - */ - AppStateSyncKeyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.proto.Message.AppStateSyncKeyRequest) - return object; - var message = new $root.proto.Message.AppStateSyncKeyRequest(); - if (object.keyIds) { - if (!Array.isArray(object.keyIds)) - throw TypeError(".proto.Message.AppStateSyncKeyRequest.keyIds: array expected"); - message.keyIds = []; - for (var i = 0; i < object.keyIds.length; ++i) { - if (typeof object.keyIds[i] !== "object") - throw TypeError(".proto.Message.AppStateSyncKeyRequest.keyIds: object expected"); - message.keyIds[i] = $root.proto.Message.AppStateSyncKeyId.fromObject(object.keyIds[i]); + /** + * Constructs a new NativeFlowInfo. + * @memberof proto.Message.ButtonsMessage.Button + * @classdesc Represents a NativeFlowInfo. + * @implements INativeFlowInfo + * @constructor + * @param {proto.Message.ButtonsMessage.Button.INativeFlowInfo=} [properties] Properties to set + */ + function NativeFlowInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - } - return message; - }; - - /** - * Creates a plain object from an AppStateSyncKeyRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.Message.AppStateSyncKeyRequest - * @static - * @param {proto.Message.AppStateSyncKeyRequest} message AppStateSyncKeyRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AppStateSyncKeyRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.keyIds = []; - if (message.keyIds && message.keyIds.length) { - object.keyIds = []; - for (var j = 0; j < message.keyIds.length; ++j) - object.keyIds[j] = $root.proto.Message.AppStateSyncKeyId.toObject(message.keyIds[j], options); - } - return object; - }; - - /** - * Converts this AppStateSyncKeyRequest to JSON. - * @function toJSON - * @memberof proto.Message.AppStateSyncKeyRequest - * @instance - * @returns {Object.} JSON object - */ - AppStateSyncKeyRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - return AppStateSyncKeyRequest; - })(); + /** + * NativeFlowInfo name. + * @member {string} name + * @memberof proto.Message.ButtonsMessage.Button.NativeFlowInfo + * @instance + */ + NativeFlowInfo.prototype.name = ""; - Message.AppStateSyncKeyShare = (function() { + /** + * NativeFlowInfo paramsJson. + * @member {string} paramsJson + * @memberof proto.Message.ButtonsMessage.Button.NativeFlowInfo + * @instance + */ + NativeFlowInfo.prototype.paramsJson = ""; - /** - * Properties of an AppStateSyncKeyShare. - * @memberof proto.Message - * @interface IAppStateSyncKeyShare - * @property {Array.|null} [keys] AppStateSyncKeyShare keys - */ + /** + * Creates a new NativeFlowInfo instance using the specified properties. + * @function create + * @memberof proto.Message.ButtonsMessage.Button.NativeFlowInfo + * @static + * @param {proto.Message.ButtonsMessage.Button.INativeFlowInfo=} [properties] Properties to set + * @returns {proto.Message.ButtonsMessage.Button.NativeFlowInfo} NativeFlowInfo instance + */ + NativeFlowInfo.create = function create(properties) { + return new NativeFlowInfo(properties); + }; - /** - * Constructs a new AppStateSyncKeyShare. - * @memberof proto.Message - * @classdesc Represents an AppStateSyncKeyShare. - * @implements IAppStateSyncKeyShare - * @constructor - * @param {proto.Message.IAppStateSyncKeyShare=} [properties] Properties to set - */ - function AppStateSyncKeyShare(properties) { - this.keys = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Encodes the specified NativeFlowInfo message. Does not implicitly {@link proto.Message.ButtonsMessage.Button.NativeFlowInfo.verify|verify} messages. + * @function encode + * @memberof proto.Message.ButtonsMessage.Button.NativeFlowInfo + * @static + * @param {proto.Message.ButtonsMessage.Button.INativeFlowInfo} message NativeFlowInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NativeFlowInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.paramsJson != null && Object.hasOwnProperty.call(message, "paramsJson")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.paramsJson); + return writer; + }; - /** - * AppStateSyncKeyShare keys. - * @member {Array.} keys - * @memberof proto.Message.AppStateSyncKeyShare - * @instance - */ - AppStateSyncKeyShare.prototype.keys = $util.emptyArray; + /** + * Encodes the specified NativeFlowInfo message, length delimited. Does not implicitly {@link proto.Message.ButtonsMessage.Button.NativeFlowInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.ButtonsMessage.Button.NativeFlowInfo + * @static + * @param {proto.Message.ButtonsMessage.Button.INativeFlowInfo} message NativeFlowInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NativeFlowInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a new AppStateSyncKeyShare instance using the specified properties. - * @function create - * @memberof proto.Message.AppStateSyncKeyShare - * @static - * @param {proto.Message.IAppStateSyncKeyShare=} [properties] Properties to set - * @returns {proto.Message.AppStateSyncKeyShare} AppStateSyncKeyShare instance - */ - AppStateSyncKeyShare.create = function create(properties) { - return new AppStateSyncKeyShare(properties); - }; + /** + * Decodes a NativeFlowInfo message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.ButtonsMessage.Button.NativeFlowInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.ButtonsMessage.Button.NativeFlowInfo} NativeFlowInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NativeFlowInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Message.ButtonsMessage.Button.NativeFlowInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.paramsJson = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Encodes the specified AppStateSyncKeyShare message. Does not implicitly {@link proto.Message.AppStateSyncKeyShare.verify|verify} messages. - * @function encode - * @memberof proto.Message.AppStateSyncKeyShare - * @static - * @param {proto.Message.IAppStateSyncKeyShare} message AppStateSyncKeyShare message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AppStateSyncKeyShare.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.keys != null && message.keys.length) - for (var i = 0; i < message.keys.length; ++i) - $root.proto.Message.AppStateSyncKey.encode(message.keys[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; + /** + * Decodes a NativeFlowInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.ButtonsMessage.Button.NativeFlowInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.ButtonsMessage.Button.NativeFlowInfo} NativeFlowInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NativeFlowInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Encodes the specified AppStateSyncKeyShare message, length delimited. Does not implicitly {@link proto.Message.AppStateSyncKeyShare.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.Message.AppStateSyncKeyShare - * @static - * @param {proto.Message.IAppStateSyncKeyShare} message AppStateSyncKeyShare message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AppStateSyncKeyShare.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Verifies a NativeFlowInfo message. + * @function verify + * @memberof proto.Message.ButtonsMessage.Button.NativeFlowInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NativeFlowInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.paramsJson != null && message.hasOwnProperty("paramsJson")) + if (!$util.isString(message.paramsJson)) + return "paramsJson: string expected"; + return null; + }; - /** - * Decodes an AppStateSyncKeyShare message from the specified reader or buffer. - * @function decode - * @memberof proto.Message.AppStateSyncKeyShare - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.Message.AppStateSyncKeyShare} AppStateSyncKeyShare - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AppStateSyncKeyShare.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Message.AppStateSyncKeyShare(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.keys && message.keys.length)) - message.keys = []; - message.keys.push($root.proto.Message.AppStateSyncKey.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Creates a NativeFlowInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.ButtonsMessage.Button.NativeFlowInfo + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.ButtonsMessage.Button.NativeFlowInfo} NativeFlowInfo + */ + NativeFlowInfo.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.ButtonsMessage.Button.NativeFlowInfo) + return object; + var message = new $root.proto.Message.ButtonsMessage.Button.NativeFlowInfo(); + if (object.name != null) + message.name = String(object.name); + if (object.paramsJson != null) + message.paramsJson = String(object.paramsJson); + return message; + }; - /** - * Decodes an AppStateSyncKeyShare message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.Message.AppStateSyncKeyShare - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.Message.AppStateSyncKeyShare} AppStateSyncKeyShare - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AppStateSyncKeyShare.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a plain object from a NativeFlowInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.ButtonsMessage.Button.NativeFlowInfo + * @static + * @param {proto.Message.ButtonsMessage.Button.NativeFlowInfo} message NativeFlowInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NativeFlowInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.paramsJson = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.paramsJson != null && message.hasOwnProperty("paramsJson")) + object.paramsJson = message.paramsJson; + return object; + }; - /** - * Verifies an AppStateSyncKeyShare message. - * @function verify - * @memberof proto.Message.AppStateSyncKeyShare - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AppStateSyncKeyShare.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.keys != null && message.hasOwnProperty("keys")) { - if (!Array.isArray(message.keys)) - return "keys: array expected"; - for (var i = 0; i < message.keys.length; ++i) { - var error = $root.proto.Message.AppStateSyncKey.verify(message.keys[i]); - if (error) - return "keys." + error; - } - } - return null; - }; + /** + * Converts this NativeFlowInfo to JSON. + * @function toJSON + * @memberof proto.Message.ButtonsMessage.Button.NativeFlowInfo + * @instance + * @returns {Object.} JSON object + */ + NativeFlowInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates an AppStateSyncKeyShare message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.Message.AppStateSyncKeyShare - * @static - * @param {Object.} object Plain object - * @returns {proto.Message.AppStateSyncKeyShare} AppStateSyncKeyShare - */ - AppStateSyncKeyShare.fromObject = function fromObject(object) { - if (object instanceof $root.proto.Message.AppStateSyncKeyShare) - return object; - var message = new $root.proto.Message.AppStateSyncKeyShare(); - if (object.keys) { - if (!Array.isArray(object.keys)) - throw TypeError(".proto.Message.AppStateSyncKeyShare.keys: array expected"); - message.keys = []; - for (var i = 0; i < object.keys.length; ++i) { - if (typeof object.keys[i] !== "object") - throw TypeError(".proto.Message.AppStateSyncKeyShare.keys: object expected"); - message.keys[i] = $root.proto.Message.AppStateSyncKey.fromObject(object.keys[i]); - } - } - return message; - }; + return NativeFlowInfo; + })(); - /** - * Creates a plain object from an AppStateSyncKeyShare message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.Message.AppStateSyncKeyShare - * @static - * @param {proto.Message.AppStateSyncKeyShare} message AppStateSyncKeyShare - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AppStateSyncKeyShare.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.keys = []; - if (message.keys && message.keys.length) { - object.keys = []; - for (var j = 0; j < message.keys.length; ++j) - object.keys[j] = $root.proto.Message.AppStateSyncKey.toObject(message.keys[j], options); - } - return object; - }; + /** + * Type enum. + * @name proto.Message.ButtonsMessage.Button.Type + * @enum {number} + * @property {number} UNKNOWN=0 UNKNOWN value + * @property {number} RESPONSE=1 RESPONSE value + * @property {number} NATIVE_FLOW=2 NATIVE_FLOW value + */ + Button.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN"] = 0; + values[valuesById[1] = "RESPONSE"] = 1; + values[valuesById[2] = "NATIVE_FLOW"] = 2; + return values; + })(); + + return Button; + })(); /** - * Converts this AppStateSyncKeyShare to JSON. - * @function toJSON - * @memberof proto.Message.AppStateSyncKeyShare - * @instance - * @returns {Object.} JSON object + * HeaderType enum. + * @name proto.Message.ButtonsMessage.HeaderType + * @enum {number} + * @property {number} UNKNOWN=0 UNKNOWN value + * @property {number} EMPTY=1 EMPTY value + * @property {number} TEXT=2 TEXT value + * @property {number} DOCUMENT=3 DOCUMENT value + * @property {number} IMAGE=4 IMAGE value + * @property {number} VIDEO=5 VIDEO value + * @property {number} LOCATION=6 LOCATION value */ - AppStateSyncKeyShare.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + ButtonsMessage.HeaderType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN"] = 0; + values[valuesById[1] = "EMPTY"] = 1; + values[valuesById[2] = "TEXT"] = 2; + values[valuesById[3] = "DOCUMENT"] = 3; + values[valuesById[4] = "IMAGE"] = 4; + values[valuesById[5] = "VIDEO"] = 5; + values[valuesById[6] = "LOCATION"] = 6; + return values; + })(); - return AppStateSyncKeyShare; + return ButtonsMessage; })(); - Message.AudioMessage = (function() { + Message.ButtonsResponseMessage = (function() { /** - * Properties of an AudioMessage. + * Properties of a ButtonsResponseMessage. * @memberof proto.Message - * @interface IAudioMessage - * @property {string|null} [url] AudioMessage url - * @property {string|null} [mimetype] AudioMessage mimetype - * @property {Uint8Array|null} [fileSha256] AudioMessage fileSha256 - * @property {number|Long|null} [fileLength] AudioMessage fileLength - * @property {number|null} [seconds] AudioMessage seconds - * @property {boolean|null} [ptt] AudioMessage ptt - * @property {Uint8Array|null} [mediaKey] AudioMessage mediaKey - * @property {Uint8Array|null} [fileEncSha256] AudioMessage fileEncSha256 - * @property {string|null} [directPath] AudioMessage directPath - * @property {number|Long|null} [mediaKeyTimestamp] AudioMessage mediaKeyTimestamp - * @property {proto.IContextInfo|null} [contextInfo] AudioMessage contextInfo - * @property {Uint8Array|null} [streamingSidecar] AudioMessage streamingSidecar - * @property {Uint8Array|null} [waveform] AudioMessage waveform - * @property {number|null} [backgroundArgb] AudioMessage backgroundArgb - * @property {boolean|null} [viewOnce] AudioMessage viewOnce + * @interface IButtonsResponseMessage + * @property {string|null} [selectedButtonId] ButtonsResponseMessage selectedButtonId + * @property {proto.IContextInfo|null} [contextInfo] ButtonsResponseMessage contextInfo + * @property {proto.Message.ButtonsResponseMessage.Type|null} [type] ButtonsResponseMessage type + * @property {string|null} [selectedDisplayText] ButtonsResponseMessage selectedDisplayText */ /** - * Constructs a new AudioMessage. + * Constructs a new ButtonsResponseMessage. * @memberof proto.Message - * @classdesc Represents an AudioMessage. - * @implements IAudioMessage + * @classdesc Represents a ButtonsResponseMessage. + * @implements IButtonsResponseMessage * @constructor - * @param {proto.Message.IAudioMessage=} [properties] Properties to set + * @param {proto.Message.IButtonsResponseMessage=} [properties] Properties to set */ - function AudioMessage(properties) { + function ButtonsResponseMessage(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -25265,257 +32699,128 @@ $root.proto = (function() { } /** - * AudioMessage url. - * @member {string} url - * @memberof proto.Message.AudioMessage - * @instance - */ - AudioMessage.prototype.url = ""; - - /** - * AudioMessage mimetype. - * @member {string} mimetype - * @memberof proto.Message.AudioMessage - * @instance - */ - AudioMessage.prototype.mimetype = ""; - - /** - * AudioMessage fileSha256. - * @member {Uint8Array} fileSha256 - * @memberof proto.Message.AudioMessage - * @instance - */ - AudioMessage.prototype.fileSha256 = $util.newBuffer([]); - - /** - * AudioMessage fileLength. - * @member {number|Long} fileLength - * @memberof proto.Message.AudioMessage - * @instance - */ - AudioMessage.prototype.fileLength = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * AudioMessage seconds. - * @member {number} seconds - * @memberof proto.Message.AudioMessage - * @instance - */ - AudioMessage.prototype.seconds = 0; - - /** - * AudioMessage ptt. - * @member {boolean} ptt - * @memberof proto.Message.AudioMessage - * @instance - */ - AudioMessage.prototype.ptt = false; - - /** - * AudioMessage mediaKey. - * @member {Uint8Array} mediaKey - * @memberof proto.Message.AudioMessage - * @instance - */ - AudioMessage.prototype.mediaKey = $util.newBuffer([]); - - /** - * AudioMessage fileEncSha256. - * @member {Uint8Array} fileEncSha256 - * @memberof proto.Message.AudioMessage - * @instance - */ - AudioMessage.prototype.fileEncSha256 = $util.newBuffer([]); - - /** - * AudioMessage directPath. - * @member {string} directPath - * @memberof proto.Message.AudioMessage - * @instance - */ - AudioMessage.prototype.directPath = ""; - - /** - * AudioMessage mediaKeyTimestamp. - * @member {number|Long} mediaKeyTimestamp - * @memberof proto.Message.AudioMessage + * ButtonsResponseMessage selectedButtonId. + * @member {string} selectedButtonId + * @memberof proto.Message.ButtonsResponseMessage * @instance */ - AudioMessage.prototype.mediaKeyTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + ButtonsResponseMessage.prototype.selectedButtonId = ""; /** - * AudioMessage contextInfo. + * ButtonsResponseMessage contextInfo. * @member {proto.IContextInfo|null|undefined} contextInfo - * @memberof proto.Message.AudioMessage + * @memberof proto.Message.ButtonsResponseMessage * @instance */ - AudioMessage.prototype.contextInfo = null; + ButtonsResponseMessage.prototype.contextInfo = null; /** - * AudioMessage streamingSidecar. - * @member {Uint8Array} streamingSidecar - * @memberof proto.Message.AudioMessage + * ButtonsResponseMessage type. + * @member {proto.Message.ButtonsResponseMessage.Type} type + * @memberof proto.Message.ButtonsResponseMessage * @instance */ - AudioMessage.prototype.streamingSidecar = $util.newBuffer([]); + ButtonsResponseMessage.prototype.type = 0; /** - * AudioMessage waveform. - * @member {Uint8Array} waveform - * @memberof proto.Message.AudioMessage + * ButtonsResponseMessage selectedDisplayText. + * @member {string|null|undefined} selectedDisplayText + * @memberof proto.Message.ButtonsResponseMessage * @instance */ - AudioMessage.prototype.waveform = $util.newBuffer([]); + ButtonsResponseMessage.prototype.selectedDisplayText = null; - /** - * AudioMessage backgroundArgb. - * @member {number} backgroundArgb - * @memberof proto.Message.AudioMessage - * @instance - */ - AudioMessage.prototype.backgroundArgb = 0; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * AudioMessage viewOnce. - * @member {boolean} viewOnce - * @memberof proto.Message.AudioMessage + * ButtonsResponseMessage response. + * @member {"selectedDisplayText"|undefined} response + * @memberof proto.Message.ButtonsResponseMessage * @instance */ - AudioMessage.prototype.viewOnce = false; + Object.defineProperty(ButtonsResponseMessage.prototype, "response", { + get: $util.oneOfGetter($oneOfFields = ["selectedDisplayText"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new AudioMessage instance using the specified properties. + * Creates a new ButtonsResponseMessage instance using the specified properties. * @function create - * @memberof proto.Message.AudioMessage + * @memberof proto.Message.ButtonsResponseMessage * @static - * @param {proto.Message.IAudioMessage=} [properties] Properties to set - * @returns {proto.Message.AudioMessage} AudioMessage instance + * @param {proto.Message.IButtonsResponseMessage=} [properties] Properties to set + * @returns {proto.Message.ButtonsResponseMessage} ButtonsResponseMessage instance */ - AudioMessage.create = function create(properties) { - return new AudioMessage(properties); + ButtonsResponseMessage.create = function create(properties) { + return new ButtonsResponseMessage(properties); }; /** - * Encodes the specified AudioMessage message. Does not implicitly {@link proto.Message.AudioMessage.verify|verify} messages. + * Encodes the specified ButtonsResponseMessage message. Does not implicitly {@link proto.Message.ButtonsResponseMessage.verify|verify} messages. * @function encode - * @memberof proto.Message.AudioMessage + * @memberof proto.Message.ButtonsResponseMessage * @static - * @param {proto.Message.IAudioMessage} message AudioMessage message or plain object to encode + * @param {proto.Message.IButtonsResponseMessage} message ButtonsResponseMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AudioMessage.encode = function encode(message, writer) { + ButtonsResponseMessage.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.url != null && Object.hasOwnProperty.call(message, "url")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.url); - if (message.mimetype != null && Object.hasOwnProperty.call(message, "mimetype")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.mimetype); - if (message.fileSha256 != null && Object.hasOwnProperty.call(message, "fileSha256")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.fileSha256); - if (message.fileLength != null && Object.hasOwnProperty.call(message, "fileLength")) - writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.fileLength); - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.seconds); - if (message.ptt != null && Object.hasOwnProperty.call(message, "ptt")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.ptt); - if (message.mediaKey != null && Object.hasOwnProperty.call(message, "mediaKey")) - writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.mediaKey); - if (message.fileEncSha256 != null && Object.hasOwnProperty.call(message, "fileEncSha256")) - writer.uint32(/* id 8, wireType 2 =*/66).bytes(message.fileEncSha256); - if (message.directPath != null && Object.hasOwnProperty.call(message, "directPath")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.directPath); - if (message.mediaKeyTimestamp != null && Object.hasOwnProperty.call(message, "mediaKeyTimestamp")) - writer.uint32(/* id 10, wireType 0 =*/80).int64(message.mediaKeyTimestamp); + if (message.selectedButtonId != null && Object.hasOwnProperty.call(message, "selectedButtonId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selectedButtonId); + if (message.selectedDisplayText != null && Object.hasOwnProperty.call(message, "selectedDisplayText")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.selectedDisplayText); if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo")) - $root.proto.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); - if (message.streamingSidecar != null && Object.hasOwnProperty.call(message, "streamingSidecar")) - writer.uint32(/* id 18, wireType 2 =*/146).bytes(message.streamingSidecar); - if (message.waveform != null && Object.hasOwnProperty.call(message, "waveform")) - writer.uint32(/* id 19, wireType 2 =*/154).bytes(message.waveform); - if (message.backgroundArgb != null && Object.hasOwnProperty.call(message, "backgroundArgb")) - writer.uint32(/* id 20, wireType 5 =*/165).fixed32(message.backgroundArgb); - if (message.viewOnce != null && Object.hasOwnProperty.call(message, "viewOnce")) - writer.uint32(/* id 21, wireType 0 =*/168).bool(message.viewOnce); + $root.proto.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.type); return writer; }; /** - * Encodes the specified AudioMessage message, length delimited. Does not implicitly {@link proto.Message.AudioMessage.verify|verify} messages. + * Encodes the specified ButtonsResponseMessage message, length delimited. Does not implicitly {@link proto.Message.ButtonsResponseMessage.verify|verify} messages. * @function encodeDelimited - * @memberof proto.Message.AudioMessage + * @memberof proto.Message.ButtonsResponseMessage * @static - * @param {proto.Message.IAudioMessage} message AudioMessage message or plain object to encode + * @param {proto.Message.IButtonsResponseMessage} message ButtonsResponseMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AudioMessage.encodeDelimited = function encodeDelimited(message, writer) { + ButtonsResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AudioMessage message from the specified reader or buffer. + * Decodes a ButtonsResponseMessage message from the specified reader or buffer. * @function decode - * @memberof proto.Message.AudioMessage + * @memberof proto.Message.ButtonsResponseMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {proto.Message.AudioMessage} AudioMessage + * @returns {proto.Message.ButtonsResponseMessage} ButtonsResponseMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AudioMessage.decode = function decode(reader, length) { + ButtonsResponseMessage.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Message.AudioMessage(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Message.ButtonsResponseMessage(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.url = reader.string(); - break; - case 2: - message.mimetype = reader.string(); - break; - case 3: - message.fileSha256 = reader.bytes(); - break; - case 4: - message.fileLength = reader.uint64(); - break; - case 5: - message.seconds = reader.uint32(); - break; - case 6: - message.ptt = reader.bool(); - break; - case 7: - message.mediaKey = reader.bytes(); - break; - case 8: - message.fileEncSha256 = reader.bytes(); - break; - case 9: - message.directPath = reader.string(); - break; - case 10: - message.mediaKeyTimestamp = reader.int64(); + message.selectedButtonId = reader.string(); break; - case 17: + case 3: message.contextInfo = $root.proto.ContextInfo.decode(reader, reader.uint32()); break; - case 18: - message.streamingSidecar = reader.bytes(); - break; - case 19: - message.waveform = reader.bytes(); - break; - case 20: - message.backgroundArgb = reader.fixed32(); + case 4: + message.type = reader.int32(); break; - case 21: - message.viewOnce = reader.bool(); + case 2: + message.selectedDisplayText = reader.string(); break; default: reader.skipType(tag & 7); @@ -25526,300 +32831,172 @@ $root.proto = (function() { }; /** - * Decodes an AudioMessage message from the specified reader or buffer, length delimited. + * Decodes a ButtonsResponseMessage message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof proto.Message.AudioMessage + * @memberof proto.Message.ButtonsResponseMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.Message.AudioMessage} AudioMessage + * @returns {proto.Message.ButtonsResponseMessage} ButtonsResponseMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AudioMessage.decodeDelimited = function decodeDelimited(reader) { + ButtonsResponseMessage.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AudioMessage message. + * Verifies a ButtonsResponseMessage message. * @function verify - * @memberof proto.Message.AudioMessage + * @memberof proto.Message.ButtonsResponseMessage * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AudioMessage.verify = function verify(message) { + ButtonsResponseMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.url != null && message.hasOwnProperty("url")) - if (!$util.isString(message.url)) - return "url: string expected"; - if (message.mimetype != null && message.hasOwnProperty("mimetype")) - if (!$util.isString(message.mimetype)) - return "mimetype: string expected"; - if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) - if (!(message.fileSha256 && typeof message.fileSha256.length === "number" || $util.isString(message.fileSha256))) - return "fileSha256: buffer expected"; - if (message.fileLength != null && message.hasOwnProperty("fileLength")) - if (!$util.isInteger(message.fileLength) && !(message.fileLength && $util.isInteger(message.fileLength.low) && $util.isInteger(message.fileLength.high))) - return "fileLength: integer|Long expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds)) - return "seconds: integer expected"; - if (message.ptt != null && message.hasOwnProperty("ptt")) - if (typeof message.ptt !== "boolean") - return "ptt: boolean expected"; - if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) - if (!(message.mediaKey && typeof message.mediaKey.length === "number" || $util.isString(message.mediaKey))) - return "mediaKey: buffer expected"; - if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) - if (!(message.fileEncSha256 && typeof message.fileEncSha256.length === "number" || $util.isString(message.fileEncSha256))) - return "fileEncSha256: buffer expected"; - if (message.directPath != null && message.hasOwnProperty("directPath")) - if (!$util.isString(message.directPath)) - return "directPath: string expected"; - if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp")) - if (!$util.isInteger(message.mediaKeyTimestamp) && !(message.mediaKeyTimestamp && $util.isInteger(message.mediaKeyTimestamp.low) && $util.isInteger(message.mediaKeyTimestamp.high))) - return "mediaKeyTimestamp: integer|Long expected"; + var properties = {}; + if (message.selectedButtonId != null && message.hasOwnProperty("selectedButtonId")) + if (!$util.isString(message.selectedButtonId)) + return "selectedButtonId: string expected"; if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { var error = $root.proto.ContextInfo.verify(message.contextInfo); if (error) return "contextInfo." + error; } - if (message.streamingSidecar != null && message.hasOwnProperty("streamingSidecar")) - if (!(message.streamingSidecar && typeof message.streamingSidecar.length === "number" || $util.isString(message.streamingSidecar))) - return "streamingSidecar: buffer expected"; - if (message.waveform != null && message.hasOwnProperty("waveform")) - if (!(message.waveform && typeof message.waveform.length === "number" || $util.isString(message.waveform))) - return "waveform: buffer expected"; - if (message.backgroundArgb != null && message.hasOwnProperty("backgroundArgb")) - if (!$util.isInteger(message.backgroundArgb)) - return "backgroundArgb: integer expected"; - if (message.viewOnce != null && message.hasOwnProperty("viewOnce")) - if (typeof message.viewOnce !== "boolean") - return "viewOnce: boolean expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + break; + } + if (message.selectedDisplayText != null && message.hasOwnProperty("selectedDisplayText")) { + properties.response = 1; + if (!$util.isString(message.selectedDisplayText)) + return "selectedDisplayText: string expected"; + } return null; }; /** - * Creates an AudioMessage message from a plain object. Also converts values to their respective internal types. + * Creates a ButtonsResponseMessage message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof proto.Message.AudioMessage + * @memberof proto.Message.ButtonsResponseMessage * @static * @param {Object.} object Plain object - * @returns {proto.Message.AudioMessage} AudioMessage + * @returns {proto.Message.ButtonsResponseMessage} ButtonsResponseMessage */ - AudioMessage.fromObject = function fromObject(object) { - if (object instanceof $root.proto.Message.AudioMessage) + ButtonsResponseMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.ButtonsResponseMessage) return object; - var message = new $root.proto.Message.AudioMessage(); - if (object.url != null) - message.url = String(object.url); - if (object.mimetype != null) - message.mimetype = String(object.mimetype); - if (object.fileSha256 != null) - if (typeof object.fileSha256 === "string") - $util.base64.decode(object.fileSha256, message.fileSha256 = $util.newBuffer($util.base64.length(object.fileSha256)), 0); - else if (object.fileSha256.length) - message.fileSha256 = object.fileSha256; - if (object.fileLength != null) - if ($util.Long) - (message.fileLength = $util.Long.fromValue(object.fileLength)).unsigned = true; - else if (typeof object.fileLength === "string") - message.fileLength = parseInt(object.fileLength, 10); - else if (typeof object.fileLength === "number") - message.fileLength = object.fileLength; - else if (typeof object.fileLength === "object") - message.fileLength = new $util.LongBits(object.fileLength.low >>> 0, object.fileLength.high >>> 0).toNumber(true); - if (object.seconds != null) - message.seconds = object.seconds >>> 0; - if (object.ptt != null) - message.ptt = Boolean(object.ptt); - if (object.mediaKey != null) - if (typeof object.mediaKey === "string") - $util.base64.decode(object.mediaKey, message.mediaKey = $util.newBuffer($util.base64.length(object.mediaKey)), 0); - else if (object.mediaKey.length) - message.mediaKey = object.mediaKey; - if (object.fileEncSha256 != null) - if (typeof object.fileEncSha256 === "string") - $util.base64.decode(object.fileEncSha256, message.fileEncSha256 = $util.newBuffer($util.base64.length(object.fileEncSha256)), 0); - else if (object.fileEncSha256.length) - message.fileEncSha256 = object.fileEncSha256; - if (object.directPath != null) - message.directPath = String(object.directPath); - if (object.mediaKeyTimestamp != null) - if ($util.Long) - (message.mediaKeyTimestamp = $util.Long.fromValue(object.mediaKeyTimestamp)).unsigned = false; - else if (typeof object.mediaKeyTimestamp === "string") - message.mediaKeyTimestamp = parseInt(object.mediaKeyTimestamp, 10); - else if (typeof object.mediaKeyTimestamp === "number") - message.mediaKeyTimestamp = object.mediaKeyTimestamp; - else if (typeof object.mediaKeyTimestamp === "object") - message.mediaKeyTimestamp = new $util.LongBits(object.mediaKeyTimestamp.low >>> 0, object.mediaKeyTimestamp.high >>> 0).toNumber(); + var message = new $root.proto.Message.ButtonsResponseMessage(); + if (object.selectedButtonId != null) + message.selectedButtonId = String(object.selectedButtonId); if (object.contextInfo != null) { if (typeof object.contextInfo !== "object") - throw TypeError(".proto.Message.AudioMessage.contextInfo: object expected"); + throw TypeError(".proto.Message.ButtonsResponseMessage.contextInfo: object expected"); message.contextInfo = $root.proto.ContextInfo.fromObject(object.contextInfo); } - if (object.streamingSidecar != null) - if (typeof object.streamingSidecar === "string") - $util.base64.decode(object.streamingSidecar, message.streamingSidecar = $util.newBuffer($util.base64.length(object.streamingSidecar)), 0); - else if (object.streamingSidecar.length) - message.streamingSidecar = object.streamingSidecar; - if (object.waveform != null) - if (typeof object.waveform === "string") - $util.base64.decode(object.waveform, message.waveform = $util.newBuffer($util.base64.length(object.waveform)), 0); - else if (object.waveform.length) - message.waveform = object.waveform; - if (object.backgroundArgb != null) - message.backgroundArgb = object.backgroundArgb >>> 0; - if (object.viewOnce != null) - message.viewOnce = Boolean(object.viewOnce); + switch (object.type) { + case "UNKNOWN": + case 0: + message.type = 0; + break; + case "DISPLAY_TEXT": + case 1: + message.type = 1; + break; + } + if (object.selectedDisplayText != null) + message.selectedDisplayText = String(object.selectedDisplayText); return message; }; /** - * Creates a plain object from an AudioMessage message. Also converts values to other types if specified. + * Creates a plain object from a ButtonsResponseMessage message. Also converts values to other types if specified. * @function toObject - * @memberof proto.Message.AudioMessage + * @memberof proto.Message.ButtonsResponseMessage * @static - * @param {proto.Message.AudioMessage} message AudioMessage + * @param {proto.Message.ButtonsResponseMessage} message ButtonsResponseMessage * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AudioMessage.toObject = function toObject(message, options) { + ButtonsResponseMessage.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.url = ""; - object.mimetype = ""; - if (options.bytes === String) - object.fileSha256 = ""; - else { - object.fileSha256 = []; - if (options.bytes !== Array) - object.fileSha256 = $util.newBuffer(object.fileSha256); - } - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.fileLength = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.fileLength = options.longs === String ? "0" : 0; - object.seconds = 0; - object.ptt = false; - if (options.bytes === String) - object.mediaKey = ""; - else { - object.mediaKey = []; - if (options.bytes !== Array) - object.mediaKey = $util.newBuffer(object.mediaKey); - } - if (options.bytes === String) - object.fileEncSha256 = ""; - else { - object.fileEncSha256 = []; - if (options.bytes !== Array) - object.fileEncSha256 = $util.newBuffer(object.fileEncSha256); - } - object.directPath = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.mediaKeyTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.mediaKeyTimestamp = options.longs === String ? "0" : 0; + object.selectedButtonId = ""; object.contextInfo = null; - if (options.bytes === String) - object.streamingSidecar = ""; - else { - object.streamingSidecar = []; - if (options.bytes !== Array) - object.streamingSidecar = $util.newBuffer(object.streamingSidecar); - } - if (options.bytes === String) - object.waveform = ""; - else { - object.waveform = []; - if (options.bytes !== Array) - object.waveform = $util.newBuffer(object.waveform); - } - object.backgroundArgb = 0; - object.viewOnce = false; + object.type = options.enums === String ? "UNKNOWN" : 0; + } + if (message.selectedButtonId != null && message.hasOwnProperty("selectedButtonId")) + object.selectedButtonId = message.selectedButtonId; + if (message.selectedDisplayText != null && message.hasOwnProperty("selectedDisplayText")) { + object.selectedDisplayText = message.selectedDisplayText; + if (options.oneofs) + object.response = "selectedDisplayText"; } - if (message.url != null && message.hasOwnProperty("url")) - object.url = message.url; - if (message.mimetype != null && message.hasOwnProperty("mimetype")) - object.mimetype = message.mimetype; - if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) - object.fileSha256 = options.bytes === String ? $util.base64.encode(message.fileSha256, 0, message.fileSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.fileSha256) : message.fileSha256; - if (message.fileLength != null && message.hasOwnProperty("fileLength")) - if (typeof message.fileLength === "number") - object.fileLength = options.longs === String ? String(message.fileLength) : message.fileLength; - else - object.fileLength = options.longs === String ? $util.Long.prototype.toString.call(message.fileLength) : options.longs === Number ? new $util.LongBits(message.fileLength.low >>> 0, message.fileLength.high >>> 0).toNumber(true) : message.fileLength; - if (message.seconds != null && message.hasOwnProperty("seconds")) - object.seconds = message.seconds; - if (message.ptt != null && message.hasOwnProperty("ptt")) - object.ptt = message.ptt; - if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) - object.mediaKey = options.bytes === String ? $util.base64.encode(message.mediaKey, 0, message.mediaKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.mediaKey) : message.mediaKey; - if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) - object.fileEncSha256 = options.bytes === String ? $util.base64.encode(message.fileEncSha256, 0, message.fileEncSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.fileEncSha256) : message.fileEncSha256; - if (message.directPath != null && message.hasOwnProperty("directPath")) - object.directPath = message.directPath; - if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp")) - if (typeof message.mediaKeyTimestamp === "number") - object.mediaKeyTimestamp = options.longs === String ? String(message.mediaKeyTimestamp) : message.mediaKeyTimestamp; - else - object.mediaKeyTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.mediaKeyTimestamp) : options.longs === Number ? new $util.LongBits(message.mediaKeyTimestamp.low >>> 0, message.mediaKeyTimestamp.high >>> 0).toNumber() : message.mediaKeyTimestamp; if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); - if (message.streamingSidecar != null && message.hasOwnProperty("streamingSidecar")) - object.streamingSidecar = options.bytes === String ? $util.base64.encode(message.streamingSidecar, 0, message.streamingSidecar.length) : options.bytes === Array ? Array.prototype.slice.call(message.streamingSidecar) : message.streamingSidecar; - if (message.waveform != null && message.hasOwnProperty("waveform")) - object.waveform = options.bytes === String ? $util.base64.encode(message.waveform, 0, message.waveform.length) : options.bytes === Array ? Array.prototype.slice.call(message.waveform) : message.waveform; - if (message.backgroundArgb != null && message.hasOwnProperty("backgroundArgb")) - object.backgroundArgb = message.backgroundArgb; - if (message.viewOnce != null && message.hasOwnProperty("viewOnce")) - object.viewOnce = message.viewOnce; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.proto.Message.ButtonsResponseMessage.Type[message.type] : message.type; return object; }; /** - * Converts this AudioMessage to JSON. + * Converts this ButtonsResponseMessage to JSON. * @function toJSON - * @memberof proto.Message.AudioMessage + * @memberof proto.Message.ButtonsResponseMessage * @instance * @returns {Object.} JSON object */ - AudioMessage.prototype.toJSON = function toJSON() { + ButtonsResponseMessage.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return AudioMessage; + /** + * Type enum. + * @name proto.Message.ButtonsResponseMessage.Type + * @enum {number} + * @property {number} UNKNOWN=0 UNKNOWN value + * @property {number} DISPLAY_TEXT=1 DISPLAY_TEXT value + */ + ButtonsResponseMessage.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN"] = 0; + values[valuesById[1] = "DISPLAY_TEXT"] = 1; + return values; + })(); + + return ButtonsResponseMessage; })(); - Message.BotFeedbackMessage = (function() { + Message.Call = (function() { /** - * Properties of a BotFeedbackMessage. + * Properties of a Call. * @memberof proto.Message - * @interface IBotFeedbackMessage - * @property {proto.IMessageKey|null} [messageKey] BotFeedbackMessage messageKey - * @property {proto.Message.BotFeedbackMessage.BotFeedbackKind|null} [kind] BotFeedbackMessage kind - * @property {string|null} [text] BotFeedbackMessage text + * @interface ICall + * @property {Uint8Array|null} [callKey] Call callKey + * @property {string|null} [conversionSource] Call conversionSource + * @property {Uint8Array|null} [conversionData] Call conversionData + * @property {number|null} [conversionDelaySeconds] Call conversionDelaySeconds */ /** - * Constructs a new BotFeedbackMessage. + * Constructs a new Call. * @memberof proto.Message - * @classdesc Represents a BotFeedbackMessage. - * @implements IBotFeedbackMessage + * @classdesc Represents a Call. + * @implements ICall * @constructor - * @param {proto.Message.IBotFeedbackMessage=} [properties] Properties to set + * @param {proto.Message.ICall=} [properties] Properties to set */ - function BotFeedbackMessage(properties) { + function Call(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -25827,101 +33004,114 @@ $root.proto = (function() { } /** - * BotFeedbackMessage messageKey. - * @member {proto.IMessageKey|null|undefined} messageKey - * @memberof proto.Message.BotFeedbackMessage + * Call callKey. + * @member {Uint8Array} callKey + * @memberof proto.Message.Call * @instance */ - BotFeedbackMessage.prototype.messageKey = null; + Call.prototype.callKey = $util.newBuffer([]); /** - * BotFeedbackMessage kind. - * @member {proto.Message.BotFeedbackMessage.BotFeedbackKind} kind - * @memberof proto.Message.BotFeedbackMessage + * Call conversionSource. + * @member {string} conversionSource + * @memberof proto.Message.Call * @instance */ - BotFeedbackMessage.prototype.kind = 0; + Call.prototype.conversionSource = ""; /** - * BotFeedbackMessage text. - * @member {string} text - * @memberof proto.Message.BotFeedbackMessage + * Call conversionData. + * @member {Uint8Array} conversionData + * @memberof proto.Message.Call * @instance */ - BotFeedbackMessage.prototype.text = ""; + Call.prototype.conversionData = $util.newBuffer([]); /** - * Creates a new BotFeedbackMessage instance using the specified properties. + * Call conversionDelaySeconds. + * @member {number} conversionDelaySeconds + * @memberof proto.Message.Call + * @instance + */ + Call.prototype.conversionDelaySeconds = 0; + + /** + * Creates a new Call instance using the specified properties. * @function create - * @memberof proto.Message.BotFeedbackMessage + * @memberof proto.Message.Call * @static - * @param {proto.Message.IBotFeedbackMessage=} [properties] Properties to set - * @returns {proto.Message.BotFeedbackMessage} BotFeedbackMessage instance + * @param {proto.Message.ICall=} [properties] Properties to set + * @returns {proto.Message.Call} Call instance */ - BotFeedbackMessage.create = function create(properties) { - return new BotFeedbackMessage(properties); + Call.create = function create(properties) { + return new Call(properties); }; /** - * Encodes the specified BotFeedbackMessage message. Does not implicitly {@link proto.Message.BotFeedbackMessage.verify|verify} messages. + * Encodes the specified Call message. Does not implicitly {@link proto.Message.Call.verify|verify} messages. * @function encode - * @memberof proto.Message.BotFeedbackMessage + * @memberof proto.Message.Call * @static - * @param {proto.Message.IBotFeedbackMessage} message BotFeedbackMessage message or plain object to encode + * @param {proto.Message.ICall} message Call message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BotFeedbackMessage.encode = function encode(message, writer) { + Call.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.messageKey != null && Object.hasOwnProperty.call(message, "messageKey")) - $root.proto.MessageKey.encode(message.messageKey, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.kind); - if (message.text != null && Object.hasOwnProperty.call(message, "text")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.text); + if (message.callKey != null && Object.hasOwnProperty.call(message, "callKey")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.callKey); + if (message.conversionSource != null && Object.hasOwnProperty.call(message, "conversionSource")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.conversionSource); + if (message.conversionData != null && Object.hasOwnProperty.call(message, "conversionData")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.conversionData); + if (message.conversionDelaySeconds != null && Object.hasOwnProperty.call(message, "conversionDelaySeconds")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.conversionDelaySeconds); return writer; }; /** - * Encodes the specified BotFeedbackMessage message, length delimited. Does not implicitly {@link proto.Message.BotFeedbackMessage.verify|verify} messages. + * Encodes the specified Call message, length delimited. Does not implicitly {@link proto.Message.Call.verify|verify} messages. * @function encodeDelimited - * @memberof proto.Message.BotFeedbackMessage + * @memberof proto.Message.Call * @static - * @param {proto.Message.IBotFeedbackMessage} message BotFeedbackMessage message or plain object to encode + * @param {proto.Message.ICall} message Call message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BotFeedbackMessage.encodeDelimited = function encodeDelimited(message, writer) { + Call.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BotFeedbackMessage message from the specified reader or buffer. + * Decodes a Call message from the specified reader or buffer. * @function decode - * @memberof proto.Message.BotFeedbackMessage + * @memberof proto.Message.Call * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {proto.Message.BotFeedbackMessage} BotFeedbackMessage + * @returns {proto.Message.Call} Call * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BotFeedbackMessage.decode = function decode(reader, length) { + Call.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Message.BotFeedbackMessage(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Message.Call(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.messageKey = $root.proto.MessageKey.decode(reader, reader.uint32()); + message.callKey = reader.bytes(); break; case 2: - message.kind = reader.int32(); + message.conversionSource = reader.string(); break; case 3: - message.text = reader.string(); + message.conversionData = reader.bytes(); + break; + case 4: + message.conversionDelaySeconds = reader.uint32(); break; default: reader.skipType(tag & 7); @@ -25932,201 +33122,155 @@ $root.proto = (function() { }; /** - * Decodes a BotFeedbackMessage message from the specified reader or buffer, length delimited. + * Decodes a Call message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof proto.Message.BotFeedbackMessage + * @memberof proto.Message.Call * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.Message.BotFeedbackMessage} BotFeedbackMessage + * @returns {proto.Message.Call} Call * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BotFeedbackMessage.decodeDelimited = function decodeDelimited(reader) { + Call.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BotFeedbackMessage message. + * Verifies a Call message. * @function verify - * @memberof proto.Message.BotFeedbackMessage + * @memberof proto.Message.Call * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BotFeedbackMessage.verify = function verify(message) { + Call.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.messageKey != null && message.hasOwnProperty("messageKey")) { - var error = $root.proto.MessageKey.verify(message.messageKey); - if (error) - return "messageKey." + error; - } - if (message.kind != null && message.hasOwnProperty("kind")) - switch (message.kind) { - default: - return "kind: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - break; - } - if (message.text != null && message.hasOwnProperty("text")) - if (!$util.isString(message.text)) - return "text: string expected"; + if (message.callKey != null && message.hasOwnProperty("callKey")) + if (!(message.callKey && typeof message.callKey.length === "number" || $util.isString(message.callKey))) + return "callKey: buffer expected"; + if (message.conversionSource != null && message.hasOwnProperty("conversionSource")) + if (!$util.isString(message.conversionSource)) + return "conversionSource: string expected"; + if (message.conversionData != null && message.hasOwnProperty("conversionData")) + if (!(message.conversionData && typeof message.conversionData.length === "number" || $util.isString(message.conversionData))) + return "conversionData: buffer expected"; + if (message.conversionDelaySeconds != null && message.hasOwnProperty("conversionDelaySeconds")) + if (!$util.isInteger(message.conversionDelaySeconds)) + return "conversionDelaySeconds: integer expected"; return null; }; /** - * Creates a BotFeedbackMessage message from a plain object. Also converts values to their respective internal types. + * Creates a Call message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof proto.Message.BotFeedbackMessage + * @memberof proto.Message.Call * @static * @param {Object.} object Plain object - * @returns {proto.Message.BotFeedbackMessage} BotFeedbackMessage - */ - BotFeedbackMessage.fromObject = function fromObject(object) { - if (object instanceof $root.proto.Message.BotFeedbackMessage) - return object; - var message = new $root.proto.Message.BotFeedbackMessage(); - if (object.messageKey != null) { - if (typeof object.messageKey !== "object") - throw TypeError(".proto.Message.BotFeedbackMessage.messageKey: object expected"); - message.messageKey = $root.proto.MessageKey.fromObject(object.messageKey); - } - switch (object.kind) { - case "BOT_FEEDBACK_POSITIVE": - case 0: - message.kind = 0; - break; - case "BOT_FEEDBACK_NEGATIVE_GENERIC": - case 1: - message.kind = 1; - break; - case "BOT_FEEDBACK_NEGATIVE_HELPFUL": - case 2: - message.kind = 2; - break; - case "BOT_FEEDBACK_NEGATIVE_INTERESTING": - case 3: - message.kind = 3; - break; - case "BOT_FEEDBACK_NEGATIVE_ACCURATE": - case 4: - message.kind = 4; - break; - case "BOT_FEEDBACK_NEGATIVE_SAFE": - case 5: - message.kind = 5; - break; - case "BOT_FEEDBACK_NEGATIVE_OTHER": - case 6: - message.kind = 6; - break; - } - if (object.text != null) - message.text = String(object.text); + * @returns {proto.Message.Call} Call + */ + Call.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.Call) + return object; + var message = new $root.proto.Message.Call(); + if (object.callKey != null) + if (typeof object.callKey === "string") + $util.base64.decode(object.callKey, message.callKey = $util.newBuffer($util.base64.length(object.callKey)), 0); + else if (object.callKey.length) + message.callKey = object.callKey; + if (object.conversionSource != null) + message.conversionSource = String(object.conversionSource); + if (object.conversionData != null) + if (typeof object.conversionData === "string") + $util.base64.decode(object.conversionData, message.conversionData = $util.newBuffer($util.base64.length(object.conversionData)), 0); + else if (object.conversionData.length) + message.conversionData = object.conversionData; + if (object.conversionDelaySeconds != null) + message.conversionDelaySeconds = object.conversionDelaySeconds >>> 0; return message; }; /** - * Creates a plain object from a BotFeedbackMessage message. Also converts values to other types if specified. + * Creates a plain object from a Call message. Also converts values to other types if specified. * @function toObject - * @memberof proto.Message.BotFeedbackMessage + * @memberof proto.Message.Call * @static - * @param {proto.Message.BotFeedbackMessage} message BotFeedbackMessage + * @param {proto.Message.Call} message Call * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BotFeedbackMessage.toObject = function toObject(message, options) { + Call.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.messageKey = null; - object.kind = options.enums === String ? "BOT_FEEDBACK_POSITIVE" : 0; - object.text = ""; + if (options.bytes === String) + object.callKey = ""; + else { + object.callKey = []; + if (options.bytes !== Array) + object.callKey = $util.newBuffer(object.callKey); + } + object.conversionSource = ""; + if (options.bytes === String) + object.conversionData = ""; + else { + object.conversionData = []; + if (options.bytes !== Array) + object.conversionData = $util.newBuffer(object.conversionData); + } + object.conversionDelaySeconds = 0; } - if (message.messageKey != null && message.hasOwnProperty("messageKey")) - object.messageKey = $root.proto.MessageKey.toObject(message.messageKey, options); - if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = options.enums === String ? $root.proto.Message.BotFeedbackMessage.BotFeedbackKind[message.kind] : message.kind; - if (message.text != null && message.hasOwnProperty("text")) - object.text = message.text; + if (message.callKey != null && message.hasOwnProperty("callKey")) + object.callKey = options.bytes === String ? $util.base64.encode(message.callKey, 0, message.callKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.callKey) : message.callKey; + if (message.conversionSource != null && message.hasOwnProperty("conversionSource")) + object.conversionSource = message.conversionSource; + if (message.conversionData != null && message.hasOwnProperty("conversionData")) + object.conversionData = options.bytes === String ? $util.base64.encode(message.conversionData, 0, message.conversionData.length) : options.bytes === Array ? Array.prototype.slice.call(message.conversionData) : message.conversionData; + if (message.conversionDelaySeconds != null && message.hasOwnProperty("conversionDelaySeconds")) + object.conversionDelaySeconds = message.conversionDelaySeconds; return object; }; /** - * Converts this BotFeedbackMessage to JSON. + * Converts this Call to JSON. * @function toJSON - * @memberof proto.Message.BotFeedbackMessage + * @memberof proto.Message.Call * @instance * @returns {Object.} JSON object */ - BotFeedbackMessage.prototype.toJSON = function toJSON() { + Call.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * BotFeedbackKind enum. - * @name proto.Message.BotFeedbackMessage.BotFeedbackKind - * @enum {number} - * @property {number} BOT_FEEDBACK_POSITIVE=0 BOT_FEEDBACK_POSITIVE value - * @property {number} BOT_FEEDBACK_NEGATIVE_GENERIC=1 BOT_FEEDBACK_NEGATIVE_GENERIC value - * @property {number} BOT_FEEDBACK_NEGATIVE_HELPFUL=2 BOT_FEEDBACK_NEGATIVE_HELPFUL value - * @property {number} BOT_FEEDBACK_NEGATIVE_INTERESTING=3 BOT_FEEDBACK_NEGATIVE_INTERESTING value - * @property {number} BOT_FEEDBACK_NEGATIVE_ACCURATE=4 BOT_FEEDBACK_NEGATIVE_ACCURATE value - * @property {number} BOT_FEEDBACK_NEGATIVE_SAFE=5 BOT_FEEDBACK_NEGATIVE_SAFE value - * @property {number} BOT_FEEDBACK_NEGATIVE_OTHER=6 BOT_FEEDBACK_NEGATIVE_OTHER value - */ - BotFeedbackMessage.BotFeedbackKind = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "BOT_FEEDBACK_POSITIVE"] = 0; - values[valuesById[1] = "BOT_FEEDBACK_NEGATIVE_GENERIC"] = 1; - values[valuesById[2] = "BOT_FEEDBACK_NEGATIVE_HELPFUL"] = 2; - values[valuesById[3] = "BOT_FEEDBACK_NEGATIVE_INTERESTING"] = 3; - values[valuesById[4] = "BOT_FEEDBACK_NEGATIVE_ACCURATE"] = 4; - values[valuesById[5] = "BOT_FEEDBACK_NEGATIVE_SAFE"] = 5; - values[valuesById[6] = "BOT_FEEDBACK_NEGATIVE_OTHER"] = 6; - return values; - })(); - - return BotFeedbackMessage; + return Call; })(); - Message.ButtonsMessage = (function() { + Message.CallLogMessage = (function() { /** - * Properties of a ButtonsMessage. + * Properties of a CallLogMessage. * @memberof proto.Message - * @interface IButtonsMessage - * @property {string|null} [contentText] ButtonsMessage contentText - * @property {string|null} [footerText] ButtonsMessage footerText - * @property {proto.IContextInfo|null} [contextInfo] ButtonsMessage contextInfo - * @property {Array.|null} [buttons] ButtonsMessage buttons - * @property {proto.Message.ButtonsMessage.HeaderType|null} [headerType] ButtonsMessage headerType - * @property {string|null} [text] ButtonsMessage text - * @property {proto.Message.IDocumentMessage|null} [documentMessage] ButtonsMessage documentMessage - * @property {proto.Message.IImageMessage|null} [imageMessage] ButtonsMessage imageMessage - * @property {proto.Message.IVideoMessage|null} [videoMessage] ButtonsMessage videoMessage - * @property {proto.Message.ILocationMessage|null} [locationMessage] ButtonsMessage locationMessage + * @interface ICallLogMessage + * @property {boolean|null} [isVideo] CallLogMessage isVideo + * @property {proto.Message.CallLogMessage.CallOutcome|null} [callOutcome] CallLogMessage callOutcome + * @property {number|Long|null} [durationSecs] CallLogMessage durationSecs + * @property {proto.Message.CallLogMessage.CallType|null} [callType] CallLogMessage callType + * @property {Array.|null} [participants] CallLogMessage participants */ /** - * Constructs a new ButtonsMessage. + * Constructs a new CallLogMessage. * @memberof proto.Message - * @classdesc Represents a ButtonsMessage. - * @implements IButtonsMessage + * @classdesc Represents a CallLogMessage. + * @implements ICallLogMessage * @constructor - * @param {proto.Message.IButtonsMessage=} [properties] Properties to set + * @param {proto.Message.ICallLogMessage=} [properties] Properties to set */ - function ButtonsMessage(properties) { - this.buttons = []; + function CallLogMessage(properties) { + this.participants = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -26134,209 +33278,130 @@ $root.proto = (function() { } /** - * ButtonsMessage contentText. - * @member {string} contentText - * @memberof proto.Message.ButtonsMessage - * @instance - */ - ButtonsMessage.prototype.contentText = ""; - - /** - * ButtonsMessage footerText. - * @member {string} footerText - * @memberof proto.Message.ButtonsMessage - * @instance - */ - ButtonsMessage.prototype.footerText = ""; - - /** - * ButtonsMessage contextInfo. - * @member {proto.IContextInfo|null|undefined} contextInfo - * @memberof proto.Message.ButtonsMessage - * @instance - */ - ButtonsMessage.prototype.contextInfo = null; - - /** - * ButtonsMessage buttons. - * @member {Array.} buttons - * @memberof proto.Message.ButtonsMessage - * @instance - */ - ButtonsMessage.prototype.buttons = $util.emptyArray; - - /** - * ButtonsMessage headerType. - * @member {proto.Message.ButtonsMessage.HeaderType} headerType - * @memberof proto.Message.ButtonsMessage - * @instance - */ - ButtonsMessage.prototype.headerType = 0; - - /** - * ButtonsMessage text. - * @member {string|null|undefined} text - * @memberof proto.Message.ButtonsMessage - * @instance - */ - ButtonsMessage.prototype.text = null; - - /** - * ButtonsMessage documentMessage. - * @member {proto.Message.IDocumentMessage|null|undefined} documentMessage - * @memberof proto.Message.ButtonsMessage + * CallLogMessage isVideo. + * @member {boolean} isVideo + * @memberof proto.Message.CallLogMessage * @instance */ - ButtonsMessage.prototype.documentMessage = null; + CallLogMessage.prototype.isVideo = false; /** - * ButtonsMessage imageMessage. - * @member {proto.Message.IImageMessage|null|undefined} imageMessage - * @memberof proto.Message.ButtonsMessage + * CallLogMessage callOutcome. + * @member {proto.Message.CallLogMessage.CallOutcome} callOutcome + * @memberof proto.Message.CallLogMessage * @instance */ - ButtonsMessage.prototype.imageMessage = null; + CallLogMessage.prototype.callOutcome = 0; /** - * ButtonsMessage videoMessage. - * @member {proto.Message.IVideoMessage|null|undefined} videoMessage - * @memberof proto.Message.ButtonsMessage + * CallLogMessage durationSecs. + * @member {number|Long} durationSecs + * @memberof proto.Message.CallLogMessage * @instance */ - ButtonsMessage.prototype.videoMessage = null; + CallLogMessage.prototype.durationSecs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * ButtonsMessage locationMessage. - * @member {proto.Message.ILocationMessage|null|undefined} locationMessage - * @memberof proto.Message.ButtonsMessage + * CallLogMessage callType. + * @member {proto.Message.CallLogMessage.CallType} callType + * @memberof proto.Message.CallLogMessage * @instance */ - ButtonsMessage.prototype.locationMessage = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + CallLogMessage.prototype.callType = 0; /** - * ButtonsMessage header. - * @member {"text"|"documentMessage"|"imageMessage"|"videoMessage"|"locationMessage"|undefined} header - * @memberof proto.Message.ButtonsMessage + * CallLogMessage participants. + * @member {Array.} participants + * @memberof proto.Message.CallLogMessage * @instance */ - Object.defineProperty(ButtonsMessage.prototype, "header", { - get: $util.oneOfGetter($oneOfFields = ["text", "documentMessage", "imageMessage", "videoMessage", "locationMessage"]), - set: $util.oneOfSetter($oneOfFields) - }); + CallLogMessage.prototype.participants = $util.emptyArray; /** - * Creates a new ButtonsMessage instance using the specified properties. + * Creates a new CallLogMessage instance using the specified properties. * @function create - * @memberof proto.Message.ButtonsMessage + * @memberof proto.Message.CallLogMessage * @static - * @param {proto.Message.IButtonsMessage=} [properties] Properties to set - * @returns {proto.Message.ButtonsMessage} ButtonsMessage instance + * @param {proto.Message.ICallLogMessage=} [properties] Properties to set + * @returns {proto.Message.CallLogMessage} CallLogMessage instance */ - ButtonsMessage.create = function create(properties) { - return new ButtonsMessage(properties); + CallLogMessage.create = function create(properties) { + return new CallLogMessage(properties); }; /** - * Encodes the specified ButtonsMessage message. Does not implicitly {@link proto.Message.ButtonsMessage.verify|verify} messages. + * Encodes the specified CallLogMessage message. Does not implicitly {@link proto.Message.CallLogMessage.verify|verify} messages. * @function encode - * @memberof proto.Message.ButtonsMessage + * @memberof proto.Message.CallLogMessage * @static - * @param {proto.Message.IButtonsMessage} message ButtonsMessage message or plain object to encode + * @param {proto.Message.ICallLogMessage} message CallLogMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ButtonsMessage.encode = function encode(message, writer) { + CallLogMessage.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.text != null && Object.hasOwnProperty.call(message, "text")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); - if (message.documentMessage != null && Object.hasOwnProperty.call(message, "documentMessage")) - $root.proto.Message.DocumentMessage.encode(message.documentMessage, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.imageMessage != null && Object.hasOwnProperty.call(message, "imageMessage")) - $root.proto.Message.ImageMessage.encode(message.imageMessage, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.videoMessage != null && Object.hasOwnProperty.call(message, "videoMessage")) - $root.proto.Message.VideoMessage.encode(message.videoMessage, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.locationMessage != null && Object.hasOwnProperty.call(message, "locationMessage")) - $root.proto.Message.LocationMessage.encode(message.locationMessage, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.contentText != null && Object.hasOwnProperty.call(message, "contentText")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.contentText); - if (message.footerText != null && Object.hasOwnProperty.call(message, "footerText")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.footerText); - if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo")) - $root.proto.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.buttons != null && message.buttons.length) - for (var i = 0; i < message.buttons.length; ++i) - $root.proto.Message.ButtonsMessage.Button.encode(message.buttons[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.headerType != null && Object.hasOwnProperty.call(message, "headerType")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.headerType); + if (message.isVideo != null && Object.hasOwnProperty.call(message, "isVideo")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.isVideo); + if (message.callOutcome != null && Object.hasOwnProperty.call(message, "callOutcome")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.callOutcome); + if (message.durationSecs != null && Object.hasOwnProperty.call(message, "durationSecs")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.durationSecs); + if (message.callType != null && Object.hasOwnProperty.call(message, "callType")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.callType); + if (message.participants != null && message.participants.length) + for (var i = 0; i < message.participants.length; ++i) + $root.proto.Message.CallLogMessage.CallParticipant.encode(message.participants[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; /** - * Encodes the specified ButtonsMessage message, length delimited. Does not implicitly {@link proto.Message.ButtonsMessage.verify|verify} messages. + * Encodes the specified CallLogMessage message, length delimited. Does not implicitly {@link proto.Message.CallLogMessage.verify|verify} messages. * @function encodeDelimited - * @memberof proto.Message.ButtonsMessage + * @memberof proto.Message.CallLogMessage * @static - * @param {proto.Message.IButtonsMessage} message ButtonsMessage message or plain object to encode + * @param {proto.Message.ICallLogMessage} message CallLogMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ButtonsMessage.encodeDelimited = function encodeDelimited(message, writer) { + CallLogMessage.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ButtonsMessage message from the specified reader or buffer. + * Decodes a CallLogMessage message from the specified reader or buffer. * @function decode - * @memberof proto.Message.ButtonsMessage + * @memberof proto.Message.CallLogMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {proto.Message.ButtonsMessage} ButtonsMessage + * @returns {proto.Message.CallLogMessage} CallLogMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ButtonsMessage.decode = function decode(reader, length) { + CallLogMessage.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Message.ButtonsMessage(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Message.CallLogMessage(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 6: - message.contentText = reader.string(); - break; - case 7: - message.footerText = reader.string(); - break; - case 8: - message.contextInfo = $root.proto.ContextInfo.decode(reader, reader.uint32()); - break; - case 9: - if (!(message.buttons && message.buttons.length)) - message.buttons = []; - message.buttons.push($root.proto.Message.ButtonsMessage.Button.decode(reader, reader.uint32())); - break; - case 10: - message.headerType = reader.int32(); - break; case 1: - message.text = reader.string(); + message.isVideo = reader.bool(); break; case 2: - message.documentMessage = $root.proto.Message.DocumentMessage.decode(reader, reader.uint32()); + message.callOutcome = reader.int32(); break; case 3: - message.imageMessage = $root.proto.Message.ImageMessage.decode(reader, reader.uint32()); + message.durationSecs = reader.int64(); break; case 4: - message.videoMessage = $root.proto.Message.VideoMessage.decode(reader, reader.uint32()); + message.callType = reader.int32(); break; case 5: - message.locationMessage = $root.proto.Message.LocationMessage.decode(reader, reader.uint32()); + if (!(message.participants && message.participants.length)) + message.participants = []; + message.participants.push($root.proto.Message.CallLogMessage.CallParticipant.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -26347,57 +33412,39 @@ $root.proto = (function() { }; /** - * Decodes a ButtonsMessage message from the specified reader or buffer, length delimited. + * Decodes a CallLogMessage message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof proto.Message.ButtonsMessage + * @memberof proto.Message.CallLogMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.Message.ButtonsMessage} ButtonsMessage + * @returns {proto.Message.CallLogMessage} CallLogMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ButtonsMessage.decodeDelimited = function decodeDelimited(reader) { + CallLogMessage.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ButtonsMessage message. + * Verifies a CallLogMessage message. * @function verify - * @memberof proto.Message.ButtonsMessage + * @memberof proto.Message.CallLogMessage * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ButtonsMessage.verify = function verify(message) { + CallLogMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.contentText != null && message.hasOwnProperty("contentText")) - if (!$util.isString(message.contentText)) - return "contentText: string expected"; - if (message.footerText != null && message.hasOwnProperty("footerText")) - if (!$util.isString(message.footerText)) - return "footerText: string expected"; - if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { - var error = $root.proto.ContextInfo.verify(message.contextInfo); - if (error) - return "contextInfo." + error; - } - if (message.buttons != null && message.hasOwnProperty("buttons")) { - if (!Array.isArray(message.buttons)) - return "buttons: array expected"; - for (var i = 0; i < message.buttons.length; ++i) { - var error = $root.proto.Message.ButtonsMessage.Button.verify(message.buttons[i]); - if (error) - return "buttons." + error; - } - } - if (message.headerType != null && message.hasOwnProperty("headerType")) - switch (message.headerType) { + if (message.isVideo != null && message.hasOwnProperty("isVideo")) + if (typeof message.isVideo !== "boolean") + return "isVideo: boolean expected"; + if (message.callOutcome != null && message.hasOwnProperty("callOutcome")) + switch (message.callOutcome) { default: - return "headerType: enum value expected"; + return "callOutcome: enum value expected"; case 0: case 1: case 2: @@ -26405,236 +33452,217 @@ $root.proto = (function() { case 4: case 5: case 6: + case 7: break; } - if (message.text != null && message.hasOwnProperty("text")) { - properties.header = 1; - if (!$util.isString(message.text)) - return "text: string expected"; - } - if (message.documentMessage != null && message.hasOwnProperty("documentMessage")) { - if (properties.header === 1) - return "header: multiple values"; - properties.header = 1; - { - var error = $root.proto.Message.DocumentMessage.verify(message.documentMessage); - if (error) - return "documentMessage." + error; - } - } - if (message.imageMessage != null && message.hasOwnProperty("imageMessage")) { - if (properties.header === 1) - return "header: multiple values"; - properties.header = 1; - { - var error = $root.proto.Message.ImageMessage.verify(message.imageMessage); - if (error) - return "imageMessage." + error; - } - } - if (message.videoMessage != null && message.hasOwnProperty("videoMessage")) { - if (properties.header === 1) - return "header: multiple values"; - properties.header = 1; - { - var error = $root.proto.Message.VideoMessage.verify(message.videoMessage); - if (error) - return "videoMessage." + error; + if (message.durationSecs != null && message.hasOwnProperty("durationSecs")) + if (!$util.isInteger(message.durationSecs) && !(message.durationSecs && $util.isInteger(message.durationSecs.low) && $util.isInteger(message.durationSecs.high))) + return "durationSecs: integer|Long expected"; + if (message.callType != null && message.hasOwnProperty("callType")) + switch (message.callType) { + default: + return "callType: enum value expected"; + case 0: + case 1: + case 2: + break; } - } - if (message.locationMessage != null && message.hasOwnProperty("locationMessage")) { - if (properties.header === 1) - return "header: multiple values"; - properties.header = 1; - { - var error = $root.proto.Message.LocationMessage.verify(message.locationMessage); + if (message.participants != null && message.hasOwnProperty("participants")) { + if (!Array.isArray(message.participants)) + return "participants: array expected"; + for (var i = 0; i < message.participants.length; ++i) { + var error = $root.proto.Message.CallLogMessage.CallParticipant.verify(message.participants[i]); if (error) - return "locationMessage." + error; + return "participants." + error; } } return null; }; /** - * Creates a ButtonsMessage message from a plain object. Also converts values to their respective internal types. + * Creates a CallLogMessage message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof proto.Message.ButtonsMessage + * @memberof proto.Message.CallLogMessage * @static * @param {Object.} object Plain object - * @returns {proto.Message.ButtonsMessage} ButtonsMessage + * @returns {proto.Message.CallLogMessage} CallLogMessage */ - ButtonsMessage.fromObject = function fromObject(object) { - if (object instanceof $root.proto.Message.ButtonsMessage) + CallLogMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.CallLogMessage) return object; - var message = new $root.proto.Message.ButtonsMessage(); - if (object.contentText != null) - message.contentText = String(object.contentText); - if (object.footerText != null) - message.footerText = String(object.footerText); - if (object.contextInfo != null) { - if (typeof object.contextInfo !== "object") - throw TypeError(".proto.Message.ButtonsMessage.contextInfo: object expected"); - message.contextInfo = $root.proto.ContextInfo.fromObject(object.contextInfo); - } - if (object.buttons) { - if (!Array.isArray(object.buttons)) - throw TypeError(".proto.Message.ButtonsMessage.buttons: array expected"); - message.buttons = []; - for (var i = 0; i < object.buttons.length; ++i) { - if (typeof object.buttons[i] !== "object") - throw TypeError(".proto.Message.ButtonsMessage.buttons: object expected"); - message.buttons[i] = $root.proto.Message.ButtonsMessage.Button.fromObject(object.buttons[i]); - } - } - switch (object.headerType) { - case "UNKNOWN": + var message = new $root.proto.Message.CallLogMessage(); + if (object.isVideo != null) + message.isVideo = Boolean(object.isVideo); + switch (object.callOutcome) { + case "CONNECTED": case 0: - message.headerType = 0; + message.callOutcome = 0; break; - case "EMPTY": + case "MISSED": case 1: - message.headerType = 1; + message.callOutcome = 1; break; - case "TEXT": + case "FAILED": case 2: - message.headerType = 2; + message.callOutcome = 2; break; - case "DOCUMENT": + case "REJECTED": case 3: - message.headerType = 3; + message.callOutcome = 3; break; - case "IMAGE": + case "ACCEPTED_ELSEWHERE": case 4: - message.headerType = 4; + message.callOutcome = 4; break; - case "VIDEO": + case "ONGOING": case 5: - message.headerType = 5; + message.callOutcome = 5; break; - case "LOCATION": + case "SILENCED_BY_DND": case 6: - message.headerType = 6; + message.callOutcome = 6; + break; + case "SILENCED_UNKNOWN_CALLER": + case 7: + message.callOutcome = 7; break; } - if (object.text != null) - message.text = String(object.text); - if (object.documentMessage != null) { - if (typeof object.documentMessage !== "object") - throw TypeError(".proto.Message.ButtonsMessage.documentMessage: object expected"); - message.documentMessage = $root.proto.Message.DocumentMessage.fromObject(object.documentMessage); - } - if (object.imageMessage != null) { - if (typeof object.imageMessage !== "object") - throw TypeError(".proto.Message.ButtonsMessage.imageMessage: object expected"); - message.imageMessage = $root.proto.Message.ImageMessage.fromObject(object.imageMessage); - } - if (object.videoMessage != null) { - if (typeof object.videoMessage !== "object") - throw TypeError(".proto.Message.ButtonsMessage.videoMessage: object expected"); - message.videoMessage = $root.proto.Message.VideoMessage.fromObject(object.videoMessage); + if (object.durationSecs != null) + if ($util.Long) + (message.durationSecs = $util.Long.fromValue(object.durationSecs)).unsigned = false; + else if (typeof object.durationSecs === "string") + message.durationSecs = parseInt(object.durationSecs, 10); + else if (typeof object.durationSecs === "number") + message.durationSecs = object.durationSecs; + else if (typeof object.durationSecs === "object") + message.durationSecs = new $util.LongBits(object.durationSecs.low >>> 0, object.durationSecs.high >>> 0).toNumber(); + switch (object.callType) { + case "REGULAR": + case 0: + message.callType = 0; + break; + case "SCHEDULED_CALL": + case 1: + message.callType = 1; + break; + case "VOICE_CHAT": + case 2: + message.callType = 2; + break; } - if (object.locationMessage != null) { - if (typeof object.locationMessage !== "object") - throw TypeError(".proto.Message.ButtonsMessage.locationMessage: object expected"); - message.locationMessage = $root.proto.Message.LocationMessage.fromObject(object.locationMessage); + if (object.participants) { + if (!Array.isArray(object.participants)) + throw TypeError(".proto.Message.CallLogMessage.participants: array expected"); + message.participants = []; + for (var i = 0; i < object.participants.length; ++i) { + if (typeof object.participants[i] !== "object") + throw TypeError(".proto.Message.CallLogMessage.participants: object expected"); + message.participants[i] = $root.proto.Message.CallLogMessage.CallParticipant.fromObject(object.participants[i]); + } } return message; }; /** - * Creates a plain object from a ButtonsMessage message. Also converts values to other types if specified. + * Creates a plain object from a CallLogMessage message. Also converts values to other types if specified. * @function toObject - * @memberof proto.Message.ButtonsMessage + * @memberof proto.Message.CallLogMessage * @static - * @param {proto.Message.ButtonsMessage} message ButtonsMessage + * @param {proto.Message.CallLogMessage} message CallLogMessage * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ButtonsMessage.toObject = function toObject(message, options) { + CallLogMessage.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.buttons = []; + object.participants = []; if (options.defaults) { - object.contentText = ""; - object.footerText = ""; - object.contextInfo = null; - object.headerType = options.enums === String ? "UNKNOWN" : 0; - } - if (message.text != null && message.hasOwnProperty("text")) { - object.text = message.text; - if (options.oneofs) - object.header = "text"; - } - if (message.documentMessage != null && message.hasOwnProperty("documentMessage")) { - object.documentMessage = $root.proto.Message.DocumentMessage.toObject(message.documentMessage, options); - if (options.oneofs) - object.header = "documentMessage"; - } - if (message.imageMessage != null && message.hasOwnProperty("imageMessage")) { - object.imageMessage = $root.proto.Message.ImageMessage.toObject(message.imageMessage, options); - if (options.oneofs) - object.header = "imageMessage"; - } - if (message.videoMessage != null && message.hasOwnProperty("videoMessage")) { - object.videoMessage = $root.proto.Message.VideoMessage.toObject(message.videoMessage, options); - if (options.oneofs) - object.header = "videoMessage"; - } - if (message.locationMessage != null && message.hasOwnProperty("locationMessage")) { - object.locationMessage = $root.proto.Message.LocationMessage.toObject(message.locationMessage, options); - if (options.oneofs) - object.header = "locationMessage"; - } - if (message.contentText != null && message.hasOwnProperty("contentText")) - object.contentText = message.contentText; - if (message.footerText != null && message.hasOwnProperty("footerText")) - object.footerText = message.footerText; - if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) - object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); - if (message.buttons && message.buttons.length) { - object.buttons = []; - for (var j = 0; j < message.buttons.length; ++j) - object.buttons[j] = $root.proto.Message.ButtonsMessage.Button.toObject(message.buttons[j], options); + object.isVideo = false; + object.callOutcome = options.enums === String ? "CONNECTED" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.durationSecs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.durationSecs = options.longs === String ? "0" : 0; + object.callType = options.enums === String ? "REGULAR" : 0; + } + if (message.isVideo != null && message.hasOwnProperty("isVideo")) + object.isVideo = message.isVideo; + if (message.callOutcome != null && message.hasOwnProperty("callOutcome")) + object.callOutcome = options.enums === String ? $root.proto.Message.CallLogMessage.CallOutcome[message.callOutcome] : message.callOutcome; + if (message.durationSecs != null && message.hasOwnProperty("durationSecs")) + if (typeof message.durationSecs === "number") + object.durationSecs = options.longs === String ? String(message.durationSecs) : message.durationSecs; + else + object.durationSecs = options.longs === String ? $util.Long.prototype.toString.call(message.durationSecs) : options.longs === Number ? new $util.LongBits(message.durationSecs.low >>> 0, message.durationSecs.high >>> 0).toNumber() : message.durationSecs; + if (message.callType != null && message.hasOwnProperty("callType")) + object.callType = options.enums === String ? $root.proto.Message.CallLogMessage.CallType[message.callType] : message.callType; + if (message.participants && message.participants.length) { + object.participants = []; + for (var j = 0; j < message.participants.length; ++j) + object.participants[j] = $root.proto.Message.CallLogMessage.CallParticipant.toObject(message.participants[j], options); } - if (message.headerType != null && message.hasOwnProperty("headerType")) - object.headerType = options.enums === String ? $root.proto.Message.ButtonsMessage.HeaderType[message.headerType] : message.headerType; return object; }; /** - * Converts this ButtonsMessage to JSON. + * Converts this CallLogMessage to JSON. * @function toJSON - * @memberof proto.Message.ButtonsMessage + * @memberof proto.Message.CallLogMessage * @instance * @returns {Object.} JSON object */ - ButtonsMessage.prototype.toJSON = function toJSON() { + CallLogMessage.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - ButtonsMessage.Button = (function() { + /** + * CallOutcome enum. + * @name proto.Message.CallLogMessage.CallOutcome + * @enum {number} + * @property {number} CONNECTED=0 CONNECTED value + * @property {number} MISSED=1 MISSED value + * @property {number} FAILED=2 FAILED value + * @property {number} REJECTED=3 REJECTED value + * @property {number} ACCEPTED_ELSEWHERE=4 ACCEPTED_ELSEWHERE value + * @property {number} ONGOING=5 ONGOING value + * @property {number} SILENCED_BY_DND=6 SILENCED_BY_DND value + * @property {number} SILENCED_UNKNOWN_CALLER=7 SILENCED_UNKNOWN_CALLER value + */ + CallLogMessage.CallOutcome = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CONNECTED"] = 0; + values[valuesById[1] = "MISSED"] = 1; + values[valuesById[2] = "FAILED"] = 2; + values[valuesById[3] = "REJECTED"] = 3; + values[valuesById[4] = "ACCEPTED_ELSEWHERE"] = 4; + values[valuesById[5] = "ONGOING"] = 5; + values[valuesById[6] = "SILENCED_BY_DND"] = 6; + values[valuesById[7] = "SILENCED_UNKNOWN_CALLER"] = 7; + return values; + })(); + + CallLogMessage.CallParticipant = (function() { /** - * Properties of a Button. - * @memberof proto.Message.ButtonsMessage - * @interface IButton - * @property {string|null} [buttonId] Button buttonId - * @property {proto.Message.ButtonsMessage.Button.IButtonText|null} [buttonText] Button buttonText - * @property {proto.Message.ButtonsMessage.Button.Type|null} [type] Button type - * @property {proto.Message.ButtonsMessage.Button.INativeFlowInfo|null} [nativeFlowInfo] Button nativeFlowInfo + * Properties of a CallParticipant. + * @memberof proto.Message.CallLogMessage + * @interface ICallParticipant + * @property {string|null} [jid] CallParticipant jid + * @property {proto.Message.CallLogMessage.CallOutcome|null} [callOutcome] CallParticipant callOutcome */ /** - * Constructs a new Button. - * @memberof proto.Message.ButtonsMessage - * @classdesc Represents a Button. - * @implements IButton + * Constructs a new CallParticipant. + * @memberof proto.Message.CallLogMessage + * @classdesc Represents a CallParticipant. + * @implements ICallParticipant * @constructor - * @param {proto.Message.ButtonsMessage.IButton=} [properties] Properties to set + * @param {proto.Message.CallLogMessage.ICallParticipant=} [properties] Properties to set */ - function Button(properties) { + function CallParticipant(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -26642,114 +33670,88 @@ $root.proto = (function() { } /** - * Button buttonId. - * @member {string} buttonId - * @memberof proto.Message.ButtonsMessage.Button - * @instance - */ - Button.prototype.buttonId = ""; - - /** - * Button buttonText. - * @member {proto.Message.ButtonsMessage.Button.IButtonText|null|undefined} buttonText - * @memberof proto.Message.ButtonsMessage.Button - * @instance - */ - Button.prototype.buttonText = null; - - /** - * Button type. - * @member {proto.Message.ButtonsMessage.Button.Type} type - * @memberof proto.Message.ButtonsMessage.Button + * CallParticipant jid. + * @member {string} jid + * @memberof proto.Message.CallLogMessage.CallParticipant * @instance */ - Button.prototype.type = 0; + CallParticipant.prototype.jid = ""; /** - * Button nativeFlowInfo. - * @member {proto.Message.ButtonsMessage.Button.INativeFlowInfo|null|undefined} nativeFlowInfo - * @memberof proto.Message.ButtonsMessage.Button + * CallParticipant callOutcome. + * @member {proto.Message.CallLogMessage.CallOutcome} callOutcome + * @memberof proto.Message.CallLogMessage.CallParticipant * @instance */ - Button.prototype.nativeFlowInfo = null; + CallParticipant.prototype.callOutcome = 0; /** - * Creates a new Button instance using the specified properties. + * Creates a new CallParticipant instance using the specified properties. * @function create - * @memberof proto.Message.ButtonsMessage.Button + * @memberof proto.Message.CallLogMessage.CallParticipant * @static - * @param {proto.Message.ButtonsMessage.IButton=} [properties] Properties to set - * @returns {proto.Message.ButtonsMessage.Button} Button instance + * @param {proto.Message.CallLogMessage.ICallParticipant=} [properties] Properties to set + * @returns {proto.Message.CallLogMessage.CallParticipant} CallParticipant instance */ - Button.create = function create(properties) { - return new Button(properties); + CallParticipant.create = function create(properties) { + return new CallParticipant(properties); }; /** - * Encodes the specified Button message. Does not implicitly {@link proto.Message.ButtonsMessage.Button.verify|verify} messages. + * Encodes the specified CallParticipant message. Does not implicitly {@link proto.Message.CallLogMessage.CallParticipant.verify|verify} messages. * @function encode - * @memberof proto.Message.ButtonsMessage.Button + * @memberof proto.Message.CallLogMessage.CallParticipant * @static - * @param {proto.Message.ButtonsMessage.IButton} message Button message or plain object to encode + * @param {proto.Message.CallLogMessage.ICallParticipant} message CallParticipant message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Button.encode = function encode(message, writer) { + CallParticipant.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.buttonId != null && Object.hasOwnProperty.call(message, "buttonId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.buttonId); - if (message.buttonText != null && Object.hasOwnProperty.call(message, "buttonText")) - $root.proto.Message.ButtonsMessage.Button.ButtonText.encode(message.buttonText, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.type); - if (message.nativeFlowInfo != null && Object.hasOwnProperty.call(message, "nativeFlowInfo")) - $root.proto.Message.ButtonsMessage.Button.NativeFlowInfo.encode(message.nativeFlowInfo, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.jid != null && Object.hasOwnProperty.call(message, "jid")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.jid); + if (message.callOutcome != null && Object.hasOwnProperty.call(message, "callOutcome")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.callOutcome); return writer; }; /** - * Encodes the specified Button message, length delimited. Does not implicitly {@link proto.Message.ButtonsMessage.Button.verify|verify} messages. + * Encodes the specified CallParticipant message, length delimited. Does not implicitly {@link proto.Message.CallLogMessage.CallParticipant.verify|verify} messages. * @function encodeDelimited - * @memberof proto.Message.ButtonsMessage.Button + * @memberof proto.Message.CallLogMessage.CallParticipant * @static - * @param {proto.Message.ButtonsMessage.IButton} message Button message or plain object to encode + * @param {proto.Message.CallLogMessage.ICallParticipant} message CallParticipant message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Button.encodeDelimited = function encodeDelimited(message, writer) { + CallParticipant.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Button message from the specified reader or buffer. + * Decodes a CallParticipant message from the specified reader or buffer. * @function decode - * @memberof proto.Message.ButtonsMessage.Button + * @memberof proto.Message.CallLogMessage.CallParticipant * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {proto.Message.ButtonsMessage.Button} Button + * @returns {proto.Message.CallLogMessage.CallParticipant} CallParticipant * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Button.decode = function decode(reader, length) { + CallParticipant.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Message.ButtonsMessage.Button(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Message.CallLogMessage.CallParticipant(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.buttonId = reader.string(); + message.jid = reader.string(); break; case 2: - message.buttonText = $root.proto.Message.ButtonsMessage.Button.ButtonText.decode(reader, reader.uint32()); - break; - case 3: - message.type = reader.int32(); - break; - case 4: - message.nativeFlowInfo = $root.proto.Message.ButtonsMessage.Button.NativeFlowInfo.decode(reader, reader.uint32()); + message.callOutcome = reader.int32(); break; default: reader.skipType(tag & 7); @@ -26760,603 +33762,802 @@ $root.proto = (function() { }; /** - * Decodes a Button message from the specified reader or buffer, length delimited. + * Decodes a CallParticipant message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof proto.Message.ButtonsMessage.Button + * @memberof proto.Message.CallLogMessage.CallParticipant * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.Message.ButtonsMessage.Button} Button + * @returns {proto.Message.CallLogMessage.CallParticipant} CallParticipant * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Button.decodeDelimited = function decodeDelimited(reader) { + CallParticipant.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Button message. + * Verifies a CallParticipant message. * @function verify - * @memberof proto.Message.ButtonsMessage.Button + * @memberof proto.Message.CallLogMessage.CallParticipant * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Button.verify = function verify(message) { + CallParticipant.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.buttonId != null && message.hasOwnProperty("buttonId")) - if (!$util.isString(message.buttonId)) - return "buttonId: string expected"; - if (message.buttonText != null && message.hasOwnProperty("buttonText")) { - var error = $root.proto.Message.ButtonsMessage.Button.ButtonText.verify(message.buttonText); - if (error) - return "buttonText." + error; - } - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { + if (message.jid != null && message.hasOwnProperty("jid")) + if (!$util.isString(message.jid)) + return "jid: string expected"; + if (message.callOutcome != null && message.hasOwnProperty("callOutcome")) + switch (message.callOutcome) { default: - return "type: enum value expected"; + return "callOutcome: enum value expected"; case 0: case 1: case 2: + case 3: + case 4: + case 5: + case 6: + case 7: break; } - if (message.nativeFlowInfo != null && message.hasOwnProperty("nativeFlowInfo")) { - var error = $root.proto.Message.ButtonsMessage.Button.NativeFlowInfo.verify(message.nativeFlowInfo); - if (error) - return "nativeFlowInfo." + error; - } return null; }; /** - * Creates a Button message from a plain object. Also converts values to their respective internal types. + * Creates a CallParticipant message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof proto.Message.ButtonsMessage.Button + * @memberof proto.Message.CallLogMessage.CallParticipant * @static * @param {Object.} object Plain object - * @returns {proto.Message.ButtonsMessage.Button} Button + * @returns {proto.Message.CallLogMessage.CallParticipant} CallParticipant */ - Button.fromObject = function fromObject(object) { - if (object instanceof $root.proto.Message.ButtonsMessage.Button) + CallParticipant.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.CallLogMessage.CallParticipant) return object; - var message = new $root.proto.Message.ButtonsMessage.Button(); - if (object.buttonId != null) - message.buttonId = String(object.buttonId); - if (object.buttonText != null) { - if (typeof object.buttonText !== "object") - throw TypeError(".proto.Message.ButtonsMessage.Button.buttonText: object expected"); - message.buttonText = $root.proto.Message.ButtonsMessage.Button.ButtonText.fromObject(object.buttonText); - } - switch (object.type) { - case "UNKNOWN": + var message = new $root.proto.Message.CallLogMessage.CallParticipant(); + if (object.jid != null) + message.jid = String(object.jid); + switch (object.callOutcome) { + case "CONNECTED": case 0: - message.type = 0; + message.callOutcome = 0; break; - case "RESPONSE": + case "MISSED": case 1: - message.type = 1; + message.callOutcome = 1; break; - case "NATIVE_FLOW": + case "FAILED": case 2: - message.type = 2; + message.callOutcome = 2; + break; + case "REJECTED": + case 3: + message.callOutcome = 3; + break; + case "ACCEPTED_ELSEWHERE": + case 4: + message.callOutcome = 4; + break; + case "ONGOING": + case 5: + message.callOutcome = 5; + break; + case "SILENCED_BY_DND": + case 6: + message.callOutcome = 6; + break; + case "SILENCED_UNKNOWN_CALLER": + case 7: + message.callOutcome = 7; break; - } - if (object.nativeFlowInfo != null) { - if (typeof object.nativeFlowInfo !== "object") - throw TypeError(".proto.Message.ButtonsMessage.Button.nativeFlowInfo: object expected"); - message.nativeFlowInfo = $root.proto.Message.ButtonsMessage.Button.NativeFlowInfo.fromObject(object.nativeFlowInfo); } return message; }; /** - * Creates a plain object from a Button message. Also converts values to other types if specified. + * Creates a plain object from a CallParticipant message. Also converts values to other types if specified. * @function toObject - * @memberof proto.Message.ButtonsMessage.Button + * @memberof proto.Message.CallLogMessage.CallParticipant * @static - * @param {proto.Message.ButtonsMessage.Button} message Button + * @param {proto.Message.CallLogMessage.CallParticipant} message CallParticipant * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Button.toObject = function toObject(message, options) { + CallParticipant.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.buttonId = ""; - object.buttonText = null; - object.type = options.enums === String ? "UNKNOWN" : 0; - object.nativeFlowInfo = null; + object.jid = ""; + object.callOutcome = options.enums === String ? "CONNECTED" : 0; } - if (message.buttonId != null && message.hasOwnProperty("buttonId")) - object.buttonId = message.buttonId; - if (message.buttonText != null && message.hasOwnProperty("buttonText")) - object.buttonText = $root.proto.Message.ButtonsMessage.Button.ButtonText.toObject(message.buttonText, options); - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.proto.Message.ButtonsMessage.Button.Type[message.type] : message.type; - if (message.nativeFlowInfo != null && message.hasOwnProperty("nativeFlowInfo")) - object.nativeFlowInfo = $root.proto.Message.ButtonsMessage.Button.NativeFlowInfo.toObject(message.nativeFlowInfo, options); + if (message.jid != null && message.hasOwnProperty("jid")) + object.jid = message.jid; + if (message.callOutcome != null && message.hasOwnProperty("callOutcome")) + object.callOutcome = options.enums === String ? $root.proto.Message.CallLogMessage.CallOutcome[message.callOutcome] : message.callOutcome; return object; }; /** - * Converts this Button to JSON. + * Converts this CallParticipant to JSON. * @function toJSON - * @memberof proto.Message.ButtonsMessage.Button + * @memberof proto.Message.CallLogMessage.CallParticipant * @instance * @returns {Object.} JSON object */ - Button.prototype.toJSON = function toJSON() { + CallParticipant.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - Button.ButtonText = (function() { + return CallParticipant; + })(); - /** - * Properties of a ButtonText. - * @memberof proto.Message.ButtonsMessage.Button - * @interface IButtonText - * @property {string|null} [displayText] ButtonText displayText - */ + /** + * CallType enum. + * @name proto.Message.CallLogMessage.CallType + * @enum {number} + * @property {number} REGULAR=0 REGULAR value + * @property {number} SCHEDULED_CALL=1 SCHEDULED_CALL value + * @property {number} VOICE_CHAT=2 VOICE_CHAT value + */ + CallLogMessage.CallType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REGULAR"] = 0; + values[valuesById[1] = "SCHEDULED_CALL"] = 1; + values[valuesById[2] = "VOICE_CHAT"] = 2; + return values; + })(); - /** - * Constructs a new ButtonText. - * @memberof proto.Message.ButtonsMessage.Button - * @classdesc Represents a ButtonText. - * @implements IButtonText - * @constructor - * @param {proto.Message.ButtonsMessage.Button.IButtonText=} [properties] Properties to set - */ - function ButtonText(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + return CallLogMessage; + })(); + + Message.CancelPaymentRequestMessage = (function() { + + /** + * Properties of a CancelPaymentRequestMessage. + * @memberof proto.Message + * @interface ICancelPaymentRequestMessage + * @property {proto.IMessageKey|null} [key] CancelPaymentRequestMessage key + */ + + /** + * Constructs a new CancelPaymentRequestMessage. + * @memberof proto.Message + * @classdesc Represents a CancelPaymentRequestMessage. + * @implements ICancelPaymentRequestMessage + * @constructor + * @param {proto.Message.ICancelPaymentRequestMessage=} [properties] Properties to set + */ + function CancelPaymentRequestMessage(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CancelPaymentRequestMessage key. + * @member {proto.IMessageKey|null|undefined} key + * @memberof proto.Message.CancelPaymentRequestMessage + * @instance + */ + CancelPaymentRequestMessage.prototype.key = null; + + /** + * Creates a new CancelPaymentRequestMessage instance using the specified properties. + * @function create + * @memberof proto.Message.CancelPaymentRequestMessage + * @static + * @param {proto.Message.ICancelPaymentRequestMessage=} [properties] Properties to set + * @returns {proto.Message.CancelPaymentRequestMessage} CancelPaymentRequestMessage instance + */ + CancelPaymentRequestMessage.create = function create(properties) { + return new CancelPaymentRequestMessage(properties); + }; + + /** + * Encodes the specified CancelPaymentRequestMessage message. Does not implicitly {@link proto.Message.CancelPaymentRequestMessage.verify|verify} messages. + * @function encode + * @memberof proto.Message.CancelPaymentRequestMessage + * @static + * @param {proto.Message.ICancelPaymentRequestMessage} message CancelPaymentRequestMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelPaymentRequestMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + $root.proto.MessageKey.encode(message.key, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CancelPaymentRequestMessage message, length delimited. Does not implicitly {@link proto.Message.CancelPaymentRequestMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.CancelPaymentRequestMessage + * @static + * @param {proto.Message.ICancelPaymentRequestMessage} message CancelPaymentRequestMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelPaymentRequestMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CancelPaymentRequestMessage message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.CancelPaymentRequestMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.CancelPaymentRequestMessage} CancelPaymentRequestMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelPaymentRequestMessage.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Message.CancelPaymentRequestMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.key = $root.proto.MessageKey.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } + } + return message; + }; - /** - * ButtonText displayText. - * @member {string} displayText - * @memberof proto.Message.ButtonsMessage.Button.ButtonText - * @instance - */ - ButtonText.prototype.displayText = ""; + /** + * Decodes a CancelPaymentRequestMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.CancelPaymentRequestMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.CancelPaymentRequestMessage} CancelPaymentRequestMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelPaymentRequestMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a new ButtonText instance using the specified properties. - * @function create - * @memberof proto.Message.ButtonsMessage.Button.ButtonText - * @static - * @param {proto.Message.ButtonsMessage.Button.IButtonText=} [properties] Properties to set - * @returns {proto.Message.ButtonsMessage.Button.ButtonText} ButtonText instance - */ - ButtonText.create = function create(properties) { - return new ButtonText(properties); - }; + /** + * Verifies a CancelPaymentRequestMessage message. + * @function verify + * @memberof proto.Message.CancelPaymentRequestMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CancelPaymentRequestMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.key != null && message.hasOwnProperty("key")) { + var error = $root.proto.MessageKey.verify(message.key); + if (error) + return "key." + error; + } + return null; + }; - /** - * Encodes the specified ButtonText message. Does not implicitly {@link proto.Message.ButtonsMessage.Button.ButtonText.verify|verify} messages. - * @function encode - * @memberof proto.Message.ButtonsMessage.Button.ButtonText - * @static - * @param {proto.Message.ButtonsMessage.Button.IButtonText} message ButtonText message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ButtonText.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayText != null && Object.hasOwnProperty.call(message, "displayText")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayText); - return writer; - }; + /** + * Creates a CancelPaymentRequestMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.CancelPaymentRequestMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.CancelPaymentRequestMessage} CancelPaymentRequestMessage + */ + CancelPaymentRequestMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.CancelPaymentRequestMessage) + return object; + var message = new $root.proto.Message.CancelPaymentRequestMessage(); + if (object.key != null) { + if (typeof object.key !== "object") + throw TypeError(".proto.Message.CancelPaymentRequestMessage.key: object expected"); + message.key = $root.proto.MessageKey.fromObject(object.key); + } + return message; + }; - /** - * Encodes the specified ButtonText message, length delimited. Does not implicitly {@link proto.Message.ButtonsMessage.Button.ButtonText.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.Message.ButtonsMessage.Button.ButtonText - * @static - * @param {proto.Message.ButtonsMessage.Button.IButtonText} message ButtonText message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ButtonText.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a plain object from a CancelPaymentRequestMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.CancelPaymentRequestMessage + * @static + * @param {proto.Message.CancelPaymentRequestMessage} message CancelPaymentRequestMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CancelPaymentRequestMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.key = null; + if (message.key != null && message.hasOwnProperty("key")) + object.key = $root.proto.MessageKey.toObject(message.key, options); + return object; + }; - /** - * Decodes a ButtonText message from the specified reader or buffer. - * @function decode - * @memberof proto.Message.ButtonsMessage.Button.ButtonText - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.Message.ButtonsMessage.Button.ButtonText} ButtonText - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ButtonText.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Message.ButtonsMessage.Button.ButtonText(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.displayText = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Converts this CancelPaymentRequestMessage to JSON. + * @function toJSON + * @memberof proto.Message.CancelPaymentRequestMessage + * @instance + * @returns {Object.} JSON object + */ + CancelPaymentRequestMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Decodes a ButtonText message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.Message.ButtonsMessage.Button.ButtonText - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.Message.ButtonsMessage.Button.ButtonText} ButtonText - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ButtonText.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + return CancelPaymentRequestMessage; + })(); - /** - * Verifies a ButtonText message. - * @function verify - * @memberof proto.Message.ButtonsMessage.Button.ButtonText - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ButtonText.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayText != null && message.hasOwnProperty("displayText")) - if (!$util.isString(message.displayText)) - return "displayText: string expected"; - return null; - }; + Message.Chat = (function() { - /** - * Creates a ButtonText message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.Message.ButtonsMessage.Button.ButtonText - * @static - * @param {Object.} object Plain object - * @returns {proto.Message.ButtonsMessage.Button.ButtonText} ButtonText - */ - ButtonText.fromObject = function fromObject(object) { - if (object instanceof $root.proto.Message.ButtonsMessage.Button.ButtonText) - return object; - var message = new $root.proto.Message.ButtonsMessage.Button.ButtonText(); - if (object.displayText != null) - message.displayText = String(object.displayText); - return message; - }; + /** + * Properties of a Chat. + * @memberof proto.Message + * @interface IChat + * @property {string|null} [displayName] Chat displayName + * @property {string|null} [id] Chat id + */ + + /** + * Constructs a new Chat. + * @memberof proto.Message + * @classdesc Represents a Chat. + * @implements IChat + * @constructor + * @param {proto.Message.IChat=} [properties] Properties to set + */ + function Chat(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Chat displayName. + * @member {string} displayName + * @memberof proto.Message.Chat + * @instance + */ + Chat.prototype.displayName = ""; + + /** + * Chat id. + * @member {string} id + * @memberof proto.Message.Chat + * @instance + */ + Chat.prototype.id = ""; + + /** + * Creates a new Chat instance using the specified properties. + * @function create + * @memberof proto.Message.Chat + * @static + * @param {proto.Message.IChat=} [properties] Properties to set + * @returns {proto.Message.Chat} Chat instance + */ + Chat.create = function create(properties) { + return new Chat(properties); + }; + + /** + * Encodes the specified Chat message. Does not implicitly {@link proto.Message.Chat.verify|verify} messages. + * @function encode + * @memberof proto.Message.Chat + * @static + * @param {proto.Message.IChat} message Chat message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Chat.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.id); + return writer; + }; - /** - * Creates a plain object from a ButtonText message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.Message.ButtonsMessage.Button.ButtonText - * @static - * @param {proto.Message.ButtonsMessage.Button.ButtonText} message ButtonText - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ButtonText.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.displayText = ""; - if (message.displayText != null && message.hasOwnProperty("displayText")) - object.displayText = message.displayText; - return object; - }; + /** + * Encodes the specified Chat message, length delimited. Does not implicitly {@link proto.Message.Chat.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.Chat + * @static + * @param {proto.Message.IChat} message Chat message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Chat.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Converts this ButtonText to JSON. - * @function toJSON - * @memberof proto.Message.ButtonsMessage.Button.ButtonText - * @instance - * @returns {Object.} JSON object - */ - ButtonText.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Decodes a Chat message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.Chat + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.Chat} Chat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Chat.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Message.Chat(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.displayName = reader.string(); + break; + case 2: + message.id = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - return ButtonText; - })(); + /** + * Decodes a Chat message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.Chat + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.Chat} Chat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Chat.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - Button.NativeFlowInfo = (function() { + /** + * Verifies a Chat message. + * @function verify + * @memberof proto.Message.Chat + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Chat.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + return null; + }; - /** - * Properties of a NativeFlowInfo. - * @memberof proto.Message.ButtonsMessage.Button - * @interface INativeFlowInfo - * @property {string|null} [name] NativeFlowInfo name - * @property {string|null} [paramsJson] NativeFlowInfo paramsJson - */ + /** + * Creates a Chat message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.Chat + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.Chat} Chat + */ + Chat.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.Chat) + return object; + var message = new $root.proto.Message.Chat(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.id != null) + message.id = String(object.id); + return message; + }; - /** - * Constructs a new NativeFlowInfo. - * @memberof proto.Message.ButtonsMessage.Button - * @classdesc Represents a NativeFlowInfo. - * @implements INativeFlowInfo - * @constructor - * @param {proto.Message.ButtonsMessage.Button.INativeFlowInfo=} [properties] Properties to set - */ - function NativeFlowInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Creates a plain object from a Chat message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.Chat + * @static + * @param {proto.Message.Chat} message Chat + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Chat.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayName = ""; + object.id = ""; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + return object; + }; - /** - * NativeFlowInfo name. - * @member {string} name - * @memberof proto.Message.ButtonsMessage.Button.NativeFlowInfo - * @instance - */ - NativeFlowInfo.prototype.name = ""; + /** + * Converts this Chat to JSON. + * @function toJSON + * @memberof proto.Message.Chat + * @instance + * @returns {Object.} JSON object + */ + Chat.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * NativeFlowInfo paramsJson. - * @member {string} paramsJson - * @memberof proto.Message.ButtonsMessage.Button.NativeFlowInfo - * @instance - */ - NativeFlowInfo.prototype.paramsJson = ""; + return Chat; + })(); - /** - * Creates a new NativeFlowInfo instance using the specified properties. - * @function create - * @memberof proto.Message.ButtonsMessage.Button.NativeFlowInfo - * @static - * @param {proto.Message.ButtonsMessage.Button.INativeFlowInfo=} [properties] Properties to set - * @returns {proto.Message.ButtonsMessage.Button.NativeFlowInfo} NativeFlowInfo instance - */ - NativeFlowInfo.create = function create(properties) { - return new NativeFlowInfo(properties); - }; + Message.CommentMessage = (function() { - /** - * Encodes the specified NativeFlowInfo message. Does not implicitly {@link proto.Message.ButtonsMessage.Button.NativeFlowInfo.verify|verify} messages. - * @function encode - * @memberof proto.Message.ButtonsMessage.Button.NativeFlowInfo - * @static - * @param {proto.Message.ButtonsMessage.Button.INativeFlowInfo} message NativeFlowInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NativeFlowInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.paramsJson != null && Object.hasOwnProperty.call(message, "paramsJson")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.paramsJson); - return writer; - }; + /** + * Properties of a CommentMessage. + * @memberof proto.Message + * @interface ICommentMessage + * @property {proto.IMessage|null} [message] CommentMessage message + * @property {proto.IMessageKey|null} [targetMessageKey] CommentMessage targetMessageKey + */ - /** - * Encodes the specified NativeFlowInfo message, length delimited. Does not implicitly {@link proto.Message.ButtonsMessage.Button.NativeFlowInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.Message.ButtonsMessage.Button.NativeFlowInfo - * @static - * @param {proto.Message.ButtonsMessage.Button.INativeFlowInfo} message NativeFlowInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NativeFlowInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Constructs a new CommentMessage. + * @memberof proto.Message + * @classdesc Represents a CommentMessage. + * @implements ICommentMessage + * @constructor + * @param {proto.Message.ICommentMessage=} [properties] Properties to set + */ + function CommentMessage(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Decodes a NativeFlowInfo message from the specified reader or buffer. - * @function decode - * @memberof proto.Message.ButtonsMessage.Button.NativeFlowInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.Message.ButtonsMessage.Button.NativeFlowInfo} NativeFlowInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NativeFlowInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Message.ButtonsMessage.Button.NativeFlowInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.paramsJson = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * CommentMessage message. + * @member {proto.IMessage|null|undefined} message + * @memberof proto.Message.CommentMessage + * @instance + */ + CommentMessage.prototype.message = null; - /** - * Decodes a NativeFlowInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.Message.ButtonsMessage.Button.NativeFlowInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.Message.ButtonsMessage.Button.NativeFlowInfo} NativeFlowInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NativeFlowInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * CommentMessage targetMessageKey. + * @member {proto.IMessageKey|null|undefined} targetMessageKey + * @memberof proto.Message.CommentMessage + * @instance + */ + CommentMessage.prototype.targetMessageKey = null; - /** - * Verifies a NativeFlowInfo message. - * @function verify - * @memberof proto.Message.ButtonsMessage.Button.NativeFlowInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NativeFlowInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.paramsJson != null && message.hasOwnProperty("paramsJson")) - if (!$util.isString(message.paramsJson)) - return "paramsJson: string expected"; - return null; - }; + /** + * Creates a new CommentMessage instance using the specified properties. + * @function create + * @memberof proto.Message.CommentMessage + * @static + * @param {proto.Message.ICommentMessage=} [properties] Properties to set + * @returns {proto.Message.CommentMessage} CommentMessage instance + */ + CommentMessage.create = function create(properties) { + return new CommentMessage(properties); + }; - /** - * Creates a NativeFlowInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.Message.ButtonsMessage.Button.NativeFlowInfo - * @static - * @param {Object.} object Plain object - * @returns {proto.Message.ButtonsMessage.Button.NativeFlowInfo} NativeFlowInfo - */ - NativeFlowInfo.fromObject = function fromObject(object) { - if (object instanceof $root.proto.Message.ButtonsMessage.Button.NativeFlowInfo) - return object; - var message = new $root.proto.Message.ButtonsMessage.Button.NativeFlowInfo(); - if (object.name != null) - message.name = String(object.name); - if (object.paramsJson != null) - message.paramsJson = String(object.paramsJson); - return message; - }; + /** + * Encodes the specified CommentMessage message. Does not implicitly {@link proto.Message.CommentMessage.verify|verify} messages. + * @function encode + * @memberof proto.Message.CommentMessage + * @static + * @param {proto.Message.ICommentMessage} message CommentMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommentMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + $root.proto.Message.encode(message.message, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.targetMessageKey != null && Object.hasOwnProperty.call(message, "targetMessageKey")) + $root.proto.MessageKey.encode(message.targetMessageKey, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; - /** - * Creates a plain object from a NativeFlowInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.Message.ButtonsMessage.Button.NativeFlowInfo - * @static - * @param {proto.Message.ButtonsMessage.Button.NativeFlowInfo} message NativeFlowInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NativeFlowInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.paramsJson = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.paramsJson != null && message.hasOwnProperty("paramsJson")) - object.paramsJson = message.paramsJson; - return object; - }; + /** + * Encodes the specified CommentMessage message, length delimited. Does not implicitly {@link proto.Message.CommentMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.CommentMessage + * @static + * @param {proto.Message.ICommentMessage} message CommentMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommentMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Converts this NativeFlowInfo to JSON. - * @function toJSON - * @memberof proto.Message.ButtonsMessage.Button.NativeFlowInfo - * @instance - * @returns {Object.} JSON object - */ - NativeFlowInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Decodes a CommentMessage message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.CommentMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.CommentMessage} CommentMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommentMessage.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Message.CommentMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.message = $root.proto.Message.decode(reader, reader.uint32()); + break; + case 2: + message.targetMessageKey = $root.proto.MessageKey.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - return NativeFlowInfo; - })(); + /** + * Decodes a CommentMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.CommentMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.CommentMessage} CommentMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommentMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Type enum. - * @name proto.Message.ButtonsMessage.Button.Type - * @enum {number} - * @property {number} UNKNOWN=0 UNKNOWN value - * @property {number} RESPONSE=1 RESPONSE value - * @property {number} NATIVE_FLOW=2 NATIVE_FLOW value - */ - Button.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UNKNOWN"] = 0; - values[valuesById[1] = "RESPONSE"] = 1; - values[valuesById[2] = "NATIVE_FLOW"] = 2; - return values; - })(); + /** + * Verifies a CommentMessage message. + * @function verify + * @memberof proto.Message.CommentMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CommentMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.message != null && message.hasOwnProperty("message")) { + var error = $root.proto.Message.verify(message.message); + if (error) + return "message." + error; + } + if (message.targetMessageKey != null && message.hasOwnProperty("targetMessageKey")) { + var error = $root.proto.MessageKey.verify(message.targetMessageKey); + if (error) + return "targetMessageKey." + error; + } + return null; + }; - return Button; - })(); + /** + * Creates a CommentMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.CommentMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.CommentMessage} CommentMessage + */ + CommentMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.CommentMessage) + return object; + var message = new $root.proto.Message.CommentMessage(); + if (object.message != null) { + if (typeof object.message !== "object") + throw TypeError(".proto.Message.CommentMessage.message: object expected"); + message.message = $root.proto.Message.fromObject(object.message); + } + if (object.targetMessageKey != null) { + if (typeof object.targetMessageKey !== "object") + throw TypeError(".proto.Message.CommentMessage.targetMessageKey: object expected"); + message.targetMessageKey = $root.proto.MessageKey.fromObject(object.targetMessageKey); + } + return message; + }; + + /** + * Creates a plain object from a CommentMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.CommentMessage + * @static + * @param {proto.Message.CommentMessage} message CommentMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CommentMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.message = null; + object.targetMessageKey = null; + } + if (message.message != null && message.hasOwnProperty("message")) + object.message = $root.proto.Message.toObject(message.message, options); + if (message.targetMessageKey != null && message.hasOwnProperty("targetMessageKey")) + object.targetMessageKey = $root.proto.MessageKey.toObject(message.targetMessageKey, options); + return object; + }; /** - * HeaderType enum. - * @name proto.Message.ButtonsMessage.HeaderType - * @enum {number} - * @property {number} UNKNOWN=0 UNKNOWN value - * @property {number} EMPTY=1 EMPTY value - * @property {number} TEXT=2 TEXT value - * @property {number} DOCUMENT=3 DOCUMENT value - * @property {number} IMAGE=4 IMAGE value - * @property {number} VIDEO=5 VIDEO value - * @property {number} LOCATION=6 LOCATION value + * Converts this CommentMessage to JSON. + * @function toJSON + * @memberof proto.Message.CommentMessage + * @instance + * @returns {Object.} JSON object */ - ButtonsMessage.HeaderType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UNKNOWN"] = 0; - values[valuesById[1] = "EMPTY"] = 1; - values[valuesById[2] = "TEXT"] = 2; - values[valuesById[3] = "DOCUMENT"] = 3; - values[valuesById[4] = "IMAGE"] = 4; - values[valuesById[5] = "VIDEO"] = 5; - values[valuesById[6] = "LOCATION"] = 6; - return values; - })(); + CommentMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return ButtonsMessage; + return CommentMessage; })(); - Message.ButtonsResponseMessage = (function() { + Message.ContactMessage = (function() { /** - * Properties of a ButtonsResponseMessage. + * Properties of a ContactMessage. * @memberof proto.Message - * @interface IButtonsResponseMessage - * @property {string|null} [selectedButtonId] ButtonsResponseMessage selectedButtonId - * @property {proto.IContextInfo|null} [contextInfo] ButtonsResponseMessage contextInfo - * @property {proto.Message.ButtonsResponseMessage.Type|null} [type] ButtonsResponseMessage type - * @property {string|null} [selectedDisplayText] ButtonsResponseMessage selectedDisplayText + * @interface IContactMessage + * @property {string|null} [displayName] ContactMessage displayName + * @property {string|null} [vcard] ContactMessage vcard + * @property {proto.IContextInfo|null} [contextInfo] ContactMessage contextInfo */ /** - * Constructs a new ButtonsResponseMessage. + * Constructs a new ContactMessage. * @memberof proto.Message - * @classdesc Represents a ButtonsResponseMessage. - * @implements IButtonsResponseMessage + * @classdesc Represents a ContactMessage. + * @implements IContactMessage * @constructor - * @param {proto.Message.IButtonsResponseMessage=} [properties] Properties to set + * @param {proto.Message.IContactMessage=} [properties] Properties to set */ - function ButtonsResponseMessage(properties) { + function ContactMessage(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -27364,128 +34565,101 @@ $root.proto = (function() { } /** - * ButtonsResponseMessage selectedButtonId. - * @member {string} selectedButtonId - * @memberof proto.Message.ButtonsResponseMessage - * @instance - */ - ButtonsResponseMessage.prototype.selectedButtonId = ""; - - /** - * ButtonsResponseMessage contextInfo. - * @member {proto.IContextInfo|null|undefined} contextInfo - * @memberof proto.Message.ButtonsResponseMessage - * @instance - */ - ButtonsResponseMessage.prototype.contextInfo = null; - - /** - * ButtonsResponseMessage type. - * @member {proto.Message.ButtonsResponseMessage.Type} type - * @memberof proto.Message.ButtonsResponseMessage + * ContactMessage displayName. + * @member {string} displayName + * @memberof proto.Message.ContactMessage * @instance */ - ButtonsResponseMessage.prototype.type = 0; + ContactMessage.prototype.displayName = ""; /** - * ButtonsResponseMessage selectedDisplayText. - * @member {string|null|undefined} selectedDisplayText - * @memberof proto.Message.ButtonsResponseMessage + * ContactMessage vcard. + * @member {string} vcard + * @memberof proto.Message.ContactMessage * @instance */ - ButtonsResponseMessage.prototype.selectedDisplayText = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + ContactMessage.prototype.vcard = ""; /** - * ButtonsResponseMessage response. - * @member {"selectedDisplayText"|undefined} response - * @memberof proto.Message.ButtonsResponseMessage + * ContactMessage contextInfo. + * @member {proto.IContextInfo|null|undefined} contextInfo + * @memberof proto.Message.ContactMessage * @instance */ - Object.defineProperty(ButtonsResponseMessage.prototype, "response", { - get: $util.oneOfGetter($oneOfFields = ["selectedDisplayText"]), - set: $util.oneOfSetter($oneOfFields) - }); + ContactMessage.prototype.contextInfo = null; /** - * Creates a new ButtonsResponseMessage instance using the specified properties. + * Creates a new ContactMessage instance using the specified properties. * @function create - * @memberof proto.Message.ButtonsResponseMessage + * @memberof proto.Message.ContactMessage * @static - * @param {proto.Message.IButtonsResponseMessage=} [properties] Properties to set - * @returns {proto.Message.ButtonsResponseMessage} ButtonsResponseMessage instance + * @param {proto.Message.IContactMessage=} [properties] Properties to set + * @returns {proto.Message.ContactMessage} ContactMessage instance */ - ButtonsResponseMessage.create = function create(properties) { - return new ButtonsResponseMessage(properties); + ContactMessage.create = function create(properties) { + return new ContactMessage(properties); }; /** - * Encodes the specified ButtonsResponseMessage message. Does not implicitly {@link proto.Message.ButtonsResponseMessage.verify|verify} messages. + * Encodes the specified ContactMessage message. Does not implicitly {@link proto.Message.ContactMessage.verify|verify} messages. * @function encode - * @memberof proto.Message.ButtonsResponseMessage + * @memberof proto.Message.ContactMessage * @static - * @param {proto.Message.IButtonsResponseMessage} message ButtonsResponseMessage message or plain object to encode + * @param {proto.Message.IContactMessage} message ContactMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ButtonsResponseMessage.encode = function encode(message, writer) { + ContactMessage.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.selectedButtonId != null && Object.hasOwnProperty.call(message, "selectedButtonId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.selectedButtonId); - if (message.selectedDisplayText != null && Object.hasOwnProperty.call(message, "selectedDisplayText")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.selectedDisplayText); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.vcard != null && Object.hasOwnProperty.call(message, "vcard")) + writer.uint32(/* id 16, wireType 2 =*/130).string(message.vcard); if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo")) - $root.proto.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.type); + $root.proto.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); return writer; }; /** - * Encodes the specified ButtonsResponseMessage message, length delimited. Does not implicitly {@link proto.Message.ButtonsResponseMessage.verify|verify} messages. + * Encodes the specified ContactMessage message, length delimited. Does not implicitly {@link proto.Message.ContactMessage.verify|verify} messages. * @function encodeDelimited - * @memberof proto.Message.ButtonsResponseMessage + * @memberof proto.Message.ContactMessage * @static - * @param {proto.Message.IButtonsResponseMessage} message ButtonsResponseMessage message or plain object to encode + * @param {proto.Message.IContactMessage} message ContactMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ButtonsResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { + ContactMessage.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ButtonsResponseMessage message from the specified reader or buffer. + * Decodes a ContactMessage message from the specified reader or buffer. * @function decode - * @memberof proto.Message.ButtonsResponseMessage + * @memberof proto.Message.ContactMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {proto.Message.ButtonsResponseMessage} ButtonsResponseMessage + * @returns {proto.Message.ContactMessage} ContactMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ButtonsResponseMessage.decode = function decode(reader, length) { + ContactMessage.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Message.ButtonsResponseMessage(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Message.ContactMessage(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.selectedButtonId = reader.string(); - break; - case 3: - message.contextInfo = $root.proto.ContextInfo.decode(reader, reader.uint32()); + message.displayName = reader.string(); break; - case 4: - message.type = reader.int32(); + case 16: + message.vcard = reader.string(); break; - case 2: - message.selectedDisplayText = reader.string(); + case 17: + message.contextInfo = $root.proto.ContextInfo.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -27496,172 +34670,132 @@ $root.proto = (function() { }; /** - * Decodes a ButtonsResponseMessage message from the specified reader or buffer, length delimited. + * Decodes a ContactMessage message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof proto.Message.ButtonsResponseMessage + * @memberof proto.Message.ContactMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.Message.ButtonsResponseMessage} ButtonsResponseMessage + * @returns {proto.Message.ContactMessage} ContactMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ButtonsResponseMessage.decodeDelimited = function decodeDelimited(reader) { + ContactMessage.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ButtonsResponseMessage message. + * Verifies a ContactMessage message. * @function verify - * @memberof proto.Message.ButtonsResponseMessage + * @memberof proto.Message.ContactMessage * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ButtonsResponseMessage.verify = function verify(message) { + ContactMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.selectedButtonId != null && message.hasOwnProperty("selectedButtonId")) - if (!$util.isString(message.selectedButtonId)) - return "selectedButtonId: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.vcard != null && message.hasOwnProperty("vcard")) + if (!$util.isString(message.vcard)) + return "vcard: string expected"; if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { var error = $root.proto.ContextInfo.verify(message.contextInfo); if (error) return "contextInfo." + error; } - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - break; - } - if (message.selectedDisplayText != null && message.hasOwnProperty("selectedDisplayText")) { - properties.response = 1; - if (!$util.isString(message.selectedDisplayText)) - return "selectedDisplayText: string expected"; - } return null; }; /** - * Creates a ButtonsResponseMessage message from a plain object. Also converts values to their respective internal types. + * Creates a ContactMessage message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof proto.Message.ButtonsResponseMessage + * @memberof proto.Message.ContactMessage * @static * @param {Object.} object Plain object - * @returns {proto.Message.ButtonsResponseMessage} ButtonsResponseMessage + * @returns {proto.Message.ContactMessage} ContactMessage */ - ButtonsResponseMessage.fromObject = function fromObject(object) { - if (object instanceof $root.proto.Message.ButtonsResponseMessage) + ContactMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.ContactMessage) return object; - var message = new $root.proto.Message.ButtonsResponseMessage(); - if (object.selectedButtonId != null) - message.selectedButtonId = String(object.selectedButtonId); + var message = new $root.proto.Message.ContactMessage(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.vcard != null) + message.vcard = String(object.vcard); if (object.contextInfo != null) { if (typeof object.contextInfo !== "object") - throw TypeError(".proto.Message.ButtonsResponseMessage.contextInfo: object expected"); + throw TypeError(".proto.Message.ContactMessage.contextInfo: object expected"); message.contextInfo = $root.proto.ContextInfo.fromObject(object.contextInfo); } - switch (object.type) { - case "UNKNOWN": - case 0: - message.type = 0; - break; - case "DISPLAY_TEXT": - case 1: - message.type = 1; - break; - } - if (object.selectedDisplayText != null) - message.selectedDisplayText = String(object.selectedDisplayText); return message; }; /** - * Creates a plain object from a ButtonsResponseMessage message. Also converts values to other types if specified. + * Creates a plain object from a ContactMessage message. Also converts values to other types if specified. * @function toObject - * @memberof proto.Message.ButtonsResponseMessage + * @memberof proto.Message.ContactMessage * @static - * @param {proto.Message.ButtonsResponseMessage} message ButtonsResponseMessage + * @param {proto.Message.ContactMessage} message ContactMessage * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ButtonsResponseMessage.toObject = function toObject(message, options) { + ContactMessage.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.selectedButtonId = ""; + object.displayName = ""; + object.vcard = ""; object.contextInfo = null; - object.type = options.enums === String ? "UNKNOWN" : 0; - } - if (message.selectedButtonId != null && message.hasOwnProperty("selectedButtonId")) - object.selectedButtonId = message.selectedButtonId; - if (message.selectedDisplayText != null && message.hasOwnProperty("selectedDisplayText")) { - object.selectedDisplayText = message.selectedDisplayText; - if (options.oneofs) - object.response = "selectedDisplayText"; } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.vcard != null && message.hasOwnProperty("vcard")) + object.vcard = message.vcard; if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.proto.Message.ButtonsResponseMessage.Type[message.type] : message.type; return object; }; /** - * Converts this ButtonsResponseMessage to JSON. + * Converts this ContactMessage to JSON. * @function toJSON - * @memberof proto.Message.ButtonsResponseMessage + * @memberof proto.Message.ContactMessage * @instance * @returns {Object.} JSON object */ - ButtonsResponseMessage.prototype.toJSON = function toJSON() { + ContactMessage.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * Type enum. - * @name proto.Message.ButtonsResponseMessage.Type - * @enum {number} - * @property {number} UNKNOWN=0 UNKNOWN value - * @property {number} DISPLAY_TEXT=1 DISPLAY_TEXT value - */ - ButtonsResponseMessage.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UNKNOWN"] = 0; - values[valuesById[1] = "DISPLAY_TEXT"] = 1; - return values; - })(); - - return ButtonsResponseMessage; + return ContactMessage; })(); - Message.Call = (function() { + Message.ContactsArrayMessage = (function() { /** - * Properties of a Call. + * Properties of a ContactsArrayMessage. * @memberof proto.Message - * @interface ICall - * @property {Uint8Array|null} [callKey] Call callKey - * @property {string|null} [conversionSource] Call conversionSource - * @property {Uint8Array|null} [conversionData] Call conversionData - * @property {number|null} [conversionDelaySeconds] Call conversionDelaySeconds + * @interface IContactsArrayMessage + * @property {string|null} [displayName] ContactsArrayMessage displayName + * @property {Array.|null} [contacts] ContactsArrayMessage contacts + * @property {proto.IContextInfo|null} [contextInfo] ContactsArrayMessage contextInfo */ /** - * Constructs a new Call. + * Constructs a new ContactsArrayMessage. * @memberof proto.Message - * @classdesc Represents a Call. - * @implements ICall + * @classdesc Represents a ContactsArrayMessage. + * @implements IContactsArrayMessage * @constructor - * @param {proto.Message.ICall=} [properties] Properties to set + * @param {proto.Message.IContactsArrayMessage=} [properties] Properties to set */ - function Call(properties) { + function ContactsArrayMessage(properties) { + this.contacts = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -27669,114 +34803,104 @@ $root.proto = (function() { } /** - * Call callKey. - * @member {Uint8Array} callKey - * @memberof proto.Message.Call - * @instance - */ - Call.prototype.callKey = $util.newBuffer([]); - - /** - * Call conversionSource. - * @member {string} conversionSource - * @memberof proto.Message.Call + * ContactsArrayMessage displayName. + * @member {string} displayName + * @memberof proto.Message.ContactsArrayMessage * @instance */ - Call.prototype.conversionSource = ""; + ContactsArrayMessage.prototype.displayName = ""; /** - * Call conversionData. - * @member {Uint8Array} conversionData - * @memberof proto.Message.Call + * ContactsArrayMessage contacts. + * @member {Array.} contacts + * @memberof proto.Message.ContactsArrayMessage * @instance */ - Call.prototype.conversionData = $util.newBuffer([]); + ContactsArrayMessage.prototype.contacts = $util.emptyArray; /** - * Call conversionDelaySeconds. - * @member {number} conversionDelaySeconds - * @memberof proto.Message.Call + * ContactsArrayMessage contextInfo. + * @member {proto.IContextInfo|null|undefined} contextInfo + * @memberof proto.Message.ContactsArrayMessage * @instance */ - Call.prototype.conversionDelaySeconds = 0; + ContactsArrayMessage.prototype.contextInfo = null; /** - * Creates a new Call instance using the specified properties. + * Creates a new ContactsArrayMessage instance using the specified properties. * @function create - * @memberof proto.Message.Call + * @memberof proto.Message.ContactsArrayMessage * @static - * @param {proto.Message.ICall=} [properties] Properties to set - * @returns {proto.Message.Call} Call instance + * @param {proto.Message.IContactsArrayMessage=} [properties] Properties to set + * @returns {proto.Message.ContactsArrayMessage} ContactsArrayMessage instance */ - Call.create = function create(properties) { - return new Call(properties); + ContactsArrayMessage.create = function create(properties) { + return new ContactsArrayMessage(properties); }; /** - * Encodes the specified Call message. Does not implicitly {@link proto.Message.Call.verify|verify} messages. + * Encodes the specified ContactsArrayMessage message. Does not implicitly {@link proto.Message.ContactsArrayMessage.verify|verify} messages. * @function encode - * @memberof proto.Message.Call + * @memberof proto.Message.ContactsArrayMessage * @static - * @param {proto.Message.ICall} message Call message or plain object to encode + * @param {proto.Message.IContactsArrayMessage} message ContactsArrayMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Call.encode = function encode(message, writer) { + ContactsArrayMessage.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.callKey != null && Object.hasOwnProperty.call(message, "callKey")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.callKey); - if (message.conversionSource != null && Object.hasOwnProperty.call(message, "conversionSource")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.conversionSource); - if (message.conversionData != null && Object.hasOwnProperty.call(message, "conversionData")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.conversionData); - if (message.conversionDelaySeconds != null && Object.hasOwnProperty.call(message, "conversionDelaySeconds")) - writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.conversionDelaySeconds); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.contacts != null && message.contacts.length) + for (var i = 0; i < message.contacts.length; ++i) + $root.proto.Message.ContactMessage.encode(message.contacts[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo")) + $root.proto.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); return writer; }; /** - * Encodes the specified Call message, length delimited. Does not implicitly {@link proto.Message.Call.verify|verify} messages. + * Encodes the specified ContactsArrayMessage message, length delimited. Does not implicitly {@link proto.Message.ContactsArrayMessage.verify|verify} messages. * @function encodeDelimited - * @memberof proto.Message.Call + * @memberof proto.Message.ContactsArrayMessage * @static - * @param {proto.Message.ICall} message Call message or plain object to encode + * @param {proto.Message.IContactsArrayMessage} message ContactsArrayMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Call.encodeDelimited = function encodeDelimited(message, writer) { + ContactsArrayMessage.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Call message from the specified reader or buffer. + * Decodes a ContactsArrayMessage message from the specified reader or buffer. * @function decode - * @memberof proto.Message.Call + * @memberof proto.Message.ContactsArrayMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {proto.Message.Call} Call + * @returns {proto.Message.ContactsArrayMessage} ContactsArrayMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Call.decode = function decode(reader, length) { + ContactsArrayMessage.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Message.Call(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Message.ContactsArrayMessage(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.callKey = reader.bytes(); + message.displayName = reader.string(); break; case 2: - message.conversionSource = reader.string(); - break; - case 3: - message.conversionData = reader.bytes(); + if (!(message.contacts && message.contacts.length)) + message.contacts = []; + message.contacts.push($root.proto.Message.ContactMessage.decode(reader, reader.uint32())); break; - case 4: - message.conversionDelaySeconds = reader.uint32(); + case 17: + message.contextInfo = $root.proto.ContextInfo.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -27787,150 +34911,147 @@ $root.proto = (function() { }; /** - * Decodes a Call message from the specified reader or buffer, length delimited. + * Decodes a ContactsArrayMessage message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof proto.Message.Call + * @memberof proto.Message.ContactsArrayMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.Message.Call} Call + * @returns {proto.Message.ContactsArrayMessage} ContactsArrayMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Call.decodeDelimited = function decodeDelimited(reader) { + ContactsArrayMessage.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Call message. + * Verifies a ContactsArrayMessage message. * @function verify - * @memberof proto.Message.Call + * @memberof proto.Message.ContactsArrayMessage * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Call.verify = function verify(message) { + ContactsArrayMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.callKey != null && message.hasOwnProperty("callKey")) - if (!(message.callKey && typeof message.callKey.length === "number" || $util.isString(message.callKey))) - return "callKey: buffer expected"; - if (message.conversionSource != null && message.hasOwnProperty("conversionSource")) - if (!$util.isString(message.conversionSource)) - return "conversionSource: string expected"; - if (message.conversionData != null && message.hasOwnProperty("conversionData")) - if (!(message.conversionData && typeof message.conversionData.length === "number" || $util.isString(message.conversionData))) - return "conversionData: buffer expected"; - if (message.conversionDelaySeconds != null && message.hasOwnProperty("conversionDelaySeconds")) - if (!$util.isInteger(message.conversionDelaySeconds)) - return "conversionDelaySeconds: integer expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.contacts != null && message.hasOwnProperty("contacts")) { + if (!Array.isArray(message.contacts)) + return "contacts: array expected"; + for (var i = 0; i < message.contacts.length; ++i) { + var error = $root.proto.Message.ContactMessage.verify(message.contacts[i]); + if (error) + return "contacts." + error; + } + } + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { + var error = $root.proto.ContextInfo.verify(message.contextInfo); + if (error) + return "contextInfo." + error; + } return null; }; /** - * Creates a Call message from a plain object. Also converts values to their respective internal types. + * Creates a ContactsArrayMessage message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof proto.Message.Call + * @memberof proto.Message.ContactsArrayMessage * @static * @param {Object.} object Plain object - * @returns {proto.Message.Call} Call + * @returns {proto.Message.ContactsArrayMessage} ContactsArrayMessage */ - Call.fromObject = function fromObject(object) { - if (object instanceof $root.proto.Message.Call) + ContactsArrayMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.ContactsArrayMessage) return object; - var message = new $root.proto.Message.Call(); - if (object.callKey != null) - if (typeof object.callKey === "string") - $util.base64.decode(object.callKey, message.callKey = $util.newBuffer($util.base64.length(object.callKey)), 0); - else if (object.callKey.length) - message.callKey = object.callKey; - if (object.conversionSource != null) - message.conversionSource = String(object.conversionSource); - if (object.conversionData != null) - if (typeof object.conversionData === "string") - $util.base64.decode(object.conversionData, message.conversionData = $util.newBuffer($util.base64.length(object.conversionData)), 0); - else if (object.conversionData.length) - message.conversionData = object.conversionData; - if (object.conversionDelaySeconds != null) - message.conversionDelaySeconds = object.conversionDelaySeconds >>> 0; + var message = new $root.proto.Message.ContactsArrayMessage(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.contacts) { + if (!Array.isArray(object.contacts)) + throw TypeError(".proto.Message.ContactsArrayMessage.contacts: array expected"); + message.contacts = []; + for (var i = 0; i < object.contacts.length; ++i) { + if (typeof object.contacts[i] !== "object") + throw TypeError(".proto.Message.ContactsArrayMessage.contacts: object expected"); + message.contacts[i] = $root.proto.Message.ContactMessage.fromObject(object.contacts[i]); + } + } + if (object.contextInfo != null) { + if (typeof object.contextInfo !== "object") + throw TypeError(".proto.Message.ContactsArrayMessage.contextInfo: object expected"); + message.contextInfo = $root.proto.ContextInfo.fromObject(object.contextInfo); + } return message; }; /** - * Creates a plain object from a Call message. Also converts values to other types if specified. + * Creates a plain object from a ContactsArrayMessage message. Also converts values to other types if specified. * @function toObject - * @memberof proto.Message.Call + * @memberof proto.Message.ContactsArrayMessage * @static - * @param {proto.Message.Call} message Call + * @param {proto.Message.ContactsArrayMessage} message ContactsArrayMessage * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object - */ - Call.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.callKey = ""; - else { - object.callKey = []; - if (options.bytes !== Array) - object.callKey = $util.newBuffer(object.callKey); - } - object.conversionSource = ""; - if (options.bytes === String) - object.conversionData = ""; - else { - object.conversionData = []; - if (options.bytes !== Array) - object.conversionData = $util.newBuffer(object.conversionData); - } - object.conversionDelaySeconds = 0; + */ + ContactsArrayMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.contacts = []; + if (options.defaults) { + object.displayName = ""; + object.contextInfo = null; } - if (message.callKey != null && message.hasOwnProperty("callKey")) - object.callKey = options.bytes === String ? $util.base64.encode(message.callKey, 0, message.callKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.callKey) : message.callKey; - if (message.conversionSource != null && message.hasOwnProperty("conversionSource")) - object.conversionSource = message.conversionSource; - if (message.conversionData != null && message.hasOwnProperty("conversionData")) - object.conversionData = options.bytes === String ? $util.base64.encode(message.conversionData, 0, message.conversionData.length) : options.bytes === Array ? Array.prototype.slice.call(message.conversionData) : message.conversionData; - if (message.conversionDelaySeconds != null && message.hasOwnProperty("conversionDelaySeconds")) - object.conversionDelaySeconds = message.conversionDelaySeconds; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.contacts && message.contacts.length) { + object.contacts = []; + for (var j = 0; j < message.contacts.length; ++j) + object.contacts[j] = $root.proto.Message.ContactMessage.toObject(message.contacts[j], options); + } + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) + object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); return object; }; /** - * Converts this Call to JSON. + * Converts this ContactsArrayMessage to JSON. * @function toJSON - * @memberof proto.Message.Call + * @memberof proto.Message.ContactsArrayMessage * @instance * @returns {Object.} JSON object */ - Call.prototype.toJSON = function toJSON() { + ContactsArrayMessage.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Call; + return ContactsArrayMessage; })(); - Message.CancelPaymentRequestMessage = (function() { + Message.DeclinePaymentRequestMessage = (function() { /** - * Properties of a CancelPaymentRequestMessage. + * Properties of a DeclinePaymentRequestMessage. * @memberof proto.Message - * @interface ICancelPaymentRequestMessage - * @property {proto.IMessageKey|null} [key] CancelPaymentRequestMessage key + * @interface IDeclinePaymentRequestMessage + * @property {proto.IMessageKey|null} [key] DeclinePaymentRequestMessage key */ /** - * Constructs a new CancelPaymentRequestMessage. + * Constructs a new DeclinePaymentRequestMessage. * @memberof proto.Message - * @classdesc Represents a CancelPaymentRequestMessage. - * @implements ICancelPaymentRequestMessage + * @classdesc Represents a DeclinePaymentRequestMessage. + * @implements IDeclinePaymentRequestMessage * @constructor - * @param {proto.Message.ICancelPaymentRequestMessage=} [properties] Properties to set + * @param {proto.Message.IDeclinePaymentRequestMessage=} [properties] Properties to set */ - function CancelPaymentRequestMessage(properties) { + function DeclinePaymentRequestMessage(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -27938,35 +35059,35 @@ $root.proto = (function() { } /** - * CancelPaymentRequestMessage key. + * DeclinePaymentRequestMessage key. * @member {proto.IMessageKey|null|undefined} key - * @memberof proto.Message.CancelPaymentRequestMessage + * @memberof proto.Message.DeclinePaymentRequestMessage * @instance */ - CancelPaymentRequestMessage.prototype.key = null; + DeclinePaymentRequestMessage.prototype.key = null; /** - * Creates a new CancelPaymentRequestMessage instance using the specified properties. + * Creates a new DeclinePaymentRequestMessage instance using the specified properties. * @function create - * @memberof proto.Message.CancelPaymentRequestMessage + * @memberof proto.Message.DeclinePaymentRequestMessage * @static - * @param {proto.Message.ICancelPaymentRequestMessage=} [properties] Properties to set - * @returns {proto.Message.CancelPaymentRequestMessage} CancelPaymentRequestMessage instance + * @param {proto.Message.IDeclinePaymentRequestMessage=} [properties] Properties to set + * @returns {proto.Message.DeclinePaymentRequestMessage} DeclinePaymentRequestMessage instance */ - CancelPaymentRequestMessage.create = function create(properties) { - return new CancelPaymentRequestMessage(properties); + DeclinePaymentRequestMessage.create = function create(properties) { + return new DeclinePaymentRequestMessage(properties); }; /** - * Encodes the specified CancelPaymentRequestMessage message. Does not implicitly {@link proto.Message.CancelPaymentRequestMessage.verify|verify} messages. + * Encodes the specified DeclinePaymentRequestMessage message. Does not implicitly {@link proto.Message.DeclinePaymentRequestMessage.verify|verify} messages. * @function encode - * @memberof proto.Message.CancelPaymentRequestMessage + * @memberof proto.Message.DeclinePaymentRequestMessage * @static - * @param {proto.Message.ICancelPaymentRequestMessage} message CancelPaymentRequestMessage message or plain object to encode + * @param {proto.Message.IDeclinePaymentRequestMessage} message DeclinePaymentRequestMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CancelPaymentRequestMessage.encode = function encode(message, writer) { + DeclinePaymentRequestMessage.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.key != null && Object.hasOwnProperty.call(message, "key")) @@ -27975,33 +35096,33 @@ $root.proto = (function() { }; /** - * Encodes the specified CancelPaymentRequestMessage message, length delimited. Does not implicitly {@link proto.Message.CancelPaymentRequestMessage.verify|verify} messages. + * Encodes the specified DeclinePaymentRequestMessage message, length delimited. Does not implicitly {@link proto.Message.DeclinePaymentRequestMessage.verify|verify} messages. * @function encodeDelimited - * @memberof proto.Message.CancelPaymentRequestMessage + * @memberof proto.Message.DeclinePaymentRequestMessage * @static - * @param {proto.Message.ICancelPaymentRequestMessage} message CancelPaymentRequestMessage message or plain object to encode + * @param {proto.Message.IDeclinePaymentRequestMessage} message DeclinePaymentRequestMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CancelPaymentRequestMessage.encodeDelimited = function encodeDelimited(message, writer) { + DeclinePaymentRequestMessage.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CancelPaymentRequestMessage message from the specified reader or buffer. + * Decodes a DeclinePaymentRequestMessage message from the specified reader or buffer. * @function decode - * @memberof proto.Message.CancelPaymentRequestMessage + * @memberof proto.Message.DeclinePaymentRequestMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {proto.Message.CancelPaymentRequestMessage} CancelPaymentRequestMessage + * @returns {proto.Message.DeclinePaymentRequestMessage} DeclinePaymentRequestMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CancelPaymentRequestMessage.decode = function decode(reader, length) { + DeclinePaymentRequestMessage.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Message.CancelPaymentRequestMessage(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Message.DeclinePaymentRequestMessage(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -28017,30 +35138,30 @@ $root.proto = (function() { }; /** - * Decodes a CancelPaymentRequestMessage message from the specified reader or buffer, length delimited. + * Decodes a DeclinePaymentRequestMessage message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof proto.Message.CancelPaymentRequestMessage + * @memberof proto.Message.DeclinePaymentRequestMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.Message.CancelPaymentRequestMessage} CancelPaymentRequestMessage + * @returns {proto.Message.DeclinePaymentRequestMessage} DeclinePaymentRequestMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CancelPaymentRequestMessage.decodeDelimited = function decodeDelimited(reader) { + DeclinePaymentRequestMessage.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CancelPaymentRequestMessage message. + * Verifies a DeclinePaymentRequestMessage message. * @function verify - * @memberof proto.Message.CancelPaymentRequestMessage + * @memberof proto.Message.DeclinePaymentRequestMessage * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CancelPaymentRequestMessage.verify = function verify(message) { + DeclinePaymentRequestMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.key != null && message.hasOwnProperty("key")) { @@ -28052,35 +35173,35 @@ $root.proto = (function() { }; /** - * Creates a CancelPaymentRequestMessage message from a plain object. Also converts values to their respective internal types. + * Creates a DeclinePaymentRequestMessage message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof proto.Message.CancelPaymentRequestMessage + * @memberof proto.Message.DeclinePaymentRequestMessage * @static * @param {Object.} object Plain object - * @returns {proto.Message.CancelPaymentRequestMessage} CancelPaymentRequestMessage + * @returns {proto.Message.DeclinePaymentRequestMessage} DeclinePaymentRequestMessage */ - CancelPaymentRequestMessage.fromObject = function fromObject(object) { - if (object instanceof $root.proto.Message.CancelPaymentRequestMessage) + DeclinePaymentRequestMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.DeclinePaymentRequestMessage) return object; - var message = new $root.proto.Message.CancelPaymentRequestMessage(); + var message = new $root.proto.Message.DeclinePaymentRequestMessage(); if (object.key != null) { if (typeof object.key !== "object") - throw TypeError(".proto.Message.CancelPaymentRequestMessage.key: object expected"); + throw TypeError(".proto.Message.DeclinePaymentRequestMessage.key: object expected"); message.key = $root.proto.MessageKey.fromObject(object.key); } return message; }; /** - * Creates a plain object from a CancelPaymentRequestMessage message. Also converts values to other types if specified. + * Creates a plain object from a DeclinePaymentRequestMessage message. Also converts values to other types if specified. * @function toObject - * @memberof proto.Message.CancelPaymentRequestMessage + * @memberof proto.Message.DeclinePaymentRequestMessage * @static - * @param {proto.Message.CancelPaymentRequestMessage} message CancelPaymentRequestMessage + * @param {proto.Message.DeclinePaymentRequestMessage} message DeclinePaymentRequestMessage * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CancelPaymentRequestMessage.toObject = function toObject(message, options) { + DeclinePaymentRequestMessage.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -28092,38 +35213,39 @@ $root.proto = (function() { }; /** - * Converts this CancelPaymentRequestMessage to JSON. + * Converts this DeclinePaymentRequestMessage to JSON. * @function toJSON - * @memberof proto.Message.CancelPaymentRequestMessage + * @memberof proto.Message.DeclinePaymentRequestMessage * @instance * @returns {Object.} JSON object */ - CancelPaymentRequestMessage.prototype.toJSON = function toJSON() { + DeclinePaymentRequestMessage.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CancelPaymentRequestMessage; + return DeclinePaymentRequestMessage; })(); - Message.Chat = (function() { + Message.DeviceSentMessage = (function() { /** - * Properties of a Chat. + * Properties of a DeviceSentMessage. * @memberof proto.Message - * @interface IChat - * @property {string|null} [displayName] Chat displayName - * @property {string|null} [id] Chat id + * @interface IDeviceSentMessage + * @property {string|null} [destinationJid] DeviceSentMessage destinationJid + * @property {proto.IMessage|null} [message] DeviceSentMessage message + * @property {string|null} [phash] DeviceSentMessage phash */ /** - * Constructs a new Chat. + * Constructs a new DeviceSentMessage. * @memberof proto.Message - * @classdesc Represents a Chat. - * @implements IChat + * @classdesc Represents a DeviceSentMessage. + * @implements IDeviceSentMessage * @constructor - * @param {proto.Message.IChat=} [properties] Properties to set + * @param {proto.Message.IDeviceSentMessage=} [properties] Properties to set */ - function Chat(properties) { + function DeviceSentMessage(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -28131,88 +35253,101 @@ $root.proto = (function() { } /** - * Chat displayName. - * @member {string} displayName - * @memberof proto.Message.Chat + * DeviceSentMessage destinationJid. + * @member {string} destinationJid + * @memberof proto.Message.DeviceSentMessage * @instance */ - Chat.prototype.displayName = ""; + DeviceSentMessage.prototype.destinationJid = ""; /** - * Chat id. - * @member {string} id - * @memberof proto.Message.Chat + * DeviceSentMessage message. + * @member {proto.IMessage|null|undefined} message + * @memberof proto.Message.DeviceSentMessage * @instance */ - Chat.prototype.id = ""; + DeviceSentMessage.prototype.message = null; /** - * Creates a new Chat instance using the specified properties. + * DeviceSentMessage phash. + * @member {string} phash + * @memberof proto.Message.DeviceSentMessage + * @instance + */ + DeviceSentMessage.prototype.phash = ""; + + /** + * Creates a new DeviceSentMessage instance using the specified properties. * @function create - * @memberof proto.Message.Chat + * @memberof proto.Message.DeviceSentMessage * @static - * @param {proto.Message.IChat=} [properties] Properties to set - * @returns {proto.Message.Chat} Chat instance + * @param {proto.Message.IDeviceSentMessage=} [properties] Properties to set + * @returns {proto.Message.DeviceSentMessage} DeviceSentMessage instance */ - Chat.create = function create(properties) { - return new Chat(properties); + DeviceSentMessage.create = function create(properties) { + return new DeviceSentMessage(properties); }; /** - * Encodes the specified Chat message. Does not implicitly {@link proto.Message.Chat.verify|verify} messages. + * Encodes the specified DeviceSentMessage message. Does not implicitly {@link proto.Message.DeviceSentMessage.verify|verify} messages. * @function encode - * @memberof proto.Message.Chat + * @memberof proto.Message.DeviceSentMessage * @static - * @param {proto.Message.IChat} message Chat message or plain object to encode + * @param {proto.Message.IDeviceSentMessage} message DeviceSentMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Chat.encode = function encode(message, writer) { + DeviceSentMessage.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.id); + if (message.destinationJid != null && Object.hasOwnProperty.call(message, "destinationJid")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.destinationJid); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + $root.proto.Message.encode(message.message, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.phash != null && Object.hasOwnProperty.call(message, "phash")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.phash); return writer; }; /** - * Encodes the specified Chat message, length delimited. Does not implicitly {@link proto.Message.Chat.verify|verify} messages. + * Encodes the specified DeviceSentMessage message, length delimited. Does not implicitly {@link proto.Message.DeviceSentMessage.verify|verify} messages. * @function encodeDelimited - * @memberof proto.Message.Chat + * @memberof proto.Message.DeviceSentMessage * @static - * @param {proto.Message.IChat} message Chat message or plain object to encode + * @param {proto.Message.IDeviceSentMessage} message DeviceSentMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Chat.encodeDelimited = function encodeDelimited(message, writer) { + DeviceSentMessage.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Chat message from the specified reader or buffer. + * Decodes a DeviceSentMessage message from the specified reader or buffer. * @function decode - * @memberof proto.Message.Chat + * @memberof proto.Message.DeviceSentMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {proto.Message.Chat} Chat + * @returns {proto.Message.DeviceSentMessage} DeviceSentMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Chat.decode = function decode(reader, length) { + DeviceSentMessage.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Message.Chat(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Message.DeviceSentMessage(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.displayName = reader.string(); + message.destinationJid = reader.string(); break; case 2: - message.id = reader.string(); + message.message = $root.proto.Message.decode(reader, reader.uint32()); + break; + case 3: + message.phash = reader.string(); break; default: reader.skipType(tag & 7); @@ -28223,118 +35358,148 @@ $root.proto = (function() { }; /** - * Decodes a Chat message from the specified reader or buffer, length delimited. + * Decodes a DeviceSentMessage message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof proto.Message.Chat + * @memberof proto.Message.DeviceSentMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.Message.Chat} Chat + * @returns {proto.Message.DeviceSentMessage} DeviceSentMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Chat.decodeDelimited = function decodeDelimited(reader) { + DeviceSentMessage.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Chat message. + * Verifies a DeviceSentMessage message. * @function verify - * @memberof proto.Message.Chat + * @memberof proto.Message.DeviceSentMessage * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Chat.verify = function verify(message) { + DeviceSentMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; + if (message.destinationJid != null && message.hasOwnProperty("destinationJid")) + if (!$util.isString(message.destinationJid)) + return "destinationJid: string expected"; + if (message.message != null && message.hasOwnProperty("message")) { + var error = $root.proto.Message.verify(message.message); + if (error) + return "message." + error; + } + if (message.phash != null && message.hasOwnProperty("phash")) + if (!$util.isString(message.phash)) + return "phash: string expected"; return null; }; /** - * Creates a Chat message from a plain object. Also converts values to their respective internal types. + * Creates a DeviceSentMessage message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof proto.Message.Chat + * @memberof proto.Message.DeviceSentMessage * @static * @param {Object.} object Plain object - * @returns {proto.Message.Chat} Chat + * @returns {proto.Message.DeviceSentMessage} DeviceSentMessage */ - Chat.fromObject = function fromObject(object) { - if (object instanceof $root.proto.Message.Chat) + DeviceSentMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.DeviceSentMessage) return object; - var message = new $root.proto.Message.Chat(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.id != null) - message.id = String(object.id); + var message = new $root.proto.Message.DeviceSentMessage(); + if (object.destinationJid != null) + message.destinationJid = String(object.destinationJid); + if (object.message != null) { + if (typeof object.message !== "object") + throw TypeError(".proto.Message.DeviceSentMessage.message: object expected"); + message.message = $root.proto.Message.fromObject(object.message); + } + if (object.phash != null) + message.phash = String(object.phash); return message; }; /** - * Creates a plain object from a Chat message. Also converts values to other types if specified. + * Creates a plain object from a DeviceSentMessage message. Also converts values to other types if specified. * @function toObject - * @memberof proto.Message.Chat + * @memberof proto.Message.DeviceSentMessage * @static - * @param {proto.Message.Chat} message Chat + * @param {proto.Message.DeviceSentMessage} message DeviceSentMessage * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Chat.toObject = function toObject(message, options) { + DeviceSentMessage.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.displayName = ""; - object.id = ""; + object.destinationJid = ""; + object.message = null; + object.phash = ""; } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; + if (message.destinationJid != null && message.hasOwnProperty("destinationJid")) + object.destinationJid = message.destinationJid; + if (message.message != null && message.hasOwnProperty("message")) + object.message = $root.proto.Message.toObject(message.message, options); + if (message.phash != null && message.hasOwnProperty("phash")) + object.phash = message.phash; return object; }; /** - * Converts this Chat to JSON. + * Converts this DeviceSentMessage to JSON. * @function toJSON - * @memberof proto.Message.Chat + * @memberof proto.Message.DeviceSentMessage * @instance * @returns {Object.} JSON object */ - Chat.prototype.toJSON = function toJSON() { + DeviceSentMessage.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Chat; + return DeviceSentMessage; })(); - Message.ContactMessage = (function() { + Message.DocumentMessage = (function() { /** - * Properties of a ContactMessage. + * Properties of a DocumentMessage. * @memberof proto.Message - * @interface IContactMessage - * @property {string|null} [displayName] ContactMessage displayName - * @property {string|null} [vcard] ContactMessage vcard - * @property {proto.IContextInfo|null} [contextInfo] ContactMessage contextInfo + * @interface IDocumentMessage + * @property {string|null} [url] DocumentMessage url + * @property {string|null} [mimetype] DocumentMessage mimetype + * @property {string|null} [title] DocumentMessage title + * @property {Uint8Array|null} [fileSha256] DocumentMessage fileSha256 + * @property {number|Long|null} [fileLength] DocumentMessage fileLength + * @property {number|null} [pageCount] DocumentMessage pageCount + * @property {Uint8Array|null} [mediaKey] DocumentMessage mediaKey + * @property {string|null} [fileName] DocumentMessage fileName + * @property {Uint8Array|null} [fileEncSha256] DocumentMessage fileEncSha256 + * @property {string|null} [directPath] DocumentMessage directPath + * @property {number|Long|null} [mediaKeyTimestamp] DocumentMessage mediaKeyTimestamp + * @property {boolean|null} [contactVcard] DocumentMessage contactVcard + * @property {string|null} [thumbnailDirectPath] DocumentMessage thumbnailDirectPath + * @property {Uint8Array|null} [thumbnailSha256] DocumentMessage thumbnailSha256 + * @property {Uint8Array|null} [thumbnailEncSha256] DocumentMessage thumbnailEncSha256 + * @property {Uint8Array|null} [jpegThumbnail] DocumentMessage jpegThumbnail + * @property {proto.IContextInfo|null} [contextInfo] DocumentMessage contextInfo + * @property {number|null} [thumbnailHeight] DocumentMessage thumbnailHeight + * @property {number|null} [thumbnailWidth] DocumentMessage thumbnailWidth + * @property {string|null} [caption] DocumentMessage caption */ /** - * Constructs a new ContactMessage. + * Constructs a new DocumentMessage. * @memberof proto.Message - * @classdesc Represents a ContactMessage. - * @implements IContactMessage + * @classdesc Represents a DocumentMessage. + * @implements IDocumentMessage * @constructor - * @param {proto.Message.IContactMessage=} [properties] Properties to set + * @param {proto.Message.IDocumentMessage=} [properties] Properties to set */ - function ContactMessage(properties) { + function DocumentMessage(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -28342,102 +35507,323 @@ $root.proto = (function() { } /** - * ContactMessage displayName. - * @member {string} displayName - * @memberof proto.Message.ContactMessage + * DocumentMessage url. + * @member {string} url + * @memberof proto.Message.DocumentMessage * @instance */ - ContactMessage.prototype.displayName = ""; + DocumentMessage.prototype.url = ""; /** - * ContactMessage vcard. - * @member {string} vcard - * @memberof proto.Message.ContactMessage + * DocumentMessage mimetype. + * @member {string} mimetype + * @memberof proto.Message.DocumentMessage + * @instance + */ + DocumentMessage.prototype.mimetype = ""; + + /** + * DocumentMessage title. + * @member {string} title + * @memberof proto.Message.DocumentMessage + * @instance + */ + DocumentMessage.prototype.title = ""; + + /** + * DocumentMessage fileSha256. + * @member {Uint8Array} fileSha256 + * @memberof proto.Message.DocumentMessage + * @instance + */ + DocumentMessage.prototype.fileSha256 = $util.newBuffer([]); + + /** + * DocumentMessage fileLength. + * @member {number|Long} fileLength + * @memberof proto.Message.DocumentMessage + * @instance + */ + DocumentMessage.prototype.fileLength = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * DocumentMessage pageCount. + * @member {number} pageCount + * @memberof proto.Message.DocumentMessage + * @instance + */ + DocumentMessage.prototype.pageCount = 0; + + /** + * DocumentMessage mediaKey. + * @member {Uint8Array} mediaKey + * @memberof proto.Message.DocumentMessage + * @instance + */ + DocumentMessage.prototype.mediaKey = $util.newBuffer([]); + + /** + * DocumentMessage fileName. + * @member {string} fileName + * @memberof proto.Message.DocumentMessage + * @instance + */ + DocumentMessage.prototype.fileName = ""; + + /** + * DocumentMessage fileEncSha256. + * @member {Uint8Array} fileEncSha256 + * @memberof proto.Message.DocumentMessage + * @instance + */ + DocumentMessage.prototype.fileEncSha256 = $util.newBuffer([]); + + /** + * DocumentMessage directPath. + * @member {string} directPath + * @memberof proto.Message.DocumentMessage + * @instance + */ + DocumentMessage.prototype.directPath = ""; + + /** + * DocumentMessage mediaKeyTimestamp. + * @member {number|Long} mediaKeyTimestamp + * @memberof proto.Message.DocumentMessage + * @instance + */ + DocumentMessage.prototype.mediaKeyTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * DocumentMessage contactVcard. + * @member {boolean} contactVcard + * @memberof proto.Message.DocumentMessage + * @instance + */ + DocumentMessage.prototype.contactVcard = false; + + /** + * DocumentMessage thumbnailDirectPath. + * @member {string} thumbnailDirectPath + * @memberof proto.Message.DocumentMessage + * @instance + */ + DocumentMessage.prototype.thumbnailDirectPath = ""; + + /** + * DocumentMessage thumbnailSha256. + * @member {Uint8Array} thumbnailSha256 + * @memberof proto.Message.DocumentMessage + * @instance + */ + DocumentMessage.prototype.thumbnailSha256 = $util.newBuffer([]); + + /** + * DocumentMessage thumbnailEncSha256. + * @member {Uint8Array} thumbnailEncSha256 + * @memberof proto.Message.DocumentMessage + * @instance + */ + DocumentMessage.prototype.thumbnailEncSha256 = $util.newBuffer([]); + + /** + * DocumentMessage jpegThumbnail. + * @member {Uint8Array} jpegThumbnail + * @memberof proto.Message.DocumentMessage + * @instance + */ + DocumentMessage.prototype.jpegThumbnail = $util.newBuffer([]); + + /** + * DocumentMessage contextInfo. + * @member {proto.IContextInfo|null|undefined} contextInfo + * @memberof proto.Message.DocumentMessage + * @instance + */ + DocumentMessage.prototype.contextInfo = null; + + /** + * DocumentMessage thumbnailHeight. + * @member {number} thumbnailHeight + * @memberof proto.Message.DocumentMessage + * @instance + */ + DocumentMessage.prototype.thumbnailHeight = 0; + + /** + * DocumentMessage thumbnailWidth. + * @member {number} thumbnailWidth + * @memberof proto.Message.DocumentMessage * @instance */ - ContactMessage.prototype.vcard = ""; + DocumentMessage.prototype.thumbnailWidth = 0; /** - * ContactMessage contextInfo. - * @member {proto.IContextInfo|null|undefined} contextInfo - * @memberof proto.Message.ContactMessage + * DocumentMessage caption. + * @member {string} caption + * @memberof proto.Message.DocumentMessage * @instance */ - ContactMessage.prototype.contextInfo = null; + DocumentMessage.prototype.caption = ""; /** - * Creates a new ContactMessage instance using the specified properties. + * Creates a new DocumentMessage instance using the specified properties. * @function create - * @memberof proto.Message.ContactMessage + * @memberof proto.Message.DocumentMessage * @static - * @param {proto.Message.IContactMessage=} [properties] Properties to set - * @returns {proto.Message.ContactMessage} ContactMessage instance + * @param {proto.Message.IDocumentMessage=} [properties] Properties to set + * @returns {proto.Message.DocumentMessage} DocumentMessage instance */ - ContactMessage.create = function create(properties) { - return new ContactMessage(properties); + DocumentMessage.create = function create(properties) { + return new DocumentMessage(properties); }; /** - * Encodes the specified ContactMessage message. Does not implicitly {@link proto.Message.ContactMessage.verify|verify} messages. + * Encodes the specified DocumentMessage message. Does not implicitly {@link proto.Message.DocumentMessage.verify|verify} messages. * @function encode - * @memberof proto.Message.ContactMessage + * @memberof proto.Message.DocumentMessage * @static - * @param {proto.Message.IContactMessage} message ContactMessage message or plain object to encode + * @param {proto.Message.IDocumentMessage} message DocumentMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ContactMessage.encode = function encode(message, writer) { + DocumentMessage.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.vcard != null && Object.hasOwnProperty.call(message, "vcard")) - writer.uint32(/* id 16, wireType 2 =*/130).string(message.vcard); + if (message.url != null && Object.hasOwnProperty.call(message, "url")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.url); + if (message.mimetype != null && Object.hasOwnProperty.call(message, "mimetype")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.mimetype); + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.title); + if (message.fileSha256 != null && Object.hasOwnProperty.call(message, "fileSha256")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.fileSha256); + if (message.fileLength != null && Object.hasOwnProperty.call(message, "fileLength")) + writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.fileLength); + if (message.pageCount != null && Object.hasOwnProperty.call(message, "pageCount")) + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.pageCount); + if (message.mediaKey != null && Object.hasOwnProperty.call(message, "mediaKey")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.mediaKey); + if (message.fileName != null && Object.hasOwnProperty.call(message, "fileName")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.fileName); + if (message.fileEncSha256 != null && Object.hasOwnProperty.call(message, "fileEncSha256")) + writer.uint32(/* id 9, wireType 2 =*/74).bytes(message.fileEncSha256); + if (message.directPath != null && Object.hasOwnProperty.call(message, "directPath")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.directPath); + if (message.mediaKeyTimestamp != null && Object.hasOwnProperty.call(message, "mediaKeyTimestamp")) + writer.uint32(/* id 11, wireType 0 =*/88).int64(message.mediaKeyTimestamp); + if (message.contactVcard != null && Object.hasOwnProperty.call(message, "contactVcard")) + writer.uint32(/* id 12, wireType 0 =*/96).bool(message.contactVcard); + if (message.thumbnailDirectPath != null && Object.hasOwnProperty.call(message, "thumbnailDirectPath")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.thumbnailDirectPath); + if (message.thumbnailSha256 != null && Object.hasOwnProperty.call(message, "thumbnailSha256")) + writer.uint32(/* id 14, wireType 2 =*/114).bytes(message.thumbnailSha256); + if (message.thumbnailEncSha256 != null && Object.hasOwnProperty.call(message, "thumbnailEncSha256")) + writer.uint32(/* id 15, wireType 2 =*/122).bytes(message.thumbnailEncSha256); + if (message.jpegThumbnail != null && Object.hasOwnProperty.call(message, "jpegThumbnail")) + writer.uint32(/* id 16, wireType 2 =*/130).bytes(message.jpegThumbnail); if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo")) $root.proto.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.thumbnailHeight != null && Object.hasOwnProperty.call(message, "thumbnailHeight")) + writer.uint32(/* id 18, wireType 0 =*/144).uint32(message.thumbnailHeight); + if (message.thumbnailWidth != null && Object.hasOwnProperty.call(message, "thumbnailWidth")) + writer.uint32(/* id 19, wireType 0 =*/152).uint32(message.thumbnailWidth); + if (message.caption != null && Object.hasOwnProperty.call(message, "caption")) + writer.uint32(/* id 20, wireType 2 =*/162).string(message.caption); return writer; }; /** - * Encodes the specified ContactMessage message, length delimited. Does not implicitly {@link proto.Message.ContactMessage.verify|verify} messages. + * Encodes the specified DocumentMessage message, length delimited. Does not implicitly {@link proto.Message.DocumentMessage.verify|verify} messages. * @function encodeDelimited - * @memberof proto.Message.ContactMessage + * @memberof proto.Message.DocumentMessage * @static - * @param {proto.Message.IContactMessage} message ContactMessage message or plain object to encode + * @param {proto.Message.IDocumentMessage} message DocumentMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ContactMessage.encodeDelimited = function encodeDelimited(message, writer) { + DocumentMessage.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ContactMessage message from the specified reader or buffer. + * Decodes a DocumentMessage message from the specified reader or buffer. * @function decode - * @memberof proto.Message.ContactMessage + * @memberof proto.Message.DocumentMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {proto.Message.ContactMessage} ContactMessage + * @returns {proto.Message.DocumentMessage} DocumentMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ContactMessage.decode = function decode(reader, length) { + DocumentMessage.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Message.ContactMessage(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Message.DocumentMessage(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.displayName = reader.string(); + message.url = reader.string(); + break; + case 2: + message.mimetype = reader.string(); + break; + case 3: + message.title = reader.string(); + break; + case 4: + message.fileSha256 = reader.bytes(); + break; + case 5: + message.fileLength = reader.uint64(); + break; + case 6: + message.pageCount = reader.uint32(); + break; + case 7: + message.mediaKey = reader.bytes(); + break; + case 8: + message.fileName = reader.string(); + break; + case 9: + message.fileEncSha256 = reader.bytes(); + break; + case 10: + message.directPath = reader.string(); + break; + case 11: + message.mediaKeyTimestamp = reader.int64(); + break; + case 12: + message.contactVcard = reader.bool(); + break; + case 13: + message.thumbnailDirectPath = reader.string(); + break; + case 14: + message.thumbnailSha256 = reader.bytes(); + break; + case 15: + message.thumbnailEncSha256 = reader.bytes(); break; case 16: - message.vcard = reader.string(); + message.jpegThumbnail = reader.bytes(); break; case 17: message.contextInfo = $root.proto.ContextInfo.decode(reader, reader.uint32()); break; + case 18: + message.thumbnailHeight = reader.uint32(); + break; + case 19: + message.thumbnailWidth = reader.uint32(); + break; + case 20: + message.caption = reader.string(); + break; default: reader.skipType(tag & 7); break; @@ -28447,132 +35833,349 @@ $root.proto = (function() { }; /** - * Decodes a ContactMessage message from the specified reader or buffer, length delimited. + * Decodes a DocumentMessage message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof proto.Message.ContactMessage + * @memberof proto.Message.DocumentMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.Message.ContactMessage} ContactMessage + * @returns {proto.Message.DocumentMessage} DocumentMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ContactMessage.decodeDelimited = function decodeDelimited(reader) { + DocumentMessage.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ContactMessage message. + * Verifies a DocumentMessage message. * @function verify - * @memberof proto.Message.ContactMessage + * @memberof proto.Message.DocumentMessage * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ContactMessage.verify = function verify(message) { + DocumentMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.vcard != null && message.hasOwnProperty("vcard")) - if (!$util.isString(message.vcard)) - return "vcard: string expected"; + if (message.url != null && message.hasOwnProperty("url")) + if (!$util.isString(message.url)) + return "url: string expected"; + if (message.mimetype != null && message.hasOwnProperty("mimetype")) + if (!$util.isString(message.mimetype)) + return "mimetype: string expected"; + if (message.title != null && message.hasOwnProperty("title")) + if (!$util.isString(message.title)) + return "title: string expected"; + if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) + if (!(message.fileSha256 && typeof message.fileSha256.length === "number" || $util.isString(message.fileSha256))) + return "fileSha256: buffer expected"; + if (message.fileLength != null && message.hasOwnProperty("fileLength")) + if (!$util.isInteger(message.fileLength) && !(message.fileLength && $util.isInteger(message.fileLength.low) && $util.isInteger(message.fileLength.high))) + return "fileLength: integer|Long expected"; + if (message.pageCount != null && message.hasOwnProperty("pageCount")) + if (!$util.isInteger(message.pageCount)) + return "pageCount: integer expected"; + if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) + if (!(message.mediaKey && typeof message.mediaKey.length === "number" || $util.isString(message.mediaKey))) + return "mediaKey: buffer expected"; + if (message.fileName != null && message.hasOwnProperty("fileName")) + if (!$util.isString(message.fileName)) + return "fileName: string expected"; + if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) + if (!(message.fileEncSha256 && typeof message.fileEncSha256.length === "number" || $util.isString(message.fileEncSha256))) + return "fileEncSha256: buffer expected"; + if (message.directPath != null && message.hasOwnProperty("directPath")) + if (!$util.isString(message.directPath)) + return "directPath: string expected"; + if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp")) + if (!$util.isInteger(message.mediaKeyTimestamp) && !(message.mediaKeyTimestamp && $util.isInteger(message.mediaKeyTimestamp.low) && $util.isInteger(message.mediaKeyTimestamp.high))) + return "mediaKeyTimestamp: integer|Long expected"; + if (message.contactVcard != null && message.hasOwnProperty("contactVcard")) + if (typeof message.contactVcard !== "boolean") + return "contactVcard: boolean expected"; + if (message.thumbnailDirectPath != null && message.hasOwnProperty("thumbnailDirectPath")) + if (!$util.isString(message.thumbnailDirectPath)) + return "thumbnailDirectPath: string expected"; + if (message.thumbnailSha256 != null && message.hasOwnProperty("thumbnailSha256")) + if (!(message.thumbnailSha256 && typeof message.thumbnailSha256.length === "number" || $util.isString(message.thumbnailSha256))) + return "thumbnailSha256: buffer expected"; + if (message.thumbnailEncSha256 != null && message.hasOwnProperty("thumbnailEncSha256")) + if (!(message.thumbnailEncSha256 && typeof message.thumbnailEncSha256.length === "number" || $util.isString(message.thumbnailEncSha256))) + return "thumbnailEncSha256: buffer expected"; + if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail")) + if (!(message.jpegThumbnail && typeof message.jpegThumbnail.length === "number" || $util.isString(message.jpegThumbnail))) + return "jpegThumbnail: buffer expected"; if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { var error = $root.proto.ContextInfo.verify(message.contextInfo); if (error) return "contextInfo." + error; } + if (message.thumbnailHeight != null && message.hasOwnProperty("thumbnailHeight")) + if (!$util.isInteger(message.thumbnailHeight)) + return "thumbnailHeight: integer expected"; + if (message.thumbnailWidth != null && message.hasOwnProperty("thumbnailWidth")) + if (!$util.isInteger(message.thumbnailWidth)) + return "thumbnailWidth: integer expected"; + if (message.caption != null && message.hasOwnProperty("caption")) + if (!$util.isString(message.caption)) + return "caption: string expected"; return null; }; /** - * Creates a ContactMessage message from a plain object. Also converts values to their respective internal types. + * Creates a DocumentMessage message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof proto.Message.ContactMessage + * @memberof proto.Message.DocumentMessage * @static * @param {Object.} object Plain object - * @returns {proto.Message.ContactMessage} ContactMessage + * @returns {proto.Message.DocumentMessage} DocumentMessage */ - ContactMessage.fromObject = function fromObject(object) { - if (object instanceof $root.proto.Message.ContactMessage) + DocumentMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.DocumentMessage) return object; - var message = new $root.proto.Message.ContactMessage(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.vcard != null) - message.vcard = String(object.vcard); + var message = new $root.proto.Message.DocumentMessage(); + if (object.url != null) + message.url = String(object.url); + if (object.mimetype != null) + message.mimetype = String(object.mimetype); + if (object.title != null) + message.title = String(object.title); + if (object.fileSha256 != null) + if (typeof object.fileSha256 === "string") + $util.base64.decode(object.fileSha256, message.fileSha256 = $util.newBuffer($util.base64.length(object.fileSha256)), 0); + else if (object.fileSha256.length) + message.fileSha256 = object.fileSha256; + if (object.fileLength != null) + if ($util.Long) + (message.fileLength = $util.Long.fromValue(object.fileLength)).unsigned = true; + else if (typeof object.fileLength === "string") + message.fileLength = parseInt(object.fileLength, 10); + else if (typeof object.fileLength === "number") + message.fileLength = object.fileLength; + else if (typeof object.fileLength === "object") + message.fileLength = new $util.LongBits(object.fileLength.low >>> 0, object.fileLength.high >>> 0).toNumber(true); + if (object.pageCount != null) + message.pageCount = object.pageCount >>> 0; + if (object.mediaKey != null) + if (typeof object.mediaKey === "string") + $util.base64.decode(object.mediaKey, message.mediaKey = $util.newBuffer($util.base64.length(object.mediaKey)), 0); + else if (object.mediaKey.length) + message.mediaKey = object.mediaKey; + if (object.fileName != null) + message.fileName = String(object.fileName); + if (object.fileEncSha256 != null) + if (typeof object.fileEncSha256 === "string") + $util.base64.decode(object.fileEncSha256, message.fileEncSha256 = $util.newBuffer($util.base64.length(object.fileEncSha256)), 0); + else if (object.fileEncSha256.length) + message.fileEncSha256 = object.fileEncSha256; + if (object.directPath != null) + message.directPath = String(object.directPath); + if (object.mediaKeyTimestamp != null) + if ($util.Long) + (message.mediaKeyTimestamp = $util.Long.fromValue(object.mediaKeyTimestamp)).unsigned = false; + else if (typeof object.mediaKeyTimestamp === "string") + message.mediaKeyTimestamp = parseInt(object.mediaKeyTimestamp, 10); + else if (typeof object.mediaKeyTimestamp === "number") + message.mediaKeyTimestamp = object.mediaKeyTimestamp; + else if (typeof object.mediaKeyTimestamp === "object") + message.mediaKeyTimestamp = new $util.LongBits(object.mediaKeyTimestamp.low >>> 0, object.mediaKeyTimestamp.high >>> 0).toNumber(); + if (object.contactVcard != null) + message.contactVcard = Boolean(object.contactVcard); + if (object.thumbnailDirectPath != null) + message.thumbnailDirectPath = String(object.thumbnailDirectPath); + if (object.thumbnailSha256 != null) + if (typeof object.thumbnailSha256 === "string") + $util.base64.decode(object.thumbnailSha256, message.thumbnailSha256 = $util.newBuffer($util.base64.length(object.thumbnailSha256)), 0); + else if (object.thumbnailSha256.length) + message.thumbnailSha256 = object.thumbnailSha256; + if (object.thumbnailEncSha256 != null) + if (typeof object.thumbnailEncSha256 === "string") + $util.base64.decode(object.thumbnailEncSha256, message.thumbnailEncSha256 = $util.newBuffer($util.base64.length(object.thumbnailEncSha256)), 0); + else if (object.thumbnailEncSha256.length) + message.thumbnailEncSha256 = object.thumbnailEncSha256; + if (object.jpegThumbnail != null) + if (typeof object.jpegThumbnail === "string") + $util.base64.decode(object.jpegThumbnail, message.jpegThumbnail = $util.newBuffer($util.base64.length(object.jpegThumbnail)), 0); + else if (object.jpegThumbnail.length) + message.jpegThumbnail = object.jpegThumbnail; if (object.contextInfo != null) { if (typeof object.contextInfo !== "object") - throw TypeError(".proto.Message.ContactMessage.contextInfo: object expected"); + throw TypeError(".proto.Message.DocumentMessage.contextInfo: object expected"); message.contextInfo = $root.proto.ContextInfo.fromObject(object.contextInfo); } + if (object.thumbnailHeight != null) + message.thumbnailHeight = object.thumbnailHeight >>> 0; + if (object.thumbnailWidth != null) + message.thumbnailWidth = object.thumbnailWidth >>> 0; + if (object.caption != null) + message.caption = String(object.caption); return message; }; /** - * Creates a plain object from a ContactMessage message. Also converts values to other types if specified. + * Creates a plain object from a DocumentMessage message. Also converts values to other types if specified. * @function toObject - * @memberof proto.Message.ContactMessage + * @memberof proto.Message.DocumentMessage * @static - * @param {proto.Message.ContactMessage} message ContactMessage + * @param {proto.Message.DocumentMessage} message DocumentMessage * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ContactMessage.toObject = function toObject(message, options) { + DocumentMessage.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.displayName = ""; - object.vcard = ""; + object.url = ""; + object.mimetype = ""; + object.title = ""; + if (options.bytes === String) + object.fileSha256 = ""; + else { + object.fileSha256 = []; + if (options.bytes !== Array) + object.fileSha256 = $util.newBuffer(object.fileSha256); + } + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.fileLength = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.fileLength = options.longs === String ? "0" : 0; + object.pageCount = 0; + if (options.bytes === String) + object.mediaKey = ""; + else { + object.mediaKey = []; + if (options.bytes !== Array) + object.mediaKey = $util.newBuffer(object.mediaKey); + } + object.fileName = ""; + if (options.bytes === String) + object.fileEncSha256 = ""; + else { + object.fileEncSha256 = []; + if (options.bytes !== Array) + object.fileEncSha256 = $util.newBuffer(object.fileEncSha256); + } + object.directPath = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.mediaKeyTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.mediaKeyTimestamp = options.longs === String ? "0" : 0; + object.contactVcard = false; + object.thumbnailDirectPath = ""; + if (options.bytes === String) + object.thumbnailSha256 = ""; + else { + object.thumbnailSha256 = []; + if (options.bytes !== Array) + object.thumbnailSha256 = $util.newBuffer(object.thumbnailSha256); + } + if (options.bytes === String) + object.thumbnailEncSha256 = ""; + else { + object.thumbnailEncSha256 = []; + if (options.bytes !== Array) + object.thumbnailEncSha256 = $util.newBuffer(object.thumbnailEncSha256); + } + if (options.bytes === String) + object.jpegThumbnail = ""; + else { + object.jpegThumbnail = []; + if (options.bytes !== Array) + object.jpegThumbnail = $util.newBuffer(object.jpegThumbnail); + } object.contextInfo = null; + object.thumbnailHeight = 0; + object.thumbnailWidth = 0; + object.caption = ""; } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.vcard != null && message.hasOwnProperty("vcard")) - object.vcard = message.vcard; + if (message.url != null && message.hasOwnProperty("url")) + object.url = message.url; + if (message.mimetype != null && message.hasOwnProperty("mimetype")) + object.mimetype = message.mimetype; + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) + object.fileSha256 = options.bytes === String ? $util.base64.encode(message.fileSha256, 0, message.fileSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.fileSha256) : message.fileSha256; + if (message.fileLength != null && message.hasOwnProperty("fileLength")) + if (typeof message.fileLength === "number") + object.fileLength = options.longs === String ? String(message.fileLength) : message.fileLength; + else + object.fileLength = options.longs === String ? $util.Long.prototype.toString.call(message.fileLength) : options.longs === Number ? new $util.LongBits(message.fileLength.low >>> 0, message.fileLength.high >>> 0).toNumber(true) : message.fileLength; + if (message.pageCount != null && message.hasOwnProperty("pageCount")) + object.pageCount = message.pageCount; + if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) + object.mediaKey = options.bytes === String ? $util.base64.encode(message.mediaKey, 0, message.mediaKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.mediaKey) : message.mediaKey; + if (message.fileName != null && message.hasOwnProperty("fileName")) + object.fileName = message.fileName; + if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) + object.fileEncSha256 = options.bytes === String ? $util.base64.encode(message.fileEncSha256, 0, message.fileEncSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.fileEncSha256) : message.fileEncSha256; + if (message.directPath != null && message.hasOwnProperty("directPath")) + object.directPath = message.directPath; + if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp")) + if (typeof message.mediaKeyTimestamp === "number") + object.mediaKeyTimestamp = options.longs === String ? String(message.mediaKeyTimestamp) : message.mediaKeyTimestamp; + else + object.mediaKeyTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.mediaKeyTimestamp) : options.longs === Number ? new $util.LongBits(message.mediaKeyTimestamp.low >>> 0, message.mediaKeyTimestamp.high >>> 0).toNumber() : message.mediaKeyTimestamp; + if (message.contactVcard != null && message.hasOwnProperty("contactVcard")) + object.contactVcard = message.contactVcard; + if (message.thumbnailDirectPath != null && message.hasOwnProperty("thumbnailDirectPath")) + object.thumbnailDirectPath = message.thumbnailDirectPath; + if (message.thumbnailSha256 != null && message.hasOwnProperty("thumbnailSha256")) + object.thumbnailSha256 = options.bytes === String ? $util.base64.encode(message.thumbnailSha256, 0, message.thumbnailSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.thumbnailSha256) : message.thumbnailSha256; + if (message.thumbnailEncSha256 != null && message.hasOwnProperty("thumbnailEncSha256")) + object.thumbnailEncSha256 = options.bytes === String ? $util.base64.encode(message.thumbnailEncSha256, 0, message.thumbnailEncSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.thumbnailEncSha256) : message.thumbnailEncSha256; + if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail")) + object.jpegThumbnail = options.bytes === String ? $util.base64.encode(message.jpegThumbnail, 0, message.jpegThumbnail.length) : options.bytes === Array ? Array.prototype.slice.call(message.jpegThumbnail) : message.jpegThumbnail; if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); + if (message.thumbnailHeight != null && message.hasOwnProperty("thumbnailHeight")) + object.thumbnailHeight = message.thumbnailHeight; + if (message.thumbnailWidth != null && message.hasOwnProperty("thumbnailWidth")) + object.thumbnailWidth = message.thumbnailWidth; + if (message.caption != null && message.hasOwnProperty("caption")) + object.caption = message.caption; return object; }; /** - * Converts this ContactMessage to JSON. + * Converts this DocumentMessage to JSON. * @function toJSON - * @memberof proto.Message.ContactMessage + * @memberof proto.Message.DocumentMessage * @instance * @returns {Object.} JSON object */ - ContactMessage.prototype.toJSON = function toJSON() { + DocumentMessage.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ContactMessage; + return DocumentMessage; })(); - Message.ContactsArrayMessage = (function() { + Message.EncCommentMessage = (function() { /** - * Properties of a ContactsArrayMessage. + * Properties of an EncCommentMessage. * @memberof proto.Message - * @interface IContactsArrayMessage - * @property {string|null} [displayName] ContactsArrayMessage displayName - * @property {Array.|null} [contacts] ContactsArrayMessage contacts - * @property {proto.IContextInfo|null} [contextInfo] ContactsArrayMessage contextInfo + * @interface IEncCommentMessage + * @property {proto.IMessageKey|null} [targetMessageKey] EncCommentMessage targetMessageKey + * @property {Uint8Array|null} [encPayload] EncCommentMessage encPayload + * @property {Uint8Array|null} [encIv] EncCommentMessage encIv */ /** - * Constructs a new ContactsArrayMessage. + * Constructs a new EncCommentMessage. * @memberof proto.Message - * @classdesc Represents a ContactsArrayMessage. - * @implements IContactsArrayMessage + * @classdesc Represents an EncCommentMessage. + * @implements IEncCommentMessage * @constructor - * @param {proto.Message.IContactsArrayMessage=} [properties] Properties to set + * @param {proto.Message.IEncCommentMessage=} [properties] Properties to set */ - function ContactsArrayMessage(properties) { - this.contacts = []; + function EncCommentMessage(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -28580,104 +36183,101 @@ $root.proto = (function() { } /** - * ContactsArrayMessage displayName. - * @member {string} displayName - * @memberof proto.Message.ContactsArrayMessage + * EncCommentMessage targetMessageKey. + * @member {proto.IMessageKey|null|undefined} targetMessageKey + * @memberof proto.Message.EncCommentMessage * @instance */ - ContactsArrayMessage.prototype.displayName = ""; + EncCommentMessage.prototype.targetMessageKey = null; /** - * ContactsArrayMessage contacts. - * @member {Array.} contacts - * @memberof proto.Message.ContactsArrayMessage + * EncCommentMessage encPayload. + * @member {Uint8Array} encPayload + * @memberof proto.Message.EncCommentMessage * @instance */ - ContactsArrayMessage.prototype.contacts = $util.emptyArray; + EncCommentMessage.prototype.encPayload = $util.newBuffer([]); /** - * ContactsArrayMessage contextInfo. - * @member {proto.IContextInfo|null|undefined} contextInfo - * @memberof proto.Message.ContactsArrayMessage + * EncCommentMessage encIv. + * @member {Uint8Array} encIv + * @memberof proto.Message.EncCommentMessage * @instance */ - ContactsArrayMessage.prototype.contextInfo = null; + EncCommentMessage.prototype.encIv = $util.newBuffer([]); /** - * Creates a new ContactsArrayMessage instance using the specified properties. + * Creates a new EncCommentMessage instance using the specified properties. * @function create - * @memberof proto.Message.ContactsArrayMessage + * @memberof proto.Message.EncCommentMessage * @static - * @param {proto.Message.IContactsArrayMessage=} [properties] Properties to set - * @returns {proto.Message.ContactsArrayMessage} ContactsArrayMessage instance + * @param {proto.Message.IEncCommentMessage=} [properties] Properties to set + * @returns {proto.Message.EncCommentMessage} EncCommentMessage instance */ - ContactsArrayMessage.create = function create(properties) { - return new ContactsArrayMessage(properties); + EncCommentMessage.create = function create(properties) { + return new EncCommentMessage(properties); }; /** - * Encodes the specified ContactsArrayMessage message. Does not implicitly {@link proto.Message.ContactsArrayMessage.verify|verify} messages. + * Encodes the specified EncCommentMessage message. Does not implicitly {@link proto.Message.EncCommentMessage.verify|verify} messages. * @function encode - * @memberof proto.Message.ContactsArrayMessage + * @memberof proto.Message.EncCommentMessage * @static - * @param {proto.Message.IContactsArrayMessage} message ContactsArrayMessage message or plain object to encode + * @param {proto.Message.IEncCommentMessage} message EncCommentMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ContactsArrayMessage.encode = function encode(message, writer) { + EncCommentMessage.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.contacts != null && message.contacts.length) - for (var i = 0; i < message.contacts.length; ++i) - $root.proto.Message.ContactMessage.encode(message.contacts[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo")) - $root.proto.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.targetMessageKey != null && Object.hasOwnProperty.call(message, "targetMessageKey")) + $root.proto.MessageKey.encode(message.targetMessageKey, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.encPayload != null && Object.hasOwnProperty.call(message, "encPayload")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.encPayload); + if (message.encIv != null && Object.hasOwnProperty.call(message, "encIv")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.encIv); return writer; }; /** - * Encodes the specified ContactsArrayMessage message, length delimited. Does not implicitly {@link proto.Message.ContactsArrayMessage.verify|verify} messages. + * Encodes the specified EncCommentMessage message, length delimited. Does not implicitly {@link proto.Message.EncCommentMessage.verify|verify} messages. * @function encodeDelimited - * @memberof proto.Message.ContactsArrayMessage + * @memberof proto.Message.EncCommentMessage * @static - * @param {proto.Message.IContactsArrayMessage} message ContactsArrayMessage message or plain object to encode + * @param {proto.Message.IEncCommentMessage} message EncCommentMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ContactsArrayMessage.encodeDelimited = function encodeDelimited(message, writer) { + EncCommentMessage.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ContactsArrayMessage message from the specified reader or buffer. + * Decodes an EncCommentMessage message from the specified reader or buffer. * @function decode - * @memberof proto.Message.ContactsArrayMessage + * @memberof proto.Message.EncCommentMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {proto.Message.ContactsArrayMessage} ContactsArrayMessage + * @returns {proto.Message.EncCommentMessage} EncCommentMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ContactsArrayMessage.decode = function decode(reader, length) { + EncCommentMessage.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Message.ContactsArrayMessage(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Message.EncCommentMessage(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.displayName = reader.string(); + message.targetMessageKey = $root.proto.MessageKey.decode(reader, reader.uint32()); break; case 2: - if (!(message.contacts && message.contacts.length)) - message.contacts = []; - message.contacts.push($root.proto.Message.ContactMessage.decode(reader, reader.uint32())); + message.encPayload = reader.bytes(); break; - case 17: - message.contextInfo = $root.proto.ContextInfo.decode(reader, reader.uint32()); + case 3: + message.encIv = reader.bytes(); break; default: reader.skipType(tag & 7); @@ -28688,147 +36288,149 @@ $root.proto = (function() { }; /** - * Decodes a ContactsArrayMessage message from the specified reader or buffer, length delimited. + * Decodes an EncCommentMessage message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof proto.Message.ContactsArrayMessage + * @memberof proto.Message.EncCommentMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.Message.ContactsArrayMessage} ContactsArrayMessage + * @returns {proto.Message.EncCommentMessage} EncCommentMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ContactsArrayMessage.decodeDelimited = function decodeDelimited(reader) { + EncCommentMessage.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ContactsArrayMessage message. + * Verifies an EncCommentMessage message. * @function verify - * @memberof proto.Message.ContactsArrayMessage + * @memberof proto.Message.EncCommentMessage * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ContactsArrayMessage.verify = function verify(message) { + EncCommentMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.contacts != null && message.hasOwnProperty("contacts")) { - if (!Array.isArray(message.contacts)) - return "contacts: array expected"; - for (var i = 0; i < message.contacts.length; ++i) { - var error = $root.proto.Message.ContactMessage.verify(message.contacts[i]); - if (error) - return "contacts." + error; - } - } - if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { - var error = $root.proto.ContextInfo.verify(message.contextInfo); + if (message.targetMessageKey != null && message.hasOwnProperty("targetMessageKey")) { + var error = $root.proto.MessageKey.verify(message.targetMessageKey); if (error) - return "contextInfo." + error; + return "targetMessageKey." + error; } + if (message.encPayload != null && message.hasOwnProperty("encPayload")) + if (!(message.encPayload && typeof message.encPayload.length === "number" || $util.isString(message.encPayload))) + return "encPayload: buffer expected"; + if (message.encIv != null && message.hasOwnProperty("encIv")) + if (!(message.encIv && typeof message.encIv.length === "number" || $util.isString(message.encIv))) + return "encIv: buffer expected"; return null; }; /** - * Creates a ContactsArrayMessage message from a plain object. Also converts values to their respective internal types. + * Creates an EncCommentMessage message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof proto.Message.ContactsArrayMessage + * @memberof proto.Message.EncCommentMessage * @static * @param {Object.} object Plain object - * @returns {proto.Message.ContactsArrayMessage} ContactsArrayMessage + * @returns {proto.Message.EncCommentMessage} EncCommentMessage */ - ContactsArrayMessage.fromObject = function fromObject(object) { - if (object instanceof $root.proto.Message.ContactsArrayMessage) + EncCommentMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.EncCommentMessage) return object; - var message = new $root.proto.Message.ContactsArrayMessage(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.contacts) { - if (!Array.isArray(object.contacts)) - throw TypeError(".proto.Message.ContactsArrayMessage.contacts: array expected"); - message.contacts = []; - for (var i = 0; i < object.contacts.length; ++i) { - if (typeof object.contacts[i] !== "object") - throw TypeError(".proto.Message.ContactsArrayMessage.contacts: object expected"); - message.contacts[i] = $root.proto.Message.ContactMessage.fromObject(object.contacts[i]); - } - } - if (object.contextInfo != null) { - if (typeof object.contextInfo !== "object") - throw TypeError(".proto.Message.ContactsArrayMessage.contextInfo: object expected"); - message.contextInfo = $root.proto.ContextInfo.fromObject(object.contextInfo); + var message = new $root.proto.Message.EncCommentMessage(); + if (object.targetMessageKey != null) { + if (typeof object.targetMessageKey !== "object") + throw TypeError(".proto.Message.EncCommentMessage.targetMessageKey: object expected"); + message.targetMessageKey = $root.proto.MessageKey.fromObject(object.targetMessageKey); } + if (object.encPayload != null) + if (typeof object.encPayload === "string") + $util.base64.decode(object.encPayload, message.encPayload = $util.newBuffer($util.base64.length(object.encPayload)), 0); + else if (object.encPayload.length) + message.encPayload = object.encPayload; + if (object.encIv != null) + if (typeof object.encIv === "string") + $util.base64.decode(object.encIv, message.encIv = $util.newBuffer($util.base64.length(object.encIv)), 0); + else if (object.encIv.length) + message.encIv = object.encIv; return message; }; /** - * Creates a plain object from a ContactsArrayMessage message. Also converts values to other types if specified. + * Creates a plain object from an EncCommentMessage message. Also converts values to other types if specified. * @function toObject - * @memberof proto.Message.ContactsArrayMessage + * @memberof proto.Message.EncCommentMessage * @static - * @param {proto.Message.ContactsArrayMessage} message ContactsArrayMessage + * @param {proto.Message.EncCommentMessage} message EncCommentMessage * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ContactsArrayMessage.toObject = function toObject(message, options) { + EncCommentMessage.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.contacts = []; if (options.defaults) { - object.displayName = ""; - object.contextInfo = null; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.contacts && message.contacts.length) { - object.contacts = []; - for (var j = 0; j < message.contacts.length; ++j) - object.contacts[j] = $root.proto.Message.ContactMessage.toObject(message.contacts[j], options); + object.targetMessageKey = null; + if (options.bytes === String) + object.encPayload = ""; + else { + object.encPayload = []; + if (options.bytes !== Array) + object.encPayload = $util.newBuffer(object.encPayload); + } + if (options.bytes === String) + object.encIv = ""; + else { + object.encIv = []; + if (options.bytes !== Array) + object.encIv = $util.newBuffer(object.encIv); + } } - if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) - object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); + if (message.targetMessageKey != null && message.hasOwnProperty("targetMessageKey")) + object.targetMessageKey = $root.proto.MessageKey.toObject(message.targetMessageKey, options); + if (message.encPayload != null && message.hasOwnProperty("encPayload")) + object.encPayload = options.bytes === String ? $util.base64.encode(message.encPayload, 0, message.encPayload.length) : options.bytes === Array ? Array.prototype.slice.call(message.encPayload) : message.encPayload; + if (message.encIv != null && message.hasOwnProperty("encIv")) + object.encIv = options.bytes === String ? $util.base64.encode(message.encIv, 0, message.encIv.length) : options.bytes === Array ? Array.prototype.slice.call(message.encIv) : message.encIv; return object; }; /** - * Converts this ContactsArrayMessage to JSON. + * Converts this EncCommentMessage to JSON. * @function toJSON - * @memberof proto.Message.ContactsArrayMessage + * @memberof proto.Message.EncCommentMessage * @instance * @returns {Object.} JSON object */ - ContactsArrayMessage.prototype.toJSON = function toJSON() { + EncCommentMessage.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ContactsArrayMessage; + return EncCommentMessage; })(); - Message.DeclinePaymentRequestMessage = (function() { + Message.EncEventUpdateMessage = (function() { /** - * Properties of a DeclinePaymentRequestMessage. + * Properties of an EncEventUpdateMessage. * @memberof proto.Message - * @interface IDeclinePaymentRequestMessage - * @property {proto.IMessageKey|null} [key] DeclinePaymentRequestMessage key + * @interface IEncEventUpdateMessage + * @property {proto.IMessageKey|null} [eventCreationMessageKey] EncEventUpdateMessage eventCreationMessageKey + * @property {Uint8Array|null} [encPayload] EncEventUpdateMessage encPayload + * @property {Uint8Array|null} [encIv] EncEventUpdateMessage encIv */ /** - * Constructs a new DeclinePaymentRequestMessage. + * Constructs a new EncEventUpdateMessage. * @memberof proto.Message - * @classdesc Represents a DeclinePaymentRequestMessage. - * @implements IDeclinePaymentRequestMessage + * @classdesc Represents an EncEventUpdateMessage. + * @implements IEncEventUpdateMessage * @constructor - * @param {proto.Message.IDeclinePaymentRequestMessage=} [properties] Properties to set + * @param {proto.Message.IEncEventUpdateMessage=} [properties] Properties to set */ - function DeclinePaymentRequestMessage(properties) { + function EncEventUpdateMessage(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -28836,75 +36438,101 @@ $root.proto = (function() { } /** - * DeclinePaymentRequestMessage key. - * @member {proto.IMessageKey|null|undefined} key - * @memberof proto.Message.DeclinePaymentRequestMessage + * EncEventUpdateMessage eventCreationMessageKey. + * @member {proto.IMessageKey|null|undefined} eventCreationMessageKey + * @memberof proto.Message.EncEventUpdateMessage * @instance */ - DeclinePaymentRequestMessage.prototype.key = null; + EncEventUpdateMessage.prototype.eventCreationMessageKey = null; /** - * Creates a new DeclinePaymentRequestMessage instance using the specified properties. + * EncEventUpdateMessage encPayload. + * @member {Uint8Array} encPayload + * @memberof proto.Message.EncEventUpdateMessage + * @instance + */ + EncEventUpdateMessage.prototype.encPayload = $util.newBuffer([]); + + /** + * EncEventUpdateMessage encIv. + * @member {Uint8Array} encIv + * @memberof proto.Message.EncEventUpdateMessage + * @instance + */ + EncEventUpdateMessage.prototype.encIv = $util.newBuffer([]); + + /** + * Creates a new EncEventUpdateMessage instance using the specified properties. * @function create - * @memberof proto.Message.DeclinePaymentRequestMessage + * @memberof proto.Message.EncEventUpdateMessage * @static - * @param {proto.Message.IDeclinePaymentRequestMessage=} [properties] Properties to set - * @returns {proto.Message.DeclinePaymentRequestMessage} DeclinePaymentRequestMessage instance + * @param {proto.Message.IEncEventUpdateMessage=} [properties] Properties to set + * @returns {proto.Message.EncEventUpdateMessage} EncEventUpdateMessage instance */ - DeclinePaymentRequestMessage.create = function create(properties) { - return new DeclinePaymentRequestMessage(properties); + EncEventUpdateMessage.create = function create(properties) { + return new EncEventUpdateMessage(properties); }; /** - * Encodes the specified DeclinePaymentRequestMessage message. Does not implicitly {@link proto.Message.DeclinePaymentRequestMessage.verify|verify} messages. + * Encodes the specified EncEventUpdateMessage message. Does not implicitly {@link proto.Message.EncEventUpdateMessage.verify|verify} messages. * @function encode - * @memberof proto.Message.DeclinePaymentRequestMessage + * @memberof proto.Message.EncEventUpdateMessage * @static - * @param {proto.Message.IDeclinePaymentRequestMessage} message DeclinePaymentRequestMessage message or plain object to encode + * @param {proto.Message.IEncEventUpdateMessage} message EncEventUpdateMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeclinePaymentRequestMessage.encode = function encode(message, writer) { + EncEventUpdateMessage.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.key != null && Object.hasOwnProperty.call(message, "key")) - $root.proto.MessageKey.encode(message.key, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.eventCreationMessageKey != null && Object.hasOwnProperty.call(message, "eventCreationMessageKey")) + $root.proto.MessageKey.encode(message.eventCreationMessageKey, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.encPayload != null && Object.hasOwnProperty.call(message, "encPayload")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.encPayload); + if (message.encIv != null && Object.hasOwnProperty.call(message, "encIv")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.encIv); return writer; }; /** - * Encodes the specified DeclinePaymentRequestMessage message, length delimited. Does not implicitly {@link proto.Message.DeclinePaymentRequestMessage.verify|verify} messages. + * Encodes the specified EncEventUpdateMessage message, length delimited. Does not implicitly {@link proto.Message.EncEventUpdateMessage.verify|verify} messages. * @function encodeDelimited - * @memberof proto.Message.DeclinePaymentRequestMessage + * @memberof proto.Message.EncEventUpdateMessage * @static - * @param {proto.Message.IDeclinePaymentRequestMessage} message DeclinePaymentRequestMessage message or plain object to encode + * @param {proto.Message.IEncEventUpdateMessage} message EncEventUpdateMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeclinePaymentRequestMessage.encodeDelimited = function encodeDelimited(message, writer) { + EncEventUpdateMessage.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeclinePaymentRequestMessage message from the specified reader or buffer. + * Decodes an EncEventUpdateMessage message from the specified reader or buffer. * @function decode - * @memberof proto.Message.DeclinePaymentRequestMessage + * @memberof proto.Message.EncEventUpdateMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {proto.Message.DeclinePaymentRequestMessage} DeclinePaymentRequestMessage + * @returns {proto.Message.EncEventUpdateMessage} EncEventUpdateMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeclinePaymentRequestMessage.decode = function decode(reader, length) { + EncEventUpdateMessage.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Message.DeclinePaymentRequestMessage(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Message.EncEventUpdateMessage(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.key = $root.proto.MessageKey.decode(reader, reader.uint32()); + message.eventCreationMessageKey = $root.proto.MessageKey.decode(reader, reader.uint32()); + break; + case 2: + message.encPayload = reader.bytes(); + break; + case 3: + message.encIv = reader.bytes(); break; default: reader.skipType(tag & 7); @@ -28915,114 +36543,149 @@ $root.proto = (function() { }; /** - * Decodes a DeclinePaymentRequestMessage message from the specified reader or buffer, length delimited. + * Decodes an EncEventUpdateMessage message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof proto.Message.DeclinePaymentRequestMessage + * @memberof proto.Message.EncEventUpdateMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.Message.DeclinePaymentRequestMessage} DeclinePaymentRequestMessage + * @returns {proto.Message.EncEventUpdateMessage} EncEventUpdateMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeclinePaymentRequestMessage.decodeDelimited = function decodeDelimited(reader) { + EncEventUpdateMessage.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeclinePaymentRequestMessage message. + * Verifies an EncEventUpdateMessage message. * @function verify - * @memberof proto.Message.DeclinePaymentRequestMessage + * @memberof proto.Message.EncEventUpdateMessage * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeclinePaymentRequestMessage.verify = function verify(message) { + EncEventUpdateMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.key != null && message.hasOwnProperty("key")) { - var error = $root.proto.MessageKey.verify(message.key); + if (message.eventCreationMessageKey != null && message.hasOwnProperty("eventCreationMessageKey")) { + var error = $root.proto.MessageKey.verify(message.eventCreationMessageKey); if (error) - return "key." + error; + return "eventCreationMessageKey." + error; } + if (message.encPayload != null && message.hasOwnProperty("encPayload")) + if (!(message.encPayload && typeof message.encPayload.length === "number" || $util.isString(message.encPayload))) + return "encPayload: buffer expected"; + if (message.encIv != null && message.hasOwnProperty("encIv")) + if (!(message.encIv && typeof message.encIv.length === "number" || $util.isString(message.encIv))) + return "encIv: buffer expected"; return null; }; /** - * Creates a DeclinePaymentRequestMessage message from a plain object. Also converts values to their respective internal types. + * Creates an EncEventUpdateMessage message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof proto.Message.DeclinePaymentRequestMessage + * @memberof proto.Message.EncEventUpdateMessage * @static * @param {Object.} object Plain object - * @returns {proto.Message.DeclinePaymentRequestMessage} DeclinePaymentRequestMessage + * @returns {proto.Message.EncEventUpdateMessage} EncEventUpdateMessage */ - DeclinePaymentRequestMessage.fromObject = function fromObject(object) { - if (object instanceof $root.proto.Message.DeclinePaymentRequestMessage) + EncEventUpdateMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.EncEventUpdateMessage) return object; - var message = new $root.proto.Message.DeclinePaymentRequestMessage(); - if (object.key != null) { - if (typeof object.key !== "object") - throw TypeError(".proto.Message.DeclinePaymentRequestMessage.key: object expected"); - message.key = $root.proto.MessageKey.fromObject(object.key); + var message = new $root.proto.Message.EncEventUpdateMessage(); + if (object.eventCreationMessageKey != null) { + if (typeof object.eventCreationMessageKey !== "object") + throw TypeError(".proto.Message.EncEventUpdateMessage.eventCreationMessageKey: object expected"); + message.eventCreationMessageKey = $root.proto.MessageKey.fromObject(object.eventCreationMessageKey); } + if (object.encPayload != null) + if (typeof object.encPayload === "string") + $util.base64.decode(object.encPayload, message.encPayload = $util.newBuffer($util.base64.length(object.encPayload)), 0); + else if (object.encPayload.length) + message.encPayload = object.encPayload; + if (object.encIv != null) + if (typeof object.encIv === "string") + $util.base64.decode(object.encIv, message.encIv = $util.newBuffer($util.base64.length(object.encIv)), 0); + else if (object.encIv.length) + message.encIv = object.encIv; return message; }; /** - * Creates a plain object from a DeclinePaymentRequestMessage message. Also converts values to other types if specified. + * Creates a plain object from an EncEventUpdateMessage message. Also converts values to other types if specified. * @function toObject - * @memberof proto.Message.DeclinePaymentRequestMessage + * @memberof proto.Message.EncEventUpdateMessage * @static - * @param {proto.Message.DeclinePaymentRequestMessage} message DeclinePaymentRequestMessage + * @param {proto.Message.EncEventUpdateMessage} message EncEventUpdateMessage * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeclinePaymentRequestMessage.toObject = function toObject(message, options) { + EncEventUpdateMessage.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.key = null; - if (message.key != null && message.hasOwnProperty("key")) - object.key = $root.proto.MessageKey.toObject(message.key, options); + if (options.defaults) { + object.eventCreationMessageKey = null; + if (options.bytes === String) + object.encPayload = ""; + else { + object.encPayload = []; + if (options.bytes !== Array) + object.encPayload = $util.newBuffer(object.encPayload); + } + if (options.bytes === String) + object.encIv = ""; + else { + object.encIv = []; + if (options.bytes !== Array) + object.encIv = $util.newBuffer(object.encIv); + } + } + if (message.eventCreationMessageKey != null && message.hasOwnProperty("eventCreationMessageKey")) + object.eventCreationMessageKey = $root.proto.MessageKey.toObject(message.eventCreationMessageKey, options); + if (message.encPayload != null && message.hasOwnProperty("encPayload")) + object.encPayload = options.bytes === String ? $util.base64.encode(message.encPayload, 0, message.encPayload.length) : options.bytes === Array ? Array.prototype.slice.call(message.encPayload) : message.encPayload; + if (message.encIv != null && message.hasOwnProperty("encIv")) + object.encIv = options.bytes === String ? $util.base64.encode(message.encIv, 0, message.encIv.length) : options.bytes === Array ? Array.prototype.slice.call(message.encIv) : message.encIv; return object; }; /** - * Converts this DeclinePaymentRequestMessage to JSON. + * Converts this EncEventUpdateMessage to JSON. * @function toJSON - * @memberof proto.Message.DeclinePaymentRequestMessage + * @memberof proto.Message.EncEventUpdateMessage * @instance * @returns {Object.} JSON object */ - DeclinePaymentRequestMessage.prototype.toJSON = function toJSON() { + EncEventUpdateMessage.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeclinePaymentRequestMessage; + return EncEventUpdateMessage; })(); - Message.DeviceSentMessage = (function() { + Message.EncReactionMessage = (function() { /** - * Properties of a DeviceSentMessage. + * Properties of an EncReactionMessage. * @memberof proto.Message - * @interface IDeviceSentMessage - * @property {string|null} [destinationJid] DeviceSentMessage destinationJid - * @property {proto.IMessage|null} [message] DeviceSentMessage message - * @property {string|null} [phash] DeviceSentMessage phash + * @interface IEncReactionMessage + * @property {proto.IMessageKey|null} [targetMessageKey] EncReactionMessage targetMessageKey + * @property {Uint8Array|null} [encPayload] EncReactionMessage encPayload + * @property {Uint8Array|null} [encIv] EncReactionMessage encIv */ /** - * Constructs a new DeviceSentMessage. + * Constructs a new EncReactionMessage. * @memberof proto.Message - * @classdesc Represents a DeviceSentMessage. - * @implements IDeviceSentMessage + * @classdesc Represents an EncReactionMessage. + * @implements IEncReactionMessage * @constructor - * @param {proto.Message.IDeviceSentMessage=} [properties] Properties to set + * @param {proto.Message.IEncReactionMessage=} [properties] Properties to set */ - function DeviceSentMessage(properties) { + function EncReactionMessage(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -29030,101 +36693,101 @@ $root.proto = (function() { } /** - * DeviceSentMessage destinationJid. - * @member {string} destinationJid - * @memberof proto.Message.DeviceSentMessage + * EncReactionMessage targetMessageKey. + * @member {proto.IMessageKey|null|undefined} targetMessageKey + * @memberof proto.Message.EncReactionMessage * @instance */ - DeviceSentMessage.prototype.destinationJid = ""; + EncReactionMessage.prototype.targetMessageKey = null; /** - * DeviceSentMessage message. - * @member {proto.IMessage|null|undefined} message - * @memberof proto.Message.DeviceSentMessage + * EncReactionMessage encPayload. + * @member {Uint8Array} encPayload + * @memberof proto.Message.EncReactionMessage * @instance */ - DeviceSentMessage.prototype.message = null; + EncReactionMessage.prototype.encPayload = $util.newBuffer([]); /** - * DeviceSentMessage phash. - * @member {string} phash - * @memberof proto.Message.DeviceSentMessage + * EncReactionMessage encIv. + * @member {Uint8Array} encIv + * @memberof proto.Message.EncReactionMessage * @instance */ - DeviceSentMessage.prototype.phash = ""; + EncReactionMessage.prototype.encIv = $util.newBuffer([]); /** - * Creates a new DeviceSentMessage instance using the specified properties. + * Creates a new EncReactionMessage instance using the specified properties. * @function create - * @memberof proto.Message.DeviceSentMessage + * @memberof proto.Message.EncReactionMessage * @static - * @param {proto.Message.IDeviceSentMessage=} [properties] Properties to set - * @returns {proto.Message.DeviceSentMessage} DeviceSentMessage instance + * @param {proto.Message.IEncReactionMessage=} [properties] Properties to set + * @returns {proto.Message.EncReactionMessage} EncReactionMessage instance */ - DeviceSentMessage.create = function create(properties) { - return new DeviceSentMessage(properties); + EncReactionMessage.create = function create(properties) { + return new EncReactionMessage(properties); }; /** - * Encodes the specified DeviceSentMessage message. Does not implicitly {@link proto.Message.DeviceSentMessage.verify|verify} messages. + * Encodes the specified EncReactionMessage message. Does not implicitly {@link proto.Message.EncReactionMessage.verify|verify} messages. * @function encode - * @memberof proto.Message.DeviceSentMessage + * @memberof proto.Message.EncReactionMessage * @static - * @param {proto.Message.IDeviceSentMessage} message DeviceSentMessage message or plain object to encode + * @param {proto.Message.IEncReactionMessage} message EncReactionMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeviceSentMessage.encode = function encode(message, writer) { + EncReactionMessage.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.destinationJid != null && Object.hasOwnProperty.call(message, "destinationJid")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.destinationJid); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - $root.proto.Message.encode(message.message, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.phash != null && Object.hasOwnProperty.call(message, "phash")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.phash); + if (message.targetMessageKey != null && Object.hasOwnProperty.call(message, "targetMessageKey")) + $root.proto.MessageKey.encode(message.targetMessageKey, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.encPayload != null && Object.hasOwnProperty.call(message, "encPayload")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.encPayload); + if (message.encIv != null && Object.hasOwnProperty.call(message, "encIv")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.encIv); return writer; }; /** - * Encodes the specified DeviceSentMessage message, length delimited. Does not implicitly {@link proto.Message.DeviceSentMessage.verify|verify} messages. + * Encodes the specified EncReactionMessage message, length delimited. Does not implicitly {@link proto.Message.EncReactionMessage.verify|verify} messages. * @function encodeDelimited - * @memberof proto.Message.DeviceSentMessage + * @memberof proto.Message.EncReactionMessage * @static - * @param {proto.Message.IDeviceSentMessage} message DeviceSentMessage message or plain object to encode + * @param {proto.Message.IEncReactionMessage} message EncReactionMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeviceSentMessage.encodeDelimited = function encodeDelimited(message, writer) { + EncReactionMessage.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeviceSentMessage message from the specified reader or buffer. + * Decodes an EncReactionMessage message from the specified reader or buffer. * @function decode - * @memberof proto.Message.DeviceSentMessage + * @memberof proto.Message.EncReactionMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {proto.Message.DeviceSentMessage} DeviceSentMessage + * @returns {proto.Message.EncReactionMessage} EncReactionMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeviceSentMessage.decode = function decode(reader, length) { + EncReactionMessage.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Message.DeviceSentMessage(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Message.EncReactionMessage(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.destinationJid = reader.string(); + message.targetMessageKey = $root.proto.MessageKey.decode(reader, reader.uint32()); break; case 2: - message.message = $root.proto.Message.decode(reader, reader.uint32()); + message.encPayload = reader.bytes(); break; case 3: - message.phash = reader.string(); + message.encIv = reader.bytes(); break; default: reader.skipType(tag & 7); @@ -29135,148 +36798,148 @@ $root.proto = (function() { }; /** - * Decodes a DeviceSentMessage message from the specified reader or buffer, length delimited. + * Decodes an EncReactionMessage message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof proto.Message.DeviceSentMessage + * @memberof proto.Message.EncReactionMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.Message.DeviceSentMessage} DeviceSentMessage + * @returns {proto.Message.EncReactionMessage} EncReactionMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeviceSentMessage.decodeDelimited = function decodeDelimited(reader) { + EncReactionMessage.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeviceSentMessage message. + * Verifies an EncReactionMessage message. * @function verify - * @memberof proto.Message.DeviceSentMessage + * @memberof proto.Message.EncReactionMessage * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeviceSentMessage.verify = function verify(message) { + EncReactionMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.destinationJid != null && message.hasOwnProperty("destinationJid")) - if (!$util.isString(message.destinationJid)) - return "destinationJid: string expected"; - if (message.message != null && message.hasOwnProperty("message")) { - var error = $root.proto.Message.verify(message.message); + if (message.targetMessageKey != null && message.hasOwnProperty("targetMessageKey")) { + var error = $root.proto.MessageKey.verify(message.targetMessageKey); if (error) - return "message." + error; + return "targetMessageKey." + error; } - if (message.phash != null && message.hasOwnProperty("phash")) - if (!$util.isString(message.phash)) - return "phash: string expected"; + if (message.encPayload != null && message.hasOwnProperty("encPayload")) + if (!(message.encPayload && typeof message.encPayload.length === "number" || $util.isString(message.encPayload))) + return "encPayload: buffer expected"; + if (message.encIv != null && message.hasOwnProperty("encIv")) + if (!(message.encIv && typeof message.encIv.length === "number" || $util.isString(message.encIv))) + return "encIv: buffer expected"; return null; }; /** - * Creates a DeviceSentMessage message from a plain object. Also converts values to their respective internal types. + * Creates an EncReactionMessage message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof proto.Message.DeviceSentMessage + * @memberof proto.Message.EncReactionMessage * @static * @param {Object.} object Plain object - * @returns {proto.Message.DeviceSentMessage} DeviceSentMessage + * @returns {proto.Message.EncReactionMessage} EncReactionMessage */ - DeviceSentMessage.fromObject = function fromObject(object) { - if (object instanceof $root.proto.Message.DeviceSentMessage) + EncReactionMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.EncReactionMessage) return object; - var message = new $root.proto.Message.DeviceSentMessage(); - if (object.destinationJid != null) - message.destinationJid = String(object.destinationJid); - if (object.message != null) { - if (typeof object.message !== "object") - throw TypeError(".proto.Message.DeviceSentMessage.message: object expected"); - message.message = $root.proto.Message.fromObject(object.message); + var message = new $root.proto.Message.EncReactionMessage(); + if (object.targetMessageKey != null) { + if (typeof object.targetMessageKey !== "object") + throw TypeError(".proto.Message.EncReactionMessage.targetMessageKey: object expected"); + message.targetMessageKey = $root.proto.MessageKey.fromObject(object.targetMessageKey); } - if (object.phash != null) - message.phash = String(object.phash); + if (object.encPayload != null) + if (typeof object.encPayload === "string") + $util.base64.decode(object.encPayload, message.encPayload = $util.newBuffer($util.base64.length(object.encPayload)), 0); + else if (object.encPayload.length) + message.encPayload = object.encPayload; + if (object.encIv != null) + if (typeof object.encIv === "string") + $util.base64.decode(object.encIv, message.encIv = $util.newBuffer($util.base64.length(object.encIv)), 0); + else if (object.encIv.length) + message.encIv = object.encIv; return message; }; /** - * Creates a plain object from a DeviceSentMessage message. Also converts values to other types if specified. + * Creates a plain object from an EncReactionMessage message. Also converts values to other types if specified. * @function toObject - * @memberof proto.Message.DeviceSentMessage + * @memberof proto.Message.EncReactionMessage * @static - * @param {proto.Message.DeviceSentMessage} message DeviceSentMessage + * @param {proto.Message.EncReactionMessage} message EncReactionMessage * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeviceSentMessage.toObject = function toObject(message, options) { + EncReactionMessage.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.destinationJid = ""; - object.message = null; - object.phash = ""; + object.targetMessageKey = null; + if (options.bytes === String) + object.encPayload = ""; + else { + object.encPayload = []; + if (options.bytes !== Array) + object.encPayload = $util.newBuffer(object.encPayload); + } + if (options.bytes === String) + object.encIv = ""; + else { + object.encIv = []; + if (options.bytes !== Array) + object.encIv = $util.newBuffer(object.encIv); + } } - if (message.destinationJid != null && message.hasOwnProperty("destinationJid")) - object.destinationJid = message.destinationJid; - if (message.message != null && message.hasOwnProperty("message")) - object.message = $root.proto.Message.toObject(message.message, options); - if (message.phash != null && message.hasOwnProperty("phash")) - object.phash = message.phash; + if (message.targetMessageKey != null && message.hasOwnProperty("targetMessageKey")) + object.targetMessageKey = $root.proto.MessageKey.toObject(message.targetMessageKey, options); + if (message.encPayload != null && message.hasOwnProperty("encPayload")) + object.encPayload = options.bytes === String ? $util.base64.encode(message.encPayload, 0, message.encPayload.length) : options.bytes === Array ? Array.prototype.slice.call(message.encPayload) : message.encPayload; + if (message.encIv != null && message.hasOwnProperty("encIv")) + object.encIv = options.bytes === String ? $util.base64.encode(message.encIv, 0, message.encIv.length) : options.bytes === Array ? Array.prototype.slice.call(message.encIv) : message.encIv; return object; }; /** - * Converts this DeviceSentMessage to JSON. + * Converts this EncReactionMessage to JSON. * @function toJSON - * @memberof proto.Message.DeviceSentMessage + * @memberof proto.Message.EncReactionMessage * @instance * @returns {Object.} JSON object */ - DeviceSentMessage.prototype.toJSON = function toJSON() { + EncReactionMessage.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeviceSentMessage; + return EncReactionMessage; })(); - Message.DocumentMessage = (function() { + Message.EventEditMessage = (function() { /** - * Properties of a DocumentMessage. + * Properties of an EventEditMessage. * @memberof proto.Message - * @interface IDocumentMessage - * @property {string|null} [url] DocumentMessage url - * @property {string|null} [mimetype] DocumentMessage mimetype - * @property {string|null} [title] DocumentMessage title - * @property {Uint8Array|null} [fileSha256] DocumentMessage fileSha256 - * @property {number|Long|null} [fileLength] DocumentMessage fileLength - * @property {number|null} [pageCount] DocumentMessage pageCount - * @property {Uint8Array|null} [mediaKey] DocumentMessage mediaKey - * @property {string|null} [fileName] DocumentMessage fileName - * @property {Uint8Array|null} [fileEncSha256] DocumentMessage fileEncSha256 - * @property {string|null} [directPath] DocumentMessage directPath - * @property {number|Long|null} [mediaKeyTimestamp] DocumentMessage mediaKeyTimestamp - * @property {boolean|null} [contactVcard] DocumentMessage contactVcard - * @property {string|null} [thumbnailDirectPath] DocumentMessage thumbnailDirectPath - * @property {Uint8Array|null} [thumbnailSha256] DocumentMessage thumbnailSha256 - * @property {Uint8Array|null} [thumbnailEncSha256] DocumentMessage thumbnailEncSha256 - * @property {Uint8Array|null} [jpegThumbnail] DocumentMessage jpegThumbnail - * @property {proto.IContextInfo|null} [contextInfo] DocumentMessage contextInfo - * @property {number|null} [thumbnailHeight] DocumentMessage thumbnailHeight - * @property {number|null} [thumbnailWidth] DocumentMessage thumbnailWidth - * @property {string|null} [caption] DocumentMessage caption + * @interface IEventEditMessage + * @property {proto.Message.IEventMessage|null} [eventEditMessage] EventEditMessage eventEditMessage + * @property {number|Long|null} [editTimestampMs] EventEditMessage editTimestampMs */ /** - * Constructs a new DocumentMessage. + * Constructs a new EventEditMessage. * @memberof proto.Message - * @classdesc Represents a DocumentMessage. - * @implements IDocumentMessage + * @classdesc Represents an EventEditMessage. + * @implements IEventEditMessage * @constructor - * @param {proto.Message.IDocumentMessage=} [properties] Properties to set + * @param {proto.Message.IEventEditMessage=} [properties] Properties to set */ - function DocumentMessage(properties) { + function EventEditMessage(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -29284,322 +36947,387 @@ $root.proto = (function() { } /** - * DocumentMessage url. - * @member {string} url - * @memberof proto.Message.DocumentMessage + * EventEditMessage eventEditMessage. + * @member {proto.Message.IEventMessage|null|undefined} eventEditMessage + * @memberof proto.Message.EventEditMessage * @instance */ - DocumentMessage.prototype.url = ""; + EventEditMessage.prototype.eventEditMessage = null; /** - * DocumentMessage mimetype. - * @member {string} mimetype - * @memberof proto.Message.DocumentMessage + * EventEditMessage editTimestampMs. + * @member {number|Long} editTimestampMs + * @memberof proto.Message.EventEditMessage * @instance */ - DocumentMessage.prototype.mimetype = ""; + EventEditMessage.prototype.editTimestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * DocumentMessage title. - * @member {string} title - * @memberof proto.Message.DocumentMessage - * @instance + * Creates a new EventEditMessage instance using the specified properties. + * @function create + * @memberof proto.Message.EventEditMessage + * @static + * @param {proto.Message.IEventEditMessage=} [properties] Properties to set + * @returns {proto.Message.EventEditMessage} EventEditMessage instance */ - DocumentMessage.prototype.title = ""; + EventEditMessage.create = function create(properties) { + return new EventEditMessage(properties); + }; /** - * DocumentMessage fileSha256. - * @member {Uint8Array} fileSha256 - * @memberof proto.Message.DocumentMessage - * @instance + * Encodes the specified EventEditMessage message. Does not implicitly {@link proto.Message.EventEditMessage.verify|verify} messages. + * @function encode + * @memberof proto.Message.EventEditMessage + * @static + * @param {proto.Message.IEventEditMessage} message EventEditMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - DocumentMessage.prototype.fileSha256 = $util.newBuffer([]); + EventEditMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.eventEditMessage != null && Object.hasOwnProperty.call(message, "eventEditMessage")) + $root.proto.Message.EventMessage.encode(message.eventEditMessage, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.editTimestampMs != null && Object.hasOwnProperty.call(message, "editTimestampMs")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.editTimestampMs); + return writer; + }; /** - * DocumentMessage fileLength. - * @member {number|Long} fileLength - * @memberof proto.Message.DocumentMessage - * @instance + * Encodes the specified EventEditMessage message, length delimited. Does not implicitly {@link proto.Message.EventEditMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.EventEditMessage + * @static + * @param {proto.Message.IEventEditMessage} message EventEditMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - DocumentMessage.prototype.fileLength = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + EventEditMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * DocumentMessage pageCount. - * @member {number} pageCount - * @memberof proto.Message.DocumentMessage - * @instance + * Decodes an EventEditMessage message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.EventEditMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.EventEditMessage} EventEditMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DocumentMessage.prototype.pageCount = 0; + EventEditMessage.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Message.EventEditMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.eventEditMessage = $root.proto.Message.EventMessage.decode(reader, reader.uint32()); + break; + case 2: + message.editTimestampMs = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * DocumentMessage mediaKey. - * @member {Uint8Array} mediaKey - * @memberof proto.Message.DocumentMessage - * @instance + * Decodes an EventEditMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.EventEditMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.EventEditMessage} EventEditMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DocumentMessage.prototype.mediaKey = $util.newBuffer([]); + EventEditMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * DocumentMessage fileName. - * @member {string} fileName - * @memberof proto.Message.DocumentMessage - * @instance + * Verifies an EventEditMessage message. + * @function verify + * @memberof proto.Message.EventEditMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DocumentMessage.prototype.fileName = ""; + EventEditMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.eventEditMessage != null && message.hasOwnProperty("eventEditMessage")) { + var error = $root.proto.Message.EventMessage.verify(message.eventEditMessage); + if (error) + return "eventEditMessage." + error; + } + if (message.editTimestampMs != null && message.hasOwnProperty("editTimestampMs")) + if (!$util.isInteger(message.editTimestampMs) && !(message.editTimestampMs && $util.isInteger(message.editTimestampMs.low) && $util.isInteger(message.editTimestampMs.high))) + return "editTimestampMs: integer|Long expected"; + return null; + }; /** - * DocumentMessage fileEncSha256. - * @member {Uint8Array} fileEncSha256 - * @memberof proto.Message.DocumentMessage - * @instance + * Creates an EventEditMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.EventEditMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.EventEditMessage} EventEditMessage */ - DocumentMessage.prototype.fileEncSha256 = $util.newBuffer([]); + EventEditMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.EventEditMessage) + return object; + var message = new $root.proto.Message.EventEditMessage(); + if (object.eventEditMessage != null) { + if (typeof object.eventEditMessage !== "object") + throw TypeError(".proto.Message.EventEditMessage.eventEditMessage: object expected"); + message.eventEditMessage = $root.proto.Message.EventMessage.fromObject(object.eventEditMessage); + } + if (object.editTimestampMs != null) + if ($util.Long) + (message.editTimestampMs = $util.Long.fromValue(object.editTimestampMs)).unsigned = false; + else if (typeof object.editTimestampMs === "string") + message.editTimestampMs = parseInt(object.editTimestampMs, 10); + else if (typeof object.editTimestampMs === "number") + message.editTimestampMs = object.editTimestampMs; + else if (typeof object.editTimestampMs === "object") + message.editTimestampMs = new $util.LongBits(object.editTimestampMs.low >>> 0, object.editTimestampMs.high >>> 0).toNumber(); + return message; + }; /** - * DocumentMessage directPath. - * @member {string} directPath - * @memberof proto.Message.DocumentMessage - * @instance + * Creates a plain object from an EventEditMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.EventEditMessage + * @static + * @param {proto.Message.EventEditMessage} message EventEditMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - DocumentMessage.prototype.directPath = ""; + EventEditMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.eventEditMessage = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.editTimestampMs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.editTimestampMs = options.longs === String ? "0" : 0; + } + if (message.eventEditMessage != null && message.hasOwnProperty("eventEditMessage")) + object.eventEditMessage = $root.proto.Message.EventMessage.toObject(message.eventEditMessage, options); + if (message.editTimestampMs != null && message.hasOwnProperty("editTimestampMs")) + if (typeof message.editTimestampMs === "number") + object.editTimestampMs = options.longs === String ? String(message.editTimestampMs) : message.editTimestampMs; + else + object.editTimestampMs = options.longs === String ? $util.Long.prototype.toString.call(message.editTimestampMs) : options.longs === Number ? new $util.LongBits(message.editTimestampMs.low >>> 0, message.editTimestampMs.high >>> 0).toNumber() : message.editTimestampMs; + return object; + }; /** - * DocumentMessage mediaKeyTimestamp. - * @member {number|Long} mediaKeyTimestamp - * @memberof proto.Message.DocumentMessage + * Converts this EventEditMessage to JSON. + * @function toJSON + * @memberof proto.Message.EventEditMessage * @instance + * @returns {Object.} JSON object */ - DocumentMessage.prototype.mediaKeyTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + EventEditMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EventEditMessage; + })(); + + Message.EventMessage = (function() { /** - * DocumentMessage contactVcard. - * @member {boolean} contactVcard - * @memberof proto.Message.DocumentMessage - * @instance + * Properties of an EventMessage. + * @memberof proto.Message + * @interface IEventMessage + * @property {proto.IContextInfo|null} [contextInfo] EventMessage contextInfo + * @property {boolean|null} [isCanceled] EventMessage isCanceled + * @property {string|null} [name] EventMessage name + * @property {string|null} [description] EventMessage description + * @property {proto.Message.ILocationMessage|null} [location] EventMessage location + * @property {string|null} [joinLink] EventMessage joinLink + * @property {number|Long|null} [startTime] EventMessage startTime */ - DocumentMessage.prototype.contactVcard = false; /** - * DocumentMessage thumbnailDirectPath. - * @member {string} thumbnailDirectPath - * @memberof proto.Message.DocumentMessage - * @instance + * Constructs a new EventMessage. + * @memberof proto.Message + * @classdesc Represents an EventMessage. + * @implements IEventMessage + * @constructor + * @param {proto.Message.IEventMessage=} [properties] Properties to set */ - DocumentMessage.prototype.thumbnailDirectPath = ""; + function EventMessage(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * DocumentMessage thumbnailSha256. - * @member {Uint8Array} thumbnailSha256 - * @memberof proto.Message.DocumentMessage + * EventMessage contextInfo. + * @member {proto.IContextInfo|null|undefined} contextInfo + * @memberof proto.Message.EventMessage * @instance */ - DocumentMessage.prototype.thumbnailSha256 = $util.newBuffer([]); + EventMessage.prototype.contextInfo = null; /** - * DocumentMessage thumbnailEncSha256. - * @member {Uint8Array} thumbnailEncSha256 - * @memberof proto.Message.DocumentMessage + * EventMessage isCanceled. + * @member {boolean} isCanceled + * @memberof proto.Message.EventMessage * @instance */ - DocumentMessage.prototype.thumbnailEncSha256 = $util.newBuffer([]); + EventMessage.prototype.isCanceled = false; /** - * DocumentMessage jpegThumbnail. - * @member {Uint8Array} jpegThumbnail - * @memberof proto.Message.DocumentMessage + * EventMessage name. + * @member {string} name + * @memberof proto.Message.EventMessage * @instance */ - DocumentMessage.prototype.jpegThumbnail = $util.newBuffer([]); + EventMessage.prototype.name = ""; /** - * DocumentMessage contextInfo. - * @member {proto.IContextInfo|null|undefined} contextInfo - * @memberof proto.Message.DocumentMessage + * EventMessage description. + * @member {string} description + * @memberof proto.Message.EventMessage * @instance */ - DocumentMessage.prototype.contextInfo = null; + EventMessage.prototype.description = ""; /** - * DocumentMessage thumbnailHeight. - * @member {number} thumbnailHeight - * @memberof proto.Message.DocumentMessage + * EventMessage location. + * @member {proto.Message.ILocationMessage|null|undefined} location + * @memberof proto.Message.EventMessage * @instance */ - DocumentMessage.prototype.thumbnailHeight = 0; + EventMessage.prototype.location = null; /** - * DocumentMessage thumbnailWidth. - * @member {number} thumbnailWidth - * @memberof proto.Message.DocumentMessage + * EventMessage joinLink. + * @member {string} joinLink + * @memberof proto.Message.EventMessage * @instance */ - DocumentMessage.prototype.thumbnailWidth = 0; + EventMessage.prototype.joinLink = ""; /** - * DocumentMessage caption. - * @member {string} caption - * @memberof proto.Message.DocumentMessage + * EventMessage startTime. + * @member {number|Long} startTime + * @memberof proto.Message.EventMessage * @instance */ - DocumentMessage.prototype.caption = ""; + EventMessage.prototype.startTime = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new DocumentMessage instance using the specified properties. + * Creates a new EventMessage instance using the specified properties. * @function create - * @memberof proto.Message.DocumentMessage + * @memberof proto.Message.EventMessage * @static - * @param {proto.Message.IDocumentMessage=} [properties] Properties to set - * @returns {proto.Message.DocumentMessage} DocumentMessage instance + * @param {proto.Message.IEventMessage=} [properties] Properties to set + * @returns {proto.Message.EventMessage} EventMessage instance */ - DocumentMessage.create = function create(properties) { - return new DocumentMessage(properties); + EventMessage.create = function create(properties) { + return new EventMessage(properties); }; /** - * Encodes the specified DocumentMessage message. Does not implicitly {@link proto.Message.DocumentMessage.verify|verify} messages. + * Encodes the specified EventMessage message. Does not implicitly {@link proto.Message.EventMessage.verify|verify} messages. * @function encode - * @memberof proto.Message.DocumentMessage + * @memberof proto.Message.EventMessage * @static - * @param {proto.Message.IDocumentMessage} message DocumentMessage message or plain object to encode + * @param {proto.Message.IEventMessage} message EventMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DocumentMessage.encode = function encode(message, writer) { + EventMessage.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.url != null && Object.hasOwnProperty.call(message, "url")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.url); - if (message.mimetype != null && Object.hasOwnProperty.call(message, "mimetype")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.mimetype); - if (message.title != null && Object.hasOwnProperty.call(message, "title")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.title); - if (message.fileSha256 != null && Object.hasOwnProperty.call(message, "fileSha256")) - writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.fileSha256); - if (message.fileLength != null && Object.hasOwnProperty.call(message, "fileLength")) - writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.fileLength); - if (message.pageCount != null && Object.hasOwnProperty.call(message, "pageCount")) - writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.pageCount); - if (message.mediaKey != null && Object.hasOwnProperty.call(message, "mediaKey")) - writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.mediaKey); - if (message.fileName != null && Object.hasOwnProperty.call(message, "fileName")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.fileName); - if (message.fileEncSha256 != null && Object.hasOwnProperty.call(message, "fileEncSha256")) - writer.uint32(/* id 9, wireType 2 =*/74).bytes(message.fileEncSha256); - if (message.directPath != null && Object.hasOwnProperty.call(message, "directPath")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.directPath); - if (message.mediaKeyTimestamp != null && Object.hasOwnProperty.call(message, "mediaKeyTimestamp")) - writer.uint32(/* id 11, wireType 0 =*/88).int64(message.mediaKeyTimestamp); - if (message.contactVcard != null && Object.hasOwnProperty.call(message, "contactVcard")) - writer.uint32(/* id 12, wireType 0 =*/96).bool(message.contactVcard); - if (message.thumbnailDirectPath != null && Object.hasOwnProperty.call(message, "thumbnailDirectPath")) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.thumbnailDirectPath); - if (message.thumbnailSha256 != null && Object.hasOwnProperty.call(message, "thumbnailSha256")) - writer.uint32(/* id 14, wireType 2 =*/114).bytes(message.thumbnailSha256); - if (message.thumbnailEncSha256 != null && Object.hasOwnProperty.call(message, "thumbnailEncSha256")) - writer.uint32(/* id 15, wireType 2 =*/122).bytes(message.thumbnailEncSha256); - if (message.jpegThumbnail != null && Object.hasOwnProperty.call(message, "jpegThumbnail")) - writer.uint32(/* id 16, wireType 2 =*/130).bytes(message.jpegThumbnail); if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo")) - $root.proto.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); - if (message.thumbnailHeight != null && Object.hasOwnProperty.call(message, "thumbnailHeight")) - writer.uint32(/* id 18, wireType 0 =*/144).uint32(message.thumbnailHeight); - if (message.thumbnailWidth != null && Object.hasOwnProperty.call(message, "thumbnailWidth")) - writer.uint32(/* id 19, wireType 0 =*/152).uint32(message.thumbnailWidth); - if (message.caption != null && Object.hasOwnProperty.call(message, "caption")) - writer.uint32(/* id 20, wireType 2 =*/162).string(message.caption); + $root.proto.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.isCanceled != null && Object.hasOwnProperty.call(message, "isCanceled")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isCanceled); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.description); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + $root.proto.Message.LocationMessage.encode(message.location, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.joinLink != null && Object.hasOwnProperty.call(message, "joinLink")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.joinLink); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + writer.uint32(/* id 7, wireType 0 =*/56).int64(message.startTime); return writer; }; /** - * Encodes the specified DocumentMessage message, length delimited. Does not implicitly {@link proto.Message.DocumentMessage.verify|verify} messages. + * Encodes the specified EventMessage message, length delimited. Does not implicitly {@link proto.Message.EventMessage.verify|verify} messages. * @function encodeDelimited - * @memberof proto.Message.DocumentMessage + * @memberof proto.Message.EventMessage * @static - * @param {proto.Message.IDocumentMessage} message DocumentMessage message or plain object to encode + * @param {proto.Message.IEventMessage} message EventMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DocumentMessage.encodeDelimited = function encodeDelimited(message, writer) { + EventMessage.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DocumentMessage message from the specified reader or buffer. + * Decodes an EventMessage message from the specified reader or buffer. * @function decode - * @memberof proto.Message.DocumentMessage + * @memberof proto.Message.EventMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {proto.Message.DocumentMessage} DocumentMessage + * @returns {proto.Message.EventMessage} EventMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DocumentMessage.decode = function decode(reader, length) { + EventMessage.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Message.DocumentMessage(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Message.EventMessage(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.url = reader.string(); + message.contextInfo = $root.proto.ContextInfo.decode(reader, reader.uint32()); break; case 2: - message.mimetype = reader.string(); + message.isCanceled = reader.bool(); break; case 3: - message.title = reader.string(); + message.name = reader.string(); break; case 4: - message.fileSha256 = reader.bytes(); + message.description = reader.string(); break; case 5: - message.fileLength = reader.uint64(); + message.location = $root.proto.Message.LocationMessage.decode(reader, reader.uint32()); break; case 6: - message.pageCount = reader.uint32(); + message.joinLink = reader.string(); break; case 7: - message.mediaKey = reader.bytes(); - break; - case 8: - message.fileName = reader.string(); - break; - case 9: - message.fileEncSha256 = reader.bytes(); - break; - case 10: - message.directPath = reader.string(); - break; - case 11: - message.mediaKeyTimestamp = reader.int64(); - break; - case 12: - message.contactVcard = reader.bool(); - break; - case 13: - message.thumbnailDirectPath = reader.string(); - break; - case 14: - message.thumbnailSha256 = reader.bytes(); - break; - case 15: - message.thumbnailEncSha256 = reader.bytes(); - break; - case 16: - message.jpegThumbnail = reader.bytes(); - break; - case 17: - message.contextInfo = $root.proto.ContextInfo.decode(reader, reader.uint32()); - break; - case 18: - message.thumbnailHeight = reader.uint32(); - break; - case 19: - message.thumbnailWidth = reader.uint32(); - break; - case 20: - message.caption = reader.string(); + message.startTime = reader.int64(); break; default: reader.skipType(tag & 7); @@ -29610,349 +37338,439 @@ $root.proto = (function() { }; /** - * Decodes a DocumentMessage message from the specified reader or buffer, length delimited. + * Decodes an EventMessage message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof proto.Message.DocumentMessage + * @memberof proto.Message.EventMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.Message.DocumentMessage} DocumentMessage + * @returns {proto.Message.EventMessage} EventMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DocumentMessage.decodeDelimited = function decodeDelimited(reader) { + EventMessage.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DocumentMessage message. + * Verifies an EventMessage message. * @function verify - * @memberof proto.Message.DocumentMessage + * @memberof proto.Message.EventMessage * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DocumentMessage.verify = function verify(message) { + EventMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.url != null && message.hasOwnProperty("url")) - if (!$util.isString(message.url)) - return "url: string expected"; - if (message.mimetype != null && message.hasOwnProperty("mimetype")) - if (!$util.isString(message.mimetype)) - return "mimetype: string expected"; - if (message.title != null && message.hasOwnProperty("title")) - if (!$util.isString(message.title)) - return "title: string expected"; - if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) - if (!(message.fileSha256 && typeof message.fileSha256.length === "number" || $util.isString(message.fileSha256))) - return "fileSha256: buffer expected"; - if (message.fileLength != null && message.hasOwnProperty("fileLength")) - if (!$util.isInteger(message.fileLength) && !(message.fileLength && $util.isInteger(message.fileLength.low) && $util.isInteger(message.fileLength.high))) - return "fileLength: integer|Long expected"; - if (message.pageCount != null && message.hasOwnProperty("pageCount")) - if (!$util.isInteger(message.pageCount)) - return "pageCount: integer expected"; - if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) - if (!(message.mediaKey && typeof message.mediaKey.length === "number" || $util.isString(message.mediaKey))) - return "mediaKey: buffer expected"; - if (message.fileName != null && message.hasOwnProperty("fileName")) - if (!$util.isString(message.fileName)) - return "fileName: string expected"; - if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) - if (!(message.fileEncSha256 && typeof message.fileEncSha256.length === "number" || $util.isString(message.fileEncSha256))) - return "fileEncSha256: buffer expected"; - if (message.directPath != null && message.hasOwnProperty("directPath")) - if (!$util.isString(message.directPath)) - return "directPath: string expected"; - if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp")) - if (!$util.isInteger(message.mediaKeyTimestamp) && !(message.mediaKeyTimestamp && $util.isInteger(message.mediaKeyTimestamp.low) && $util.isInteger(message.mediaKeyTimestamp.high))) - return "mediaKeyTimestamp: integer|Long expected"; - if (message.contactVcard != null && message.hasOwnProperty("contactVcard")) - if (typeof message.contactVcard !== "boolean") - return "contactVcard: boolean expected"; - if (message.thumbnailDirectPath != null && message.hasOwnProperty("thumbnailDirectPath")) - if (!$util.isString(message.thumbnailDirectPath)) - return "thumbnailDirectPath: string expected"; - if (message.thumbnailSha256 != null && message.hasOwnProperty("thumbnailSha256")) - if (!(message.thumbnailSha256 && typeof message.thumbnailSha256.length === "number" || $util.isString(message.thumbnailSha256))) - return "thumbnailSha256: buffer expected"; - if (message.thumbnailEncSha256 != null && message.hasOwnProperty("thumbnailEncSha256")) - if (!(message.thumbnailEncSha256 && typeof message.thumbnailEncSha256.length === "number" || $util.isString(message.thumbnailEncSha256))) - return "thumbnailEncSha256: buffer expected"; - if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail")) - if (!(message.jpegThumbnail && typeof message.jpegThumbnail.length === "number" || $util.isString(message.jpegThumbnail))) - return "jpegThumbnail: buffer expected"; if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { var error = $root.proto.ContextInfo.verify(message.contextInfo); if (error) return "contextInfo." + error; } - if (message.thumbnailHeight != null && message.hasOwnProperty("thumbnailHeight")) - if (!$util.isInteger(message.thumbnailHeight)) - return "thumbnailHeight: integer expected"; - if (message.thumbnailWidth != null && message.hasOwnProperty("thumbnailWidth")) - if (!$util.isInteger(message.thumbnailWidth)) - return "thumbnailWidth: integer expected"; - if (message.caption != null && message.hasOwnProperty("caption")) - if (!$util.isString(message.caption)) - return "caption: string expected"; + if (message.isCanceled != null && message.hasOwnProperty("isCanceled")) + if (typeof message.isCanceled !== "boolean") + return "isCanceled: boolean expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.location != null && message.hasOwnProperty("location")) { + var error = $root.proto.Message.LocationMessage.verify(message.location); + if (error) + return "location." + error; + } + if (message.joinLink != null && message.hasOwnProperty("joinLink")) + if (!$util.isString(message.joinLink)) + return "joinLink: string expected"; + if (message.startTime != null && message.hasOwnProperty("startTime")) + if (!$util.isInteger(message.startTime) && !(message.startTime && $util.isInteger(message.startTime.low) && $util.isInteger(message.startTime.high))) + return "startTime: integer|Long expected"; return null; }; /** - * Creates a DocumentMessage message from a plain object. Also converts values to their respective internal types. + * Creates an EventMessage message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof proto.Message.DocumentMessage + * @memberof proto.Message.EventMessage * @static * @param {Object.} object Plain object - * @returns {proto.Message.DocumentMessage} DocumentMessage + * @returns {proto.Message.EventMessage} EventMessage */ - DocumentMessage.fromObject = function fromObject(object) { - if (object instanceof $root.proto.Message.DocumentMessage) + EventMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.EventMessage) return object; - var message = new $root.proto.Message.DocumentMessage(); - if (object.url != null) - message.url = String(object.url); - if (object.mimetype != null) - message.mimetype = String(object.mimetype); - if (object.title != null) - message.title = String(object.title); - if (object.fileSha256 != null) - if (typeof object.fileSha256 === "string") - $util.base64.decode(object.fileSha256, message.fileSha256 = $util.newBuffer($util.base64.length(object.fileSha256)), 0); - else if (object.fileSha256.length) - message.fileSha256 = object.fileSha256; - if (object.fileLength != null) - if ($util.Long) - (message.fileLength = $util.Long.fromValue(object.fileLength)).unsigned = true; - else if (typeof object.fileLength === "string") - message.fileLength = parseInt(object.fileLength, 10); - else if (typeof object.fileLength === "number") - message.fileLength = object.fileLength; - else if (typeof object.fileLength === "object") - message.fileLength = new $util.LongBits(object.fileLength.low >>> 0, object.fileLength.high >>> 0).toNumber(true); - if (object.pageCount != null) - message.pageCount = object.pageCount >>> 0; - if (object.mediaKey != null) - if (typeof object.mediaKey === "string") - $util.base64.decode(object.mediaKey, message.mediaKey = $util.newBuffer($util.base64.length(object.mediaKey)), 0); - else if (object.mediaKey.length) - message.mediaKey = object.mediaKey; - if (object.fileName != null) - message.fileName = String(object.fileName); - if (object.fileEncSha256 != null) - if (typeof object.fileEncSha256 === "string") - $util.base64.decode(object.fileEncSha256, message.fileEncSha256 = $util.newBuffer($util.base64.length(object.fileEncSha256)), 0); - else if (object.fileEncSha256.length) - message.fileEncSha256 = object.fileEncSha256; - if (object.directPath != null) - message.directPath = String(object.directPath); - if (object.mediaKeyTimestamp != null) - if ($util.Long) - (message.mediaKeyTimestamp = $util.Long.fromValue(object.mediaKeyTimestamp)).unsigned = false; - else if (typeof object.mediaKeyTimestamp === "string") - message.mediaKeyTimestamp = parseInt(object.mediaKeyTimestamp, 10); - else if (typeof object.mediaKeyTimestamp === "number") - message.mediaKeyTimestamp = object.mediaKeyTimestamp; - else if (typeof object.mediaKeyTimestamp === "object") - message.mediaKeyTimestamp = new $util.LongBits(object.mediaKeyTimestamp.low >>> 0, object.mediaKeyTimestamp.high >>> 0).toNumber(); - if (object.contactVcard != null) - message.contactVcard = Boolean(object.contactVcard); - if (object.thumbnailDirectPath != null) - message.thumbnailDirectPath = String(object.thumbnailDirectPath); - if (object.thumbnailSha256 != null) - if (typeof object.thumbnailSha256 === "string") - $util.base64.decode(object.thumbnailSha256, message.thumbnailSha256 = $util.newBuffer($util.base64.length(object.thumbnailSha256)), 0); - else if (object.thumbnailSha256.length) - message.thumbnailSha256 = object.thumbnailSha256; - if (object.thumbnailEncSha256 != null) - if (typeof object.thumbnailEncSha256 === "string") - $util.base64.decode(object.thumbnailEncSha256, message.thumbnailEncSha256 = $util.newBuffer($util.base64.length(object.thumbnailEncSha256)), 0); - else if (object.thumbnailEncSha256.length) - message.thumbnailEncSha256 = object.thumbnailEncSha256; - if (object.jpegThumbnail != null) - if (typeof object.jpegThumbnail === "string") - $util.base64.decode(object.jpegThumbnail, message.jpegThumbnail = $util.newBuffer($util.base64.length(object.jpegThumbnail)), 0); - else if (object.jpegThumbnail.length) - message.jpegThumbnail = object.jpegThumbnail; + var message = new $root.proto.Message.EventMessage(); if (object.contextInfo != null) { if (typeof object.contextInfo !== "object") - throw TypeError(".proto.Message.DocumentMessage.contextInfo: object expected"); + throw TypeError(".proto.Message.EventMessage.contextInfo: object expected"); message.contextInfo = $root.proto.ContextInfo.fromObject(object.contextInfo); } - if (object.thumbnailHeight != null) - message.thumbnailHeight = object.thumbnailHeight >>> 0; - if (object.thumbnailWidth != null) - message.thumbnailWidth = object.thumbnailWidth >>> 0; - if (object.caption != null) - message.caption = String(object.caption); + if (object.isCanceled != null) + message.isCanceled = Boolean(object.isCanceled); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.location != null) { + if (typeof object.location !== "object") + throw TypeError(".proto.Message.EventMessage.location: object expected"); + message.location = $root.proto.Message.LocationMessage.fromObject(object.location); + } + if (object.joinLink != null) + message.joinLink = String(object.joinLink); + if (object.startTime != null) + if ($util.Long) + (message.startTime = $util.Long.fromValue(object.startTime)).unsigned = false; + else if (typeof object.startTime === "string") + message.startTime = parseInt(object.startTime, 10); + else if (typeof object.startTime === "number") + message.startTime = object.startTime; + else if (typeof object.startTime === "object") + message.startTime = new $util.LongBits(object.startTime.low >>> 0, object.startTime.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from an EventMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.EventMessage + * @static + * @param {proto.Message.EventMessage} message EventMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EventMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.contextInfo = null; + object.isCanceled = false; + object.name = ""; + object.description = ""; + object.location = null; + object.joinLink = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.startTime = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.startTime = options.longs === String ? "0" : 0; + } + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) + object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); + if (message.isCanceled != null && message.hasOwnProperty("isCanceled")) + object.isCanceled = message.isCanceled; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.location != null && message.hasOwnProperty("location")) + object.location = $root.proto.Message.LocationMessage.toObject(message.location, options); + if (message.joinLink != null && message.hasOwnProperty("joinLink")) + object.joinLink = message.joinLink; + if (message.startTime != null && message.hasOwnProperty("startTime")) + if (typeof message.startTime === "number") + object.startTime = options.longs === String ? String(message.startTime) : message.startTime; + else + object.startTime = options.longs === String ? $util.Long.prototype.toString.call(message.startTime) : options.longs === Number ? new $util.LongBits(message.startTime.low >>> 0, message.startTime.high >>> 0).toNumber() : message.startTime; + return object; + }; + + /** + * Converts this EventMessage to JSON. + * @function toJSON + * @memberof proto.Message.EventMessage + * @instance + * @returns {Object.} JSON object + */ + EventMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EventMessage; + })(); + + Message.EventResponseMessage = (function() { + + /** + * Properties of an EventResponseMessage. + * @memberof proto.Message + * @interface IEventResponseMessage + * @property {proto.Message.EventResponseMessage.EventResponseType|null} [response] EventResponseMessage response + * @property {number|Long|null} [timestampMs] EventResponseMessage timestampMs + */ + + /** + * Constructs a new EventResponseMessage. + * @memberof proto.Message + * @classdesc Represents an EventResponseMessage. + * @implements IEventResponseMessage + * @constructor + * @param {proto.Message.IEventResponseMessage=} [properties] Properties to set + */ + function EventResponseMessage(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EventResponseMessage response. + * @member {proto.Message.EventResponseMessage.EventResponseType} response + * @memberof proto.Message.EventResponseMessage + * @instance + */ + EventResponseMessage.prototype.response = 0; + + /** + * EventResponseMessage timestampMs. + * @member {number|Long} timestampMs + * @memberof proto.Message.EventResponseMessage + * @instance + */ + EventResponseMessage.prototype.timestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new EventResponseMessage instance using the specified properties. + * @function create + * @memberof proto.Message.EventResponseMessage + * @static + * @param {proto.Message.IEventResponseMessage=} [properties] Properties to set + * @returns {proto.Message.EventResponseMessage} EventResponseMessage instance + */ + EventResponseMessage.create = function create(properties) { + return new EventResponseMessage(properties); + }; + + /** + * Encodes the specified EventResponseMessage message. Does not implicitly {@link proto.Message.EventResponseMessage.verify|verify} messages. + * @function encode + * @memberof proto.Message.EventResponseMessage + * @static + * @param {proto.Message.IEventResponseMessage} message EventResponseMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EventResponseMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.response != null && Object.hasOwnProperty.call(message, "response")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.response); + if (message.timestampMs != null && Object.hasOwnProperty.call(message, "timestampMs")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.timestampMs); + return writer; + }; + + /** + * Encodes the specified EventResponseMessage message, length delimited. Does not implicitly {@link proto.Message.EventResponseMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.EventResponseMessage + * @static + * @param {proto.Message.IEventResponseMessage} message EventResponseMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EventResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EventResponseMessage message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.EventResponseMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.EventResponseMessage} EventResponseMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EventResponseMessage.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Message.EventResponseMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.response = reader.int32(); + break; + case 2: + message.timestampMs = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } return message; }; /** - * Creates a plain object from a DocumentMessage message. Also converts values to other types if specified. + * Decodes an EventResponseMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.EventResponseMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.EventResponseMessage} EventResponseMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EventResponseMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EventResponseMessage message. + * @function verify + * @memberof proto.Message.EventResponseMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EventResponseMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.response != null && message.hasOwnProperty("response")) + switch (message.response) { + default: + return "response: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.timestampMs != null && message.hasOwnProperty("timestampMs")) + if (!$util.isInteger(message.timestampMs) && !(message.timestampMs && $util.isInteger(message.timestampMs.low) && $util.isInteger(message.timestampMs.high))) + return "timestampMs: integer|Long expected"; + return null; + }; + + /** + * Creates an EventResponseMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.EventResponseMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.EventResponseMessage} EventResponseMessage + */ + EventResponseMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.EventResponseMessage) + return object; + var message = new $root.proto.Message.EventResponseMessage(); + switch (object.response) { + case "UNKNOWN": + case 0: + message.response = 0; + break; + case "GOING": + case 1: + message.response = 1; + break; + case "NOT_GOING": + case 2: + message.response = 2; + break; + } + if (object.timestampMs != null) + if ($util.Long) + (message.timestampMs = $util.Long.fromValue(object.timestampMs)).unsigned = false; + else if (typeof object.timestampMs === "string") + message.timestampMs = parseInt(object.timestampMs, 10); + else if (typeof object.timestampMs === "number") + message.timestampMs = object.timestampMs; + else if (typeof object.timestampMs === "object") + message.timestampMs = new $util.LongBits(object.timestampMs.low >>> 0, object.timestampMs.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from an EventResponseMessage message. Also converts values to other types if specified. * @function toObject - * @memberof proto.Message.DocumentMessage + * @memberof proto.Message.EventResponseMessage * @static - * @param {proto.Message.DocumentMessage} message DocumentMessage + * @param {proto.Message.EventResponseMessage} message EventResponseMessage * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DocumentMessage.toObject = function toObject(message, options) { + EventResponseMessage.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.url = ""; - object.mimetype = ""; - object.title = ""; - if (options.bytes === String) - object.fileSha256 = ""; - else { - object.fileSha256 = []; - if (options.bytes !== Array) - object.fileSha256 = $util.newBuffer(object.fileSha256); - } - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.fileLength = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.fileLength = options.longs === String ? "0" : 0; - object.pageCount = 0; - if (options.bytes === String) - object.mediaKey = ""; - else { - object.mediaKey = []; - if (options.bytes !== Array) - object.mediaKey = $util.newBuffer(object.mediaKey); - } - object.fileName = ""; - if (options.bytes === String) - object.fileEncSha256 = ""; - else { - object.fileEncSha256 = []; - if (options.bytes !== Array) - object.fileEncSha256 = $util.newBuffer(object.fileEncSha256); - } - object.directPath = ""; + object.response = options.enums === String ? "UNKNOWN" : 0; if ($util.Long) { var long = new $util.Long(0, 0, false); - object.mediaKeyTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.timestampMs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else - object.mediaKeyTimestamp = options.longs === String ? "0" : 0; - object.contactVcard = false; - object.thumbnailDirectPath = ""; - if (options.bytes === String) - object.thumbnailSha256 = ""; - else { - object.thumbnailSha256 = []; - if (options.bytes !== Array) - object.thumbnailSha256 = $util.newBuffer(object.thumbnailSha256); - } - if (options.bytes === String) - object.thumbnailEncSha256 = ""; - else { - object.thumbnailEncSha256 = []; - if (options.bytes !== Array) - object.thumbnailEncSha256 = $util.newBuffer(object.thumbnailEncSha256); - } - if (options.bytes === String) - object.jpegThumbnail = ""; - else { - object.jpegThumbnail = []; - if (options.bytes !== Array) - object.jpegThumbnail = $util.newBuffer(object.jpegThumbnail); - } - object.contextInfo = null; - object.thumbnailHeight = 0; - object.thumbnailWidth = 0; - object.caption = ""; + object.timestampMs = options.longs === String ? "0" : 0; } - if (message.url != null && message.hasOwnProperty("url")) - object.url = message.url; - if (message.mimetype != null && message.hasOwnProperty("mimetype")) - object.mimetype = message.mimetype; - if (message.title != null && message.hasOwnProperty("title")) - object.title = message.title; - if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) - object.fileSha256 = options.bytes === String ? $util.base64.encode(message.fileSha256, 0, message.fileSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.fileSha256) : message.fileSha256; - if (message.fileLength != null && message.hasOwnProperty("fileLength")) - if (typeof message.fileLength === "number") - object.fileLength = options.longs === String ? String(message.fileLength) : message.fileLength; - else - object.fileLength = options.longs === String ? $util.Long.prototype.toString.call(message.fileLength) : options.longs === Number ? new $util.LongBits(message.fileLength.low >>> 0, message.fileLength.high >>> 0).toNumber(true) : message.fileLength; - if (message.pageCount != null && message.hasOwnProperty("pageCount")) - object.pageCount = message.pageCount; - if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) - object.mediaKey = options.bytes === String ? $util.base64.encode(message.mediaKey, 0, message.mediaKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.mediaKey) : message.mediaKey; - if (message.fileName != null && message.hasOwnProperty("fileName")) - object.fileName = message.fileName; - if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) - object.fileEncSha256 = options.bytes === String ? $util.base64.encode(message.fileEncSha256, 0, message.fileEncSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.fileEncSha256) : message.fileEncSha256; - if (message.directPath != null && message.hasOwnProperty("directPath")) - object.directPath = message.directPath; - if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp")) - if (typeof message.mediaKeyTimestamp === "number") - object.mediaKeyTimestamp = options.longs === String ? String(message.mediaKeyTimestamp) : message.mediaKeyTimestamp; + if (message.response != null && message.hasOwnProperty("response")) + object.response = options.enums === String ? $root.proto.Message.EventResponseMessage.EventResponseType[message.response] : message.response; + if (message.timestampMs != null && message.hasOwnProperty("timestampMs")) + if (typeof message.timestampMs === "number") + object.timestampMs = options.longs === String ? String(message.timestampMs) : message.timestampMs; else - object.mediaKeyTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.mediaKeyTimestamp) : options.longs === Number ? new $util.LongBits(message.mediaKeyTimestamp.low >>> 0, message.mediaKeyTimestamp.high >>> 0).toNumber() : message.mediaKeyTimestamp; - if (message.contactVcard != null && message.hasOwnProperty("contactVcard")) - object.contactVcard = message.contactVcard; - if (message.thumbnailDirectPath != null && message.hasOwnProperty("thumbnailDirectPath")) - object.thumbnailDirectPath = message.thumbnailDirectPath; - if (message.thumbnailSha256 != null && message.hasOwnProperty("thumbnailSha256")) - object.thumbnailSha256 = options.bytes === String ? $util.base64.encode(message.thumbnailSha256, 0, message.thumbnailSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.thumbnailSha256) : message.thumbnailSha256; - if (message.thumbnailEncSha256 != null && message.hasOwnProperty("thumbnailEncSha256")) - object.thumbnailEncSha256 = options.bytes === String ? $util.base64.encode(message.thumbnailEncSha256, 0, message.thumbnailEncSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.thumbnailEncSha256) : message.thumbnailEncSha256; - if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail")) - object.jpegThumbnail = options.bytes === String ? $util.base64.encode(message.jpegThumbnail, 0, message.jpegThumbnail.length) : options.bytes === Array ? Array.prototype.slice.call(message.jpegThumbnail) : message.jpegThumbnail; - if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) - object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); - if (message.thumbnailHeight != null && message.hasOwnProperty("thumbnailHeight")) - object.thumbnailHeight = message.thumbnailHeight; - if (message.thumbnailWidth != null && message.hasOwnProperty("thumbnailWidth")) - object.thumbnailWidth = message.thumbnailWidth; - if (message.caption != null && message.hasOwnProperty("caption")) - object.caption = message.caption; + object.timestampMs = options.longs === String ? $util.Long.prototype.toString.call(message.timestampMs) : options.longs === Number ? new $util.LongBits(message.timestampMs.low >>> 0, message.timestampMs.high >>> 0).toNumber() : message.timestampMs; return object; }; /** - * Converts this DocumentMessage to JSON. + * Converts this EventResponseMessage to JSON. * @function toJSON - * @memberof proto.Message.DocumentMessage + * @memberof proto.Message.EventResponseMessage * @instance * @returns {Object.} JSON object */ - DocumentMessage.prototype.toJSON = function toJSON() { + EventResponseMessage.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DocumentMessage; + /** + * EventResponseType enum. + * @name proto.Message.EventResponseMessage.EventResponseType + * @enum {number} + * @property {number} UNKNOWN=0 UNKNOWN value + * @property {number} GOING=1 GOING value + * @property {number} NOT_GOING=2 NOT_GOING value + */ + EventResponseMessage.EventResponseType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN"] = 0; + values[valuesById[1] = "GOING"] = 1; + values[valuesById[2] = "NOT_GOING"] = 2; + return values; + })(); + + return EventResponseMessage; })(); - Message.EncReactionMessage = (function() { + Message.EventUpdateMessage = (function() { /** - * Properties of an EncReactionMessage. + * Properties of an EventUpdateMessage. * @memberof proto.Message - * @interface IEncReactionMessage - * @property {proto.IMessageKey|null} [targetMessageKey] EncReactionMessage targetMessageKey - * @property {Uint8Array|null} [encPayload] EncReactionMessage encPayload - * @property {Uint8Array|null} [encIv] EncReactionMessage encIv + * @interface IEventUpdateMessage + * @property {proto.Message.IEventResponseMessage|null} [response] EventUpdateMessage response + * @property {proto.Message.IEventEditMessage|null} [edit] EventUpdateMessage edit */ /** - * Constructs a new EncReactionMessage. + * Constructs a new EventUpdateMessage. * @memberof proto.Message - * @classdesc Represents an EncReactionMessage. - * @implements IEncReactionMessage + * @classdesc Represents an EventUpdateMessage. + * @implements IEventUpdateMessage * @constructor - * @param {proto.Message.IEncReactionMessage=} [properties] Properties to set + * @param {proto.Message.IEventUpdateMessage=} [properties] Properties to set */ - function EncReactionMessage(properties) { + function EventUpdateMessage(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -29960,101 +37778,88 @@ $root.proto = (function() { } /** - * EncReactionMessage targetMessageKey. - * @member {proto.IMessageKey|null|undefined} targetMessageKey - * @memberof proto.Message.EncReactionMessage - * @instance - */ - EncReactionMessage.prototype.targetMessageKey = null; - - /** - * EncReactionMessage encPayload. - * @member {Uint8Array} encPayload - * @memberof proto.Message.EncReactionMessage + * EventUpdateMessage response. + * @member {proto.Message.IEventResponseMessage|null|undefined} response + * @memberof proto.Message.EventUpdateMessage * @instance */ - EncReactionMessage.prototype.encPayload = $util.newBuffer([]); + EventUpdateMessage.prototype.response = null; /** - * EncReactionMessage encIv. - * @member {Uint8Array} encIv - * @memberof proto.Message.EncReactionMessage + * EventUpdateMessage edit. + * @member {proto.Message.IEventEditMessage|null|undefined} edit + * @memberof proto.Message.EventUpdateMessage * @instance */ - EncReactionMessage.prototype.encIv = $util.newBuffer([]); + EventUpdateMessage.prototype.edit = null; /** - * Creates a new EncReactionMessage instance using the specified properties. + * Creates a new EventUpdateMessage instance using the specified properties. * @function create - * @memberof proto.Message.EncReactionMessage + * @memberof proto.Message.EventUpdateMessage * @static - * @param {proto.Message.IEncReactionMessage=} [properties] Properties to set - * @returns {proto.Message.EncReactionMessage} EncReactionMessage instance + * @param {proto.Message.IEventUpdateMessage=} [properties] Properties to set + * @returns {proto.Message.EventUpdateMessage} EventUpdateMessage instance */ - EncReactionMessage.create = function create(properties) { - return new EncReactionMessage(properties); + EventUpdateMessage.create = function create(properties) { + return new EventUpdateMessage(properties); }; /** - * Encodes the specified EncReactionMessage message. Does not implicitly {@link proto.Message.EncReactionMessage.verify|verify} messages. + * Encodes the specified EventUpdateMessage message. Does not implicitly {@link proto.Message.EventUpdateMessage.verify|verify} messages. * @function encode - * @memberof proto.Message.EncReactionMessage + * @memberof proto.Message.EventUpdateMessage * @static - * @param {proto.Message.IEncReactionMessage} message EncReactionMessage message or plain object to encode + * @param {proto.Message.IEventUpdateMessage} message EventUpdateMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EncReactionMessage.encode = function encode(message, writer) { + EventUpdateMessage.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.targetMessageKey != null && Object.hasOwnProperty.call(message, "targetMessageKey")) - $root.proto.MessageKey.encode(message.targetMessageKey, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.encPayload != null && Object.hasOwnProperty.call(message, "encPayload")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.encPayload); - if (message.encIv != null && Object.hasOwnProperty.call(message, "encIv")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.encIv); + if (message.response != null && Object.hasOwnProperty.call(message, "response")) + $root.proto.Message.EventResponseMessage.encode(message.response, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.edit != null && Object.hasOwnProperty.call(message, "edit")) + $root.proto.Message.EventEditMessage.encode(message.edit, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified EncReactionMessage message, length delimited. Does not implicitly {@link proto.Message.EncReactionMessage.verify|verify} messages. + * Encodes the specified EventUpdateMessage message, length delimited. Does not implicitly {@link proto.Message.EventUpdateMessage.verify|verify} messages. * @function encodeDelimited - * @memberof proto.Message.EncReactionMessage + * @memberof proto.Message.EventUpdateMessage * @static - * @param {proto.Message.IEncReactionMessage} message EncReactionMessage message or plain object to encode + * @param {proto.Message.IEventUpdateMessage} message EventUpdateMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EncReactionMessage.encodeDelimited = function encodeDelimited(message, writer) { + EventUpdateMessage.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EncReactionMessage message from the specified reader or buffer. + * Decodes an EventUpdateMessage message from the specified reader or buffer. * @function decode - * @memberof proto.Message.EncReactionMessage + * @memberof proto.Message.EventUpdateMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {proto.Message.EncReactionMessage} EncReactionMessage + * @returns {proto.Message.EventUpdateMessage} EventUpdateMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EncReactionMessage.decode = function decode(reader, length) { + EventUpdateMessage.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Message.EncReactionMessage(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Message.EventUpdateMessage(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.targetMessageKey = $root.proto.MessageKey.decode(reader, reader.uint32()); + message.response = $root.proto.Message.EventResponseMessage.decode(reader, reader.uint32()); break; case 2: - message.encPayload = reader.bytes(); - break; - case 3: - message.encIv = reader.bytes(); + message.edit = $root.proto.Message.EventEditMessage.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -30065,127 +37870,106 @@ $root.proto = (function() { }; /** - * Decodes an EncReactionMessage message from the specified reader or buffer, length delimited. + * Decodes an EventUpdateMessage message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof proto.Message.EncReactionMessage + * @memberof proto.Message.EventUpdateMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.Message.EncReactionMessage} EncReactionMessage + * @returns {proto.Message.EventUpdateMessage} EventUpdateMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EncReactionMessage.decodeDelimited = function decodeDelimited(reader) { + EventUpdateMessage.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EncReactionMessage message. + * Verifies an EventUpdateMessage message. * @function verify - * @memberof proto.Message.EncReactionMessage + * @memberof proto.Message.EventUpdateMessage * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EncReactionMessage.verify = function verify(message) { + EventUpdateMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.targetMessageKey != null && message.hasOwnProperty("targetMessageKey")) { - var error = $root.proto.MessageKey.verify(message.targetMessageKey); + if (message.response != null && message.hasOwnProperty("response")) { + var error = $root.proto.Message.EventResponseMessage.verify(message.response); if (error) - return "targetMessageKey." + error; + return "response." + error; + } + if (message.edit != null && message.hasOwnProperty("edit")) { + var error = $root.proto.Message.EventEditMessage.verify(message.edit); + if (error) + return "edit." + error; } - if (message.encPayload != null && message.hasOwnProperty("encPayload")) - if (!(message.encPayload && typeof message.encPayload.length === "number" || $util.isString(message.encPayload))) - return "encPayload: buffer expected"; - if (message.encIv != null && message.hasOwnProperty("encIv")) - if (!(message.encIv && typeof message.encIv.length === "number" || $util.isString(message.encIv))) - return "encIv: buffer expected"; return null; }; /** - * Creates an EncReactionMessage message from a plain object. Also converts values to their respective internal types. + * Creates an EventUpdateMessage message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof proto.Message.EncReactionMessage + * @memberof proto.Message.EventUpdateMessage * @static * @param {Object.} object Plain object - * @returns {proto.Message.EncReactionMessage} EncReactionMessage + * @returns {proto.Message.EventUpdateMessage} EventUpdateMessage */ - EncReactionMessage.fromObject = function fromObject(object) { - if (object instanceof $root.proto.Message.EncReactionMessage) + EventUpdateMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.EventUpdateMessage) return object; - var message = new $root.proto.Message.EncReactionMessage(); - if (object.targetMessageKey != null) { - if (typeof object.targetMessageKey !== "object") - throw TypeError(".proto.Message.EncReactionMessage.targetMessageKey: object expected"); - message.targetMessageKey = $root.proto.MessageKey.fromObject(object.targetMessageKey); + var message = new $root.proto.Message.EventUpdateMessage(); + if (object.response != null) { + if (typeof object.response !== "object") + throw TypeError(".proto.Message.EventUpdateMessage.response: object expected"); + message.response = $root.proto.Message.EventResponseMessage.fromObject(object.response); + } + if (object.edit != null) { + if (typeof object.edit !== "object") + throw TypeError(".proto.Message.EventUpdateMessage.edit: object expected"); + message.edit = $root.proto.Message.EventEditMessage.fromObject(object.edit); } - if (object.encPayload != null) - if (typeof object.encPayload === "string") - $util.base64.decode(object.encPayload, message.encPayload = $util.newBuffer($util.base64.length(object.encPayload)), 0); - else if (object.encPayload.length) - message.encPayload = object.encPayload; - if (object.encIv != null) - if (typeof object.encIv === "string") - $util.base64.decode(object.encIv, message.encIv = $util.newBuffer($util.base64.length(object.encIv)), 0); - else if (object.encIv.length) - message.encIv = object.encIv; return message; }; /** - * Creates a plain object from an EncReactionMessage message. Also converts values to other types if specified. + * Creates a plain object from an EventUpdateMessage message. Also converts values to other types if specified. * @function toObject - * @memberof proto.Message.EncReactionMessage + * @memberof proto.Message.EventUpdateMessage * @static - * @param {proto.Message.EncReactionMessage} message EncReactionMessage + * @param {proto.Message.EventUpdateMessage} message EventUpdateMessage * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EncReactionMessage.toObject = function toObject(message, options) { + EventUpdateMessage.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.targetMessageKey = null; - if (options.bytes === String) - object.encPayload = ""; - else { - object.encPayload = []; - if (options.bytes !== Array) - object.encPayload = $util.newBuffer(object.encPayload); - } - if (options.bytes === String) - object.encIv = ""; - else { - object.encIv = []; - if (options.bytes !== Array) - object.encIv = $util.newBuffer(object.encIv); - } + object.response = null; + object.edit = null; } - if (message.targetMessageKey != null && message.hasOwnProperty("targetMessageKey")) - object.targetMessageKey = $root.proto.MessageKey.toObject(message.targetMessageKey, options); - if (message.encPayload != null && message.hasOwnProperty("encPayload")) - object.encPayload = options.bytes === String ? $util.base64.encode(message.encPayload, 0, message.encPayload.length) : options.bytes === Array ? Array.prototype.slice.call(message.encPayload) : message.encPayload; - if (message.encIv != null && message.hasOwnProperty("encIv")) - object.encIv = options.bytes === String ? $util.base64.encode(message.encIv, 0, message.encIv.length) : options.bytes === Array ? Array.prototype.slice.call(message.encIv) : message.encIv; + if (message.response != null && message.hasOwnProperty("response")) + object.response = $root.proto.Message.EventResponseMessage.toObject(message.response, options); + if (message.edit != null && message.hasOwnProperty("edit")) + object.edit = $root.proto.Message.EventEditMessage.toObject(message.edit, options); return object; }; /** - * Converts this EncReactionMessage to JSON. + * Converts this EventUpdateMessage to JSON. * @function toJSON - * @memberof proto.Message.EncReactionMessage + * @memberof proto.Message.EventUpdateMessage * @instance * @returns {Object.} JSON object */ - EncReactionMessage.prototype.toJSON = function toJSON() { + EventUpdateMessage.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return EncReactionMessage; + return EventUpdateMessage; })(); Message.ExtendedTextMessage = (function() { @@ -30668,9 +38452,6 @@ $root.proto = (function() { case 0: case 1: case 2: - case 3: - case 4: - case 5: case 6: case 7: case 8: @@ -30684,6 +38465,8 @@ $root.proto = (function() { return "previewType: enum value expected"; case 0: case 1: + case 4: + case 5: break; } if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail")) @@ -30777,30 +38560,18 @@ $root.proto = (function() { if (object.backgroundArgb != null) message.backgroundArgb = object.backgroundArgb >>> 0; switch (object.font) { - case "SANS_SERIF": + case "SYSTEM": case 0: message.font = 0; break; - case "SERIF": + case "SYSTEM_TEXT": case 1: message.font = 1; break; - case "NORICAN_REGULAR": + case "FB_SCRIPT": case 2: message.font = 2; break; - case "BRYNDAN_WRITE": - case 3: - message.font = 3; - break; - case "BEBASNEUE_REGULAR": - case 4: - message.font = 4; - break; - case "OSWALD_HEAVY": - case 5: - message.font = 5; - break; case "SYSTEM_BOLD": case 6: message.font = 6; @@ -30831,6 +38602,14 @@ $root.proto = (function() { case 1: message.previewType = 1; break; + case "PLACEHOLDER": + case 4: + message.previewType = 4; + break; + case "IMAGE": + case 5: + message.previewType = 5; + break; } if (object.jpegThumbnail != null) if (typeof object.jpegThumbnail === "string") @@ -30943,7 +38722,7 @@ $root.proto = (function() { object.title = ""; object.textArgb = 0; object.backgroundArgb = 0; - object.font = options.enums === String ? "SANS_SERIF" : 0; + object.font = options.enums === String ? "SYSTEM" : 0; object.previewType = options.enums === String ? "NONE" : 0; if (options.bytes === String) object.jpegThumbnail = ""; @@ -31064,12 +38843,9 @@ $root.proto = (function() { * FontType enum. * @name proto.Message.ExtendedTextMessage.FontType * @enum {number} - * @property {number} SANS_SERIF=0 SANS_SERIF value - * @property {number} SERIF=1 SERIF value - * @property {number} NORICAN_REGULAR=2 NORICAN_REGULAR value - * @property {number} BRYNDAN_WRITE=3 BRYNDAN_WRITE value - * @property {number} BEBASNEUE_REGULAR=4 BEBASNEUE_REGULAR value - * @property {number} OSWALD_HEAVY=5 OSWALD_HEAVY value + * @property {number} SYSTEM=0 SYSTEM value + * @property {number} SYSTEM_TEXT=1 SYSTEM_TEXT value + * @property {number} FB_SCRIPT=2 FB_SCRIPT value * @property {number} SYSTEM_BOLD=6 SYSTEM_BOLD value * @property {number} MORNINGBREEZE_REGULAR=7 MORNINGBREEZE_REGULAR value * @property {number} CALISTOGA_REGULAR=8 CALISTOGA_REGULAR value @@ -31078,12 +38854,9 @@ $root.proto = (function() { */ ExtendedTextMessage.FontType = (function() { var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SANS_SERIF"] = 0; - values[valuesById[1] = "SERIF"] = 1; - values[valuesById[2] = "NORICAN_REGULAR"] = 2; - values[valuesById[3] = "BRYNDAN_WRITE"] = 3; - values[valuesById[4] = "BEBASNEUE_REGULAR"] = 4; - values[valuesById[5] = "OSWALD_HEAVY"] = 5; + values[valuesById[0] = "SYSTEM"] = 0; + values[valuesById[1] = "SYSTEM_TEXT"] = 1; + values[valuesById[2] = "FB_SCRIPT"] = 2; values[valuesById[6] = "SYSTEM_BOLD"] = 6; values[valuesById[7] = "MORNINGBREEZE_REGULAR"] = 7; values[valuesById[8] = "CALISTOGA_REGULAR"] = 8; @@ -31116,17 +38889,241 @@ $root.proto = (function() { * @enum {number} * @property {number} NONE=0 NONE value * @property {number} VIDEO=1 VIDEO value + * @property {number} PLACEHOLDER=4 PLACEHOLDER value + * @property {number} IMAGE=5 IMAGE value */ ExtendedTextMessage.PreviewType = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "NONE"] = 0; values[valuesById[1] = "VIDEO"] = 1; + values[valuesById[4] = "PLACEHOLDER"] = 4; + values[valuesById[5] = "IMAGE"] = 5; return values; })(); return ExtendedTextMessage; })(); + Message.ExtendedTextMessageWithParentKey = (function() { + + /** + * Properties of an ExtendedTextMessageWithParentKey. + * @memberof proto.Message + * @interface IExtendedTextMessageWithParentKey + * @property {proto.IMessageKey|null} [key] ExtendedTextMessageWithParentKey key + * @property {proto.Message.IExtendedTextMessage|null} [extendedTextMessage] ExtendedTextMessageWithParentKey extendedTextMessage + */ + + /** + * Constructs a new ExtendedTextMessageWithParentKey. + * @memberof proto.Message + * @classdesc Represents an ExtendedTextMessageWithParentKey. + * @implements IExtendedTextMessageWithParentKey + * @constructor + * @param {proto.Message.IExtendedTextMessageWithParentKey=} [properties] Properties to set + */ + function ExtendedTextMessageWithParentKey(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtendedTextMessageWithParentKey key. + * @member {proto.IMessageKey|null|undefined} key + * @memberof proto.Message.ExtendedTextMessageWithParentKey + * @instance + */ + ExtendedTextMessageWithParentKey.prototype.key = null; + + /** + * ExtendedTextMessageWithParentKey extendedTextMessage. + * @member {proto.Message.IExtendedTextMessage|null|undefined} extendedTextMessage + * @memberof proto.Message.ExtendedTextMessageWithParentKey + * @instance + */ + ExtendedTextMessageWithParentKey.prototype.extendedTextMessage = null; + + /** + * Creates a new ExtendedTextMessageWithParentKey instance using the specified properties. + * @function create + * @memberof proto.Message.ExtendedTextMessageWithParentKey + * @static + * @param {proto.Message.IExtendedTextMessageWithParentKey=} [properties] Properties to set + * @returns {proto.Message.ExtendedTextMessageWithParentKey} ExtendedTextMessageWithParentKey instance + */ + ExtendedTextMessageWithParentKey.create = function create(properties) { + return new ExtendedTextMessageWithParentKey(properties); + }; + + /** + * Encodes the specified ExtendedTextMessageWithParentKey message. Does not implicitly {@link proto.Message.ExtendedTextMessageWithParentKey.verify|verify} messages. + * @function encode + * @memberof proto.Message.ExtendedTextMessageWithParentKey + * @static + * @param {proto.Message.IExtendedTextMessageWithParentKey} message ExtendedTextMessageWithParentKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtendedTextMessageWithParentKey.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + $root.proto.MessageKey.encode(message.key, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.extendedTextMessage != null && Object.hasOwnProperty.call(message, "extendedTextMessage")) + $root.proto.Message.ExtendedTextMessage.encode(message.extendedTextMessage, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtendedTextMessageWithParentKey message, length delimited. Does not implicitly {@link proto.Message.ExtendedTextMessageWithParentKey.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.ExtendedTextMessageWithParentKey + * @static + * @param {proto.Message.IExtendedTextMessageWithParentKey} message ExtendedTextMessageWithParentKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtendedTextMessageWithParentKey.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtendedTextMessageWithParentKey message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.ExtendedTextMessageWithParentKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.ExtendedTextMessageWithParentKey} ExtendedTextMessageWithParentKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtendedTextMessageWithParentKey.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Message.ExtendedTextMessageWithParentKey(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.key = $root.proto.MessageKey.decode(reader, reader.uint32()); + break; + case 2: + message.extendedTextMessage = $root.proto.Message.ExtendedTextMessage.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtendedTextMessageWithParentKey message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.ExtendedTextMessageWithParentKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.ExtendedTextMessageWithParentKey} ExtendedTextMessageWithParentKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtendedTextMessageWithParentKey.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtendedTextMessageWithParentKey message. + * @function verify + * @memberof proto.Message.ExtendedTextMessageWithParentKey + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtendedTextMessageWithParentKey.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.key != null && message.hasOwnProperty("key")) { + var error = $root.proto.MessageKey.verify(message.key); + if (error) + return "key." + error; + } + if (message.extendedTextMessage != null && message.hasOwnProperty("extendedTextMessage")) { + var error = $root.proto.Message.ExtendedTextMessage.verify(message.extendedTextMessage); + if (error) + return "extendedTextMessage." + error; + } + return null; + }; + + /** + * Creates an ExtendedTextMessageWithParentKey message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.ExtendedTextMessageWithParentKey + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.ExtendedTextMessageWithParentKey} ExtendedTextMessageWithParentKey + */ + ExtendedTextMessageWithParentKey.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.ExtendedTextMessageWithParentKey) + return object; + var message = new $root.proto.Message.ExtendedTextMessageWithParentKey(); + if (object.key != null) { + if (typeof object.key !== "object") + throw TypeError(".proto.Message.ExtendedTextMessageWithParentKey.key: object expected"); + message.key = $root.proto.MessageKey.fromObject(object.key); + } + if (object.extendedTextMessage != null) { + if (typeof object.extendedTextMessage !== "object") + throw TypeError(".proto.Message.ExtendedTextMessageWithParentKey.extendedTextMessage: object expected"); + message.extendedTextMessage = $root.proto.Message.ExtendedTextMessage.fromObject(object.extendedTextMessage); + } + return message; + }; + + /** + * Creates a plain object from an ExtendedTextMessageWithParentKey message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.ExtendedTextMessageWithParentKey + * @static + * @param {proto.Message.ExtendedTextMessageWithParentKey} message ExtendedTextMessageWithParentKey + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtendedTextMessageWithParentKey.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.key = null; + object.extendedTextMessage = null; + } + if (message.key != null && message.hasOwnProperty("key")) + object.key = $root.proto.MessageKey.toObject(message.key, options); + if (message.extendedTextMessage != null && message.hasOwnProperty("extendedTextMessage")) + object.extendedTextMessage = $root.proto.Message.ExtendedTextMessage.toObject(message.extendedTextMessage, options); + return object; + }; + + /** + * Converts this ExtendedTextMessageWithParentKey to JSON. + * @function toJSON + * @memberof proto.Message.ExtendedTextMessageWithParentKey + * @instance + * @returns {Object.} JSON object + */ + ExtendedTextMessageWithParentKey.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ExtendedTextMessageWithParentKey; + })(); + Message.FutureProofMessage = (function() { /** @@ -34059,6 +42056,7 @@ $root.proto = (function() { * @property {Uint8Array|null} [thumbnailSha256] ImageMessage thumbnailSha256 * @property {Uint8Array|null} [thumbnailEncSha256] ImageMessage thumbnailEncSha256 * @property {string|null} [staticUrl] ImageMessage staticUrl + * @property {Array.|null} [annotations] ImageMessage annotations */ /** @@ -34072,6 +42070,7 @@ $root.proto = (function() { function ImageMessage(properties) { this.interactiveAnnotations = []; this.scanLengths = []; + this.annotations = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -34286,6 +42285,14 @@ $root.proto = (function() { */ ImageMessage.prototype.staticUrl = ""; + /** + * ImageMessage annotations. + * @member {Array.} annotations + * @memberof proto.Message.ImageMessage + * @instance + */ + ImageMessage.prototype.annotations = $util.emptyArray; + /** * Creates a new ImageMessage instance using the specified properties. * @function create @@ -34364,6 +42371,9 @@ $root.proto = (function() { writer.uint32(/* id 28, wireType 2 =*/226).bytes(message.thumbnailEncSha256); if (message.staticUrl != null && Object.hasOwnProperty.call(message, "staticUrl")) writer.uint32(/* id 29, wireType 2 =*/234).string(message.staticUrl); + if (message.annotations != null && message.annotations.length) + for (var i = 0; i < message.annotations.length; ++i) + $root.proto.InteractiveAnnotation.encode(message.annotations[i], writer.uint32(/* id 30, wireType 2 =*/242).fork()).ldelim(); return writer; }; @@ -34485,6 +42495,11 @@ $root.proto = (function() { case 29: message.staticUrl = reader.string(); break; + case 30: + if (!(message.annotations && message.annotations.length)) + message.annotations = []; + message.annotations.push($root.proto.InteractiveAnnotation.decode(reader, reader.uint32())); + break; default: reader.skipType(tag & 7); break; @@ -34610,6 +42625,15 @@ $root.proto = (function() { if (message.staticUrl != null && message.hasOwnProperty("staticUrl")) if (!$util.isString(message.staticUrl)) return "staticUrl: string expected"; + if (message.annotations != null && message.hasOwnProperty("annotations")) { + if (!Array.isArray(message.annotations)) + return "annotations: array expected"; + for (var i = 0; i < message.annotations.length; ++i) { + var error = $root.proto.InteractiveAnnotation.verify(message.annotations[i]); + if (error) + return "annotations." + error; + } + } return null; }; @@ -34737,6 +42761,16 @@ $root.proto = (function() { message.thumbnailEncSha256 = object.thumbnailEncSha256; if (object.staticUrl != null) message.staticUrl = String(object.staticUrl); + if (object.annotations) { + if (!Array.isArray(object.annotations)) + throw TypeError(".proto.Message.ImageMessage.annotations: array expected"); + message.annotations = []; + for (var i = 0; i < object.annotations.length; ++i) { + if (typeof object.annotations[i] !== "object") + throw TypeError(".proto.Message.ImageMessage.annotations: object expected"); + message.annotations[i] = $root.proto.InteractiveAnnotation.fromObject(object.annotations[i]); + } + } return message; }; @@ -34756,6 +42790,7 @@ $root.proto = (function() { if (options.arrays || options.defaults) { object.interactiveAnnotations = []; object.scanLengths = []; + object.annotations = []; } if (options.defaults) { object.url = ""; @@ -34915,6 +42950,11 @@ $root.proto = (function() { object.thumbnailEncSha256 = options.bytes === String ? $util.base64.encode(message.thumbnailEncSha256, 0, message.thumbnailEncSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.thumbnailEncSha256) : message.thumbnailEncSha256; if (message.staticUrl != null && message.hasOwnProperty("staticUrl")) object.staticUrl = message.staticUrl; + if (message.annotations && message.annotations.length) { + object.annotations = []; + for (var j = 0; j < message.annotations.length; ++j) + object.annotations[j] = $root.proto.InteractiveAnnotation.toObject(message.annotations[j], options); + } return object; }; @@ -41326,96 +49366,532 @@ $root.proto = (function() { * @memberof proto.Message.LiveLocationMessage * @instance */ - LiveLocationMessage.prototype.speedInMps = 0; + LiveLocationMessage.prototype.speedInMps = 0; + + /** + * LiveLocationMessage degreesClockwiseFromMagneticNorth. + * @member {number} degreesClockwiseFromMagneticNorth + * @memberof proto.Message.LiveLocationMessage + * @instance + */ + LiveLocationMessage.prototype.degreesClockwiseFromMagneticNorth = 0; + + /** + * LiveLocationMessage caption. + * @member {string} caption + * @memberof proto.Message.LiveLocationMessage + * @instance + */ + LiveLocationMessage.prototype.caption = ""; + + /** + * LiveLocationMessage sequenceNumber. + * @member {number|Long} sequenceNumber + * @memberof proto.Message.LiveLocationMessage + * @instance + */ + LiveLocationMessage.prototype.sequenceNumber = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * LiveLocationMessage timeOffset. + * @member {number} timeOffset + * @memberof proto.Message.LiveLocationMessage + * @instance + */ + LiveLocationMessage.prototype.timeOffset = 0; + + /** + * LiveLocationMessage jpegThumbnail. + * @member {Uint8Array} jpegThumbnail + * @memberof proto.Message.LiveLocationMessage + * @instance + */ + LiveLocationMessage.prototype.jpegThumbnail = $util.newBuffer([]); + + /** + * LiveLocationMessage contextInfo. + * @member {proto.IContextInfo|null|undefined} contextInfo + * @memberof proto.Message.LiveLocationMessage + * @instance + */ + LiveLocationMessage.prototype.contextInfo = null; + + /** + * Creates a new LiveLocationMessage instance using the specified properties. + * @function create + * @memberof proto.Message.LiveLocationMessage + * @static + * @param {proto.Message.ILiveLocationMessage=} [properties] Properties to set + * @returns {proto.Message.LiveLocationMessage} LiveLocationMessage instance + */ + LiveLocationMessage.create = function create(properties) { + return new LiveLocationMessage(properties); + }; + + /** + * Encodes the specified LiveLocationMessage message. Does not implicitly {@link proto.Message.LiveLocationMessage.verify|verify} messages. + * @function encode + * @memberof proto.Message.LiveLocationMessage + * @static + * @param {proto.Message.ILiveLocationMessage} message LiveLocationMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LiveLocationMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.degreesLatitude != null && Object.hasOwnProperty.call(message, "degreesLatitude")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.degreesLatitude); + if (message.degreesLongitude != null && Object.hasOwnProperty.call(message, "degreesLongitude")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.degreesLongitude); + if (message.accuracyInMeters != null && Object.hasOwnProperty.call(message, "accuracyInMeters")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.accuracyInMeters); + if (message.speedInMps != null && Object.hasOwnProperty.call(message, "speedInMps")) + writer.uint32(/* id 4, wireType 5 =*/37).float(message.speedInMps); + if (message.degreesClockwiseFromMagneticNorth != null && Object.hasOwnProperty.call(message, "degreesClockwiseFromMagneticNorth")) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.degreesClockwiseFromMagneticNorth); + if (message.caption != null && Object.hasOwnProperty.call(message, "caption")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.caption); + if (message.sequenceNumber != null && Object.hasOwnProperty.call(message, "sequenceNumber")) + writer.uint32(/* id 7, wireType 0 =*/56).int64(message.sequenceNumber); + if (message.timeOffset != null && Object.hasOwnProperty.call(message, "timeOffset")) + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.timeOffset); + if (message.jpegThumbnail != null && Object.hasOwnProperty.call(message, "jpegThumbnail")) + writer.uint32(/* id 16, wireType 2 =*/130).bytes(message.jpegThumbnail); + if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo")) + $root.proto.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LiveLocationMessage message, length delimited. Does not implicitly {@link proto.Message.LiveLocationMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.LiveLocationMessage + * @static + * @param {proto.Message.ILiveLocationMessage} message LiveLocationMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LiveLocationMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LiveLocationMessage message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.LiveLocationMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.LiveLocationMessage} LiveLocationMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LiveLocationMessage.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Message.LiveLocationMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.degreesLatitude = reader.double(); + break; + case 2: + message.degreesLongitude = reader.double(); + break; + case 3: + message.accuracyInMeters = reader.uint32(); + break; + case 4: + message.speedInMps = reader.float(); + break; + case 5: + message.degreesClockwiseFromMagneticNorth = reader.uint32(); + break; + case 6: + message.caption = reader.string(); + break; + case 7: + message.sequenceNumber = reader.int64(); + break; + case 8: + message.timeOffset = reader.uint32(); + break; + case 16: + message.jpegThumbnail = reader.bytes(); + break; + case 17: + message.contextInfo = $root.proto.ContextInfo.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LiveLocationMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.LiveLocationMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.LiveLocationMessage} LiveLocationMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LiveLocationMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LiveLocationMessage message. + * @function verify + * @memberof proto.Message.LiveLocationMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LiveLocationMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.degreesLatitude != null && message.hasOwnProperty("degreesLatitude")) + if (typeof message.degreesLatitude !== "number") + return "degreesLatitude: number expected"; + if (message.degreesLongitude != null && message.hasOwnProperty("degreesLongitude")) + if (typeof message.degreesLongitude !== "number") + return "degreesLongitude: number expected"; + if (message.accuracyInMeters != null && message.hasOwnProperty("accuracyInMeters")) + if (!$util.isInteger(message.accuracyInMeters)) + return "accuracyInMeters: integer expected"; + if (message.speedInMps != null && message.hasOwnProperty("speedInMps")) + if (typeof message.speedInMps !== "number") + return "speedInMps: number expected"; + if (message.degreesClockwiseFromMagneticNorth != null && message.hasOwnProperty("degreesClockwiseFromMagneticNorth")) + if (!$util.isInteger(message.degreesClockwiseFromMagneticNorth)) + return "degreesClockwiseFromMagneticNorth: integer expected"; + if (message.caption != null && message.hasOwnProperty("caption")) + if (!$util.isString(message.caption)) + return "caption: string expected"; + if (message.sequenceNumber != null && message.hasOwnProperty("sequenceNumber")) + if (!$util.isInteger(message.sequenceNumber) && !(message.sequenceNumber && $util.isInteger(message.sequenceNumber.low) && $util.isInteger(message.sequenceNumber.high))) + return "sequenceNumber: integer|Long expected"; + if (message.timeOffset != null && message.hasOwnProperty("timeOffset")) + if (!$util.isInteger(message.timeOffset)) + return "timeOffset: integer expected"; + if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail")) + if (!(message.jpegThumbnail && typeof message.jpegThumbnail.length === "number" || $util.isString(message.jpegThumbnail))) + return "jpegThumbnail: buffer expected"; + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { + var error = $root.proto.ContextInfo.verify(message.contextInfo); + if (error) + return "contextInfo." + error; + } + return null; + }; + + /** + * Creates a LiveLocationMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.LiveLocationMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.LiveLocationMessage} LiveLocationMessage + */ + LiveLocationMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.LiveLocationMessage) + return object; + var message = new $root.proto.Message.LiveLocationMessage(); + if (object.degreesLatitude != null) + message.degreesLatitude = Number(object.degreesLatitude); + if (object.degreesLongitude != null) + message.degreesLongitude = Number(object.degreesLongitude); + if (object.accuracyInMeters != null) + message.accuracyInMeters = object.accuracyInMeters >>> 0; + if (object.speedInMps != null) + message.speedInMps = Number(object.speedInMps); + if (object.degreesClockwiseFromMagneticNorth != null) + message.degreesClockwiseFromMagneticNorth = object.degreesClockwiseFromMagneticNorth >>> 0; + if (object.caption != null) + message.caption = String(object.caption); + if (object.sequenceNumber != null) + if ($util.Long) + (message.sequenceNumber = $util.Long.fromValue(object.sequenceNumber)).unsigned = false; + else if (typeof object.sequenceNumber === "string") + message.sequenceNumber = parseInt(object.sequenceNumber, 10); + else if (typeof object.sequenceNumber === "number") + message.sequenceNumber = object.sequenceNumber; + else if (typeof object.sequenceNumber === "object") + message.sequenceNumber = new $util.LongBits(object.sequenceNumber.low >>> 0, object.sequenceNumber.high >>> 0).toNumber(); + if (object.timeOffset != null) + message.timeOffset = object.timeOffset >>> 0; + if (object.jpegThumbnail != null) + if (typeof object.jpegThumbnail === "string") + $util.base64.decode(object.jpegThumbnail, message.jpegThumbnail = $util.newBuffer($util.base64.length(object.jpegThumbnail)), 0); + else if (object.jpegThumbnail.length) + message.jpegThumbnail = object.jpegThumbnail; + if (object.contextInfo != null) { + if (typeof object.contextInfo !== "object") + throw TypeError(".proto.Message.LiveLocationMessage.contextInfo: object expected"); + message.contextInfo = $root.proto.ContextInfo.fromObject(object.contextInfo); + } + return message; + }; + + /** + * Creates a plain object from a LiveLocationMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.LiveLocationMessage + * @static + * @param {proto.Message.LiveLocationMessage} message LiveLocationMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LiveLocationMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.degreesLatitude = 0; + object.degreesLongitude = 0; + object.accuracyInMeters = 0; + object.speedInMps = 0; + object.degreesClockwiseFromMagneticNorth = 0; + object.caption = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.sequenceNumber = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.sequenceNumber = options.longs === String ? "0" : 0; + object.timeOffset = 0; + if (options.bytes === String) + object.jpegThumbnail = ""; + else { + object.jpegThumbnail = []; + if (options.bytes !== Array) + object.jpegThumbnail = $util.newBuffer(object.jpegThumbnail); + } + object.contextInfo = null; + } + if (message.degreesLatitude != null && message.hasOwnProperty("degreesLatitude")) + object.degreesLatitude = options.json && !isFinite(message.degreesLatitude) ? String(message.degreesLatitude) : message.degreesLatitude; + if (message.degreesLongitude != null && message.hasOwnProperty("degreesLongitude")) + object.degreesLongitude = options.json && !isFinite(message.degreesLongitude) ? String(message.degreesLongitude) : message.degreesLongitude; + if (message.accuracyInMeters != null && message.hasOwnProperty("accuracyInMeters")) + object.accuracyInMeters = message.accuracyInMeters; + if (message.speedInMps != null && message.hasOwnProperty("speedInMps")) + object.speedInMps = options.json && !isFinite(message.speedInMps) ? String(message.speedInMps) : message.speedInMps; + if (message.degreesClockwiseFromMagneticNorth != null && message.hasOwnProperty("degreesClockwiseFromMagneticNorth")) + object.degreesClockwiseFromMagneticNorth = message.degreesClockwiseFromMagneticNorth; + if (message.caption != null && message.hasOwnProperty("caption")) + object.caption = message.caption; + if (message.sequenceNumber != null && message.hasOwnProperty("sequenceNumber")) + if (typeof message.sequenceNumber === "number") + object.sequenceNumber = options.longs === String ? String(message.sequenceNumber) : message.sequenceNumber; + else + object.sequenceNumber = options.longs === String ? $util.Long.prototype.toString.call(message.sequenceNumber) : options.longs === Number ? new $util.LongBits(message.sequenceNumber.low >>> 0, message.sequenceNumber.high >>> 0).toNumber() : message.sequenceNumber; + if (message.timeOffset != null && message.hasOwnProperty("timeOffset")) + object.timeOffset = message.timeOffset; + if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail")) + object.jpegThumbnail = options.bytes === String ? $util.base64.encode(message.jpegThumbnail, 0, message.jpegThumbnail.length) : options.bytes === Array ? Array.prototype.slice.call(message.jpegThumbnail) : message.jpegThumbnail; + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) + object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); + return object; + }; + + /** + * Converts this LiveLocationMessage to JSON. + * @function toJSON + * @memberof proto.Message.LiveLocationMessage + * @instance + * @returns {Object.} JSON object + */ + LiveLocationMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return LiveLocationMessage; + })(); + + Message.LocationMessage = (function() { + + /** + * Properties of a LocationMessage. + * @memberof proto.Message + * @interface ILocationMessage + * @property {number|null} [degreesLatitude] LocationMessage degreesLatitude + * @property {number|null} [degreesLongitude] LocationMessage degreesLongitude + * @property {string|null} [name] LocationMessage name + * @property {string|null} [address] LocationMessage address + * @property {string|null} [url] LocationMessage url + * @property {boolean|null} [isLive] LocationMessage isLive + * @property {number|null} [accuracyInMeters] LocationMessage accuracyInMeters + * @property {number|null} [speedInMps] LocationMessage speedInMps + * @property {number|null} [degreesClockwiseFromMagneticNorth] LocationMessage degreesClockwiseFromMagneticNorth + * @property {string|null} [comment] LocationMessage comment + * @property {Uint8Array|null} [jpegThumbnail] LocationMessage jpegThumbnail + * @property {proto.IContextInfo|null} [contextInfo] LocationMessage contextInfo + */ + + /** + * Constructs a new LocationMessage. + * @memberof proto.Message + * @classdesc Represents a LocationMessage. + * @implements ILocationMessage + * @constructor + * @param {proto.Message.ILocationMessage=} [properties] Properties to set + */ + function LocationMessage(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LocationMessage degreesLatitude. + * @member {number} degreesLatitude + * @memberof proto.Message.LocationMessage + * @instance + */ + LocationMessage.prototype.degreesLatitude = 0; + + /** + * LocationMessage degreesLongitude. + * @member {number} degreesLongitude + * @memberof proto.Message.LocationMessage + * @instance + */ + LocationMessage.prototype.degreesLongitude = 0; + + /** + * LocationMessage name. + * @member {string} name + * @memberof proto.Message.LocationMessage + * @instance + */ + LocationMessage.prototype.name = ""; + + /** + * LocationMessage address. + * @member {string} address + * @memberof proto.Message.LocationMessage + * @instance + */ + LocationMessage.prototype.address = ""; + + /** + * LocationMessage url. + * @member {string} url + * @memberof proto.Message.LocationMessage + * @instance + */ + LocationMessage.prototype.url = ""; + + /** + * LocationMessage isLive. + * @member {boolean} isLive + * @memberof proto.Message.LocationMessage + * @instance + */ + LocationMessage.prototype.isLive = false; /** - * LiveLocationMessage degreesClockwiseFromMagneticNorth. - * @member {number} degreesClockwiseFromMagneticNorth - * @memberof proto.Message.LiveLocationMessage + * LocationMessage accuracyInMeters. + * @member {number} accuracyInMeters + * @memberof proto.Message.LocationMessage * @instance */ - LiveLocationMessage.prototype.degreesClockwiseFromMagneticNorth = 0; + LocationMessage.prototype.accuracyInMeters = 0; /** - * LiveLocationMessage caption. - * @member {string} caption - * @memberof proto.Message.LiveLocationMessage + * LocationMessage speedInMps. + * @member {number} speedInMps + * @memberof proto.Message.LocationMessage * @instance */ - LiveLocationMessage.prototype.caption = ""; + LocationMessage.prototype.speedInMps = 0; /** - * LiveLocationMessage sequenceNumber. - * @member {number|Long} sequenceNumber - * @memberof proto.Message.LiveLocationMessage + * LocationMessage degreesClockwiseFromMagneticNorth. + * @member {number} degreesClockwiseFromMagneticNorth + * @memberof proto.Message.LocationMessage * @instance */ - LiveLocationMessage.prototype.sequenceNumber = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + LocationMessage.prototype.degreesClockwiseFromMagneticNorth = 0; /** - * LiveLocationMessage timeOffset. - * @member {number} timeOffset - * @memberof proto.Message.LiveLocationMessage + * LocationMessage comment. + * @member {string} comment + * @memberof proto.Message.LocationMessage * @instance */ - LiveLocationMessage.prototype.timeOffset = 0; + LocationMessage.prototype.comment = ""; /** - * LiveLocationMessage jpegThumbnail. + * LocationMessage jpegThumbnail. * @member {Uint8Array} jpegThumbnail - * @memberof proto.Message.LiveLocationMessage + * @memberof proto.Message.LocationMessage * @instance */ - LiveLocationMessage.prototype.jpegThumbnail = $util.newBuffer([]); + LocationMessage.prototype.jpegThumbnail = $util.newBuffer([]); /** - * LiveLocationMessage contextInfo. + * LocationMessage contextInfo. * @member {proto.IContextInfo|null|undefined} contextInfo - * @memberof proto.Message.LiveLocationMessage + * @memberof proto.Message.LocationMessage * @instance */ - LiveLocationMessage.prototype.contextInfo = null; + LocationMessage.prototype.contextInfo = null; /** - * Creates a new LiveLocationMessage instance using the specified properties. + * Creates a new LocationMessage instance using the specified properties. * @function create - * @memberof proto.Message.LiveLocationMessage + * @memberof proto.Message.LocationMessage * @static - * @param {proto.Message.ILiveLocationMessage=} [properties] Properties to set - * @returns {proto.Message.LiveLocationMessage} LiveLocationMessage instance + * @param {proto.Message.ILocationMessage=} [properties] Properties to set + * @returns {proto.Message.LocationMessage} LocationMessage instance */ - LiveLocationMessage.create = function create(properties) { - return new LiveLocationMessage(properties); + LocationMessage.create = function create(properties) { + return new LocationMessage(properties); }; /** - * Encodes the specified LiveLocationMessage message. Does not implicitly {@link proto.Message.LiveLocationMessage.verify|verify} messages. + * Encodes the specified LocationMessage message. Does not implicitly {@link proto.Message.LocationMessage.verify|verify} messages. * @function encode - * @memberof proto.Message.LiveLocationMessage + * @memberof proto.Message.LocationMessage * @static - * @param {proto.Message.ILiveLocationMessage} message LiveLocationMessage message or plain object to encode + * @param {proto.Message.ILocationMessage} message LocationMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LiveLocationMessage.encode = function encode(message, writer) { + LocationMessage.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.degreesLatitude != null && Object.hasOwnProperty.call(message, "degreesLatitude")) writer.uint32(/* id 1, wireType 1 =*/9).double(message.degreesLatitude); if (message.degreesLongitude != null && Object.hasOwnProperty.call(message, "degreesLongitude")) writer.uint32(/* id 2, wireType 1 =*/17).double(message.degreesLongitude); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + if (message.address != null && Object.hasOwnProperty.call(message, "address")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.address); + if (message.url != null && Object.hasOwnProperty.call(message, "url")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.url); + if (message.isLive != null && Object.hasOwnProperty.call(message, "isLive")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.isLive); if (message.accuracyInMeters != null && Object.hasOwnProperty.call(message, "accuracyInMeters")) - writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.accuracyInMeters); + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.accuracyInMeters); if (message.speedInMps != null && Object.hasOwnProperty.call(message, "speedInMps")) - writer.uint32(/* id 4, wireType 5 =*/37).float(message.speedInMps); + writer.uint32(/* id 8, wireType 5 =*/69).float(message.speedInMps); if (message.degreesClockwiseFromMagneticNorth != null && Object.hasOwnProperty.call(message, "degreesClockwiseFromMagneticNorth")) - writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.degreesClockwiseFromMagneticNorth); - if (message.caption != null && Object.hasOwnProperty.call(message, "caption")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.caption); - if (message.sequenceNumber != null && Object.hasOwnProperty.call(message, "sequenceNumber")) - writer.uint32(/* id 7, wireType 0 =*/56).int64(message.sequenceNumber); - if (message.timeOffset != null && Object.hasOwnProperty.call(message, "timeOffset")) - writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.timeOffset); + writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.degreesClockwiseFromMagneticNorth); + if (message.comment != null && Object.hasOwnProperty.call(message, "comment")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.comment); if (message.jpegThumbnail != null && Object.hasOwnProperty.call(message, "jpegThumbnail")) writer.uint32(/* id 16, wireType 2 =*/130).bytes(message.jpegThumbnail); if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo")) @@ -41424,33 +49900,33 @@ $root.proto = (function() { }; /** - * Encodes the specified LiveLocationMessage message, length delimited. Does not implicitly {@link proto.Message.LiveLocationMessage.verify|verify} messages. + * Encodes the specified LocationMessage message, length delimited. Does not implicitly {@link proto.Message.LocationMessage.verify|verify} messages. * @function encodeDelimited - * @memberof proto.Message.LiveLocationMessage + * @memberof proto.Message.LocationMessage * @static - * @param {proto.Message.ILiveLocationMessage} message LiveLocationMessage message or plain object to encode + * @param {proto.Message.ILocationMessage} message LocationMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LiveLocationMessage.encodeDelimited = function encodeDelimited(message, writer) { + LocationMessage.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a LiveLocationMessage message from the specified reader or buffer. + * Decodes a LocationMessage message from the specified reader or buffer. * @function decode - * @memberof proto.Message.LiveLocationMessage + * @memberof proto.Message.LocationMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {proto.Message.LiveLocationMessage} LiveLocationMessage + * @returns {proto.Message.LocationMessage} LocationMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LiveLocationMessage.decode = function decode(reader, length) { + LocationMessage.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Message.LiveLocationMessage(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Message.LocationMessage(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -41461,22 +49937,28 @@ $root.proto = (function() { message.degreesLongitude = reader.double(); break; case 3: - message.accuracyInMeters = reader.uint32(); + message.name = reader.string(); break; case 4: - message.speedInMps = reader.float(); + message.address = reader.string(); break; case 5: - message.degreesClockwiseFromMagneticNorth = reader.uint32(); + message.url = reader.string(); break; case 6: - message.caption = reader.string(); + message.isLive = reader.bool(); break; case 7: - message.sequenceNumber = reader.int64(); + message.accuracyInMeters = reader.uint32(); break; case 8: - message.timeOffset = reader.uint32(); + message.speedInMps = reader.float(); + break; + case 9: + message.degreesClockwiseFromMagneticNorth = reader.uint32(); + break; + case 11: + message.comment = reader.string(); break; case 16: message.jpegThumbnail = reader.bytes(); @@ -41493,30 +49975,30 @@ $root.proto = (function() { }; /** - * Decodes a LiveLocationMessage message from the specified reader or buffer, length delimited. + * Decodes a LocationMessage message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof proto.Message.LiveLocationMessage + * @memberof proto.Message.LocationMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.Message.LiveLocationMessage} LiveLocationMessage + * @returns {proto.Message.LocationMessage} LocationMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LiveLocationMessage.decodeDelimited = function decodeDelimited(reader) { + LocationMessage.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a LiveLocationMessage message. + * Verifies a LocationMessage message. * @function verify - * @memberof proto.Message.LiveLocationMessage + * @memberof proto.Message.LocationMessage * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - LiveLocationMessage.verify = function verify(message) { + LocationMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.degreesLatitude != null && message.hasOwnProperty("degreesLatitude")) @@ -41525,6 +50007,18 @@ $root.proto = (function() { if (message.degreesLongitude != null && message.hasOwnProperty("degreesLongitude")) if (typeof message.degreesLongitude !== "number") return "degreesLongitude: number expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.address != null && message.hasOwnProperty("address")) + if (!$util.isString(message.address)) + return "address: string expected"; + if (message.url != null && message.hasOwnProperty("url")) + if (!$util.isString(message.url)) + return "url: string expected"; + if (message.isLive != null && message.hasOwnProperty("isLive")) + if (typeof message.isLive !== "boolean") + return "isLive: boolean expected"; if (message.accuracyInMeters != null && message.hasOwnProperty("accuracyInMeters")) if (!$util.isInteger(message.accuracyInMeters)) return "accuracyInMeters: integer expected"; @@ -41534,15 +50028,9 @@ $root.proto = (function() { if (message.degreesClockwiseFromMagneticNorth != null && message.hasOwnProperty("degreesClockwiseFromMagneticNorth")) if (!$util.isInteger(message.degreesClockwiseFromMagneticNorth)) return "degreesClockwiseFromMagneticNorth: integer expected"; - if (message.caption != null && message.hasOwnProperty("caption")) - if (!$util.isString(message.caption)) - return "caption: string expected"; - if (message.sequenceNumber != null && message.hasOwnProperty("sequenceNumber")) - if (!$util.isInteger(message.sequenceNumber) && !(message.sequenceNumber && $util.isInteger(message.sequenceNumber.low) && $util.isInteger(message.sequenceNumber.high))) - return "sequenceNumber: integer|Long expected"; - if (message.timeOffset != null && message.hasOwnProperty("timeOffset")) - if (!$util.isInteger(message.timeOffset)) - return "timeOffset: integer expected"; + if (message.comment != null && message.hasOwnProperty("comment")) + if (!$util.isString(message.comment)) + return "comment: string expected"; if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail")) if (!(message.jpegThumbnail && typeof message.jpegThumbnail.length === "number" || $util.isString(message.jpegThumbnail))) return "jpegThumbnail: buffer expected"; @@ -41555,40 +50043,37 @@ $root.proto = (function() { }; /** - * Creates a LiveLocationMessage message from a plain object. Also converts values to their respective internal types. + * Creates a LocationMessage message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof proto.Message.LiveLocationMessage + * @memberof proto.Message.LocationMessage * @static * @param {Object.} object Plain object - * @returns {proto.Message.LiveLocationMessage} LiveLocationMessage + * @returns {proto.Message.LocationMessage} LocationMessage */ - LiveLocationMessage.fromObject = function fromObject(object) { - if (object instanceof $root.proto.Message.LiveLocationMessage) + LocationMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.LocationMessage) return object; - var message = new $root.proto.Message.LiveLocationMessage(); + var message = new $root.proto.Message.LocationMessage(); if (object.degreesLatitude != null) message.degreesLatitude = Number(object.degreesLatitude); if (object.degreesLongitude != null) message.degreesLongitude = Number(object.degreesLongitude); + if (object.name != null) + message.name = String(object.name); + if (object.address != null) + message.address = String(object.address); + if (object.url != null) + message.url = String(object.url); + if (object.isLive != null) + message.isLive = Boolean(object.isLive); if (object.accuracyInMeters != null) message.accuracyInMeters = object.accuracyInMeters >>> 0; if (object.speedInMps != null) message.speedInMps = Number(object.speedInMps); if (object.degreesClockwiseFromMagneticNorth != null) message.degreesClockwiseFromMagneticNorth = object.degreesClockwiseFromMagneticNorth >>> 0; - if (object.caption != null) - message.caption = String(object.caption); - if (object.sequenceNumber != null) - if ($util.Long) - (message.sequenceNumber = $util.Long.fromValue(object.sequenceNumber)).unsigned = false; - else if (typeof object.sequenceNumber === "string") - message.sequenceNumber = parseInt(object.sequenceNumber, 10); - else if (typeof object.sequenceNumber === "number") - message.sequenceNumber = object.sequenceNumber; - else if (typeof object.sequenceNumber === "object") - message.sequenceNumber = new $util.LongBits(object.sequenceNumber.low >>> 0, object.sequenceNumber.high >>> 0).toNumber(); - if (object.timeOffset != null) - message.timeOffset = object.timeOffset >>> 0; + if (object.comment != null) + message.comment = String(object.comment); if (object.jpegThumbnail != null) if (typeof object.jpegThumbnail === "string") $util.base64.decode(object.jpegThumbnail, message.jpegThumbnail = $util.newBuffer($util.base64.length(object.jpegThumbnail)), 0); @@ -41596,38 +50081,36 @@ $root.proto = (function() { message.jpegThumbnail = object.jpegThumbnail; if (object.contextInfo != null) { if (typeof object.contextInfo !== "object") - throw TypeError(".proto.Message.LiveLocationMessage.contextInfo: object expected"); + throw TypeError(".proto.Message.LocationMessage.contextInfo: object expected"); message.contextInfo = $root.proto.ContextInfo.fromObject(object.contextInfo); } return message; }; /** - * Creates a plain object from a LiveLocationMessage message. Also converts values to other types if specified. + * Creates a plain object from a LocationMessage message. Also converts values to other types if specified. * @function toObject - * @memberof proto.Message.LiveLocationMessage + * @memberof proto.Message.LocationMessage * @static - * @param {proto.Message.LiveLocationMessage} message LiveLocationMessage + * @param {proto.Message.LocationMessage} message LocationMessage * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LiveLocationMessage.toObject = function toObject(message, options) { + LocationMessage.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.degreesLatitude = 0; object.degreesLongitude = 0; + object.name = ""; + object.address = ""; + object.url = ""; + object.isLive = false; object.accuracyInMeters = 0; object.speedInMps = 0; object.degreesClockwiseFromMagneticNorth = 0; - object.caption = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.sequenceNumber = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.sequenceNumber = options.longs === String ? "0" : 0; - object.timeOffset = 0; + object.comment = ""; if (options.bytes === String) object.jpegThumbnail = ""; else { @@ -41641,21 +50124,22 @@ $root.proto = (function() { object.degreesLatitude = options.json && !isFinite(message.degreesLatitude) ? String(message.degreesLatitude) : message.degreesLatitude; if (message.degreesLongitude != null && message.hasOwnProperty("degreesLongitude")) object.degreesLongitude = options.json && !isFinite(message.degreesLongitude) ? String(message.degreesLongitude) : message.degreesLongitude; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.address != null && message.hasOwnProperty("address")) + object.address = message.address; + if (message.url != null && message.hasOwnProperty("url")) + object.url = message.url; + if (message.isLive != null && message.hasOwnProperty("isLive")) + object.isLive = message.isLive; if (message.accuracyInMeters != null && message.hasOwnProperty("accuracyInMeters")) object.accuracyInMeters = message.accuracyInMeters; if (message.speedInMps != null && message.hasOwnProperty("speedInMps")) object.speedInMps = options.json && !isFinite(message.speedInMps) ? String(message.speedInMps) : message.speedInMps; if (message.degreesClockwiseFromMagneticNorth != null && message.hasOwnProperty("degreesClockwiseFromMagneticNorth")) object.degreesClockwiseFromMagneticNorth = message.degreesClockwiseFromMagneticNorth; - if (message.caption != null && message.hasOwnProperty("caption")) - object.caption = message.caption; - if (message.sequenceNumber != null && message.hasOwnProperty("sequenceNumber")) - if (typeof message.sequenceNumber === "number") - object.sequenceNumber = options.longs === String ? String(message.sequenceNumber) : message.sequenceNumber; - else - object.sequenceNumber = options.longs === String ? $util.Long.prototype.toString.call(message.sequenceNumber) : options.longs === Number ? new $util.LongBits(message.sequenceNumber.low >>> 0, message.sequenceNumber.high >>> 0).toNumber() : message.sequenceNumber; - if (message.timeOffset != null && message.hasOwnProperty("timeOffset")) - object.timeOffset = message.timeOffset; + if (message.comment != null && message.hasOwnProperty("comment")) + object.comment = message.comment; if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail")) object.jpegThumbnail = options.bytes === String ? $util.base64.encode(message.jpegThumbnail, 0, message.jpegThumbnail.length) : options.bytes === Array ? Array.prototype.slice.call(message.jpegThumbnail) : message.jpegThumbnail; if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) @@ -41664,48 +50148,45 @@ $root.proto = (function() { }; /** - * Converts this LiveLocationMessage to JSON. + * Converts this LocationMessage to JSON. * @function toJSON - * @memberof proto.Message.LiveLocationMessage + * @memberof proto.Message.LocationMessage * @instance * @returns {Object.} JSON object */ - LiveLocationMessage.prototype.toJSON = function toJSON() { + LocationMessage.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return LiveLocationMessage; + return LocationMessage; })(); - Message.LocationMessage = (function() { + Message.MessageHistoryBundle = (function() { /** - * Properties of a LocationMessage. + * Properties of a MessageHistoryBundle. * @memberof proto.Message - * @interface ILocationMessage - * @property {number|null} [degreesLatitude] LocationMessage degreesLatitude - * @property {number|null} [degreesLongitude] LocationMessage degreesLongitude - * @property {string|null} [name] LocationMessage name - * @property {string|null} [address] LocationMessage address - * @property {string|null} [url] LocationMessage url - * @property {boolean|null} [isLive] LocationMessage isLive - * @property {number|null} [accuracyInMeters] LocationMessage accuracyInMeters - * @property {number|null} [speedInMps] LocationMessage speedInMps - * @property {number|null} [degreesClockwiseFromMagneticNorth] LocationMessage degreesClockwiseFromMagneticNorth - * @property {string|null} [comment] LocationMessage comment - * @property {Uint8Array|null} [jpegThumbnail] LocationMessage jpegThumbnail - * @property {proto.IContextInfo|null} [contextInfo] LocationMessage contextInfo + * @interface IMessageHistoryBundle + * @property {string|null} [mimetype] MessageHistoryBundle mimetype + * @property {Uint8Array|null} [fileSha256] MessageHistoryBundle fileSha256 + * @property {Uint8Array|null} [mediaKey] MessageHistoryBundle mediaKey + * @property {Uint8Array|null} [fileEncSha256] MessageHistoryBundle fileEncSha256 + * @property {string|null} [directPath] MessageHistoryBundle directPath + * @property {number|Long|null} [mediaKeyTimestamp] MessageHistoryBundle mediaKeyTimestamp + * @property {proto.IContextInfo|null} [contextInfo] MessageHistoryBundle contextInfo + * @property {Array.|null} [participants] MessageHistoryBundle participants */ /** - * Constructs a new LocationMessage. + * Constructs a new MessageHistoryBundle. * @memberof proto.Message - * @classdesc Represents a LocationMessage. - * @implements ILocationMessage + * @classdesc Represents a MessageHistoryBundle. + * @implements IMessageHistoryBundle * @constructor - * @param {proto.Message.ILocationMessage=} [properties] Properties to set + * @param {proto.Message.IMessageHistoryBundle=} [properties] Properties to set */ - function LocationMessage(properties) { + function MessageHistoryBundle(properties) { + this.participants = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -41713,218 +50194,528 @@ $root.proto = (function() { } /** - * LocationMessage degreesLatitude. - * @member {number} degreesLatitude - * @memberof proto.Message.LocationMessage + * MessageHistoryBundle mimetype. + * @member {string} mimetype + * @memberof proto.Message.MessageHistoryBundle * @instance */ - LocationMessage.prototype.degreesLatitude = 0; + MessageHistoryBundle.prototype.mimetype = ""; /** - * LocationMessage degreesLongitude. - * @member {number} degreesLongitude - * @memberof proto.Message.LocationMessage + * MessageHistoryBundle fileSha256. + * @member {Uint8Array} fileSha256 + * @memberof proto.Message.MessageHistoryBundle * @instance */ - LocationMessage.prototype.degreesLongitude = 0; + MessageHistoryBundle.prototype.fileSha256 = $util.newBuffer([]); + + /** + * MessageHistoryBundle mediaKey. + * @member {Uint8Array} mediaKey + * @memberof proto.Message.MessageHistoryBundle + * @instance + */ + MessageHistoryBundle.prototype.mediaKey = $util.newBuffer([]); + + /** + * MessageHistoryBundle fileEncSha256. + * @member {Uint8Array} fileEncSha256 + * @memberof proto.Message.MessageHistoryBundle + * @instance + */ + MessageHistoryBundle.prototype.fileEncSha256 = $util.newBuffer([]); + + /** + * MessageHistoryBundle directPath. + * @member {string} directPath + * @memberof proto.Message.MessageHistoryBundle + * @instance + */ + MessageHistoryBundle.prototype.directPath = ""; + + /** + * MessageHistoryBundle mediaKeyTimestamp. + * @member {number|Long} mediaKeyTimestamp + * @memberof proto.Message.MessageHistoryBundle + * @instance + */ + MessageHistoryBundle.prototype.mediaKeyTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * MessageHistoryBundle contextInfo. + * @member {proto.IContextInfo|null|undefined} contextInfo + * @memberof proto.Message.MessageHistoryBundle + * @instance + */ + MessageHistoryBundle.prototype.contextInfo = null; + + /** + * MessageHistoryBundle participants. + * @member {Array.} participants + * @memberof proto.Message.MessageHistoryBundle + * @instance + */ + MessageHistoryBundle.prototype.participants = $util.emptyArray; + + /** + * Creates a new MessageHistoryBundle instance using the specified properties. + * @function create + * @memberof proto.Message.MessageHistoryBundle + * @static + * @param {proto.Message.IMessageHistoryBundle=} [properties] Properties to set + * @returns {proto.Message.MessageHistoryBundle} MessageHistoryBundle instance + */ + MessageHistoryBundle.create = function create(properties) { + return new MessageHistoryBundle(properties); + }; + + /** + * Encodes the specified MessageHistoryBundle message. Does not implicitly {@link proto.Message.MessageHistoryBundle.verify|verify} messages. + * @function encode + * @memberof proto.Message.MessageHistoryBundle + * @static + * @param {proto.Message.IMessageHistoryBundle} message MessageHistoryBundle message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageHistoryBundle.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.mimetype != null && Object.hasOwnProperty.call(message, "mimetype")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.mimetype); + if (message.fileSha256 != null && Object.hasOwnProperty.call(message, "fileSha256")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.fileSha256); + if (message.mediaKey != null && Object.hasOwnProperty.call(message, "mediaKey")) + writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.mediaKey); + if (message.fileEncSha256 != null && Object.hasOwnProperty.call(message, "fileEncSha256")) + writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.fileEncSha256); + if (message.directPath != null && Object.hasOwnProperty.call(message, "directPath")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.directPath); + if (message.mediaKeyTimestamp != null && Object.hasOwnProperty.call(message, "mediaKeyTimestamp")) + writer.uint32(/* id 8, wireType 0 =*/64).int64(message.mediaKeyTimestamp); + if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo")) + $root.proto.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.participants != null && message.participants.length) + for (var i = 0; i < message.participants.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.participants[i]); + return writer; + }; + + /** + * Encodes the specified MessageHistoryBundle message, length delimited. Does not implicitly {@link proto.Message.MessageHistoryBundle.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.MessageHistoryBundle + * @static + * @param {proto.Message.IMessageHistoryBundle} message MessageHistoryBundle message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageHistoryBundle.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MessageHistoryBundle message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.MessageHistoryBundle + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.MessageHistoryBundle} MessageHistoryBundle + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageHistoryBundle.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Message.MessageHistoryBundle(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.mimetype = reader.string(); + break; + case 3: + message.fileSha256 = reader.bytes(); + break; + case 5: + message.mediaKey = reader.bytes(); + break; + case 6: + message.fileEncSha256 = reader.bytes(); + break; + case 7: + message.directPath = reader.string(); + break; + case 8: + message.mediaKeyTimestamp = reader.int64(); + break; + case 9: + message.contextInfo = $root.proto.ContextInfo.decode(reader, reader.uint32()); + break; + case 10: + if (!(message.participants && message.participants.length)) + message.participants = []; + message.participants.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MessageHistoryBundle message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.MessageHistoryBundle + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.MessageHistoryBundle} MessageHistoryBundle + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageHistoryBundle.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MessageHistoryBundle message. + * @function verify + * @memberof proto.Message.MessageHistoryBundle + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MessageHistoryBundle.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.mimetype != null && message.hasOwnProperty("mimetype")) + if (!$util.isString(message.mimetype)) + return "mimetype: string expected"; + if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) + if (!(message.fileSha256 && typeof message.fileSha256.length === "number" || $util.isString(message.fileSha256))) + return "fileSha256: buffer expected"; + if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) + if (!(message.mediaKey && typeof message.mediaKey.length === "number" || $util.isString(message.mediaKey))) + return "mediaKey: buffer expected"; + if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) + if (!(message.fileEncSha256 && typeof message.fileEncSha256.length === "number" || $util.isString(message.fileEncSha256))) + return "fileEncSha256: buffer expected"; + if (message.directPath != null && message.hasOwnProperty("directPath")) + if (!$util.isString(message.directPath)) + return "directPath: string expected"; + if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp")) + if (!$util.isInteger(message.mediaKeyTimestamp) && !(message.mediaKeyTimestamp && $util.isInteger(message.mediaKeyTimestamp.low) && $util.isInteger(message.mediaKeyTimestamp.high))) + return "mediaKeyTimestamp: integer|Long expected"; + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { + var error = $root.proto.ContextInfo.verify(message.contextInfo); + if (error) + return "contextInfo." + error; + } + if (message.participants != null && message.hasOwnProperty("participants")) { + if (!Array.isArray(message.participants)) + return "participants: array expected"; + for (var i = 0; i < message.participants.length; ++i) + if (!$util.isString(message.participants[i])) + return "participants: string[] expected"; + } + return null; + }; + + /** + * Creates a MessageHistoryBundle message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.MessageHistoryBundle + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.MessageHistoryBundle} MessageHistoryBundle + */ + MessageHistoryBundle.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.MessageHistoryBundle) + return object; + var message = new $root.proto.Message.MessageHistoryBundle(); + if (object.mimetype != null) + message.mimetype = String(object.mimetype); + if (object.fileSha256 != null) + if (typeof object.fileSha256 === "string") + $util.base64.decode(object.fileSha256, message.fileSha256 = $util.newBuffer($util.base64.length(object.fileSha256)), 0); + else if (object.fileSha256.length) + message.fileSha256 = object.fileSha256; + if (object.mediaKey != null) + if (typeof object.mediaKey === "string") + $util.base64.decode(object.mediaKey, message.mediaKey = $util.newBuffer($util.base64.length(object.mediaKey)), 0); + else if (object.mediaKey.length) + message.mediaKey = object.mediaKey; + if (object.fileEncSha256 != null) + if (typeof object.fileEncSha256 === "string") + $util.base64.decode(object.fileEncSha256, message.fileEncSha256 = $util.newBuffer($util.base64.length(object.fileEncSha256)), 0); + else if (object.fileEncSha256.length) + message.fileEncSha256 = object.fileEncSha256; + if (object.directPath != null) + message.directPath = String(object.directPath); + if (object.mediaKeyTimestamp != null) + if ($util.Long) + (message.mediaKeyTimestamp = $util.Long.fromValue(object.mediaKeyTimestamp)).unsigned = false; + else if (typeof object.mediaKeyTimestamp === "string") + message.mediaKeyTimestamp = parseInt(object.mediaKeyTimestamp, 10); + else if (typeof object.mediaKeyTimestamp === "number") + message.mediaKeyTimestamp = object.mediaKeyTimestamp; + else if (typeof object.mediaKeyTimestamp === "object") + message.mediaKeyTimestamp = new $util.LongBits(object.mediaKeyTimestamp.low >>> 0, object.mediaKeyTimestamp.high >>> 0).toNumber(); + if (object.contextInfo != null) { + if (typeof object.contextInfo !== "object") + throw TypeError(".proto.Message.MessageHistoryBundle.contextInfo: object expected"); + message.contextInfo = $root.proto.ContextInfo.fromObject(object.contextInfo); + } + if (object.participants) { + if (!Array.isArray(object.participants)) + throw TypeError(".proto.Message.MessageHistoryBundle.participants: array expected"); + message.participants = []; + for (var i = 0; i < object.participants.length; ++i) + message.participants[i] = String(object.participants[i]); + } + return message; + }; + + /** + * Creates a plain object from a MessageHistoryBundle message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.MessageHistoryBundle + * @static + * @param {proto.Message.MessageHistoryBundle} message MessageHistoryBundle + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MessageHistoryBundle.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.participants = []; + if (options.defaults) { + object.mimetype = ""; + if (options.bytes === String) + object.fileSha256 = ""; + else { + object.fileSha256 = []; + if (options.bytes !== Array) + object.fileSha256 = $util.newBuffer(object.fileSha256); + } + if (options.bytes === String) + object.mediaKey = ""; + else { + object.mediaKey = []; + if (options.bytes !== Array) + object.mediaKey = $util.newBuffer(object.mediaKey); + } + if (options.bytes === String) + object.fileEncSha256 = ""; + else { + object.fileEncSha256 = []; + if (options.bytes !== Array) + object.fileEncSha256 = $util.newBuffer(object.fileEncSha256); + } + object.directPath = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.mediaKeyTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.mediaKeyTimestamp = options.longs === String ? "0" : 0; + object.contextInfo = null; + } + if (message.mimetype != null && message.hasOwnProperty("mimetype")) + object.mimetype = message.mimetype; + if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) + object.fileSha256 = options.bytes === String ? $util.base64.encode(message.fileSha256, 0, message.fileSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.fileSha256) : message.fileSha256; + if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) + object.mediaKey = options.bytes === String ? $util.base64.encode(message.mediaKey, 0, message.mediaKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.mediaKey) : message.mediaKey; + if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) + object.fileEncSha256 = options.bytes === String ? $util.base64.encode(message.fileEncSha256, 0, message.fileEncSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.fileEncSha256) : message.fileEncSha256; + if (message.directPath != null && message.hasOwnProperty("directPath")) + object.directPath = message.directPath; + if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp")) + if (typeof message.mediaKeyTimestamp === "number") + object.mediaKeyTimestamp = options.longs === String ? String(message.mediaKeyTimestamp) : message.mediaKeyTimestamp; + else + object.mediaKeyTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.mediaKeyTimestamp) : options.longs === Number ? new $util.LongBits(message.mediaKeyTimestamp.low >>> 0, message.mediaKeyTimestamp.high >>> 0).toNumber() : message.mediaKeyTimestamp; + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) + object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); + if (message.participants && message.participants.length) { + object.participants = []; + for (var j = 0; j < message.participants.length; ++j) + object.participants[j] = message.participants[j]; + } + return object; + }; /** - * LocationMessage name. - * @member {string} name - * @memberof proto.Message.LocationMessage + * Converts this MessageHistoryBundle to JSON. + * @function toJSON + * @memberof proto.Message.MessageHistoryBundle * @instance + * @returns {Object.} JSON object */ - LocationMessage.prototype.name = ""; + MessageHistoryBundle.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * LocationMessage address. - * @member {string} address - * @memberof proto.Message.LocationMessage - * @instance - */ - LocationMessage.prototype.address = ""; + return MessageHistoryBundle; + })(); - /** - * LocationMessage url. - * @member {string} url - * @memberof proto.Message.LocationMessage - * @instance - */ - LocationMessage.prototype.url = ""; + Message.NewsletterAdminInviteMessage = (function() { /** - * LocationMessage isLive. - * @member {boolean} isLive - * @memberof proto.Message.LocationMessage - * @instance + * Properties of a NewsletterAdminInviteMessage. + * @memberof proto.Message + * @interface INewsletterAdminInviteMessage + * @property {string|null} [newsletterJid] NewsletterAdminInviteMessage newsletterJid + * @property {string|null} [newsletterName] NewsletterAdminInviteMessage newsletterName + * @property {Uint8Array|null} [jpegThumbnail] NewsletterAdminInviteMessage jpegThumbnail + * @property {string|null} [caption] NewsletterAdminInviteMessage caption + * @property {number|Long|null} [inviteExpiration] NewsletterAdminInviteMessage inviteExpiration */ - LocationMessage.prototype.isLive = false; /** - * LocationMessage accuracyInMeters. - * @member {number} accuracyInMeters - * @memberof proto.Message.LocationMessage - * @instance + * Constructs a new NewsletterAdminInviteMessage. + * @memberof proto.Message + * @classdesc Represents a NewsletterAdminInviteMessage. + * @implements INewsletterAdminInviteMessage + * @constructor + * @param {proto.Message.INewsletterAdminInviteMessage=} [properties] Properties to set */ - LocationMessage.prototype.accuracyInMeters = 0; + function NewsletterAdminInviteMessage(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * LocationMessage speedInMps. - * @member {number} speedInMps - * @memberof proto.Message.LocationMessage + * NewsletterAdminInviteMessage newsletterJid. + * @member {string} newsletterJid + * @memberof proto.Message.NewsletterAdminInviteMessage * @instance */ - LocationMessage.prototype.speedInMps = 0; + NewsletterAdminInviteMessage.prototype.newsletterJid = ""; /** - * LocationMessage degreesClockwiseFromMagneticNorth. - * @member {number} degreesClockwiseFromMagneticNorth - * @memberof proto.Message.LocationMessage + * NewsletterAdminInviteMessage newsletterName. + * @member {string} newsletterName + * @memberof proto.Message.NewsletterAdminInviteMessage * @instance */ - LocationMessage.prototype.degreesClockwiseFromMagneticNorth = 0; + NewsletterAdminInviteMessage.prototype.newsletterName = ""; /** - * LocationMessage comment. - * @member {string} comment - * @memberof proto.Message.LocationMessage + * NewsletterAdminInviteMessage jpegThumbnail. + * @member {Uint8Array} jpegThumbnail + * @memberof proto.Message.NewsletterAdminInviteMessage * @instance */ - LocationMessage.prototype.comment = ""; + NewsletterAdminInviteMessage.prototype.jpegThumbnail = $util.newBuffer([]); /** - * LocationMessage jpegThumbnail. - * @member {Uint8Array} jpegThumbnail - * @memberof proto.Message.LocationMessage + * NewsletterAdminInviteMessage caption. + * @member {string} caption + * @memberof proto.Message.NewsletterAdminInviteMessage * @instance */ - LocationMessage.prototype.jpegThumbnail = $util.newBuffer([]); + NewsletterAdminInviteMessage.prototype.caption = ""; /** - * LocationMessage contextInfo. - * @member {proto.IContextInfo|null|undefined} contextInfo - * @memberof proto.Message.LocationMessage + * NewsletterAdminInviteMessage inviteExpiration. + * @member {number|Long} inviteExpiration + * @memberof proto.Message.NewsletterAdminInviteMessage * @instance */ - LocationMessage.prototype.contextInfo = null; + NewsletterAdminInviteMessage.prototype.inviteExpiration = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new LocationMessage instance using the specified properties. + * Creates a new NewsletterAdminInviteMessage instance using the specified properties. * @function create - * @memberof proto.Message.LocationMessage + * @memberof proto.Message.NewsletterAdminInviteMessage * @static - * @param {proto.Message.ILocationMessage=} [properties] Properties to set - * @returns {proto.Message.LocationMessage} LocationMessage instance + * @param {proto.Message.INewsletterAdminInviteMessage=} [properties] Properties to set + * @returns {proto.Message.NewsletterAdminInviteMessage} NewsletterAdminInviteMessage instance */ - LocationMessage.create = function create(properties) { - return new LocationMessage(properties); + NewsletterAdminInviteMessage.create = function create(properties) { + return new NewsletterAdminInviteMessage(properties); }; /** - * Encodes the specified LocationMessage message. Does not implicitly {@link proto.Message.LocationMessage.verify|verify} messages. + * Encodes the specified NewsletterAdminInviteMessage message. Does not implicitly {@link proto.Message.NewsletterAdminInviteMessage.verify|verify} messages. * @function encode - * @memberof proto.Message.LocationMessage + * @memberof proto.Message.NewsletterAdminInviteMessage * @static - * @param {proto.Message.ILocationMessage} message LocationMessage message or plain object to encode + * @param {proto.Message.INewsletterAdminInviteMessage} message NewsletterAdminInviteMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LocationMessage.encode = function encode(message, writer) { + NewsletterAdminInviteMessage.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.degreesLatitude != null && Object.hasOwnProperty.call(message, "degreesLatitude")) - writer.uint32(/* id 1, wireType 1 =*/9).double(message.degreesLatitude); - if (message.degreesLongitude != null && Object.hasOwnProperty.call(message, "degreesLongitude")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.degreesLongitude); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); - if (message.address != null && Object.hasOwnProperty.call(message, "address")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.address); - if (message.url != null && Object.hasOwnProperty.call(message, "url")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.url); - if (message.isLive != null && Object.hasOwnProperty.call(message, "isLive")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.isLive); - if (message.accuracyInMeters != null && Object.hasOwnProperty.call(message, "accuracyInMeters")) - writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.accuracyInMeters); - if (message.speedInMps != null && Object.hasOwnProperty.call(message, "speedInMps")) - writer.uint32(/* id 8, wireType 5 =*/69).float(message.speedInMps); - if (message.degreesClockwiseFromMagneticNorth != null && Object.hasOwnProperty.call(message, "degreesClockwiseFromMagneticNorth")) - writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.degreesClockwiseFromMagneticNorth); - if (message.comment != null && Object.hasOwnProperty.call(message, "comment")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.comment); + if (message.newsletterJid != null && Object.hasOwnProperty.call(message, "newsletterJid")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.newsletterJid); + if (message.newsletterName != null && Object.hasOwnProperty.call(message, "newsletterName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.newsletterName); if (message.jpegThumbnail != null && Object.hasOwnProperty.call(message, "jpegThumbnail")) - writer.uint32(/* id 16, wireType 2 =*/130).bytes(message.jpegThumbnail); - if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo")) - $root.proto.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.jpegThumbnail); + if (message.caption != null && Object.hasOwnProperty.call(message, "caption")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.caption); + if (message.inviteExpiration != null && Object.hasOwnProperty.call(message, "inviteExpiration")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.inviteExpiration); return writer; }; /** - * Encodes the specified LocationMessage message, length delimited. Does not implicitly {@link proto.Message.LocationMessage.verify|verify} messages. + * Encodes the specified NewsletterAdminInviteMessage message, length delimited. Does not implicitly {@link proto.Message.NewsletterAdminInviteMessage.verify|verify} messages. * @function encodeDelimited - * @memberof proto.Message.LocationMessage + * @memberof proto.Message.NewsletterAdminInviteMessage * @static - * @param {proto.Message.ILocationMessage} message LocationMessage message or plain object to encode + * @param {proto.Message.INewsletterAdminInviteMessage} message NewsletterAdminInviteMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LocationMessage.encodeDelimited = function encodeDelimited(message, writer) { + NewsletterAdminInviteMessage.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a LocationMessage message from the specified reader or buffer. + * Decodes a NewsletterAdminInviteMessage message from the specified reader or buffer. * @function decode - * @memberof proto.Message.LocationMessage + * @memberof proto.Message.NewsletterAdminInviteMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {proto.Message.LocationMessage} LocationMessage + * @returns {proto.Message.NewsletterAdminInviteMessage} NewsletterAdminInviteMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LocationMessage.decode = function decode(reader, length) { + NewsletterAdminInviteMessage.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Message.LocationMessage(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Message.NewsletterAdminInviteMessage(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.degreesLatitude = reader.double(); + message.newsletterJid = reader.string(); break; case 2: - message.degreesLongitude = reader.double(); + message.newsletterName = reader.string(); break; case 3: - message.name = reader.string(); + message.jpegThumbnail = reader.bytes(); break; case 4: - message.address = reader.string(); + message.caption = reader.string(); break; case 5: - message.url = reader.string(); - break; - case 6: - message.isLive = reader.bool(); - break; - case 7: - message.accuracyInMeters = reader.uint32(); - break; - case 8: - message.speedInMps = reader.float(); - break; - case 9: - message.degreesClockwiseFromMagneticNorth = reader.uint32(); - break; - case 11: - message.comment = reader.string(); - break; - case 16: - message.jpegThumbnail = reader.bytes(); - break; - case 17: - message.contextInfo = $root.proto.ContextInfo.decode(reader, reader.uint32()); + message.inviteExpiration = reader.int64(); break; default: reader.skipType(tag & 7); @@ -41935,142 +50726,101 @@ $root.proto = (function() { }; /** - * Decodes a LocationMessage message from the specified reader or buffer, length delimited. + * Decodes a NewsletterAdminInviteMessage message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof proto.Message.LocationMessage + * @memberof proto.Message.NewsletterAdminInviteMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.Message.LocationMessage} LocationMessage + * @returns {proto.Message.NewsletterAdminInviteMessage} NewsletterAdminInviteMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LocationMessage.decodeDelimited = function decodeDelimited(reader) { + NewsletterAdminInviteMessage.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a LocationMessage message. + * Verifies a NewsletterAdminInviteMessage message. * @function verify - * @memberof proto.Message.LocationMessage + * @memberof proto.Message.NewsletterAdminInviteMessage * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - LocationMessage.verify = function verify(message) { + NewsletterAdminInviteMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.degreesLatitude != null && message.hasOwnProperty("degreesLatitude")) - if (typeof message.degreesLatitude !== "number") - return "degreesLatitude: number expected"; - if (message.degreesLongitude != null && message.hasOwnProperty("degreesLongitude")) - if (typeof message.degreesLongitude !== "number") - return "degreesLongitude: number expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.address != null && message.hasOwnProperty("address")) - if (!$util.isString(message.address)) - return "address: string expected"; - if (message.url != null && message.hasOwnProperty("url")) - if (!$util.isString(message.url)) - return "url: string expected"; - if (message.isLive != null && message.hasOwnProperty("isLive")) - if (typeof message.isLive !== "boolean") - return "isLive: boolean expected"; - if (message.accuracyInMeters != null && message.hasOwnProperty("accuracyInMeters")) - if (!$util.isInteger(message.accuracyInMeters)) - return "accuracyInMeters: integer expected"; - if (message.speedInMps != null && message.hasOwnProperty("speedInMps")) - if (typeof message.speedInMps !== "number") - return "speedInMps: number expected"; - if (message.degreesClockwiseFromMagneticNorth != null && message.hasOwnProperty("degreesClockwiseFromMagneticNorth")) - if (!$util.isInteger(message.degreesClockwiseFromMagneticNorth)) - return "degreesClockwiseFromMagneticNorth: integer expected"; - if (message.comment != null && message.hasOwnProperty("comment")) - if (!$util.isString(message.comment)) - return "comment: string expected"; + if (message.newsletterJid != null && message.hasOwnProperty("newsletterJid")) + if (!$util.isString(message.newsletterJid)) + return "newsletterJid: string expected"; + if (message.newsletterName != null && message.hasOwnProperty("newsletterName")) + if (!$util.isString(message.newsletterName)) + return "newsletterName: string expected"; if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail")) if (!(message.jpegThumbnail && typeof message.jpegThumbnail.length === "number" || $util.isString(message.jpegThumbnail))) return "jpegThumbnail: buffer expected"; - if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { - var error = $root.proto.ContextInfo.verify(message.contextInfo); - if (error) - return "contextInfo." + error; - } + if (message.caption != null && message.hasOwnProperty("caption")) + if (!$util.isString(message.caption)) + return "caption: string expected"; + if (message.inviteExpiration != null && message.hasOwnProperty("inviteExpiration")) + if (!$util.isInteger(message.inviteExpiration) && !(message.inviteExpiration && $util.isInteger(message.inviteExpiration.low) && $util.isInteger(message.inviteExpiration.high))) + return "inviteExpiration: integer|Long expected"; return null; }; /** - * Creates a LocationMessage message from a plain object. Also converts values to their respective internal types. + * Creates a NewsletterAdminInviteMessage message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof proto.Message.LocationMessage + * @memberof proto.Message.NewsletterAdminInviteMessage * @static * @param {Object.} object Plain object - * @returns {proto.Message.LocationMessage} LocationMessage + * @returns {proto.Message.NewsletterAdminInviteMessage} NewsletterAdminInviteMessage */ - LocationMessage.fromObject = function fromObject(object) { - if (object instanceof $root.proto.Message.LocationMessage) + NewsletterAdminInviteMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.NewsletterAdminInviteMessage) return object; - var message = new $root.proto.Message.LocationMessage(); - if (object.degreesLatitude != null) - message.degreesLatitude = Number(object.degreesLatitude); - if (object.degreesLongitude != null) - message.degreesLongitude = Number(object.degreesLongitude); - if (object.name != null) - message.name = String(object.name); - if (object.address != null) - message.address = String(object.address); - if (object.url != null) - message.url = String(object.url); - if (object.isLive != null) - message.isLive = Boolean(object.isLive); - if (object.accuracyInMeters != null) - message.accuracyInMeters = object.accuracyInMeters >>> 0; - if (object.speedInMps != null) - message.speedInMps = Number(object.speedInMps); - if (object.degreesClockwiseFromMagneticNorth != null) - message.degreesClockwiseFromMagneticNorth = object.degreesClockwiseFromMagneticNorth >>> 0; - if (object.comment != null) - message.comment = String(object.comment); + var message = new $root.proto.Message.NewsletterAdminInviteMessage(); + if (object.newsletterJid != null) + message.newsletterJid = String(object.newsletterJid); + if (object.newsletterName != null) + message.newsletterName = String(object.newsletterName); if (object.jpegThumbnail != null) if (typeof object.jpegThumbnail === "string") $util.base64.decode(object.jpegThumbnail, message.jpegThumbnail = $util.newBuffer($util.base64.length(object.jpegThumbnail)), 0); else if (object.jpegThumbnail.length) message.jpegThumbnail = object.jpegThumbnail; - if (object.contextInfo != null) { - if (typeof object.contextInfo !== "object") - throw TypeError(".proto.Message.LocationMessage.contextInfo: object expected"); - message.contextInfo = $root.proto.ContextInfo.fromObject(object.contextInfo); - } + if (object.caption != null) + message.caption = String(object.caption); + if (object.inviteExpiration != null) + if ($util.Long) + (message.inviteExpiration = $util.Long.fromValue(object.inviteExpiration)).unsigned = false; + else if (typeof object.inviteExpiration === "string") + message.inviteExpiration = parseInt(object.inviteExpiration, 10); + else if (typeof object.inviteExpiration === "number") + message.inviteExpiration = object.inviteExpiration; + else if (typeof object.inviteExpiration === "object") + message.inviteExpiration = new $util.LongBits(object.inviteExpiration.low >>> 0, object.inviteExpiration.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from a LocationMessage message. Also converts values to other types if specified. + * Creates a plain object from a NewsletterAdminInviteMessage message. Also converts values to other types if specified. * @function toObject - * @memberof proto.Message.LocationMessage + * @memberof proto.Message.NewsletterAdminInviteMessage * @static - * @param {proto.Message.LocationMessage} message LocationMessage + * @param {proto.Message.NewsletterAdminInviteMessage} message NewsletterAdminInviteMessage * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LocationMessage.toObject = function toObject(message, options) { + NewsletterAdminInviteMessage.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.degreesLatitude = 0; - object.degreesLongitude = 0; - object.name = ""; - object.address = ""; - object.url = ""; - object.isLive = false; - object.accuracyInMeters = 0; - object.speedInMps = 0; - object.degreesClockwiseFromMagneticNorth = 0; - object.comment = ""; + object.newsletterJid = ""; + object.newsletterName = ""; if (options.bytes === String) object.jpegThumbnail = ""; else { @@ -42078,47 +50828,41 @@ $root.proto = (function() { if (options.bytes !== Array) object.jpegThumbnail = $util.newBuffer(object.jpegThumbnail); } - object.contextInfo = null; + object.caption = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.inviteExpiration = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.inviteExpiration = options.longs === String ? "0" : 0; } - if (message.degreesLatitude != null && message.hasOwnProperty("degreesLatitude")) - object.degreesLatitude = options.json && !isFinite(message.degreesLatitude) ? String(message.degreesLatitude) : message.degreesLatitude; - if (message.degreesLongitude != null && message.hasOwnProperty("degreesLongitude")) - object.degreesLongitude = options.json && !isFinite(message.degreesLongitude) ? String(message.degreesLongitude) : message.degreesLongitude; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.address != null && message.hasOwnProperty("address")) - object.address = message.address; - if (message.url != null && message.hasOwnProperty("url")) - object.url = message.url; - if (message.isLive != null && message.hasOwnProperty("isLive")) - object.isLive = message.isLive; - if (message.accuracyInMeters != null && message.hasOwnProperty("accuracyInMeters")) - object.accuracyInMeters = message.accuracyInMeters; - if (message.speedInMps != null && message.hasOwnProperty("speedInMps")) - object.speedInMps = options.json && !isFinite(message.speedInMps) ? String(message.speedInMps) : message.speedInMps; - if (message.degreesClockwiseFromMagneticNorth != null && message.hasOwnProperty("degreesClockwiseFromMagneticNorth")) - object.degreesClockwiseFromMagneticNorth = message.degreesClockwiseFromMagneticNorth; - if (message.comment != null && message.hasOwnProperty("comment")) - object.comment = message.comment; + if (message.newsletterJid != null && message.hasOwnProperty("newsletterJid")) + object.newsletterJid = message.newsletterJid; + if (message.newsletterName != null && message.hasOwnProperty("newsletterName")) + object.newsletterName = message.newsletterName; if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail")) object.jpegThumbnail = options.bytes === String ? $util.base64.encode(message.jpegThumbnail, 0, message.jpegThumbnail.length) : options.bytes === Array ? Array.prototype.slice.call(message.jpegThumbnail) : message.jpegThumbnail; - if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) - object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); + if (message.caption != null && message.hasOwnProperty("caption")) + object.caption = message.caption; + if (message.inviteExpiration != null && message.hasOwnProperty("inviteExpiration")) + if (typeof message.inviteExpiration === "number") + object.inviteExpiration = options.longs === String ? String(message.inviteExpiration) : message.inviteExpiration; + else + object.inviteExpiration = options.longs === String ? $util.Long.prototype.toString.call(message.inviteExpiration) : options.longs === Number ? new $util.LongBits(message.inviteExpiration.low >>> 0, message.inviteExpiration.high >>> 0).toNumber() : message.inviteExpiration; return object; }; /** - * Converts this LocationMessage to JSON. + * Converts this NewsletterAdminInviteMessage to JSON. * @function toJSON - * @memberof proto.Message.LocationMessage + * @memberof proto.Message.NewsletterAdminInviteMessage * @instance * @returns {Object.} JSON object */ - LocationMessage.prototype.toJSON = function toJSON() { + NewsletterAdminInviteMessage.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return LocationMessage; + return NewsletterAdminInviteMessage; })(); Message.OrderMessage = (function() { @@ -42139,6 +50883,8 @@ $root.proto = (function() { * @property {number|Long|null} [totalAmount1000] OrderMessage totalAmount1000 * @property {string|null} [totalCurrencyCode] OrderMessage totalCurrencyCode * @property {proto.IContextInfo|null} [contextInfo] OrderMessage contextInfo + * @property {number|null} [messageVersion] OrderMessage messageVersion + * @property {proto.IMessageKey|null} [orderRequestMessageId] OrderMessage orderRequestMessageId */ /** @@ -42252,6 +50998,22 @@ $root.proto = (function() { */ OrderMessage.prototype.contextInfo = null; + /** + * OrderMessage messageVersion. + * @member {number} messageVersion + * @memberof proto.Message.OrderMessage + * @instance + */ + OrderMessage.prototype.messageVersion = 0; + + /** + * OrderMessage orderRequestMessageId. + * @member {proto.IMessageKey|null|undefined} orderRequestMessageId + * @memberof proto.Message.OrderMessage + * @instance + */ + OrderMessage.prototype.orderRequestMessageId = null; + /** * Creates a new OrderMessage instance using the specified properties. * @function create @@ -42298,6 +51060,10 @@ $root.proto = (function() { writer.uint32(/* id 10, wireType 0 =*/80).int64(message.totalAmount1000); if (message.totalCurrencyCode != null && Object.hasOwnProperty.call(message, "totalCurrencyCode")) writer.uint32(/* id 11, wireType 2 =*/90).string(message.totalCurrencyCode); + if (message.messageVersion != null && Object.hasOwnProperty.call(message, "messageVersion")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.messageVersion); + if (message.orderRequestMessageId != null && Object.hasOwnProperty.call(message, "orderRequestMessageId")) + $root.proto.MessageKey.encode(message.orderRequestMessageId, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo")) $root.proto.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); return writer; @@ -42370,6 +51136,12 @@ $root.proto = (function() { case 17: message.contextInfo = $root.proto.ContextInfo.decode(reader, reader.uint32()); break; + case 12: + message.messageVersion = reader.int32(); + break; + case 13: + message.orderRequestMessageId = $root.proto.MessageKey.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -42419,6 +51191,8 @@ $root.proto = (function() { default: return "status: enum value expected"; case 1: + case 2: + case 3: break; } if (message.surface != null && message.hasOwnProperty("surface")) @@ -42451,6 +51225,14 @@ $root.proto = (function() { if (error) return "contextInfo." + error; } + if (message.messageVersion != null && message.hasOwnProperty("messageVersion")) + if (!$util.isInteger(message.messageVersion)) + return "messageVersion: integer expected"; + if (message.orderRequestMessageId != null && message.hasOwnProperty("orderRequestMessageId")) { + var error = $root.proto.MessageKey.verify(message.orderRequestMessageId); + if (error) + return "orderRequestMessageId." + error; + } return null; }; @@ -42480,6 +51262,14 @@ $root.proto = (function() { case 1: message.status = 1; break; + case "ACCEPTED": + case 2: + message.status = 2; + break; + case "DECLINED": + case 3: + message.status = 3; + break; } switch (object.surface) { case "CATALOG": @@ -42511,6 +51301,13 @@ $root.proto = (function() { throw TypeError(".proto.Message.OrderMessage.contextInfo: object expected"); message.contextInfo = $root.proto.ContextInfo.fromObject(object.contextInfo); } + if (object.messageVersion != null) + message.messageVersion = object.messageVersion | 0; + if (object.orderRequestMessageId != null) { + if (typeof object.orderRequestMessageId !== "object") + throw TypeError(".proto.Message.OrderMessage.orderRequestMessageId: object expected"); + message.orderRequestMessageId = $root.proto.MessageKey.fromObject(object.orderRequestMessageId); + } return message; }; @@ -42549,6 +51346,8 @@ $root.proto = (function() { } else object.totalAmount1000 = options.longs === String ? "0" : 0; object.totalCurrencyCode = ""; + object.messageVersion = 0; + object.orderRequestMessageId = null; object.contextInfo = null; } if (message.orderId != null && message.hasOwnProperty("orderId")) @@ -42576,6 +51375,10 @@ $root.proto = (function() { object.totalAmount1000 = options.longs === String ? $util.Long.prototype.toString.call(message.totalAmount1000) : options.longs === Number ? new $util.LongBits(message.totalAmount1000.low >>> 0, message.totalAmount1000.high >>> 0).toNumber() : message.totalAmount1000; if (message.totalCurrencyCode != null && message.hasOwnProperty("totalCurrencyCode")) object.totalCurrencyCode = message.totalCurrencyCode; + if (message.messageVersion != null && message.hasOwnProperty("messageVersion")) + object.messageVersion = message.messageVersion; + if (message.orderRequestMessageId != null && message.hasOwnProperty("orderRequestMessageId")) + object.orderRequestMessageId = $root.proto.MessageKey.toObject(message.orderRequestMessageId, options); if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); return object; @@ -42597,10 +51400,14 @@ $root.proto = (function() { * @name proto.Message.OrderMessage.OrderStatus * @enum {number} * @property {number} INQUIRY=1 INQUIRY value + * @property {number} ACCEPTED=2 ACCEPTED value + * @property {number} DECLINED=3 DECLINED value */ OrderMessage.OrderStatus = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[1] = "INQUIRY"] = 1; + values[valuesById[2] = "ACCEPTED"] = 2; + values[valuesById[3] = "DECLINED"] = 3; return values; })(); @@ -45911,6 +54718,213 @@ $root.proto = (function() { return PinInChatMessage; })(); + Message.PlaceholderMessage = (function() { + + /** + * Properties of a PlaceholderMessage. + * @memberof proto.Message + * @interface IPlaceholderMessage + * @property {proto.Message.PlaceholderMessage.PlaceholderType|null} [type] PlaceholderMessage type + */ + + /** + * Constructs a new PlaceholderMessage. + * @memberof proto.Message + * @classdesc Represents a PlaceholderMessage. + * @implements IPlaceholderMessage + * @constructor + * @param {proto.Message.IPlaceholderMessage=} [properties] Properties to set + */ + function PlaceholderMessage(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PlaceholderMessage type. + * @member {proto.Message.PlaceholderMessage.PlaceholderType} type + * @memberof proto.Message.PlaceholderMessage + * @instance + */ + PlaceholderMessage.prototype.type = 0; + + /** + * Creates a new PlaceholderMessage instance using the specified properties. + * @function create + * @memberof proto.Message.PlaceholderMessage + * @static + * @param {proto.Message.IPlaceholderMessage=} [properties] Properties to set + * @returns {proto.Message.PlaceholderMessage} PlaceholderMessage instance + */ + PlaceholderMessage.create = function create(properties) { + return new PlaceholderMessage(properties); + }; + + /** + * Encodes the specified PlaceholderMessage message. Does not implicitly {@link proto.Message.PlaceholderMessage.verify|verify} messages. + * @function encode + * @memberof proto.Message.PlaceholderMessage + * @static + * @param {proto.Message.IPlaceholderMessage} message PlaceholderMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PlaceholderMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + return writer; + }; + + /** + * Encodes the specified PlaceholderMessage message, length delimited. Does not implicitly {@link proto.Message.PlaceholderMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.PlaceholderMessage + * @static + * @param {proto.Message.IPlaceholderMessage} message PlaceholderMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PlaceholderMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PlaceholderMessage message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.PlaceholderMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.PlaceholderMessage} PlaceholderMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PlaceholderMessage.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Message.PlaceholderMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PlaceholderMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.PlaceholderMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.PlaceholderMessage} PlaceholderMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PlaceholderMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PlaceholderMessage message. + * @function verify + * @memberof proto.Message.PlaceholderMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PlaceholderMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + break; + } + return null; + }; + + /** + * Creates a PlaceholderMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.PlaceholderMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.PlaceholderMessage} PlaceholderMessage + */ + PlaceholderMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.PlaceholderMessage) + return object; + var message = new $root.proto.Message.PlaceholderMessage(); + switch (object.type) { + case "MASK_LINKED_DEVICES": + case 0: + message.type = 0; + break; + } + return message; + }; + + /** + * Creates a plain object from a PlaceholderMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.PlaceholderMessage + * @static + * @param {proto.Message.PlaceholderMessage} message PlaceholderMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PlaceholderMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.type = options.enums === String ? "MASK_LINKED_DEVICES" : 0; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.proto.Message.PlaceholderMessage.PlaceholderType[message.type] : message.type; + return object; + }; + + /** + * Converts this PlaceholderMessage to JSON. + * @function toJSON + * @memberof proto.Message.PlaceholderMessage + * @instance + * @returns {Object.} JSON object + */ + PlaceholderMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * PlaceholderType enum. + * @name proto.Message.PlaceholderMessage.PlaceholderType + * @enum {number} + * @property {number} MASK_LINKED_DEVICES=0 MASK_LINKED_DEVICES value + */ + PlaceholderMessage.PlaceholderType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MASK_LINKED_DEVICES"] = 0; + return values; + })(); + + return PlaceholderMessage; + })(); + Message.PollCreationMessage = (function() { /** @@ -48299,6 +57313,9 @@ $root.proto = (function() { * @property {proto.Message.IPeerDataOperationRequestMessage|null} [peerDataOperationRequestMessage] ProtocolMessage peerDataOperationRequestMessage * @property {proto.Message.IPeerDataOperationRequestResponseMessage|null} [peerDataOperationRequestResponseMessage] ProtocolMessage peerDataOperationRequestResponseMessage * @property {proto.Message.IBotFeedbackMessage|null} [botFeedbackMessage] ProtocolMessage botFeedbackMessage + * @property {string|null} [invokerJid] ProtocolMessage invokerJid + * @property {proto.Message.IRequestWelcomeMessageMetadata|null} [requestWelcomeMessageMetadata] ProtocolMessage requestWelcomeMessageMetadata + * @property {proto.IMediaNotifyMessage|null} [mediaNotifyMessage] ProtocolMessage mediaNotifyMessage */ /** @@ -48436,6 +57453,30 @@ $root.proto = (function() { */ ProtocolMessage.prototype.botFeedbackMessage = null; + /** + * ProtocolMessage invokerJid. + * @member {string} invokerJid + * @memberof proto.Message.ProtocolMessage + * @instance + */ + ProtocolMessage.prototype.invokerJid = ""; + + /** + * ProtocolMessage requestWelcomeMessageMetadata. + * @member {proto.Message.IRequestWelcomeMessageMetadata|null|undefined} requestWelcomeMessageMetadata + * @memberof proto.Message.ProtocolMessage + * @instance + */ + ProtocolMessage.prototype.requestWelcomeMessageMetadata = null; + + /** + * ProtocolMessage mediaNotifyMessage. + * @member {proto.IMediaNotifyMessage|null|undefined} mediaNotifyMessage + * @memberof proto.Message.ProtocolMessage + * @instance + */ + ProtocolMessage.prototype.mediaNotifyMessage = null; + /** * Creates a new ProtocolMessage instance using the specified properties. * @function create @@ -48490,6 +57531,12 @@ $root.proto = (function() { $root.proto.Message.PeerDataOperationRequestResponseMessage.encode(message.peerDataOperationRequestResponseMessage, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); if (message.botFeedbackMessage != null && Object.hasOwnProperty.call(message, "botFeedbackMessage")) $root.proto.Message.BotFeedbackMessage.encode(message.botFeedbackMessage, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.invokerJid != null && Object.hasOwnProperty.call(message, "invokerJid")) + writer.uint32(/* id 19, wireType 2 =*/154).string(message.invokerJid); + if (message.requestWelcomeMessageMetadata != null && Object.hasOwnProperty.call(message, "requestWelcomeMessageMetadata")) + $root.proto.Message.RequestWelcomeMessageMetadata.encode(message.requestWelcomeMessageMetadata, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.mediaNotifyMessage != null && Object.hasOwnProperty.call(message, "mediaNotifyMessage")) + $root.proto.MediaNotifyMessage.encode(message.mediaNotifyMessage, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); return writer; }; @@ -48569,6 +57616,15 @@ $root.proto = (function() { case 18: message.botFeedbackMessage = $root.proto.Message.BotFeedbackMessage.decode(reader, reader.uint32()); break; + case 19: + message.invokerJid = reader.string(); + break; + case 20: + message.requestWelcomeMessageMetadata = $root.proto.Message.RequestWelcomeMessageMetadata.decode(reader, reader.uint32()); + break; + case 21: + message.mediaNotifyMessage = $root.proto.MediaNotifyMessage.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -48628,6 +57684,7 @@ $root.proto = (function() { case 17: case 18: case 19: + case 20: break; } if (message.ephemeralExpiration != null && message.hasOwnProperty("ephemeralExpiration")) @@ -48689,6 +57746,19 @@ $root.proto = (function() { if (error) return "botFeedbackMessage." + error; } + if (message.invokerJid != null && message.hasOwnProperty("invokerJid")) + if (!$util.isString(message.invokerJid)) + return "invokerJid: string expected"; + if (message.requestWelcomeMessageMetadata != null && message.hasOwnProperty("requestWelcomeMessageMetadata")) { + var error = $root.proto.Message.RequestWelcomeMessageMetadata.verify(message.requestWelcomeMessageMetadata); + if (error) + return "requestWelcomeMessageMetadata." + error; + } + if (message.mediaNotifyMessage != null && message.hasOwnProperty("mediaNotifyMessage")) { + var error = $root.proto.MediaNotifyMessage.verify(message.mediaNotifyMessage); + if (error) + return "mediaNotifyMessage." + error; + } return null; }; @@ -48770,6 +57840,10 @@ $root.proto = (function() { case 19: message.type = 19; break; + case "MEDIA_NOTIFY_MESSAGE": + case 20: + message.type = 20; + break; } if (object.ephemeralExpiration != null) message.ephemeralExpiration = object.ephemeralExpiration >>> 0; @@ -48841,6 +57915,18 @@ $root.proto = (function() { throw TypeError(".proto.Message.ProtocolMessage.botFeedbackMessage: object expected"); message.botFeedbackMessage = $root.proto.Message.BotFeedbackMessage.fromObject(object.botFeedbackMessage); } + if (object.invokerJid != null) + message.invokerJid = String(object.invokerJid); + if (object.requestWelcomeMessageMetadata != null) { + if (typeof object.requestWelcomeMessageMetadata !== "object") + throw TypeError(".proto.Message.ProtocolMessage.requestWelcomeMessageMetadata: object expected"); + message.requestWelcomeMessageMetadata = $root.proto.Message.RequestWelcomeMessageMetadata.fromObject(object.requestWelcomeMessageMetadata); + } + if (object.mediaNotifyMessage != null) { + if (typeof object.mediaNotifyMessage !== "object") + throw TypeError(".proto.Message.ProtocolMessage.mediaNotifyMessage: object expected"); + message.mediaNotifyMessage = $root.proto.MediaNotifyMessage.fromObject(object.mediaNotifyMessage); + } return message; }; @@ -48881,6 +57967,9 @@ $root.proto = (function() { object.peerDataOperationRequestMessage = null; object.peerDataOperationRequestResponseMessage = null; object.botFeedbackMessage = null; + object.invokerJid = ""; + object.requestWelcomeMessageMetadata = null; + object.mediaNotifyMessage = null; } if (message.key != null && message.hasOwnProperty("key")) object.key = $root.proto.MessageKey.toObject(message.key, options); @@ -48918,6 +58007,12 @@ $root.proto = (function() { object.peerDataOperationRequestResponseMessage = $root.proto.Message.PeerDataOperationRequestResponseMessage.toObject(message.peerDataOperationRequestResponseMessage, options); if (message.botFeedbackMessage != null && message.hasOwnProperty("botFeedbackMessage")) object.botFeedbackMessage = $root.proto.Message.BotFeedbackMessage.toObject(message.botFeedbackMessage, options); + if (message.invokerJid != null && message.hasOwnProperty("invokerJid")) + object.invokerJid = message.invokerJid; + if (message.requestWelcomeMessageMetadata != null && message.hasOwnProperty("requestWelcomeMessageMetadata")) + object.requestWelcomeMessageMetadata = $root.proto.Message.RequestWelcomeMessageMetadata.toObject(message.requestWelcomeMessageMetadata, options); + if (message.mediaNotifyMessage != null && message.hasOwnProperty("mediaNotifyMessage")) + object.mediaNotifyMessage = $root.proto.MediaNotifyMessage.toObject(message.mediaNotifyMessage, options); return object; }; @@ -48951,6 +58046,7 @@ $root.proto = (function() { * @property {number} PEER_DATA_OPERATION_REQUEST_RESPONSE_MESSAGE=17 PEER_DATA_OPERATION_REQUEST_RESPONSE_MESSAGE value * @property {number} REQUEST_WELCOME_MESSAGE=18 REQUEST_WELCOME_MESSAGE value * @property {number} BOT_FEEDBACK_MESSAGE=19 BOT_FEEDBACK_MESSAGE value + * @property {number} MEDIA_NOTIFY_MESSAGE=20 MEDIA_NOTIFY_MESSAGE value */ ProtocolMessage.Type = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -48969,6 +58065,7 @@ $root.proto = (function() { values[valuesById[17] = "PEER_DATA_OPERATION_REQUEST_RESPONSE_MESSAGE"] = 17; values[valuesById[18] = "REQUEST_WELCOME_MESSAGE"] = 18; values[valuesById[19] = "BOT_FEEDBACK_MESSAGE"] = 19; + values[valuesById[20] = "MEDIA_NOTIFY_MESSAGE"] = 20; return values; })(); @@ -49803,6 +58900,220 @@ $root.proto = (function() { return RequestPhoneNumberMessage; })(); + Message.RequestWelcomeMessageMetadata = (function() { + + /** + * Properties of a RequestWelcomeMessageMetadata. + * @memberof proto.Message + * @interface IRequestWelcomeMessageMetadata + * @property {proto.Message.RequestWelcomeMessageMetadata.LocalChatState|null} [localChatState] RequestWelcomeMessageMetadata localChatState + */ + + /** + * Constructs a new RequestWelcomeMessageMetadata. + * @memberof proto.Message + * @classdesc Represents a RequestWelcomeMessageMetadata. + * @implements IRequestWelcomeMessageMetadata + * @constructor + * @param {proto.Message.IRequestWelcomeMessageMetadata=} [properties] Properties to set + */ + function RequestWelcomeMessageMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RequestWelcomeMessageMetadata localChatState. + * @member {proto.Message.RequestWelcomeMessageMetadata.LocalChatState} localChatState + * @memberof proto.Message.RequestWelcomeMessageMetadata + * @instance + */ + RequestWelcomeMessageMetadata.prototype.localChatState = 0; + + /** + * Creates a new RequestWelcomeMessageMetadata instance using the specified properties. + * @function create + * @memberof proto.Message.RequestWelcomeMessageMetadata + * @static + * @param {proto.Message.IRequestWelcomeMessageMetadata=} [properties] Properties to set + * @returns {proto.Message.RequestWelcomeMessageMetadata} RequestWelcomeMessageMetadata instance + */ + RequestWelcomeMessageMetadata.create = function create(properties) { + return new RequestWelcomeMessageMetadata(properties); + }; + + /** + * Encodes the specified RequestWelcomeMessageMetadata message. Does not implicitly {@link proto.Message.RequestWelcomeMessageMetadata.verify|verify} messages. + * @function encode + * @memberof proto.Message.RequestWelcomeMessageMetadata + * @static + * @param {proto.Message.IRequestWelcomeMessageMetadata} message RequestWelcomeMessageMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestWelcomeMessageMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.localChatState != null && Object.hasOwnProperty.call(message, "localChatState")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.localChatState); + return writer; + }; + + /** + * Encodes the specified RequestWelcomeMessageMetadata message, length delimited. Does not implicitly {@link proto.Message.RequestWelcomeMessageMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.RequestWelcomeMessageMetadata + * @static + * @param {proto.Message.IRequestWelcomeMessageMetadata} message RequestWelcomeMessageMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestWelcomeMessageMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RequestWelcomeMessageMetadata message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.RequestWelcomeMessageMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.RequestWelcomeMessageMetadata} RequestWelcomeMessageMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestWelcomeMessageMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Message.RequestWelcomeMessageMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.localChatState = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RequestWelcomeMessageMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.RequestWelcomeMessageMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.RequestWelcomeMessageMetadata} RequestWelcomeMessageMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestWelcomeMessageMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestWelcomeMessageMetadata message. + * @function verify + * @memberof proto.Message.RequestWelcomeMessageMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestWelcomeMessageMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.localChatState != null && message.hasOwnProperty("localChatState")) + switch (message.localChatState) { + default: + return "localChatState: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; + + /** + * Creates a RequestWelcomeMessageMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.RequestWelcomeMessageMetadata + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.RequestWelcomeMessageMetadata} RequestWelcomeMessageMetadata + */ + RequestWelcomeMessageMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.RequestWelcomeMessageMetadata) + return object; + var message = new $root.proto.Message.RequestWelcomeMessageMetadata(); + switch (object.localChatState) { + case "EMPTY": + case 0: + message.localChatState = 0; + break; + case "NON_EMPTY": + case 1: + message.localChatState = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from a RequestWelcomeMessageMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.RequestWelcomeMessageMetadata + * @static + * @param {proto.Message.RequestWelcomeMessageMetadata} message RequestWelcomeMessageMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestWelcomeMessageMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.localChatState = options.enums === String ? "EMPTY" : 0; + if (message.localChatState != null && message.hasOwnProperty("localChatState")) + object.localChatState = options.enums === String ? $root.proto.Message.RequestWelcomeMessageMetadata.LocalChatState[message.localChatState] : message.localChatState; + return object; + }; + + /** + * Converts this RequestWelcomeMessageMetadata to JSON. + * @function toJSON + * @memberof proto.Message.RequestWelcomeMessageMetadata + * @instance + * @returns {Object.} JSON object + */ + RequestWelcomeMessageMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * LocalChatState enum. + * @name proto.Message.RequestWelcomeMessageMetadata.LocalChatState + * @enum {number} + * @property {number} EMPTY=0 EMPTY value + * @property {number} NON_EMPTY=1 NON_EMPTY value + */ + RequestWelcomeMessageMetadata.LocalChatState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EMPTY"] = 0; + values[valuesById[1] = "NON_EMPTY"] = 1; + return values; + })(); + + return RequestWelcomeMessageMetadata; + })(); + Message.ScheduledCallCreationMessage = (function() { /** @@ -50814,6 +60125,8 @@ $root.proto = (function() { * @property {proto.IContextInfo|null} [contextInfo] StickerMessage contextInfo * @property {number|Long|null} [stickerSentTs] StickerMessage stickerSentTs * @property {boolean|null} [isAvatar] StickerMessage isAvatar + * @property {boolean|null} [isAiSticker] StickerMessage isAiSticker + * @property {boolean|null} [isLottie] StickerMessage isLottie */ /** @@ -50967,6 +60280,22 @@ $root.proto = (function() { */ StickerMessage.prototype.isAvatar = false; + /** + * StickerMessage isAiSticker. + * @member {boolean} isAiSticker + * @memberof proto.Message.StickerMessage + * @instance + */ + StickerMessage.prototype.isAiSticker = false; + + /** + * StickerMessage isLottie. + * @member {boolean} isLottie + * @memberof proto.Message.StickerMessage + * @instance + */ + StickerMessage.prototype.isLottie = false; + /** * Creates a new StickerMessage instance using the specified properties. * @function create @@ -51025,6 +60354,10 @@ $root.proto = (function() { writer.uint32(/* id 18, wireType 0 =*/144).int64(message.stickerSentTs); if (message.isAvatar != null && Object.hasOwnProperty.call(message, "isAvatar")) writer.uint32(/* id 19, wireType 0 =*/152).bool(message.isAvatar); + if (message.isAiSticker != null && Object.hasOwnProperty.call(message, "isAiSticker")) + writer.uint32(/* id 20, wireType 0 =*/160).bool(message.isAiSticker); + if (message.isLottie != null && Object.hasOwnProperty.call(message, "isLottie")) + writer.uint32(/* id 21, wireType 0 =*/168).bool(message.isLottie); return writer; }; @@ -51110,6 +60443,12 @@ $root.proto = (function() { case 19: message.isAvatar = reader.bool(); break; + case 20: + message.isAiSticker = reader.bool(); + break; + case 21: + message.isLottie = reader.bool(); + break; default: reader.skipType(tag & 7); break; @@ -51198,6 +60537,12 @@ $root.proto = (function() { if (message.isAvatar != null && message.hasOwnProperty("isAvatar")) if (typeof message.isAvatar !== "boolean") return "isAvatar: boolean expected"; + if (message.isAiSticker != null && message.hasOwnProperty("isAiSticker")) + if (typeof message.isAiSticker !== "boolean") + return "isAiSticker: boolean expected"; + if (message.isLottie != null && message.hasOwnProperty("isLottie")) + if (typeof message.isLottie !== "boolean") + return "isLottie: boolean expected"; return null; }; @@ -51286,6 +60631,10 @@ $root.proto = (function() { message.stickerSentTs = new $util.LongBits(object.stickerSentTs.low >>> 0, object.stickerSentTs.high >>> 0).toNumber(); if (object.isAvatar != null) message.isAvatar = Boolean(object.isAvatar); + if (object.isAiSticker != null) + message.isAiSticker = Boolean(object.isAiSticker); + if (object.isLottie != null) + message.isLottie = Boolean(object.isLottie); return message; }; @@ -51362,6 +60711,8 @@ $root.proto = (function() { } else object.stickerSentTs = options.longs === String ? "0" : 0; object.isAvatar = false; + object.isAiSticker = false; + object.isLottie = false; } if (message.url != null && message.hasOwnProperty("url")) object.url = message.url; @@ -51406,6 +60757,10 @@ $root.proto = (function() { object.stickerSentTs = options.longs === String ? $util.Long.prototype.toString.call(message.stickerSentTs) : options.longs === Number ? new $util.LongBits(message.stickerSentTs.low >>> 0, message.stickerSentTs.high >>> 0).toNumber() : message.stickerSentTs; if (message.isAvatar != null && message.hasOwnProperty("isAvatar")) object.isAvatar = message.isAvatar; + if (message.isAiSticker != null && message.hasOwnProperty("isAiSticker")) + object.isAiSticker = message.isAiSticker; + if (message.isLottie != null && message.hasOwnProperty("isLottie")) + object.isLottie = message.isLottie; return object; }; @@ -51696,6 +61051,7 @@ $root.proto = (function() { * @property {string|null} [selectedDisplayText] TemplateButtonReplyMessage selectedDisplayText * @property {proto.IContextInfo|null} [contextInfo] TemplateButtonReplyMessage contextInfo * @property {number|null} [selectedIndex] TemplateButtonReplyMessage selectedIndex + * @property {number|null} [selectedCarouselCardIndex] TemplateButtonReplyMessage selectedCarouselCardIndex */ /** @@ -51745,6 +61101,14 @@ $root.proto = (function() { */ TemplateButtonReplyMessage.prototype.selectedIndex = 0; + /** + * TemplateButtonReplyMessage selectedCarouselCardIndex. + * @member {number} selectedCarouselCardIndex + * @memberof proto.Message.TemplateButtonReplyMessage + * @instance + */ + TemplateButtonReplyMessage.prototype.selectedCarouselCardIndex = 0; + /** * Creates a new TemplateButtonReplyMessage instance using the specified properties. * @function create @@ -51777,6 +61141,8 @@ $root.proto = (function() { $root.proto.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.selectedIndex != null && Object.hasOwnProperty.call(message, "selectedIndex")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.selectedIndex); + if (message.selectedCarouselCardIndex != null && Object.hasOwnProperty.call(message, "selectedCarouselCardIndex")) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.selectedCarouselCardIndex); return writer; }; @@ -51823,6 +61189,9 @@ $root.proto = (function() { case 4: message.selectedIndex = reader.uint32(); break; + case 5: + message.selectedCarouselCardIndex = reader.uint32(); + break; default: reader.skipType(tag & 7); break; @@ -51872,6 +61241,9 @@ $root.proto = (function() { if (message.selectedIndex != null && message.hasOwnProperty("selectedIndex")) if (!$util.isInteger(message.selectedIndex)) return "selectedIndex: integer expected"; + if (message.selectedCarouselCardIndex != null && message.hasOwnProperty("selectedCarouselCardIndex")) + if (!$util.isInteger(message.selectedCarouselCardIndex)) + return "selectedCarouselCardIndex: integer expected"; return null; }; @@ -51898,6 +61270,8 @@ $root.proto = (function() { } if (object.selectedIndex != null) message.selectedIndex = object.selectedIndex >>> 0; + if (object.selectedCarouselCardIndex != null) + message.selectedCarouselCardIndex = object.selectedCarouselCardIndex >>> 0; return message; }; @@ -51919,6 +61293,7 @@ $root.proto = (function() { object.selectedDisplayText = ""; object.contextInfo = null; object.selectedIndex = 0; + object.selectedCarouselCardIndex = 0; } if (message.selectedId != null && message.hasOwnProperty("selectedId")) object.selectedId = message.selectedId; @@ -51928,6 +61303,8 @@ $root.proto = (function() { object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); if (message.selectedIndex != null && message.hasOwnProperty("selectedIndex")) object.selectedIndex = message.selectedIndex; + if (message.selectedCarouselCardIndex != null && message.hasOwnProperty("selectedCarouselCardIndex")) + object.selectedCarouselCardIndex = message.selectedCarouselCardIndex; return object; }; @@ -52756,6 +62133,7 @@ $root.proto = (function() { * @property {string|null} [hydratedFooterText] HydratedFourRowTemplate hydratedFooterText * @property {Array.|null} [hydratedButtons] HydratedFourRowTemplate hydratedButtons * @property {string|null} [templateId] HydratedFourRowTemplate templateId + * @property {boolean|null} [maskLinkedDevices] HydratedFourRowTemplate maskLinkedDevices * @property {proto.Message.IDocumentMessage|null} [documentMessage] HydratedFourRowTemplate documentMessage * @property {string|null} [hydratedTitleText] HydratedFourRowTemplate hydratedTitleText * @property {proto.Message.IImageMessage|null} [imageMessage] HydratedFourRowTemplate imageMessage @@ -52811,6 +62189,14 @@ $root.proto = (function() { */ HydratedFourRowTemplate.prototype.templateId = ""; + /** + * HydratedFourRowTemplate maskLinkedDevices. + * @member {boolean} maskLinkedDevices + * @memberof proto.Message.TemplateMessage.HydratedFourRowTemplate + * @instance + */ + HydratedFourRowTemplate.prototype.maskLinkedDevices = false; + /** * HydratedFourRowTemplate documentMessage. * @member {proto.Message.IDocumentMessage|null|undefined} documentMessage @@ -52908,6 +62294,8 @@ $root.proto = (function() { $root.proto.HydratedTemplateButton.encode(message.hydratedButtons[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); if (message.templateId != null && Object.hasOwnProperty.call(message, "templateId")) writer.uint32(/* id 9, wireType 2 =*/74).string(message.templateId); + if (message.maskLinkedDevices != null && Object.hasOwnProperty.call(message, "maskLinkedDevices")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.maskLinkedDevices); return writer; }; @@ -52956,6 +62344,9 @@ $root.proto = (function() { case 9: message.templateId = reader.string(); break; + case 10: + message.maskLinkedDevices = reader.bool(); + break; case 1: message.documentMessage = $root.proto.Message.DocumentMessage.decode(reader, reader.uint32()); break; @@ -53025,6 +62416,9 @@ $root.proto = (function() { if (message.templateId != null && message.hasOwnProperty("templateId")) if (!$util.isString(message.templateId)) return "templateId: string expected"; + if (message.maskLinkedDevices != null && message.hasOwnProperty("maskLinkedDevices")) + if (typeof message.maskLinkedDevices !== "boolean") + return "maskLinkedDevices: boolean expected"; if (message.documentMessage != null && message.hasOwnProperty("documentMessage")) { properties.title = 1; { @@ -53101,6 +62495,8 @@ $root.proto = (function() { } if (object.templateId != null) message.templateId = String(object.templateId); + if (object.maskLinkedDevices != null) + message.maskLinkedDevices = Boolean(object.maskLinkedDevices); if (object.documentMessage != null) { if (typeof object.documentMessage !== "object") throw TypeError(".proto.Message.TemplateMessage.HydratedFourRowTemplate.documentMessage: object expected"); @@ -53145,6 +62541,7 @@ $root.proto = (function() { object.hydratedContentText = ""; object.hydratedFooterText = ""; object.templateId = ""; + object.maskLinkedDevices = false; } if (message.documentMessage != null && message.hasOwnProperty("documentMessage")) { object.documentMessage = $root.proto.Message.DocumentMessage.toObject(message.documentMessage, options); @@ -53182,6 +62579,8 @@ $root.proto = (function() { } if (message.templateId != null && message.hasOwnProperty("templateId")) object.templateId = message.templateId; + if (message.maskLinkedDevices != null && message.hasOwnProperty("maskLinkedDevices")) + object.maskLinkedDevices = message.maskLinkedDevices; return object; }; @@ -53231,6 +62630,7 @@ $root.proto = (function() { * @property {Uint8Array|null} [thumbnailSha256] VideoMessage thumbnailSha256 * @property {Uint8Array|null} [thumbnailEncSha256] VideoMessage thumbnailEncSha256 * @property {string|null} [staticUrl] VideoMessage staticUrl + * @property {Array.|null} [annotations] VideoMessage annotations */ /** @@ -53243,6 +62643,7 @@ $root.proto = (function() { */ function VideoMessage(properties) { this.interactiveAnnotations = []; + this.annotations = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -53433,6 +62834,14 @@ $root.proto = (function() { */ VideoMessage.prototype.staticUrl = ""; + /** + * VideoMessage annotations. + * @member {Array.} annotations + * @memberof proto.Message.VideoMessage + * @instance + */ + VideoMessage.prototype.annotations = $util.emptyArray; + /** * Creates a new VideoMessage instance using the specified properties. * @function create @@ -53504,6 +62913,9 @@ $root.proto = (function() { writer.uint32(/* id 23, wireType 2 =*/186).bytes(message.thumbnailEncSha256); if (message.staticUrl != null && Object.hasOwnProperty.call(message, "staticUrl")) writer.uint32(/* id 24, wireType 2 =*/194).string(message.staticUrl); + if (message.annotations != null && message.annotations.length) + for (var i = 0; i < message.annotations.length; ++i) + $root.proto.InteractiveAnnotation.encode(message.annotations[i], writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); return writer; }; @@ -53609,6 +63021,11 @@ $root.proto = (function() { case 24: message.staticUrl = reader.string(); break; + case 25: + if (!(message.annotations && message.annotations.length)) + message.annotations = []; + message.annotations.push($root.proto.InteractiveAnnotation.decode(reader, reader.uint32())); + break; default: reader.skipType(tag & 7); break; @@ -53727,6 +63144,15 @@ $root.proto = (function() { if (message.staticUrl != null && message.hasOwnProperty("staticUrl")) if (!$util.isString(message.staticUrl)) return "staticUrl: string expected"; + if (message.annotations != null && message.hasOwnProperty("annotations")) { + if (!Array.isArray(message.annotations)) + return "annotations: array expected"; + for (var i = 0; i < message.annotations.length; ++i) { + var error = $root.proto.InteractiveAnnotation.verify(message.annotations[i]); + if (error) + return "annotations." + error; + } + } return null; }; @@ -53846,6 +63272,16 @@ $root.proto = (function() { message.thumbnailEncSha256 = object.thumbnailEncSha256; if (object.staticUrl != null) message.staticUrl = String(object.staticUrl); + if (object.annotations) { + if (!Array.isArray(object.annotations)) + throw TypeError(".proto.Message.VideoMessage.annotations: array expected"); + message.annotations = []; + for (var i = 0; i < object.annotations.length; ++i) { + if (typeof object.annotations[i] !== "object") + throw TypeError(".proto.Message.VideoMessage.annotations: object expected"); + message.annotations[i] = $root.proto.InteractiveAnnotation.fromObject(object.annotations[i]); + } + } return message; }; @@ -53862,8 +63298,10 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) + if (options.arrays || options.defaults) { object.interactiveAnnotations = []; + object.annotations = []; + } if (options.defaults) { object.url = ""; object.mimetype = ""; @@ -53993,6 +63431,11 @@ $root.proto = (function() { object.thumbnailEncSha256 = options.bytes === String ? $util.base64.encode(message.thumbnailEncSha256, 0, message.thumbnailEncSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.thumbnailEncSha256) : message.thumbnailEncSha256; if (message.staticUrl != null && message.hasOwnProperty("staticUrl")) object.staticUrl = message.staticUrl; + if (message.annotations && message.annotations.length) { + object.annotations = []; + for (var j = 0; j < message.annotations.length; ++j) + object.annotations[j] = $root.proto.InteractiveAnnotation.toObject(message.annotations[j], options); + } return object; }; @@ -54229,6 +63672,7 @@ $root.proto = (function() { * @property {number|null} [messageAddOnDurationInSecs] MessageContextInfo messageAddOnDurationInSecs * @property {Uint8Array|null} [botMessageSecret] MessageContextInfo botMessageSecret * @property {proto.IBotMetadata|null} [botMetadata] MessageContextInfo botMetadata + * @property {number|null} [reportingTokenVersion] MessageContextInfo reportingTokenVersion */ /** @@ -54302,6 +63746,14 @@ $root.proto = (function() { */ MessageContextInfo.prototype.botMetadata = null; + /** + * MessageContextInfo reportingTokenVersion. + * @member {number} reportingTokenVersion + * @memberof proto.MessageContextInfo + * @instance + */ + MessageContextInfo.prototype.reportingTokenVersion = 0; + /** * Creates a new MessageContextInfo instance using the specified properties. * @function create @@ -54340,6 +63792,8 @@ $root.proto = (function() { writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.botMessageSecret); if (message.botMetadata != null && Object.hasOwnProperty.call(message, "botMetadata")) $root.proto.BotMetadata.encode(message.botMetadata, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.reportingTokenVersion != null && Object.hasOwnProperty.call(message, "reportingTokenVersion")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.reportingTokenVersion); return writer; }; @@ -54395,6 +63849,9 @@ $root.proto = (function() { case 7: message.botMetadata = $root.proto.BotMetadata.decode(reader, reader.uint32()); break; + case 8: + message.reportingTokenVersion = reader.int32(); + break; default: reader.skipType(tag & 7); break; @@ -54455,6 +63912,9 @@ $root.proto = (function() { if (error) return "botMetadata." + error; } + if (message.reportingTokenVersion != null && message.hasOwnProperty("reportingTokenVersion")) + if (!$util.isInteger(message.reportingTokenVersion)) + return "reportingTokenVersion: integer expected"; return null; }; @@ -54499,6 +63959,8 @@ $root.proto = (function() { throw TypeError(".proto.MessageContextInfo.botMetadata: object expected"); message.botMetadata = $root.proto.BotMetadata.fromObject(object.botMetadata); } + if (object.reportingTokenVersion != null) + message.reportingTokenVersion = object.reportingTokenVersion | 0; return message; }; @@ -54541,6 +64003,7 @@ $root.proto = (function() { object.botMessageSecret = $util.newBuffer(object.botMessageSecret); } object.botMetadata = null; + object.reportingTokenVersion = 0; } if (message.deviceListMetadata != null && message.hasOwnProperty("deviceListMetadata")) object.deviceListMetadata = $root.proto.DeviceListMetadata.toObject(message.deviceListMetadata, options); @@ -54556,6 +64019,8 @@ $root.proto = (function() { object.botMessageSecret = options.bytes === String ? $util.base64.encode(message.botMessageSecret, 0, message.botMessageSecret.length) : options.bytes === Array ? Array.prototype.slice.call(message.botMessageSecret) : message.botMessageSecret; if (message.botMetadata != null && message.hasOwnProperty("botMetadata")) object.botMetadata = $root.proto.BotMetadata.toObject(message.botMetadata, options); + if (message.reportingTokenVersion != null && message.hasOwnProperty("reportingTokenVersion")) + object.reportingTokenVersion = message.reportingTokenVersion; return object; }; @@ -55356,6 +64821,9 @@ $root.proto = (function() { * @property {Uint8Array|null} [encReactionEncPayload] MsgOpaqueData encReactionEncPayload * @property {Uint8Array|null} [encReactionEncIv] MsgOpaqueData encReactionEncIv * @property {Uint8Array|null} [botMessageSecret] MsgOpaqueData botMessageSecret + * @property {string|null} [targetMessageKey] MsgOpaqueData targetMessageKey + * @property {Uint8Array|null} [encPayload] MsgOpaqueData encPayload + * @property {Uint8Array|null} [encIv] MsgOpaqueData encIv */ /** @@ -55590,6 +65058,30 @@ $root.proto = (function() { */ MsgOpaqueData.prototype.botMessageSecret = $util.newBuffer([]); + /** + * MsgOpaqueData targetMessageKey. + * @member {string} targetMessageKey + * @memberof proto.MsgOpaqueData + * @instance + */ + MsgOpaqueData.prototype.targetMessageKey = ""; + + /** + * MsgOpaqueData encPayload. + * @member {Uint8Array} encPayload + * @memberof proto.MsgOpaqueData + * @instance + */ + MsgOpaqueData.prototype.encPayload = $util.newBuffer([]); + + /** + * MsgOpaqueData encIv. + * @member {Uint8Array} encIv + * @memberof proto.MsgOpaqueData + * @instance + */ + MsgOpaqueData.prototype.encIv = $util.newBuffer([]); + /** * Creates a new MsgOpaqueData instance using the specified properties. * @function create @@ -55667,6 +65159,12 @@ $root.proto = (function() { writer.uint32(/* id 28, wireType 0 =*/224).bool(message.isSentCagPollCreation); if (message.botMessageSecret != null && Object.hasOwnProperty.call(message, "botMessageSecret")) writer.uint32(/* id 29, wireType 2 =*/234).bytes(message.botMessageSecret); + if (message.targetMessageKey != null && Object.hasOwnProperty.call(message, "targetMessageKey")) + writer.uint32(/* id 30, wireType 2 =*/242).string(message.targetMessageKey); + if (message.encPayload != null && Object.hasOwnProperty.call(message, "encPayload")) + writer.uint32(/* id 31, wireType 2 =*/250).bytes(message.encPayload); + if (message.encIv != null && Object.hasOwnProperty.call(message, "encIv")) + writer.uint32(/* id 32, wireType 2 =*/258).bytes(message.encIv); if (message.originalSelfAuthor != null && Object.hasOwnProperty.call(message, "originalSelfAuthor")) writer.uint32(/* id 51, wireType 2 =*/410).string(message.originalSelfAuthor); return writer; @@ -55786,6 +65284,15 @@ $root.proto = (function() { case 29: message.botMessageSecret = reader.bytes(); break; + case 30: + message.targetMessageKey = reader.string(); + break; + case 31: + message.encPayload = reader.bytes(); + break; + case 32: + message.encIv = reader.bytes(); + break; default: reader.skipType(tag & 7); break; @@ -55910,6 +65417,15 @@ $root.proto = (function() { if (message.botMessageSecret != null && message.hasOwnProperty("botMessageSecret")) if (!(message.botMessageSecret && typeof message.botMessageSecret.length === "number" || $util.isString(message.botMessageSecret))) return "botMessageSecret: buffer expected"; + if (message.targetMessageKey != null && message.hasOwnProperty("targetMessageKey")) + if (!$util.isString(message.targetMessageKey)) + return "targetMessageKey: string expected"; + if (message.encPayload != null && message.hasOwnProperty("encPayload")) + if (!(message.encPayload && typeof message.encPayload.length === "number" || $util.isString(message.encPayload))) + return "encPayload: buffer expected"; + if (message.encIv != null && message.hasOwnProperty("encIv")) + if (!(message.encIv && typeof message.encIv.length === "number" || $util.isString(message.encIv))) + return "encIv: buffer expected"; return null; }; @@ -56012,6 +65528,18 @@ $root.proto = (function() { $util.base64.decode(object.botMessageSecret, message.botMessageSecret = $util.newBuffer($util.base64.length(object.botMessageSecret)), 0); else if (object.botMessageSecret.length) message.botMessageSecret = object.botMessageSecret; + if (object.targetMessageKey != null) + message.targetMessageKey = String(object.targetMessageKey); + if (object.encPayload != null) + if (typeof object.encPayload === "string") + $util.base64.decode(object.encPayload, message.encPayload = $util.newBuffer($util.base64.length(object.encPayload)), 0); + else if (object.encPayload.length) + message.encPayload = object.encPayload; + if (object.encIv != null) + if (typeof object.encIv === "string") + $util.base64.decode(object.encIv, message.encIv = $util.newBuffer($util.base64.length(object.encIv)), 0); + else if (object.encIv.length) + message.encIv = object.encIv; return message; }; @@ -56090,6 +65618,21 @@ $root.proto = (function() { if (options.bytes !== Array) object.botMessageSecret = $util.newBuffer(object.botMessageSecret); } + object.targetMessageKey = ""; + if (options.bytes === String) + object.encPayload = ""; + else { + object.encPayload = []; + if (options.bytes !== Array) + object.encPayload = $util.newBuffer(object.encPayload); + } + if (options.bytes === String) + object.encIv = ""; + else { + object.encIv = []; + if (options.bytes !== Array) + object.encIv = $util.newBuffer(object.encIv); + } object.originalSelfAuthor = ""; } if (message.body != null && message.hasOwnProperty("body")) @@ -56150,6 +65693,12 @@ $root.proto = (function() { object.isSentCagPollCreation = message.isSentCagPollCreation; if (message.botMessageSecret != null && message.hasOwnProperty("botMessageSecret")) object.botMessageSecret = options.bytes === String ? $util.base64.encode(message.botMessageSecret, 0, message.botMessageSecret.length) : options.bytes === Array ? Array.prototype.slice.call(message.botMessageSecret) : message.botMessageSecret; + if (message.targetMessageKey != null && message.hasOwnProperty("targetMessageKey")) + object.targetMessageKey = message.targetMessageKey; + if (message.encPayload != null && message.hasOwnProperty("encPayload")) + object.encPayload = options.bytes === String ? $util.base64.encode(message.encPayload, 0, message.encPayload.length) : options.bytes === Array ? Array.prototype.slice.call(message.encPayload) : message.encPayload; + if (message.encIv != null && message.hasOwnProperty("encIv")) + object.encIv = options.bytes === String ? $util.base64.encode(message.encIv, 0, message.encIv.length) : options.bytes === Array ? Array.prototype.slice.call(message.encIv) : message.encIv; if (message.originalSelfAuthor != null && message.hasOwnProperty("originalSelfAuthor")) object.originalSelfAuthor = message.originalSelfAuthor; return object; @@ -58183,6 +67732,530 @@ $root.proto = (function() { return PastParticipants; })(); + proto.PatchDebugData = (function() { + + /** + * Properties of a PatchDebugData. + * @memberof proto + * @interface IPatchDebugData + * @property {Uint8Array|null} [currentLthash] PatchDebugData currentLthash + * @property {Uint8Array|null} [newLthash] PatchDebugData newLthash + * @property {Uint8Array|null} [patchVersion] PatchDebugData patchVersion + * @property {Uint8Array|null} [collectionName] PatchDebugData collectionName + * @property {Uint8Array|null} [firstFourBytesFromAHashOfSnapshotMacKey] PatchDebugData firstFourBytesFromAHashOfSnapshotMacKey + * @property {Uint8Array|null} [newLthashSubtract] PatchDebugData newLthashSubtract + * @property {number|null} [numberAdd] PatchDebugData numberAdd + * @property {number|null} [numberRemove] PatchDebugData numberRemove + * @property {number|null} [numberOverride] PatchDebugData numberOverride + * @property {proto.PatchDebugData.Platform|null} [senderPlatform] PatchDebugData senderPlatform + * @property {boolean|null} [isSenderPrimary] PatchDebugData isSenderPrimary + */ + + /** + * Constructs a new PatchDebugData. + * @memberof proto + * @classdesc Represents a PatchDebugData. + * @implements IPatchDebugData + * @constructor + * @param {proto.IPatchDebugData=} [properties] Properties to set + */ + function PatchDebugData(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PatchDebugData currentLthash. + * @member {Uint8Array} currentLthash + * @memberof proto.PatchDebugData + * @instance + */ + PatchDebugData.prototype.currentLthash = $util.newBuffer([]); + + /** + * PatchDebugData newLthash. + * @member {Uint8Array} newLthash + * @memberof proto.PatchDebugData + * @instance + */ + PatchDebugData.prototype.newLthash = $util.newBuffer([]); + + /** + * PatchDebugData patchVersion. + * @member {Uint8Array} patchVersion + * @memberof proto.PatchDebugData + * @instance + */ + PatchDebugData.prototype.patchVersion = $util.newBuffer([]); + + /** + * PatchDebugData collectionName. + * @member {Uint8Array} collectionName + * @memberof proto.PatchDebugData + * @instance + */ + PatchDebugData.prototype.collectionName = $util.newBuffer([]); + + /** + * PatchDebugData firstFourBytesFromAHashOfSnapshotMacKey. + * @member {Uint8Array} firstFourBytesFromAHashOfSnapshotMacKey + * @memberof proto.PatchDebugData + * @instance + */ + PatchDebugData.prototype.firstFourBytesFromAHashOfSnapshotMacKey = $util.newBuffer([]); + + /** + * PatchDebugData newLthashSubtract. + * @member {Uint8Array} newLthashSubtract + * @memberof proto.PatchDebugData + * @instance + */ + PatchDebugData.prototype.newLthashSubtract = $util.newBuffer([]); + + /** + * PatchDebugData numberAdd. + * @member {number} numberAdd + * @memberof proto.PatchDebugData + * @instance + */ + PatchDebugData.prototype.numberAdd = 0; + + /** + * PatchDebugData numberRemove. + * @member {number} numberRemove + * @memberof proto.PatchDebugData + * @instance + */ + PatchDebugData.prototype.numberRemove = 0; + + /** + * PatchDebugData numberOverride. + * @member {number} numberOverride + * @memberof proto.PatchDebugData + * @instance + */ + PatchDebugData.prototype.numberOverride = 0; + + /** + * PatchDebugData senderPlatform. + * @member {proto.PatchDebugData.Platform} senderPlatform + * @memberof proto.PatchDebugData + * @instance + */ + PatchDebugData.prototype.senderPlatform = 0; + + /** + * PatchDebugData isSenderPrimary. + * @member {boolean} isSenderPrimary + * @memberof proto.PatchDebugData + * @instance + */ + PatchDebugData.prototype.isSenderPrimary = false; + + /** + * Creates a new PatchDebugData instance using the specified properties. + * @function create + * @memberof proto.PatchDebugData + * @static + * @param {proto.IPatchDebugData=} [properties] Properties to set + * @returns {proto.PatchDebugData} PatchDebugData instance + */ + PatchDebugData.create = function create(properties) { + return new PatchDebugData(properties); + }; + + /** + * Encodes the specified PatchDebugData message. Does not implicitly {@link proto.PatchDebugData.verify|verify} messages. + * @function encode + * @memberof proto.PatchDebugData + * @static + * @param {proto.IPatchDebugData} message PatchDebugData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PatchDebugData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.currentLthash != null && Object.hasOwnProperty.call(message, "currentLthash")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.currentLthash); + if (message.newLthash != null && Object.hasOwnProperty.call(message, "newLthash")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.newLthash); + if (message.patchVersion != null && Object.hasOwnProperty.call(message, "patchVersion")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.patchVersion); + if (message.collectionName != null && Object.hasOwnProperty.call(message, "collectionName")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.collectionName); + if (message.firstFourBytesFromAHashOfSnapshotMacKey != null && Object.hasOwnProperty.call(message, "firstFourBytesFromAHashOfSnapshotMacKey")) + writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.firstFourBytesFromAHashOfSnapshotMacKey); + if (message.newLthashSubtract != null && Object.hasOwnProperty.call(message, "newLthashSubtract")) + writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.newLthashSubtract); + if (message.numberAdd != null && Object.hasOwnProperty.call(message, "numberAdd")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.numberAdd); + if (message.numberRemove != null && Object.hasOwnProperty.call(message, "numberRemove")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.numberRemove); + if (message.numberOverride != null && Object.hasOwnProperty.call(message, "numberOverride")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.numberOverride); + if (message.senderPlatform != null && Object.hasOwnProperty.call(message, "senderPlatform")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.senderPlatform); + if (message.isSenderPrimary != null && Object.hasOwnProperty.call(message, "isSenderPrimary")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.isSenderPrimary); + return writer; + }; + + /** + * Encodes the specified PatchDebugData message, length delimited. Does not implicitly {@link proto.PatchDebugData.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.PatchDebugData + * @static + * @param {proto.IPatchDebugData} message PatchDebugData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PatchDebugData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PatchDebugData message from the specified reader or buffer. + * @function decode + * @memberof proto.PatchDebugData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.PatchDebugData} PatchDebugData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PatchDebugData.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.PatchDebugData(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.currentLthash = reader.bytes(); + break; + case 2: + message.newLthash = reader.bytes(); + break; + case 3: + message.patchVersion = reader.bytes(); + break; + case 4: + message.collectionName = reader.bytes(); + break; + case 5: + message.firstFourBytesFromAHashOfSnapshotMacKey = reader.bytes(); + break; + case 6: + message.newLthashSubtract = reader.bytes(); + break; + case 7: + message.numberAdd = reader.int32(); + break; + case 8: + message.numberRemove = reader.int32(); + break; + case 9: + message.numberOverride = reader.int32(); + break; + case 10: + message.senderPlatform = reader.int32(); + break; + case 11: + message.isSenderPrimary = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PatchDebugData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.PatchDebugData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.PatchDebugData} PatchDebugData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PatchDebugData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PatchDebugData message. + * @function verify + * @memberof proto.PatchDebugData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PatchDebugData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.currentLthash != null && message.hasOwnProperty("currentLthash")) + if (!(message.currentLthash && typeof message.currentLthash.length === "number" || $util.isString(message.currentLthash))) + return "currentLthash: buffer expected"; + if (message.newLthash != null && message.hasOwnProperty("newLthash")) + if (!(message.newLthash && typeof message.newLthash.length === "number" || $util.isString(message.newLthash))) + return "newLthash: buffer expected"; + if (message.patchVersion != null && message.hasOwnProperty("patchVersion")) + if (!(message.patchVersion && typeof message.patchVersion.length === "number" || $util.isString(message.patchVersion))) + return "patchVersion: buffer expected"; + if (message.collectionName != null && message.hasOwnProperty("collectionName")) + if (!(message.collectionName && typeof message.collectionName.length === "number" || $util.isString(message.collectionName))) + return "collectionName: buffer expected"; + if (message.firstFourBytesFromAHashOfSnapshotMacKey != null && message.hasOwnProperty("firstFourBytesFromAHashOfSnapshotMacKey")) + if (!(message.firstFourBytesFromAHashOfSnapshotMacKey && typeof message.firstFourBytesFromAHashOfSnapshotMacKey.length === "number" || $util.isString(message.firstFourBytesFromAHashOfSnapshotMacKey))) + return "firstFourBytesFromAHashOfSnapshotMacKey: buffer expected"; + if (message.newLthashSubtract != null && message.hasOwnProperty("newLthashSubtract")) + if (!(message.newLthashSubtract && typeof message.newLthashSubtract.length === "number" || $util.isString(message.newLthashSubtract))) + return "newLthashSubtract: buffer expected"; + if (message.numberAdd != null && message.hasOwnProperty("numberAdd")) + if (!$util.isInteger(message.numberAdd)) + return "numberAdd: integer expected"; + if (message.numberRemove != null && message.hasOwnProperty("numberRemove")) + if (!$util.isInteger(message.numberRemove)) + return "numberRemove: integer expected"; + if (message.numberOverride != null && message.hasOwnProperty("numberOverride")) + if (!$util.isInteger(message.numberOverride)) + return "numberOverride: integer expected"; + if (message.senderPlatform != null && message.hasOwnProperty("senderPlatform")) + switch (message.senderPlatform) { + default: + return "senderPlatform: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.isSenderPrimary != null && message.hasOwnProperty("isSenderPrimary")) + if (typeof message.isSenderPrimary !== "boolean") + return "isSenderPrimary: boolean expected"; + return null; + }; + + /** + * Creates a PatchDebugData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.PatchDebugData + * @static + * @param {Object.} object Plain object + * @returns {proto.PatchDebugData} PatchDebugData + */ + PatchDebugData.fromObject = function fromObject(object) { + if (object instanceof $root.proto.PatchDebugData) + return object; + var message = new $root.proto.PatchDebugData(); + if (object.currentLthash != null) + if (typeof object.currentLthash === "string") + $util.base64.decode(object.currentLthash, message.currentLthash = $util.newBuffer($util.base64.length(object.currentLthash)), 0); + else if (object.currentLthash.length) + message.currentLthash = object.currentLthash; + if (object.newLthash != null) + if (typeof object.newLthash === "string") + $util.base64.decode(object.newLthash, message.newLthash = $util.newBuffer($util.base64.length(object.newLthash)), 0); + else if (object.newLthash.length) + message.newLthash = object.newLthash; + if (object.patchVersion != null) + if (typeof object.patchVersion === "string") + $util.base64.decode(object.patchVersion, message.patchVersion = $util.newBuffer($util.base64.length(object.patchVersion)), 0); + else if (object.patchVersion.length) + message.patchVersion = object.patchVersion; + if (object.collectionName != null) + if (typeof object.collectionName === "string") + $util.base64.decode(object.collectionName, message.collectionName = $util.newBuffer($util.base64.length(object.collectionName)), 0); + else if (object.collectionName.length) + message.collectionName = object.collectionName; + if (object.firstFourBytesFromAHashOfSnapshotMacKey != null) + if (typeof object.firstFourBytesFromAHashOfSnapshotMacKey === "string") + $util.base64.decode(object.firstFourBytesFromAHashOfSnapshotMacKey, message.firstFourBytesFromAHashOfSnapshotMacKey = $util.newBuffer($util.base64.length(object.firstFourBytesFromAHashOfSnapshotMacKey)), 0); + else if (object.firstFourBytesFromAHashOfSnapshotMacKey.length) + message.firstFourBytesFromAHashOfSnapshotMacKey = object.firstFourBytesFromAHashOfSnapshotMacKey; + if (object.newLthashSubtract != null) + if (typeof object.newLthashSubtract === "string") + $util.base64.decode(object.newLthashSubtract, message.newLthashSubtract = $util.newBuffer($util.base64.length(object.newLthashSubtract)), 0); + else if (object.newLthashSubtract.length) + message.newLthashSubtract = object.newLthashSubtract; + if (object.numberAdd != null) + message.numberAdd = object.numberAdd | 0; + if (object.numberRemove != null) + message.numberRemove = object.numberRemove | 0; + if (object.numberOverride != null) + message.numberOverride = object.numberOverride | 0; + switch (object.senderPlatform) { + case "ANDROID": + case 0: + message.senderPlatform = 0; + break; + case "SMBA": + case 1: + message.senderPlatform = 1; + break; + case "IPHONE": + case 2: + message.senderPlatform = 2; + break; + case "SMBI": + case 3: + message.senderPlatform = 3; + break; + case "WEB": + case 4: + message.senderPlatform = 4; + break; + case "UWP": + case 5: + message.senderPlatform = 5; + break; + case "DARWIN": + case 6: + message.senderPlatform = 6; + break; + } + if (object.isSenderPrimary != null) + message.isSenderPrimary = Boolean(object.isSenderPrimary); + return message; + }; + + /** + * Creates a plain object from a PatchDebugData message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.PatchDebugData + * @static + * @param {proto.PatchDebugData} message PatchDebugData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PatchDebugData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.currentLthash = ""; + else { + object.currentLthash = []; + if (options.bytes !== Array) + object.currentLthash = $util.newBuffer(object.currentLthash); + } + if (options.bytes === String) + object.newLthash = ""; + else { + object.newLthash = []; + if (options.bytes !== Array) + object.newLthash = $util.newBuffer(object.newLthash); + } + if (options.bytes === String) + object.patchVersion = ""; + else { + object.patchVersion = []; + if (options.bytes !== Array) + object.patchVersion = $util.newBuffer(object.patchVersion); + } + if (options.bytes === String) + object.collectionName = ""; + else { + object.collectionName = []; + if (options.bytes !== Array) + object.collectionName = $util.newBuffer(object.collectionName); + } + if (options.bytes === String) + object.firstFourBytesFromAHashOfSnapshotMacKey = ""; + else { + object.firstFourBytesFromAHashOfSnapshotMacKey = []; + if (options.bytes !== Array) + object.firstFourBytesFromAHashOfSnapshotMacKey = $util.newBuffer(object.firstFourBytesFromAHashOfSnapshotMacKey); + } + if (options.bytes === String) + object.newLthashSubtract = ""; + else { + object.newLthashSubtract = []; + if (options.bytes !== Array) + object.newLthashSubtract = $util.newBuffer(object.newLthashSubtract); + } + object.numberAdd = 0; + object.numberRemove = 0; + object.numberOverride = 0; + object.senderPlatform = options.enums === String ? "ANDROID" : 0; + object.isSenderPrimary = false; + } + if (message.currentLthash != null && message.hasOwnProperty("currentLthash")) + object.currentLthash = options.bytes === String ? $util.base64.encode(message.currentLthash, 0, message.currentLthash.length) : options.bytes === Array ? Array.prototype.slice.call(message.currentLthash) : message.currentLthash; + if (message.newLthash != null && message.hasOwnProperty("newLthash")) + object.newLthash = options.bytes === String ? $util.base64.encode(message.newLthash, 0, message.newLthash.length) : options.bytes === Array ? Array.prototype.slice.call(message.newLthash) : message.newLthash; + if (message.patchVersion != null && message.hasOwnProperty("patchVersion")) + object.patchVersion = options.bytes === String ? $util.base64.encode(message.patchVersion, 0, message.patchVersion.length) : options.bytes === Array ? Array.prototype.slice.call(message.patchVersion) : message.patchVersion; + if (message.collectionName != null && message.hasOwnProperty("collectionName")) + object.collectionName = options.bytes === String ? $util.base64.encode(message.collectionName, 0, message.collectionName.length) : options.bytes === Array ? Array.prototype.slice.call(message.collectionName) : message.collectionName; + if (message.firstFourBytesFromAHashOfSnapshotMacKey != null && message.hasOwnProperty("firstFourBytesFromAHashOfSnapshotMacKey")) + object.firstFourBytesFromAHashOfSnapshotMacKey = options.bytes === String ? $util.base64.encode(message.firstFourBytesFromAHashOfSnapshotMacKey, 0, message.firstFourBytesFromAHashOfSnapshotMacKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.firstFourBytesFromAHashOfSnapshotMacKey) : message.firstFourBytesFromAHashOfSnapshotMacKey; + if (message.newLthashSubtract != null && message.hasOwnProperty("newLthashSubtract")) + object.newLthashSubtract = options.bytes === String ? $util.base64.encode(message.newLthashSubtract, 0, message.newLthashSubtract.length) : options.bytes === Array ? Array.prototype.slice.call(message.newLthashSubtract) : message.newLthashSubtract; + if (message.numberAdd != null && message.hasOwnProperty("numberAdd")) + object.numberAdd = message.numberAdd; + if (message.numberRemove != null && message.hasOwnProperty("numberRemove")) + object.numberRemove = message.numberRemove; + if (message.numberOverride != null && message.hasOwnProperty("numberOverride")) + object.numberOverride = message.numberOverride; + if (message.senderPlatform != null && message.hasOwnProperty("senderPlatform")) + object.senderPlatform = options.enums === String ? $root.proto.PatchDebugData.Platform[message.senderPlatform] : message.senderPlatform; + if (message.isSenderPrimary != null && message.hasOwnProperty("isSenderPrimary")) + object.isSenderPrimary = message.isSenderPrimary; + return object; + }; + + /** + * Converts this PatchDebugData to JSON. + * @function toJSON + * @memberof proto.PatchDebugData + * @instance + * @returns {Object.} JSON object + */ + PatchDebugData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Platform enum. + * @name proto.PatchDebugData.Platform + * @enum {number} + * @property {number} ANDROID=0 ANDROID value + * @property {number} SMBA=1 SMBA value + * @property {number} IPHONE=2 IPHONE value + * @property {number} SMBI=3 SMBI value + * @property {number} WEB=4 WEB value + * @property {number} UWP=5 UWP value + * @property {number} DARWIN=6 DARWIN value + */ + PatchDebugData.Platform = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ANDROID"] = 0; + values[valuesById[1] = "SMBA"] = 1; + values[valuesById[2] = "IPHONE"] = 2; + values[valuesById[3] = "SMBI"] = 3; + values[valuesById[4] = "WEB"] = 4; + values[valuesById[5] = "UWP"] = 5; + values[valuesById[6] = "DARWIN"] = 6; + return values; + })(); + + return PatchDebugData; + })(); + proto.PaymentBackground = (function() { /** @@ -59802,6 +69875,216 @@ $root.proto = (function() { return PaymentInfo; })(); + proto.PhoneNumberToLIDMapping = (function() { + + /** + * Properties of a PhoneNumberToLIDMapping. + * @memberof proto + * @interface IPhoneNumberToLIDMapping + * @property {string|null} [pnJid] PhoneNumberToLIDMapping pnJid + * @property {string|null} [lidJid] PhoneNumberToLIDMapping lidJid + */ + + /** + * Constructs a new PhoneNumberToLIDMapping. + * @memberof proto + * @classdesc Represents a PhoneNumberToLIDMapping. + * @implements IPhoneNumberToLIDMapping + * @constructor + * @param {proto.IPhoneNumberToLIDMapping=} [properties] Properties to set + */ + function PhoneNumberToLIDMapping(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PhoneNumberToLIDMapping pnJid. + * @member {string} pnJid + * @memberof proto.PhoneNumberToLIDMapping + * @instance + */ + PhoneNumberToLIDMapping.prototype.pnJid = ""; + + /** + * PhoneNumberToLIDMapping lidJid. + * @member {string} lidJid + * @memberof proto.PhoneNumberToLIDMapping + * @instance + */ + PhoneNumberToLIDMapping.prototype.lidJid = ""; + + /** + * Creates a new PhoneNumberToLIDMapping instance using the specified properties. + * @function create + * @memberof proto.PhoneNumberToLIDMapping + * @static + * @param {proto.IPhoneNumberToLIDMapping=} [properties] Properties to set + * @returns {proto.PhoneNumberToLIDMapping} PhoneNumberToLIDMapping instance + */ + PhoneNumberToLIDMapping.create = function create(properties) { + return new PhoneNumberToLIDMapping(properties); + }; + + /** + * Encodes the specified PhoneNumberToLIDMapping message. Does not implicitly {@link proto.PhoneNumberToLIDMapping.verify|verify} messages. + * @function encode + * @memberof proto.PhoneNumberToLIDMapping + * @static + * @param {proto.IPhoneNumberToLIDMapping} message PhoneNumberToLIDMapping message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhoneNumberToLIDMapping.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pnJid != null && Object.hasOwnProperty.call(message, "pnJid")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.pnJid); + if (message.lidJid != null && Object.hasOwnProperty.call(message, "lidJid")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.lidJid); + return writer; + }; + + /** + * Encodes the specified PhoneNumberToLIDMapping message, length delimited. Does not implicitly {@link proto.PhoneNumberToLIDMapping.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.PhoneNumberToLIDMapping + * @static + * @param {proto.IPhoneNumberToLIDMapping} message PhoneNumberToLIDMapping message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhoneNumberToLIDMapping.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PhoneNumberToLIDMapping message from the specified reader or buffer. + * @function decode + * @memberof proto.PhoneNumberToLIDMapping + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.PhoneNumberToLIDMapping} PhoneNumberToLIDMapping + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhoneNumberToLIDMapping.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.PhoneNumberToLIDMapping(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.pnJid = reader.string(); + break; + case 2: + message.lidJid = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PhoneNumberToLIDMapping message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.PhoneNumberToLIDMapping + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.PhoneNumberToLIDMapping} PhoneNumberToLIDMapping + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhoneNumberToLIDMapping.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PhoneNumberToLIDMapping message. + * @function verify + * @memberof proto.PhoneNumberToLIDMapping + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PhoneNumberToLIDMapping.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pnJid != null && message.hasOwnProperty("pnJid")) + if (!$util.isString(message.pnJid)) + return "pnJid: string expected"; + if (message.lidJid != null && message.hasOwnProperty("lidJid")) + if (!$util.isString(message.lidJid)) + return "lidJid: string expected"; + return null; + }; + + /** + * Creates a PhoneNumberToLIDMapping message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.PhoneNumberToLIDMapping + * @static + * @param {Object.} object Plain object + * @returns {proto.PhoneNumberToLIDMapping} PhoneNumberToLIDMapping + */ + PhoneNumberToLIDMapping.fromObject = function fromObject(object) { + if (object instanceof $root.proto.PhoneNumberToLIDMapping) + return object; + var message = new $root.proto.PhoneNumberToLIDMapping(); + if (object.pnJid != null) + message.pnJid = String(object.pnJid); + if (object.lidJid != null) + message.lidJid = String(object.lidJid); + return message; + }; + + /** + * Creates a plain object from a PhoneNumberToLIDMapping message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.PhoneNumberToLIDMapping + * @static + * @param {proto.PhoneNumberToLIDMapping} message PhoneNumberToLIDMapping + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PhoneNumberToLIDMapping.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.pnJid = ""; + object.lidJid = ""; + } + if (message.pnJid != null && message.hasOwnProperty("pnJid")) + object.pnJid = message.pnJid; + if (message.lidJid != null && message.hasOwnProperty("lidJid")) + object.lidJid = message.lidJid; + return object; + }; + + /** + * Converts this PhoneNumberToLIDMapping to JSON. + * @function toJSON + * @memberof proto.PhoneNumberToLIDMapping + * @instance + * @returns {Object.} JSON object + */ + PhoneNumberToLIDMapping.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PhoneNumberToLIDMapping; + })(); + proto.PhotoChange = (function() { /** @@ -61958,6 +72241,193 @@ $root.proto = (function() { return PreKeySignalMessage; })(); + proto.PremiumMessageInfo = (function() { + + /** + * Properties of a PremiumMessageInfo. + * @memberof proto + * @interface IPremiumMessageInfo + * @property {string|null} [serverCampaignId] PremiumMessageInfo serverCampaignId + */ + + /** + * Constructs a new PremiumMessageInfo. + * @memberof proto + * @classdesc Represents a PremiumMessageInfo. + * @implements IPremiumMessageInfo + * @constructor + * @param {proto.IPremiumMessageInfo=} [properties] Properties to set + */ + function PremiumMessageInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PremiumMessageInfo serverCampaignId. + * @member {string} serverCampaignId + * @memberof proto.PremiumMessageInfo + * @instance + */ + PremiumMessageInfo.prototype.serverCampaignId = ""; + + /** + * Creates a new PremiumMessageInfo instance using the specified properties. + * @function create + * @memberof proto.PremiumMessageInfo + * @static + * @param {proto.IPremiumMessageInfo=} [properties] Properties to set + * @returns {proto.PremiumMessageInfo} PremiumMessageInfo instance + */ + PremiumMessageInfo.create = function create(properties) { + return new PremiumMessageInfo(properties); + }; + + /** + * Encodes the specified PremiumMessageInfo message. Does not implicitly {@link proto.PremiumMessageInfo.verify|verify} messages. + * @function encode + * @memberof proto.PremiumMessageInfo + * @static + * @param {proto.IPremiumMessageInfo} message PremiumMessageInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PremiumMessageInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.serverCampaignId != null && Object.hasOwnProperty.call(message, "serverCampaignId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.serverCampaignId); + return writer; + }; + + /** + * Encodes the specified PremiumMessageInfo message, length delimited. Does not implicitly {@link proto.PremiumMessageInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.PremiumMessageInfo + * @static + * @param {proto.IPremiumMessageInfo} message PremiumMessageInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PremiumMessageInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PremiumMessageInfo message from the specified reader or buffer. + * @function decode + * @memberof proto.PremiumMessageInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.PremiumMessageInfo} PremiumMessageInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PremiumMessageInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.PremiumMessageInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.serverCampaignId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PremiumMessageInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.PremiumMessageInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.PremiumMessageInfo} PremiumMessageInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PremiumMessageInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PremiumMessageInfo message. + * @function verify + * @memberof proto.PremiumMessageInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PremiumMessageInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.serverCampaignId != null && message.hasOwnProperty("serverCampaignId")) + if (!$util.isString(message.serverCampaignId)) + return "serverCampaignId: string expected"; + return null; + }; + + /** + * Creates a PremiumMessageInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.PremiumMessageInfo + * @static + * @param {Object.} object Plain object + * @returns {proto.PremiumMessageInfo} PremiumMessageInfo + */ + PremiumMessageInfo.fromObject = function fromObject(object) { + if (object instanceof $root.proto.PremiumMessageInfo) + return object; + var message = new $root.proto.PremiumMessageInfo(); + if (object.serverCampaignId != null) + message.serverCampaignId = String(object.serverCampaignId); + return message; + }; + + /** + * Creates a plain object from a PremiumMessageInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.PremiumMessageInfo + * @static + * @param {proto.PremiumMessageInfo} message PremiumMessageInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PremiumMessageInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.serverCampaignId = ""; + if (message.serverCampaignId != null && message.hasOwnProperty("serverCampaignId")) + object.serverCampaignId = message.serverCampaignId; + return object; + }; + + /** + * Converts this PremiumMessageInfo to JSON. + * @function toJSON + * @memberof proto.PremiumMessageInfo + * @instance + * @returns {Object.} JSON object + */ + PremiumMessageInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PremiumMessageInfo; + })(); + proto.Pushname = (function() { /** @@ -63925,6 +74395,202 @@ $root.proto = (function() { return RecordStructure; })(); + proto.ReportingTokenInfo = (function() { + + /** + * Properties of a ReportingTokenInfo. + * @memberof proto + * @interface IReportingTokenInfo + * @property {Uint8Array|null} [reportingTag] ReportingTokenInfo reportingTag + */ + + /** + * Constructs a new ReportingTokenInfo. + * @memberof proto + * @classdesc Represents a ReportingTokenInfo. + * @implements IReportingTokenInfo + * @constructor + * @param {proto.IReportingTokenInfo=} [properties] Properties to set + */ + function ReportingTokenInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReportingTokenInfo reportingTag. + * @member {Uint8Array} reportingTag + * @memberof proto.ReportingTokenInfo + * @instance + */ + ReportingTokenInfo.prototype.reportingTag = $util.newBuffer([]); + + /** + * Creates a new ReportingTokenInfo instance using the specified properties. + * @function create + * @memberof proto.ReportingTokenInfo + * @static + * @param {proto.IReportingTokenInfo=} [properties] Properties to set + * @returns {proto.ReportingTokenInfo} ReportingTokenInfo instance + */ + ReportingTokenInfo.create = function create(properties) { + return new ReportingTokenInfo(properties); + }; + + /** + * Encodes the specified ReportingTokenInfo message. Does not implicitly {@link proto.ReportingTokenInfo.verify|verify} messages. + * @function encode + * @memberof proto.ReportingTokenInfo + * @static + * @param {proto.IReportingTokenInfo} message ReportingTokenInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReportingTokenInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.reportingTag != null && Object.hasOwnProperty.call(message, "reportingTag")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.reportingTag); + return writer; + }; + + /** + * Encodes the specified ReportingTokenInfo message, length delimited. Does not implicitly {@link proto.ReportingTokenInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.ReportingTokenInfo + * @static + * @param {proto.IReportingTokenInfo} message ReportingTokenInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReportingTokenInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReportingTokenInfo message from the specified reader or buffer. + * @function decode + * @memberof proto.ReportingTokenInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.ReportingTokenInfo} ReportingTokenInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReportingTokenInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.ReportingTokenInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.reportingTag = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReportingTokenInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.ReportingTokenInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.ReportingTokenInfo} ReportingTokenInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReportingTokenInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReportingTokenInfo message. + * @function verify + * @memberof proto.ReportingTokenInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReportingTokenInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.reportingTag != null && message.hasOwnProperty("reportingTag")) + if (!(message.reportingTag && typeof message.reportingTag.length === "number" || $util.isString(message.reportingTag))) + return "reportingTag: buffer expected"; + return null; + }; + + /** + * Creates a ReportingTokenInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.ReportingTokenInfo + * @static + * @param {Object.} object Plain object + * @returns {proto.ReportingTokenInfo} ReportingTokenInfo + */ + ReportingTokenInfo.fromObject = function fromObject(object) { + if (object instanceof $root.proto.ReportingTokenInfo) + return object; + var message = new $root.proto.ReportingTokenInfo(); + if (object.reportingTag != null) + if (typeof object.reportingTag === "string") + $util.base64.decode(object.reportingTag, message.reportingTag = $util.newBuffer($util.base64.length(object.reportingTag)), 0); + else if (object.reportingTag.length) + message.reportingTag = object.reportingTag; + return message; + }; + + /** + * Creates a plain object from a ReportingTokenInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.ReportingTokenInfo + * @static + * @param {proto.ReportingTokenInfo} message ReportingTokenInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReportingTokenInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if (options.bytes === String) + object.reportingTag = ""; + else { + object.reportingTag = []; + if (options.bytes !== Array) + object.reportingTag = $util.newBuffer(object.reportingTag); + } + if (message.reportingTag != null && message.hasOwnProperty("reportingTag")) + object.reportingTag = options.bytes === String ? $util.base64.encode(message.reportingTag, 0, message.reportingTag.length) : options.bytes === Array ? Array.prototype.slice.call(message.reportingTag) : message.reportingTag; + return object; + }; + + /** + * Converts this ReportingTokenInfo to JSON. + * @function toJSON + * @memberof proto.ReportingTokenInfo + * @instance + * @returns {Object.} JSON object + */ + ReportingTokenInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ReportingTokenInfo; + })(); + proto.SenderKeyDistributionMessage = (function() { /** @@ -69333,6 +79999,13 @@ $root.proto = (function() { * @property {proto.SyncActionValue.IMarketingMessageBroadcastAction|null} [marketingMessageBroadcastAction] SyncActionValue marketingMessageBroadcastAction * @property {proto.SyncActionValue.IExternalWebBetaAction|null} [externalWebBetaAction] SyncActionValue externalWebBetaAction * @property {proto.SyncActionValue.IPrivacySettingRelayAllCalls|null} [privacySettingRelayAllCalls] SyncActionValue privacySettingRelayAllCalls + * @property {proto.SyncActionValue.ICallLogAction|null} [callLogAction] SyncActionValue callLogAction + * @property {proto.SyncActionValue.IStatusPrivacyAction|null} [statusPrivacy] SyncActionValue statusPrivacy + * @property {proto.SyncActionValue.IBotWelcomeRequestAction|null} [botWelcomeRequestAction] SyncActionValue botWelcomeRequestAction + * @property {proto.SyncActionValue.IDeleteIndividualCallLogAction|null} [deleteIndividualCallLog] SyncActionValue deleteIndividualCallLog + * @property {proto.SyncActionValue.ILabelReorderingAction|null} [labelReorderingAction] SyncActionValue labelReorderingAction + * @property {proto.SyncActionValue.IPaymentInfoAction|null} [paymentInfoAction] SyncActionValue paymentInfoAction + * @property {proto.SyncActionValue.ICustomPaymentMethodsAction|null} [customPaymentMethodsAction] SyncActionValue customPaymentMethodsAction */ /** @@ -69638,6 +80311,62 @@ $root.proto = (function() { */ SyncActionValue.prototype.privacySettingRelayAllCalls = null; + /** + * SyncActionValue callLogAction. + * @member {proto.SyncActionValue.ICallLogAction|null|undefined} callLogAction + * @memberof proto.SyncActionValue + * @instance + */ + SyncActionValue.prototype.callLogAction = null; + + /** + * SyncActionValue statusPrivacy. + * @member {proto.SyncActionValue.IStatusPrivacyAction|null|undefined} statusPrivacy + * @memberof proto.SyncActionValue + * @instance + */ + SyncActionValue.prototype.statusPrivacy = null; + + /** + * SyncActionValue botWelcomeRequestAction. + * @member {proto.SyncActionValue.IBotWelcomeRequestAction|null|undefined} botWelcomeRequestAction + * @memberof proto.SyncActionValue + * @instance + */ + SyncActionValue.prototype.botWelcomeRequestAction = null; + + /** + * SyncActionValue deleteIndividualCallLog. + * @member {proto.SyncActionValue.IDeleteIndividualCallLogAction|null|undefined} deleteIndividualCallLog + * @memberof proto.SyncActionValue + * @instance + */ + SyncActionValue.prototype.deleteIndividualCallLog = null; + + /** + * SyncActionValue labelReorderingAction. + * @member {proto.SyncActionValue.ILabelReorderingAction|null|undefined} labelReorderingAction + * @memberof proto.SyncActionValue + * @instance + */ + SyncActionValue.prototype.labelReorderingAction = null; + + /** + * SyncActionValue paymentInfoAction. + * @member {proto.SyncActionValue.IPaymentInfoAction|null|undefined} paymentInfoAction + * @memberof proto.SyncActionValue + * @instance + */ + SyncActionValue.prototype.paymentInfoAction = null; + + /** + * SyncActionValue customPaymentMethodsAction. + * @member {proto.SyncActionValue.ICustomPaymentMethodsAction|null|undefined} customPaymentMethodsAction + * @memberof proto.SyncActionValue + * @instance + */ + SyncActionValue.prototype.customPaymentMethodsAction = null; + /** * Creates a new SyncActionValue instance using the specified properties. * @function create @@ -69734,6 +80463,20 @@ $root.proto = (function() { $root.proto.SyncActionValue.ExternalWebBetaAction.encode(message.externalWebBetaAction, writer.uint32(/* id 40, wireType 2 =*/322).fork()).ldelim(); if (message.privacySettingRelayAllCalls != null && Object.hasOwnProperty.call(message, "privacySettingRelayAllCalls")) $root.proto.SyncActionValue.PrivacySettingRelayAllCalls.encode(message.privacySettingRelayAllCalls, writer.uint32(/* id 41, wireType 2 =*/330).fork()).ldelim(); + if (message.callLogAction != null && Object.hasOwnProperty.call(message, "callLogAction")) + $root.proto.SyncActionValue.CallLogAction.encode(message.callLogAction, writer.uint32(/* id 42, wireType 2 =*/338).fork()).ldelim(); + if (message.statusPrivacy != null && Object.hasOwnProperty.call(message, "statusPrivacy")) + $root.proto.SyncActionValue.StatusPrivacyAction.encode(message.statusPrivacy, writer.uint32(/* id 44, wireType 2 =*/354).fork()).ldelim(); + if (message.botWelcomeRequestAction != null && Object.hasOwnProperty.call(message, "botWelcomeRequestAction")) + $root.proto.SyncActionValue.BotWelcomeRequestAction.encode(message.botWelcomeRequestAction, writer.uint32(/* id 45, wireType 2 =*/362).fork()).ldelim(); + if (message.deleteIndividualCallLog != null && Object.hasOwnProperty.call(message, "deleteIndividualCallLog")) + $root.proto.SyncActionValue.DeleteIndividualCallLogAction.encode(message.deleteIndividualCallLog, writer.uint32(/* id 46, wireType 2 =*/370).fork()).ldelim(); + if (message.labelReorderingAction != null && Object.hasOwnProperty.call(message, "labelReorderingAction")) + $root.proto.SyncActionValue.LabelReorderingAction.encode(message.labelReorderingAction, writer.uint32(/* id 47, wireType 2 =*/378).fork()).ldelim(); + if (message.paymentInfoAction != null && Object.hasOwnProperty.call(message, "paymentInfoAction")) + $root.proto.SyncActionValue.PaymentInfoAction.encode(message.paymentInfoAction, writer.uint32(/* id 48, wireType 2 =*/386).fork()).ldelim(); + if (message.customPaymentMethodsAction != null && Object.hasOwnProperty.call(message, "customPaymentMethodsAction")) + $root.proto.SyncActionValue.CustomPaymentMethodsAction.encode(message.customPaymentMethodsAction, writer.uint32(/* id 49, wireType 2 =*/394).fork()).ldelim(); return writer; }; @@ -69876,6 +80619,27 @@ $root.proto = (function() { case 41: message.privacySettingRelayAllCalls = $root.proto.SyncActionValue.PrivacySettingRelayAllCalls.decode(reader, reader.uint32()); break; + case 42: + message.callLogAction = $root.proto.SyncActionValue.CallLogAction.decode(reader, reader.uint32()); + break; + case 44: + message.statusPrivacy = $root.proto.SyncActionValue.StatusPrivacyAction.decode(reader, reader.uint32()); + break; + case 45: + message.botWelcomeRequestAction = $root.proto.SyncActionValue.BotWelcomeRequestAction.decode(reader, reader.uint32()); + break; + case 46: + message.deleteIndividualCallLog = $root.proto.SyncActionValue.DeleteIndividualCallLogAction.decode(reader, reader.uint32()); + break; + case 47: + message.labelReorderingAction = $root.proto.SyncActionValue.LabelReorderingAction.decode(reader, reader.uint32()); + break; + case 48: + message.paymentInfoAction = $root.proto.SyncActionValue.PaymentInfoAction.decode(reader, reader.uint32()); + break; + case 49: + message.customPaymentMethodsAction = $root.proto.SyncActionValue.CustomPaymentMethodsAction.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -70089,6 +80853,41 @@ $root.proto = (function() { if (error) return "privacySettingRelayAllCalls." + error; } + if (message.callLogAction != null && message.hasOwnProperty("callLogAction")) { + var error = $root.proto.SyncActionValue.CallLogAction.verify(message.callLogAction); + if (error) + return "callLogAction." + error; + } + if (message.statusPrivacy != null && message.hasOwnProperty("statusPrivacy")) { + var error = $root.proto.SyncActionValue.StatusPrivacyAction.verify(message.statusPrivacy); + if (error) + return "statusPrivacy." + error; + } + if (message.botWelcomeRequestAction != null && message.hasOwnProperty("botWelcomeRequestAction")) { + var error = $root.proto.SyncActionValue.BotWelcomeRequestAction.verify(message.botWelcomeRequestAction); + if (error) + return "botWelcomeRequestAction." + error; + } + if (message.deleteIndividualCallLog != null && message.hasOwnProperty("deleteIndividualCallLog")) { + var error = $root.proto.SyncActionValue.DeleteIndividualCallLogAction.verify(message.deleteIndividualCallLog); + if (error) + return "deleteIndividualCallLog." + error; + } + if (message.labelReorderingAction != null && message.hasOwnProperty("labelReorderingAction")) { + var error = $root.proto.SyncActionValue.LabelReorderingAction.verify(message.labelReorderingAction); + if (error) + return "labelReorderingAction." + error; + } + if (message.paymentInfoAction != null && message.hasOwnProperty("paymentInfoAction")) { + var error = $root.proto.SyncActionValue.PaymentInfoAction.verify(message.paymentInfoAction); + if (error) + return "paymentInfoAction." + error; + } + if (message.customPaymentMethodsAction != null && message.hasOwnProperty("customPaymentMethodsAction")) { + var error = $root.proto.SyncActionValue.CustomPaymentMethodsAction.verify(message.customPaymentMethodsAction); + if (error) + return "customPaymentMethodsAction." + error; + } return null; }; @@ -70288,6 +81087,41 @@ $root.proto = (function() { throw TypeError(".proto.SyncActionValue.privacySettingRelayAllCalls: object expected"); message.privacySettingRelayAllCalls = $root.proto.SyncActionValue.PrivacySettingRelayAllCalls.fromObject(object.privacySettingRelayAllCalls); } + if (object.callLogAction != null) { + if (typeof object.callLogAction !== "object") + throw TypeError(".proto.SyncActionValue.callLogAction: object expected"); + message.callLogAction = $root.proto.SyncActionValue.CallLogAction.fromObject(object.callLogAction); + } + if (object.statusPrivacy != null) { + if (typeof object.statusPrivacy !== "object") + throw TypeError(".proto.SyncActionValue.statusPrivacy: object expected"); + message.statusPrivacy = $root.proto.SyncActionValue.StatusPrivacyAction.fromObject(object.statusPrivacy); + } + if (object.botWelcomeRequestAction != null) { + if (typeof object.botWelcomeRequestAction !== "object") + throw TypeError(".proto.SyncActionValue.botWelcomeRequestAction: object expected"); + message.botWelcomeRequestAction = $root.proto.SyncActionValue.BotWelcomeRequestAction.fromObject(object.botWelcomeRequestAction); + } + if (object.deleteIndividualCallLog != null) { + if (typeof object.deleteIndividualCallLog !== "object") + throw TypeError(".proto.SyncActionValue.deleteIndividualCallLog: object expected"); + message.deleteIndividualCallLog = $root.proto.SyncActionValue.DeleteIndividualCallLogAction.fromObject(object.deleteIndividualCallLog); + } + if (object.labelReorderingAction != null) { + if (typeof object.labelReorderingAction !== "object") + throw TypeError(".proto.SyncActionValue.labelReorderingAction: object expected"); + message.labelReorderingAction = $root.proto.SyncActionValue.LabelReorderingAction.fromObject(object.labelReorderingAction); + } + if (object.paymentInfoAction != null) { + if (typeof object.paymentInfoAction !== "object") + throw TypeError(".proto.SyncActionValue.paymentInfoAction: object expected"); + message.paymentInfoAction = $root.proto.SyncActionValue.PaymentInfoAction.fromObject(object.paymentInfoAction); + } + if (object.customPaymentMethodsAction != null) { + if (typeof object.customPaymentMethodsAction !== "object") + throw TypeError(".proto.SyncActionValue.customPaymentMethodsAction: object expected"); + message.customPaymentMethodsAction = $root.proto.SyncActionValue.CustomPaymentMethodsAction.fromObject(object.customPaymentMethodsAction); + } return message; }; @@ -70345,6 +81179,13 @@ $root.proto = (function() { object.marketingMessageBroadcastAction = null; object.externalWebBetaAction = null; object.privacySettingRelayAllCalls = null; + object.callLogAction = null; + object.statusPrivacy = null; + object.botWelcomeRequestAction = null; + object.deleteIndividualCallLog = null; + object.labelReorderingAction = null; + object.paymentInfoAction = null; + object.customPaymentMethodsAction = null; } if (message.timestamp != null && message.hasOwnProperty("timestamp")) if (typeof message.timestamp === "number") @@ -70421,6 +81262,20 @@ $root.proto = (function() { object.externalWebBetaAction = $root.proto.SyncActionValue.ExternalWebBetaAction.toObject(message.externalWebBetaAction, options); if (message.privacySettingRelayAllCalls != null && message.hasOwnProperty("privacySettingRelayAllCalls")) object.privacySettingRelayAllCalls = $root.proto.SyncActionValue.PrivacySettingRelayAllCalls.toObject(message.privacySettingRelayAllCalls, options); + if (message.callLogAction != null && message.hasOwnProperty("callLogAction")) + object.callLogAction = $root.proto.SyncActionValue.CallLogAction.toObject(message.callLogAction, options); + if (message.statusPrivacy != null && message.hasOwnProperty("statusPrivacy")) + object.statusPrivacy = $root.proto.SyncActionValue.StatusPrivacyAction.toObject(message.statusPrivacy, options); + if (message.botWelcomeRequestAction != null && message.hasOwnProperty("botWelcomeRequestAction")) + object.botWelcomeRequestAction = $root.proto.SyncActionValue.BotWelcomeRequestAction.toObject(message.botWelcomeRequestAction, options); + if (message.deleteIndividualCallLog != null && message.hasOwnProperty("deleteIndividualCallLog")) + object.deleteIndividualCallLog = $root.proto.SyncActionValue.DeleteIndividualCallLogAction.toObject(message.deleteIndividualCallLog, options); + if (message.labelReorderingAction != null && message.hasOwnProperty("labelReorderingAction")) + object.labelReorderingAction = $root.proto.SyncActionValue.LabelReorderingAction.toObject(message.labelReorderingAction, options); + if (message.paymentInfoAction != null && message.hasOwnProperty("paymentInfoAction")) + object.paymentInfoAction = $root.proto.SyncActionValue.PaymentInfoAction.toObject(message.paymentInfoAction, options); + if (message.customPaymentMethodsAction != null && message.hasOwnProperty("customPaymentMethodsAction")) + object.customPaymentMethodsAction = $root.proto.SyncActionValue.CustomPaymentMethodsAction.toObject(message.customPaymentMethodsAction, options); return object; }; @@ -70872,7 +81727,408 @@ $root.proto = (function() { * @constructor * @param {proto.SyncActionValue.IArchiveChatAction=} [properties] Properties to set */ - function ArchiveChatAction(properties) { + function ArchiveChatAction(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ArchiveChatAction archived. + * @member {boolean} archived + * @memberof proto.SyncActionValue.ArchiveChatAction + * @instance + */ + ArchiveChatAction.prototype.archived = false; + + /** + * ArchiveChatAction messageRange. + * @member {proto.SyncActionValue.ISyncActionMessageRange|null|undefined} messageRange + * @memberof proto.SyncActionValue.ArchiveChatAction + * @instance + */ + ArchiveChatAction.prototype.messageRange = null; + + /** + * Creates a new ArchiveChatAction instance using the specified properties. + * @function create + * @memberof proto.SyncActionValue.ArchiveChatAction + * @static + * @param {proto.SyncActionValue.IArchiveChatAction=} [properties] Properties to set + * @returns {proto.SyncActionValue.ArchiveChatAction} ArchiveChatAction instance + */ + ArchiveChatAction.create = function create(properties) { + return new ArchiveChatAction(properties); + }; + + /** + * Encodes the specified ArchiveChatAction message. Does not implicitly {@link proto.SyncActionValue.ArchiveChatAction.verify|verify} messages. + * @function encode + * @memberof proto.SyncActionValue.ArchiveChatAction + * @static + * @param {proto.SyncActionValue.IArchiveChatAction} message ArchiveChatAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ArchiveChatAction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.archived != null && Object.hasOwnProperty.call(message, "archived")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.archived); + if (message.messageRange != null && Object.hasOwnProperty.call(message, "messageRange")) + $root.proto.SyncActionValue.SyncActionMessageRange.encode(message.messageRange, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ArchiveChatAction message, length delimited. Does not implicitly {@link proto.SyncActionValue.ArchiveChatAction.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.SyncActionValue.ArchiveChatAction + * @static + * @param {proto.SyncActionValue.IArchiveChatAction} message ArchiveChatAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ArchiveChatAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ArchiveChatAction message from the specified reader or buffer. + * @function decode + * @memberof proto.SyncActionValue.ArchiveChatAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.SyncActionValue.ArchiveChatAction} ArchiveChatAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ArchiveChatAction.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.SyncActionValue.ArchiveChatAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.archived = reader.bool(); + break; + case 2: + message.messageRange = $root.proto.SyncActionValue.SyncActionMessageRange.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ArchiveChatAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.SyncActionValue.ArchiveChatAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.SyncActionValue.ArchiveChatAction} ArchiveChatAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ArchiveChatAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ArchiveChatAction message. + * @function verify + * @memberof proto.SyncActionValue.ArchiveChatAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ArchiveChatAction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.archived != null && message.hasOwnProperty("archived")) + if (typeof message.archived !== "boolean") + return "archived: boolean expected"; + if (message.messageRange != null && message.hasOwnProperty("messageRange")) { + var error = $root.proto.SyncActionValue.SyncActionMessageRange.verify(message.messageRange); + if (error) + return "messageRange." + error; + } + return null; + }; + + /** + * Creates an ArchiveChatAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.SyncActionValue.ArchiveChatAction + * @static + * @param {Object.} object Plain object + * @returns {proto.SyncActionValue.ArchiveChatAction} ArchiveChatAction + */ + ArchiveChatAction.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SyncActionValue.ArchiveChatAction) + return object; + var message = new $root.proto.SyncActionValue.ArchiveChatAction(); + if (object.archived != null) + message.archived = Boolean(object.archived); + if (object.messageRange != null) { + if (typeof object.messageRange !== "object") + throw TypeError(".proto.SyncActionValue.ArchiveChatAction.messageRange: object expected"); + message.messageRange = $root.proto.SyncActionValue.SyncActionMessageRange.fromObject(object.messageRange); + } + return message; + }; + + /** + * Creates a plain object from an ArchiveChatAction message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.SyncActionValue.ArchiveChatAction + * @static + * @param {proto.SyncActionValue.ArchiveChatAction} message ArchiveChatAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ArchiveChatAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.archived = false; + object.messageRange = null; + } + if (message.archived != null && message.hasOwnProperty("archived")) + object.archived = message.archived; + if (message.messageRange != null && message.hasOwnProperty("messageRange")) + object.messageRange = $root.proto.SyncActionValue.SyncActionMessageRange.toObject(message.messageRange, options); + return object; + }; + + /** + * Converts this ArchiveChatAction to JSON. + * @function toJSON + * @memberof proto.SyncActionValue.ArchiveChatAction + * @instance + * @returns {Object.} JSON object + */ + ArchiveChatAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ArchiveChatAction; + })(); + + SyncActionValue.BotWelcomeRequestAction = (function() { + + /** + * Properties of a BotWelcomeRequestAction. + * @memberof proto.SyncActionValue + * @interface IBotWelcomeRequestAction + * @property {boolean|null} [isSent] BotWelcomeRequestAction isSent + */ + + /** + * Constructs a new BotWelcomeRequestAction. + * @memberof proto.SyncActionValue + * @classdesc Represents a BotWelcomeRequestAction. + * @implements IBotWelcomeRequestAction + * @constructor + * @param {proto.SyncActionValue.IBotWelcomeRequestAction=} [properties] Properties to set + */ + function BotWelcomeRequestAction(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BotWelcomeRequestAction isSent. + * @member {boolean} isSent + * @memberof proto.SyncActionValue.BotWelcomeRequestAction + * @instance + */ + BotWelcomeRequestAction.prototype.isSent = false; + + /** + * Creates a new BotWelcomeRequestAction instance using the specified properties. + * @function create + * @memberof proto.SyncActionValue.BotWelcomeRequestAction + * @static + * @param {proto.SyncActionValue.IBotWelcomeRequestAction=} [properties] Properties to set + * @returns {proto.SyncActionValue.BotWelcomeRequestAction} BotWelcomeRequestAction instance + */ + BotWelcomeRequestAction.create = function create(properties) { + return new BotWelcomeRequestAction(properties); + }; + + /** + * Encodes the specified BotWelcomeRequestAction message. Does not implicitly {@link proto.SyncActionValue.BotWelcomeRequestAction.verify|verify} messages. + * @function encode + * @memberof proto.SyncActionValue.BotWelcomeRequestAction + * @static + * @param {proto.SyncActionValue.IBotWelcomeRequestAction} message BotWelcomeRequestAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BotWelcomeRequestAction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.isSent != null && Object.hasOwnProperty.call(message, "isSent")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.isSent); + return writer; + }; + + /** + * Encodes the specified BotWelcomeRequestAction message, length delimited. Does not implicitly {@link proto.SyncActionValue.BotWelcomeRequestAction.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.SyncActionValue.BotWelcomeRequestAction + * @static + * @param {proto.SyncActionValue.IBotWelcomeRequestAction} message BotWelcomeRequestAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BotWelcomeRequestAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BotWelcomeRequestAction message from the specified reader or buffer. + * @function decode + * @memberof proto.SyncActionValue.BotWelcomeRequestAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.SyncActionValue.BotWelcomeRequestAction} BotWelcomeRequestAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BotWelcomeRequestAction.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.SyncActionValue.BotWelcomeRequestAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.isSent = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BotWelcomeRequestAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.SyncActionValue.BotWelcomeRequestAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.SyncActionValue.BotWelcomeRequestAction} BotWelcomeRequestAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BotWelcomeRequestAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BotWelcomeRequestAction message. + * @function verify + * @memberof proto.SyncActionValue.BotWelcomeRequestAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BotWelcomeRequestAction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.isSent != null && message.hasOwnProperty("isSent")) + if (typeof message.isSent !== "boolean") + return "isSent: boolean expected"; + return null; + }; + + /** + * Creates a BotWelcomeRequestAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.SyncActionValue.BotWelcomeRequestAction + * @static + * @param {Object.} object Plain object + * @returns {proto.SyncActionValue.BotWelcomeRequestAction} BotWelcomeRequestAction + */ + BotWelcomeRequestAction.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SyncActionValue.BotWelcomeRequestAction) + return object; + var message = new $root.proto.SyncActionValue.BotWelcomeRequestAction(); + if (object.isSent != null) + message.isSent = Boolean(object.isSent); + return message; + }; + + /** + * Creates a plain object from a BotWelcomeRequestAction message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.SyncActionValue.BotWelcomeRequestAction + * @static + * @param {proto.SyncActionValue.BotWelcomeRequestAction} message BotWelcomeRequestAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BotWelcomeRequestAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.isSent = false; + if (message.isSent != null && message.hasOwnProperty("isSent")) + object.isSent = message.isSent; + return object; + }; + + /** + * Converts this BotWelcomeRequestAction to JSON. + * @function toJSON + * @memberof proto.SyncActionValue.BotWelcomeRequestAction + * @instance + * @returns {Object.} JSON object + */ + BotWelcomeRequestAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return BotWelcomeRequestAction; + })(); + + SyncActionValue.CallLogAction = (function() { + + /** + * Properties of a CallLogAction. + * @memberof proto.SyncActionValue + * @interface ICallLogAction + * @property {proto.ICallLogRecord|null} [callLogRecord] CallLogAction callLogRecord + */ + + /** + * Constructs a new CallLogAction. + * @memberof proto.SyncActionValue + * @classdesc Represents a CallLogAction. + * @implements ICallLogAction + * @constructor + * @param {proto.SyncActionValue.ICallLogAction=} [properties] Properties to set + */ + function CallLogAction(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -70880,88 +82136,75 @@ $root.proto = (function() { } /** - * ArchiveChatAction archived. - * @member {boolean} archived - * @memberof proto.SyncActionValue.ArchiveChatAction - * @instance - */ - ArchiveChatAction.prototype.archived = false; - - /** - * ArchiveChatAction messageRange. - * @member {proto.SyncActionValue.ISyncActionMessageRange|null|undefined} messageRange - * @memberof proto.SyncActionValue.ArchiveChatAction + * CallLogAction callLogRecord. + * @member {proto.ICallLogRecord|null|undefined} callLogRecord + * @memberof proto.SyncActionValue.CallLogAction * @instance */ - ArchiveChatAction.prototype.messageRange = null; + CallLogAction.prototype.callLogRecord = null; /** - * Creates a new ArchiveChatAction instance using the specified properties. + * Creates a new CallLogAction instance using the specified properties. * @function create - * @memberof proto.SyncActionValue.ArchiveChatAction + * @memberof proto.SyncActionValue.CallLogAction * @static - * @param {proto.SyncActionValue.IArchiveChatAction=} [properties] Properties to set - * @returns {proto.SyncActionValue.ArchiveChatAction} ArchiveChatAction instance + * @param {proto.SyncActionValue.ICallLogAction=} [properties] Properties to set + * @returns {proto.SyncActionValue.CallLogAction} CallLogAction instance */ - ArchiveChatAction.create = function create(properties) { - return new ArchiveChatAction(properties); + CallLogAction.create = function create(properties) { + return new CallLogAction(properties); }; /** - * Encodes the specified ArchiveChatAction message. Does not implicitly {@link proto.SyncActionValue.ArchiveChatAction.verify|verify} messages. + * Encodes the specified CallLogAction message. Does not implicitly {@link proto.SyncActionValue.CallLogAction.verify|verify} messages. * @function encode - * @memberof proto.SyncActionValue.ArchiveChatAction + * @memberof proto.SyncActionValue.CallLogAction * @static - * @param {proto.SyncActionValue.IArchiveChatAction} message ArchiveChatAction message or plain object to encode + * @param {proto.SyncActionValue.ICallLogAction} message CallLogAction message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ArchiveChatAction.encode = function encode(message, writer) { + CallLogAction.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.archived != null && Object.hasOwnProperty.call(message, "archived")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.archived); - if (message.messageRange != null && Object.hasOwnProperty.call(message, "messageRange")) - $root.proto.SyncActionValue.SyncActionMessageRange.encode(message.messageRange, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.callLogRecord != null && Object.hasOwnProperty.call(message, "callLogRecord")) + $root.proto.CallLogRecord.encode(message.callLogRecord, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified ArchiveChatAction message, length delimited. Does not implicitly {@link proto.SyncActionValue.ArchiveChatAction.verify|verify} messages. + * Encodes the specified CallLogAction message, length delimited. Does not implicitly {@link proto.SyncActionValue.CallLogAction.verify|verify} messages. * @function encodeDelimited - * @memberof proto.SyncActionValue.ArchiveChatAction + * @memberof proto.SyncActionValue.CallLogAction * @static - * @param {proto.SyncActionValue.IArchiveChatAction} message ArchiveChatAction message or plain object to encode + * @param {proto.SyncActionValue.ICallLogAction} message CallLogAction message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ArchiveChatAction.encodeDelimited = function encodeDelimited(message, writer) { + CallLogAction.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ArchiveChatAction message from the specified reader or buffer. + * Decodes a CallLogAction message from the specified reader or buffer. * @function decode - * @memberof proto.SyncActionValue.ArchiveChatAction + * @memberof proto.SyncActionValue.CallLogAction * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {proto.SyncActionValue.ArchiveChatAction} ArchiveChatAction + * @returns {proto.SyncActionValue.CallLogAction} CallLogAction * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ArchiveChatAction.decode = function decode(reader, length) { + CallLogAction.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.SyncActionValue.ArchiveChatAction(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.SyncActionValue.CallLogAction(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.archived = reader.bool(); - break; - case 2: - message.messageRange = $root.proto.SyncActionValue.SyncActionMessageRange.decode(reader, reader.uint32()); + message.callLogRecord = $root.proto.CallLogRecord.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -70972,101 +82215,92 @@ $root.proto = (function() { }; /** - * Decodes an ArchiveChatAction message from the specified reader or buffer, length delimited. + * Decodes a CallLogAction message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof proto.SyncActionValue.ArchiveChatAction + * @memberof proto.SyncActionValue.CallLogAction * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.SyncActionValue.ArchiveChatAction} ArchiveChatAction + * @returns {proto.SyncActionValue.CallLogAction} CallLogAction * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ArchiveChatAction.decodeDelimited = function decodeDelimited(reader) { + CallLogAction.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ArchiveChatAction message. + * Verifies a CallLogAction message. * @function verify - * @memberof proto.SyncActionValue.ArchiveChatAction + * @memberof proto.SyncActionValue.CallLogAction * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ArchiveChatAction.verify = function verify(message) { + CallLogAction.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.archived != null && message.hasOwnProperty("archived")) - if (typeof message.archived !== "boolean") - return "archived: boolean expected"; - if (message.messageRange != null && message.hasOwnProperty("messageRange")) { - var error = $root.proto.SyncActionValue.SyncActionMessageRange.verify(message.messageRange); + if (message.callLogRecord != null && message.hasOwnProperty("callLogRecord")) { + var error = $root.proto.CallLogRecord.verify(message.callLogRecord); if (error) - return "messageRange." + error; + return "callLogRecord." + error; } return null; }; /** - * Creates an ArchiveChatAction message from a plain object. Also converts values to their respective internal types. + * Creates a CallLogAction message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof proto.SyncActionValue.ArchiveChatAction + * @memberof proto.SyncActionValue.CallLogAction * @static * @param {Object.} object Plain object - * @returns {proto.SyncActionValue.ArchiveChatAction} ArchiveChatAction + * @returns {proto.SyncActionValue.CallLogAction} CallLogAction */ - ArchiveChatAction.fromObject = function fromObject(object) { - if (object instanceof $root.proto.SyncActionValue.ArchiveChatAction) + CallLogAction.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SyncActionValue.CallLogAction) return object; - var message = new $root.proto.SyncActionValue.ArchiveChatAction(); - if (object.archived != null) - message.archived = Boolean(object.archived); - if (object.messageRange != null) { - if (typeof object.messageRange !== "object") - throw TypeError(".proto.SyncActionValue.ArchiveChatAction.messageRange: object expected"); - message.messageRange = $root.proto.SyncActionValue.SyncActionMessageRange.fromObject(object.messageRange); + var message = new $root.proto.SyncActionValue.CallLogAction(); + if (object.callLogRecord != null) { + if (typeof object.callLogRecord !== "object") + throw TypeError(".proto.SyncActionValue.CallLogAction.callLogRecord: object expected"); + message.callLogRecord = $root.proto.CallLogRecord.fromObject(object.callLogRecord); } return message; }; /** - * Creates a plain object from an ArchiveChatAction message. Also converts values to other types if specified. + * Creates a plain object from a CallLogAction message. Also converts values to other types if specified. * @function toObject - * @memberof proto.SyncActionValue.ArchiveChatAction + * @memberof proto.SyncActionValue.CallLogAction * @static - * @param {proto.SyncActionValue.ArchiveChatAction} message ArchiveChatAction + * @param {proto.SyncActionValue.CallLogAction} message CallLogAction * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ArchiveChatAction.toObject = function toObject(message, options) { + CallLogAction.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.archived = false; - object.messageRange = null; - } - if (message.archived != null && message.hasOwnProperty("archived")) - object.archived = message.archived; - if (message.messageRange != null && message.hasOwnProperty("messageRange")) - object.messageRange = $root.proto.SyncActionValue.SyncActionMessageRange.toObject(message.messageRange, options); + if (options.defaults) + object.callLogRecord = null; + if (message.callLogRecord != null && message.hasOwnProperty("callLogRecord")) + object.callLogRecord = $root.proto.CallLogRecord.toObject(message.callLogRecord, options); return object; }; /** - * Converts this ArchiveChatAction to JSON. + * Converts this CallLogAction to JSON. * @function toJSON - * @memberof proto.SyncActionValue.ArchiveChatAction + * @memberof proto.SyncActionValue.CallLogAction * @instance * @returns {Object.} JSON object */ - ArchiveChatAction.prototype.toJSON = function toJSON() { + CallLogAction.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ArchiveChatAction; + return CallLogAction; })(); SyncActionValue.ChatAssignmentAction = (function() { @@ -71644,6 +82878,7 @@ $root.proto = (function() { * @property {string|null} [fullName] ContactAction fullName * @property {string|null} [firstName] ContactAction firstName * @property {string|null} [lidJid] ContactAction lidJid + * @property {boolean|null} [saveOnPrimaryAddressbook] ContactAction saveOnPrimaryAddressbook */ /** @@ -71685,6 +82920,14 @@ $root.proto = (function() { */ ContactAction.prototype.lidJid = ""; + /** + * ContactAction saveOnPrimaryAddressbook. + * @member {boolean} saveOnPrimaryAddressbook + * @memberof proto.SyncActionValue.ContactAction + * @instance + */ + ContactAction.prototype.saveOnPrimaryAddressbook = false; + /** * Creates a new ContactAction instance using the specified properties. * @function create @@ -71715,6 +82958,8 @@ $root.proto = (function() { writer.uint32(/* id 2, wireType 2 =*/18).string(message.firstName); if (message.lidJid != null && Object.hasOwnProperty.call(message, "lidJid")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.lidJid); + if (message.saveOnPrimaryAddressbook != null && Object.hasOwnProperty.call(message, "saveOnPrimaryAddressbook")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.saveOnPrimaryAddressbook); return writer; }; @@ -71758,6 +83003,9 @@ $root.proto = (function() { case 3: message.lidJid = reader.string(); break; + case 4: + message.saveOnPrimaryAddressbook = reader.bool(); + break; default: reader.skipType(tag & 7); break; @@ -71802,6 +83050,9 @@ $root.proto = (function() { if (message.lidJid != null && message.hasOwnProperty("lidJid")) if (!$util.isString(message.lidJid)) return "lidJid: string expected"; + if (message.saveOnPrimaryAddressbook != null && message.hasOwnProperty("saveOnPrimaryAddressbook")) + if (typeof message.saveOnPrimaryAddressbook !== "boolean") + return "saveOnPrimaryAddressbook: boolean expected"; return null; }; @@ -71823,6 +83074,8 @@ $root.proto = (function() { message.firstName = String(object.firstName); if (object.lidJid != null) message.lidJid = String(object.lidJid); + if (object.saveOnPrimaryAddressbook != null) + message.saveOnPrimaryAddressbook = Boolean(object.saveOnPrimaryAddressbook); return message; }; @@ -71843,6 +83096,7 @@ $root.proto = (function() { object.fullName = ""; object.firstName = ""; object.lidJid = ""; + object.saveOnPrimaryAddressbook = false; } if (message.fullName != null && message.hasOwnProperty("fullName")) object.fullName = message.fullName; @@ -71850,6 +83104,8 @@ $root.proto = (function() { object.firstName = message.firstName; if (message.lidJid != null && message.hasOwnProperty("lidJid")) object.lidJid = message.lidJid; + if (message.saveOnPrimaryAddressbook != null && message.hasOwnProperty("saveOnPrimaryAddressbook")) + object.saveOnPrimaryAddressbook = message.saveOnPrimaryAddressbook; return object; }; @@ -71867,6 +83123,700 @@ $root.proto = (function() { return ContactAction; })(); + SyncActionValue.CustomPaymentMethod = (function() { + + /** + * Properties of a CustomPaymentMethod. + * @memberof proto.SyncActionValue + * @interface ICustomPaymentMethod + * @property {string} credentialId CustomPaymentMethod credentialId + * @property {string} country CustomPaymentMethod country + * @property {string} type CustomPaymentMethod type + * @property {Array.|null} [metadata] CustomPaymentMethod metadata + */ + + /** + * Constructs a new CustomPaymentMethod. + * @memberof proto.SyncActionValue + * @classdesc Represents a CustomPaymentMethod. + * @implements ICustomPaymentMethod + * @constructor + * @param {proto.SyncActionValue.ICustomPaymentMethod=} [properties] Properties to set + */ + function CustomPaymentMethod(properties) { + this.metadata = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CustomPaymentMethod credentialId. + * @member {string} credentialId + * @memberof proto.SyncActionValue.CustomPaymentMethod + * @instance + */ + CustomPaymentMethod.prototype.credentialId = ""; + + /** + * CustomPaymentMethod country. + * @member {string} country + * @memberof proto.SyncActionValue.CustomPaymentMethod + * @instance + */ + CustomPaymentMethod.prototype.country = ""; + + /** + * CustomPaymentMethod type. + * @member {string} type + * @memberof proto.SyncActionValue.CustomPaymentMethod + * @instance + */ + CustomPaymentMethod.prototype.type = ""; + + /** + * CustomPaymentMethod metadata. + * @member {Array.} metadata + * @memberof proto.SyncActionValue.CustomPaymentMethod + * @instance + */ + CustomPaymentMethod.prototype.metadata = $util.emptyArray; + + /** + * Creates a new CustomPaymentMethod instance using the specified properties. + * @function create + * @memberof proto.SyncActionValue.CustomPaymentMethod + * @static + * @param {proto.SyncActionValue.ICustomPaymentMethod=} [properties] Properties to set + * @returns {proto.SyncActionValue.CustomPaymentMethod} CustomPaymentMethod instance + */ + CustomPaymentMethod.create = function create(properties) { + return new CustomPaymentMethod(properties); + }; + + /** + * Encodes the specified CustomPaymentMethod message. Does not implicitly {@link proto.SyncActionValue.CustomPaymentMethod.verify|verify} messages. + * @function encode + * @memberof proto.SyncActionValue.CustomPaymentMethod + * @static + * @param {proto.SyncActionValue.ICustomPaymentMethod} message CustomPaymentMethod message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomPaymentMethod.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.credentialId); + writer.uint32(/* id 2, wireType 2 =*/18).string(message.country); + writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); + if (message.metadata != null && message.metadata.length) + for (var i = 0; i < message.metadata.length; ++i) + $root.proto.SyncActionValue.CustomPaymentMethodMetadata.encode(message.metadata[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CustomPaymentMethod message, length delimited. Does not implicitly {@link proto.SyncActionValue.CustomPaymentMethod.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.SyncActionValue.CustomPaymentMethod + * @static + * @param {proto.SyncActionValue.ICustomPaymentMethod} message CustomPaymentMethod message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomPaymentMethod.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomPaymentMethod message from the specified reader or buffer. + * @function decode + * @memberof proto.SyncActionValue.CustomPaymentMethod + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.SyncActionValue.CustomPaymentMethod} CustomPaymentMethod + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomPaymentMethod.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.SyncActionValue.CustomPaymentMethod(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.credentialId = reader.string(); + break; + case 2: + message.country = reader.string(); + break; + case 3: + message.type = reader.string(); + break; + case 4: + if (!(message.metadata && message.metadata.length)) + message.metadata = []; + message.metadata.push($root.proto.SyncActionValue.CustomPaymentMethodMetadata.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("credentialId")) + throw $util.ProtocolError("missing required 'credentialId'", { instance: message }); + if (!message.hasOwnProperty("country")) + throw $util.ProtocolError("missing required 'country'", { instance: message }); + if (!message.hasOwnProperty("type")) + throw $util.ProtocolError("missing required 'type'", { instance: message }); + return message; + }; + + /** + * Decodes a CustomPaymentMethod message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.SyncActionValue.CustomPaymentMethod + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.SyncActionValue.CustomPaymentMethod} CustomPaymentMethod + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomPaymentMethod.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomPaymentMethod message. + * @function verify + * @memberof proto.SyncActionValue.CustomPaymentMethod + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomPaymentMethod.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.credentialId)) + return "credentialId: string expected"; + if (!$util.isString(message.country)) + return "country: string expected"; + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + if (!Array.isArray(message.metadata)) + return "metadata: array expected"; + for (var i = 0; i < message.metadata.length; ++i) { + var error = $root.proto.SyncActionValue.CustomPaymentMethodMetadata.verify(message.metadata[i]); + if (error) + return "metadata." + error; + } + } + return null; + }; + + /** + * Creates a CustomPaymentMethod message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.SyncActionValue.CustomPaymentMethod + * @static + * @param {Object.} object Plain object + * @returns {proto.SyncActionValue.CustomPaymentMethod} CustomPaymentMethod + */ + CustomPaymentMethod.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SyncActionValue.CustomPaymentMethod) + return object; + var message = new $root.proto.SyncActionValue.CustomPaymentMethod(); + if (object.credentialId != null) + message.credentialId = String(object.credentialId); + if (object.country != null) + message.country = String(object.country); + if (object.type != null) + message.type = String(object.type); + if (object.metadata) { + if (!Array.isArray(object.metadata)) + throw TypeError(".proto.SyncActionValue.CustomPaymentMethod.metadata: array expected"); + message.metadata = []; + for (var i = 0; i < object.metadata.length; ++i) { + if (typeof object.metadata[i] !== "object") + throw TypeError(".proto.SyncActionValue.CustomPaymentMethod.metadata: object expected"); + message.metadata[i] = $root.proto.SyncActionValue.CustomPaymentMethodMetadata.fromObject(object.metadata[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a CustomPaymentMethod message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.SyncActionValue.CustomPaymentMethod + * @static + * @param {proto.SyncActionValue.CustomPaymentMethod} message CustomPaymentMethod + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomPaymentMethod.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.metadata = []; + if (options.defaults) { + object.credentialId = ""; + object.country = ""; + object.type = ""; + } + if (message.credentialId != null && message.hasOwnProperty("credentialId")) + object.credentialId = message.credentialId; + if (message.country != null && message.hasOwnProperty("country")) + object.country = message.country; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.metadata && message.metadata.length) { + object.metadata = []; + for (var j = 0; j < message.metadata.length; ++j) + object.metadata[j] = $root.proto.SyncActionValue.CustomPaymentMethodMetadata.toObject(message.metadata[j], options); + } + return object; + }; + + /** + * Converts this CustomPaymentMethod to JSON. + * @function toJSON + * @memberof proto.SyncActionValue.CustomPaymentMethod + * @instance + * @returns {Object.} JSON object + */ + CustomPaymentMethod.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CustomPaymentMethod; + })(); + + SyncActionValue.CustomPaymentMethodMetadata = (function() { + + /** + * Properties of a CustomPaymentMethodMetadata. + * @memberof proto.SyncActionValue + * @interface ICustomPaymentMethodMetadata + * @property {string} key CustomPaymentMethodMetadata key + * @property {string} value CustomPaymentMethodMetadata value + */ + + /** + * Constructs a new CustomPaymentMethodMetadata. + * @memberof proto.SyncActionValue + * @classdesc Represents a CustomPaymentMethodMetadata. + * @implements ICustomPaymentMethodMetadata + * @constructor + * @param {proto.SyncActionValue.ICustomPaymentMethodMetadata=} [properties] Properties to set + */ + function CustomPaymentMethodMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CustomPaymentMethodMetadata key. + * @member {string} key + * @memberof proto.SyncActionValue.CustomPaymentMethodMetadata + * @instance + */ + CustomPaymentMethodMetadata.prototype.key = ""; + + /** + * CustomPaymentMethodMetadata value. + * @member {string} value + * @memberof proto.SyncActionValue.CustomPaymentMethodMetadata + * @instance + */ + CustomPaymentMethodMetadata.prototype.value = ""; + + /** + * Creates a new CustomPaymentMethodMetadata instance using the specified properties. + * @function create + * @memberof proto.SyncActionValue.CustomPaymentMethodMetadata + * @static + * @param {proto.SyncActionValue.ICustomPaymentMethodMetadata=} [properties] Properties to set + * @returns {proto.SyncActionValue.CustomPaymentMethodMetadata} CustomPaymentMethodMetadata instance + */ + CustomPaymentMethodMetadata.create = function create(properties) { + return new CustomPaymentMethodMetadata(properties); + }; + + /** + * Encodes the specified CustomPaymentMethodMetadata message. Does not implicitly {@link proto.SyncActionValue.CustomPaymentMethodMetadata.verify|verify} messages. + * @function encode + * @memberof proto.SyncActionValue.CustomPaymentMethodMetadata + * @static + * @param {proto.SyncActionValue.ICustomPaymentMethodMetadata} message CustomPaymentMethodMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomPaymentMethodMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + return writer; + }; + + /** + * Encodes the specified CustomPaymentMethodMetadata message, length delimited. Does not implicitly {@link proto.SyncActionValue.CustomPaymentMethodMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.SyncActionValue.CustomPaymentMethodMetadata + * @static + * @param {proto.SyncActionValue.ICustomPaymentMethodMetadata} message CustomPaymentMethodMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomPaymentMethodMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomPaymentMethodMetadata message from the specified reader or buffer. + * @function decode + * @memberof proto.SyncActionValue.CustomPaymentMethodMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.SyncActionValue.CustomPaymentMethodMetadata} CustomPaymentMethodMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomPaymentMethodMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.SyncActionValue.CustomPaymentMethodMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.key = reader.string(); + break; + case 2: + message.value = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("key")) + throw $util.ProtocolError("missing required 'key'", { instance: message }); + if (!message.hasOwnProperty("value")) + throw $util.ProtocolError("missing required 'value'", { instance: message }); + return message; + }; + + /** + * Decodes a CustomPaymentMethodMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.SyncActionValue.CustomPaymentMethodMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.SyncActionValue.CustomPaymentMethodMetadata} CustomPaymentMethodMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomPaymentMethodMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomPaymentMethodMetadata message. + * @function verify + * @memberof proto.SyncActionValue.CustomPaymentMethodMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomPaymentMethodMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.key)) + return "key: string expected"; + if (!$util.isString(message.value)) + return "value: string expected"; + return null; + }; + + /** + * Creates a CustomPaymentMethodMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.SyncActionValue.CustomPaymentMethodMetadata + * @static + * @param {Object.} object Plain object + * @returns {proto.SyncActionValue.CustomPaymentMethodMetadata} CustomPaymentMethodMetadata + */ + CustomPaymentMethodMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SyncActionValue.CustomPaymentMethodMetadata) + return object; + var message = new $root.proto.SyncActionValue.CustomPaymentMethodMetadata(); + if (object.key != null) + message.key = String(object.key); + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from a CustomPaymentMethodMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.SyncActionValue.CustomPaymentMethodMetadata + * @static + * @param {proto.SyncActionValue.CustomPaymentMethodMetadata} message CustomPaymentMethodMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomPaymentMethodMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.key = ""; + object.value = ""; + } + if (message.key != null && message.hasOwnProperty("key")) + object.key = message.key; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; + + /** + * Converts this CustomPaymentMethodMetadata to JSON. + * @function toJSON + * @memberof proto.SyncActionValue.CustomPaymentMethodMetadata + * @instance + * @returns {Object.} JSON object + */ + CustomPaymentMethodMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CustomPaymentMethodMetadata; + })(); + + SyncActionValue.CustomPaymentMethodsAction = (function() { + + /** + * Properties of a CustomPaymentMethodsAction. + * @memberof proto.SyncActionValue + * @interface ICustomPaymentMethodsAction + * @property {Array.|null} [customPaymentMethods] CustomPaymentMethodsAction customPaymentMethods + */ + + /** + * Constructs a new CustomPaymentMethodsAction. + * @memberof proto.SyncActionValue + * @classdesc Represents a CustomPaymentMethodsAction. + * @implements ICustomPaymentMethodsAction + * @constructor + * @param {proto.SyncActionValue.ICustomPaymentMethodsAction=} [properties] Properties to set + */ + function CustomPaymentMethodsAction(properties) { + this.customPaymentMethods = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CustomPaymentMethodsAction customPaymentMethods. + * @member {Array.} customPaymentMethods + * @memberof proto.SyncActionValue.CustomPaymentMethodsAction + * @instance + */ + CustomPaymentMethodsAction.prototype.customPaymentMethods = $util.emptyArray; + + /** + * Creates a new CustomPaymentMethodsAction instance using the specified properties. + * @function create + * @memberof proto.SyncActionValue.CustomPaymentMethodsAction + * @static + * @param {proto.SyncActionValue.ICustomPaymentMethodsAction=} [properties] Properties to set + * @returns {proto.SyncActionValue.CustomPaymentMethodsAction} CustomPaymentMethodsAction instance + */ + CustomPaymentMethodsAction.create = function create(properties) { + return new CustomPaymentMethodsAction(properties); + }; + + /** + * Encodes the specified CustomPaymentMethodsAction message. Does not implicitly {@link proto.SyncActionValue.CustomPaymentMethodsAction.verify|verify} messages. + * @function encode + * @memberof proto.SyncActionValue.CustomPaymentMethodsAction + * @static + * @param {proto.SyncActionValue.ICustomPaymentMethodsAction} message CustomPaymentMethodsAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomPaymentMethodsAction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.customPaymentMethods != null && message.customPaymentMethods.length) + for (var i = 0; i < message.customPaymentMethods.length; ++i) + $root.proto.SyncActionValue.CustomPaymentMethod.encode(message.customPaymentMethods[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CustomPaymentMethodsAction message, length delimited. Does not implicitly {@link proto.SyncActionValue.CustomPaymentMethodsAction.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.SyncActionValue.CustomPaymentMethodsAction + * @static + * @param {proto.SyncActionValue.ICustomPaymentMethodsAction} message CustomPaymentMethodsAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomPaymentMethodsAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomPaymentMethodsAction message from the specified reader or buffer. + * @function decode + * @memberof proto.SyncActionValue.CustomPaymentMethodsAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.SyncActionValue.CustomPaymentMethodsAction} CustomPaymentMethodsAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomPaymentMethodsAction.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.SyncActionValue.CustomPaymentMethodsAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.customPaymentMethods && message.customPaymentMethods.length)) + message.customPaymentMethods = []; + message.customPaymentMethods.push($root.proto.SyncActionValue.CustomPaymentMethod.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CustomPaymentMethodsAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.SyncActionValue.CustomPaymentMethodsAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.SyncActionValue.CustomPaymentMethodsAction} CustomPaymentMethodsAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomPaymentMethodsAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomPaymentMethodsAction message. + * @function verify + * @memberof proto.SyncActionValue.CustomPaymentMethodsAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomPaymentMethodsAction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.customPaymentMethods != null && message.hasOwnProperty("customPaymentMethods")) { + if (!Array.isArray(message.customPaymentMethods)) + return "customPaymentMethods: array expected"; + for (var i = 0; i < message.customPaymentMethods.length; ++i) { + var error = $root.proto.SyncActionValue.CustomPaymentMethod.verify(message.customPaymentMethods[i]); + if (error) + return "customPaymentMethods." + error; + } + } + return null; + }; + + /** + * Creates a CustomPaymentMethodsAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.SyncActionValue.CustomPaymentMethodsAction + * @static + * @param {Object.} object Plain object + * @returns {proto.SyncActionValue.CustomPaymentMethodsAction} CustomPaymentMethodsAction + */ + CustomPaymentMethodsAction.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SyncActionValue.CustomPaymentMethodsAction) + return object; + var message = new $root.proto.SyncActionValue.CustomPaymentMethodsAction(); + if (object.customPaymentMethods) { + if (!Array.isArray(object.customPaymentMethods)) + throw TypeError(".proto.SyncActionValue.CustomPaymentMethodsAction.customPaymentMethods: array expected"); + message.customPaymentMethods = []; + for (var i = 0; i < object.customPaymentMethods.length; ++i) { + if (typeof object.customPaymentMethods[i] !== "object") + throw TypeError(".proto.SyncActionValue.CustomPaymentMethodsAction.customPaymentMethods: object expected"); + message.customPaymentMethods[i] = $root.proto.SyncActionValue.CustomPaymentMethod.fromObject(object.customPaymentMethods[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a CustomPaymentMethodsAction message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.SyncActionValue.CustomPaymentMethodsAction + * @static + * @param {proto.SyncActionValue.CustomPaymentMethodsAction} message CustomPaymentMethodsAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomPaymentMethodsAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.customPaymentMethods = []; + if (message.customPaymentMethods && message.customPaymentMethods.length) { + object.customPaymentMethods = []; + for (var j = 0; j < message.customPaymentMethods.length; ++j) + object.customPaymentMethods[j] = $root.proto.SyncActionValue.CustomPaymentMethod.toObject(message.customPaymentMethods[j], options); + } + return object; + }; + + /** + * Converts this CustomPaymentMethodsAction to JSON. + * @function toJSON + * @memberof proto.SyncActionValue.CustomPaymentMethodsAction + * @instance + * @returns {Object.} JSON object + */ + CustomPaymentMethodsAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CustomPaymentMethodsAction; + })(); + SyncActionValue.DeleteChatAction = (function() { /** @@ -72059,6 +84009,216 @@ $root.proto = (function() { return DeleteChatAction; })(); + SyncActionValue.DeleteIndividualCallLogAction = (function() { + + /** + * Properties of a DeleteIndividualCallLogAction. + * @memberof proto.SyncActionValue + * @interface IDeleteIndividualCallLogAction + * @property {string|null} [peerJid] DeleteIndividualCallLogAction peerJid + * @property {boolean|null} [isIncoming] DeleteIndividualCallLogAction isIncoming + */ + + /** + * Constructs a new DeleteIndividualCallLogAction. + * @memberof proto.SyncActionValue + * @classdesc Represents a DeleteIndividualCallLogAction. + * @implements IDeleteIndividualCallLogAction + * @constructor + * @param {proto.SyncActionValue.IDeleteIndividualCallLogAction=} [properties] Properties to set + */ + function DeleteIndividualCallLogAction(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteIndividualCallLogAction peerJid. + * @member {string} peerJid + * @memberof proto.SyncActionValue.DeleteIndividualCallLogAction + * @instance + */ + DeleteIndividualCallLogAction.prototype.peerJid = ""; + + /** + * DeleteIndividualCallLogAction isIncoming. + * @member {boolean} isIncoming + * @memberof proto.SyncActionValue.DeleteIndividualCallLogAction + * @instance + */ + DeleteIndividualCallLogAction.prototype.isIncoming = false; + + /** + * Creates a new DeleteIndividualCallLogAction instance using the specified properties. + * @function create + * @memberof proto.SyncActionValue.DeleteIndividualCallLogAction + * @static + * @param {proto.SyncActionValue.IDeleteIndividualCallLogAction=} [properties] Properties to set + * @returns {proto.SyncActionValue.DeleteIndividualCallLogAction} DeleteIndividualCallLogAction instance + */ + DeleteIndividualCallLogAction.create = function create(properties) { + return new DeleteIndividualCallLogAction(properties); + }; + + /** + * Encodes the specified DeleteIndividualCallLogAction message. Does not implicitly {@link proto.SyncActionValue.DeleteIndividualCallLogAction.verify|verify} messages. + * @function encode + * @memberof proto.SyncActionValue.DeleteIndividualCallLogAction + * @static + * @param {proto.SyncActionValue.IDeleteIndividualCallLogAction} message DeleteIndividualCallLogAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteIndividualCallLogAction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.peerJid != null && Object.hasOwnProperty.call(message, "peerJid")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.peerJid); + if (message.isIncoming != null && Object.hasOwnProperty.call(message, "isIncoming")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isIncoming); + return writer; + }; + + /** + * Encodes the specified DeleteIndividualCallLogAction message, length delimited. Does not implicitly {@link proto.SyncActionValue.DeleteIndividualCallLogAction.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.SyncActionValue.DeleteIndividualCallLogAction + * @static + * @param {proto.SyncActionValue.IDeleteIndividualCallLogAction} message DeleteIndividualCallLogAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteIndividualCallLogAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteIndividualCallLogAction message from the specified reader or buffer. + * @function decode + * @memberof proto.SyncActionValue.DeleteIndividualCallLogAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.SyncActionValue.DeleteIndividualCallLogAction} DeleteIndividualCallLogAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteIndividualCallLogAction.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.SyncActionValue.DeleteIndividualCallLogAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.peerJid = reader.string(); + break; + case 2: + message.isIncoming = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteIndividualCallLogAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.SyncActionValue.DeleteIndividualCallLogAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.SyncActionValue.DeleteIndividualCallLogAction} DeleteIndividualCallLogAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteIndividualCallLogAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteIndividualCallLogAction message. + * @function verify + * @memberof proto.SyncActionValue.DeleteIndividualCallLogAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteIndividualCallLogAction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.peerJid != null && message.hasOwnProperty("peerJid")) + if (!$util.isString(message.peerJid)) + return "peerJid: string expected"; + if (message.isIncoming != null && message.hasOwnProperty("isIncoming")) + if (typeof message.isIncoming !== "boolean") + return "isIncoming: boolean expected"; + return null; + }; + + /** + * Creates a DeleteIndividualCallLogAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.SyncActionValue.DeleteIndividualCallLogAction + * @static + * @param {Object.} object Plain object + * @returns {proto.SyncActionValue.DeleteIndividualCallLogAction} DeleteIndividualCallLogAction + */ + DeleteIndividualCallLogAction.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SyncActionValue.DeleteIndividualCallLogAction) + return object; + var message = new $root.proto.SyncActionValue.DeleteIndividualCallLogAction(); + if (object.peerJid != null) + message.peerJid = String(object.peerJid); + if (object.isIncoming != null) + message.isIncoming = Boolean(object.isIncoming); + return message; + }; + + /** + * Creates a plain object from a DeleteIndividualCallLogAction message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.SyncActionValue.DeleteIndividualCallLogAction + * @static + * @param {proto.SyncActionValue.DeleteIndividualCallLogAction} message DeleteIndividualCallLogAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteIndividualCallLogAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.peerJid = ""; + object.isIncoming = false; + } + if (message.peerJid != null && message.hasOwnProperty("peerJid")) + object.peerJid = message.peerJid; + if (message.isIncoming != null && message.hasOwnProperty("isIncoming")) + object.isIncoming = message.isIncoming; + return object; + }; + + /** + * Converts this DeleteIndividualCallLogAction to JSON. + * @function toJSON + * @memberof proto.SyncActionValue.DeleteIndividualCallLogAction + * @instance + * @returns {Object.} JSON object + */ + DeleteIndividualCallLogAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteIndividualCallLogAction; + })(); + SyncActionValue.DeleteMessageForMeAction = (function() { /** @@ -72854,6 +85014,7 @@ $root.proto = (function() { * @property {number|null} [color] LabelEditAction color * @property {number|null} [predefinedId] LabelEditAction predefinedId * @property {boolean|null} [deleted] LabelEditAction deleted + * @property {number|null} [orderIndex] LabelEditAction orderIndex */ /** @@ -72903,6 +85064,14 @@ $root.proto = (function() { */ LabelEditAction.prototype.deleted = false; + /** + * LabelEditAction orderIndex. + * @member {number} orderIndex + * @memberof proto.SyncActionValue.LabelEditAction + * @instance + */ + LabelEditAction.prototype.orderIndex = 0; + /** * Creates a new LabelEditAction instance using the specified properties. * @function create @@ -72935,6 +85104,8 @@ $root.proto = (function() { writer.uint32(/* id 3, wireType 0 =*/24).int32(message.predefinedId); if (message.deleted != null && Object.hasOwnProperty.call(message, "deleted")) writer.uint32(/* id 4, wireType 0 =*/32).bool(message.deleted); + if (message.orderIndex != null && Object.hasOwnProperty.call(message, "orderIndex")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.orderIndex); return writer; }; @@ -72981,6 +85152,9 @@ $root.proto = (function() { case 4: message.deleted = reader.bool(); break; + case 5: + message.orderIndex = reader.int32(); + break; default: reader.skipType(tag & 7); break; @@ -73028,6 +85202,9 @@ $root.proto = (function() { if (message.deleted != null && message.hasOwnProperty("deleted")) if (typeof message.deleted !== "boolean") return "deleted: boolean expected"; + if (message.orderIndex != null && message.hasOwnProperty("orderIndex")) + if (!$util.isInteger(message.orderIndex)) + return "orderIndex: integer expected"; return null; }; @@ -73051,6 +85228,8 @@ $root.proto = (function() { message.predefinedId = object.predefinedId | 0; if (object.deleted != null) message.deleted = Boolean(object.deleted); + if (object.orderIndex != null) + message.orderIndex = object.orderIndex | 0; return message; }; @@ -73072,6 +85251,7 @@ $root.proto = (function() { object.color = 0; object.predefinedId = 0; object.deleted = false; + object.orderIndex = 0; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -73081,6 +85261,8 @@ $root.proto = (function() { object.predefinedId = message.predefinedId; if (message.deleted != null && message.hasOwnProperty("deleted")) object.deleted = message.deleted; + if (message.orderIndex != null && message.hasOwnProperty("orderIndex")) + object.orderIndex = message.orderIndex; return object; }; @@ -73098,6 +85280,214 @@ $root.proto = (function() { return LabelEditAction; })(); + SyncActionValue.LabelReorderingAction = (function() { + + /** + * Properties of a LabelReorderingAction. + * @memberof proto.SyncActionValue + * @interface ILabelReorderingAction + * @property {Array.|null} [sortedLabelIds] LabelReorderingAction sortedLabelIds + */ + + /** + * Constructs a new LabelReorderingAction. + * @memberof proto.SyncActionValue + * @classdesc Represents a LabelReorderingAction. + * @implements ILabelReorderingAction + * @constructor + * @param {proto.SyncActionValue.ILabelReorderingAction=} [properties] Properties to set + */ + function LabelReorderingAction(properties) { + this.sortedLabelIds = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LabelReorderingAction sortedLabelIds. + * @member {Array.} sortedLabelIds + * @memberof proto.SyncActionValue.LabelReorderingAction + * @instance + */ + LabelReorderingAction.prototype.sortedLabelIds = $util.emptyArray; + + /** + * Creates a new LabelReorderingAction instance using the specified properties. + * @function create + * @memberof proto.SyncActionValue.LabelReorderingAction + * @static + * @param {proto.SyncActionValue.ILabelReorderingAction=} [properties] Properties to set + * @returns {proto.SyncActionValue.LabelReorderingAction} LabelReorderingAction instance + */ + LabelReorderingAction.create = function create(properties) { + return new LabelReorderingAction(properties); + }; + + /** + * Encodes the specified LabelReorderingAction message. Does not implicitly {@link proto.SyncActionValue.LabelReorderingAction.verify|verify} messages. + * @function encode + * @memberof proto.SyncActionValue.LabelReorderingAction + * @static + * @param {proto.SyncActionValue.ILabelReorderingAction} message LabelReorderingAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LabelReorderingAction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sortedLabelIds != null && message.sortedLabelIds.length) + for (var i = 0; i < message.sortedLabelIds.length; ++i) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.sortedLabelIds[i]); + return writer; + }; + + /** + * Encodes the specified LabelReorderingAction message, length delimited. Does not implicitly {@link proto.SyncActionValue.LabelReorderingAction.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.SyncActionValue.LabelReorderingAction + * @static + * @param {proto.SyncActionValue.ILabelReorderingAction} message LabelReorderingAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LabelReorderingAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LabelReorderingAction message from the specified reader or buffer. + * @function decode + * @memberof proto.SyncActionValue.LabelReorderingAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.SyncActionValue.LabelReorderingAction} LabelReorderingAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LabelReorderingAction.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.SyncActionValue.LabelReorderingAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.sortedLabelIds && message.sortedLabelIds.length)) + message.sortedLabelIds = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.sortedLabelIds.push(reader.int32()); + } else + message.sortedLabelIds.push(reader.int32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LabelReorderingAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.SyncActionValue.LabelReorderingAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.SyncActionValue.LabelReorderingAction} LabelReorderingAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LabelReorderingAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LabelReorderingAction message. + * @function verify + * @memberof proto.SyncActionValue.LabelReorderingAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LabelReorderingAction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sortedLabelIds != null && message.hasOwnProperty("sortedLabelIds")) { + if (!Array.isArray(message.sortedLabelIds)) + return "sortedLabelIds: array expected"; + for (var i = 0; i < message.sortedLabelIds.length; ++i) + if (!$util.isInteger(message.sortedLabelIds[i])) + return "sortedLabelIds: integer[] expected"; + } + return null; + }; + + /** + * Creates a LabelReorderingAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.SyncActionValue.LabelReorderingAction + * @static + * @param {Object.} object Plain object + * @returns {proto.SyncActionValue.LabelReorderingAction} LabelReorderingAction + */ + LabelReorderingAction.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SyncActionValue.LabelReorderingAction) + return object; + var message = new $root.proto.SyncActionValue.LabelReorderingAction(); + if (object.sortedLabelIds) { + if (!Array.isArray(object.sortedLabelIds)) + throw TypeError(".proto.SyncActionValue.LabelReorderingAction.sortedLabelIds: array expected"); + message.sortedLabelIds = []; + for (var i = 0; i < object.sortedLabelIds.length; ++i) + message.sortedLabelIds[i] = object.sortedLabelIds[i] | 0; + } + return message; + }; + + /** + * Creates a plain object from a LabelReorderingAction message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.SyncActionValue.LabelReorderingAction + * @static + * @param {proto.SyncActionValue.LabelReorderingAction} message LabelReorderingAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LabelReorderingAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.sortedLabelIds = []; + if (message.sortedLabelIds && message.sortedLabelIds.length) { + object.sortedLabelIds = []; + for (var j = 0; j < message.sortedLabelIds.length; ++j) + object.sortedLabelIds[j] = message.sortedLabelIds[j]; + } + return object; + }; + + /** + * Converts this LabelReorderingAction to JSON. + * @function toJSON + * @memberof proto.SyncActionValue.LabelReorderingAction + * @instance + * @returns {Object.} JSON object + */ + LabelReorderingAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return LabelReorderingAction; + })(); + SyncActionValue.LocaleSetting = (function() { /** @@ -74488,6 +86878,193 @@ $root.proto = (function() { return NuxAction; })(); + SyncActionValue.PaymentInfoAction = (function() { + + /** + * Properties of a PaymentInfoAction. + * @memberof proto.SyncActionValue + * @interface IPaymentInfoAction + * @property {string|null} [cpi] PaymentInfoAction cpi + */ + + /** + * Constructs a new PaymentInfoAction. + * @memberof proto.SyncActionValue + * @classdesc Represents a PaymentInfoAction. + * @implements IPaymentInfoAction + * @constructor + * @param {proto.SyncActionValue.IPaymentInfoAction=} [properties] Properties to set + */ + function PaymentInfoAction(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PaymentInfoAction cpi. + * @member {string} cpi + * @memberof proto.SyncActionValue.PaymentInfoAction + * @instance + */ + PaymentInfoAction.prototype.cpi = ""; + + /** + * Creates a new PaymentInfoAction instance using the specified properties. + * @function create + * @memberof proto.SyncActionValue.PaymentInfoAction + * @static + * @param {proto.SyncActionValue.IPaymentInfoAction=} [properties] Properties to set + * @returns {proto.SyncActionValue.PaymentInfoAction} PaymentInfoAction instance + */ + PaymentInfoAction.create = function create(properties) { + return new PaymentInfoAction(properties); + }; + + /** + * Encodes the specified PaymentInfoAction message. Does not implicitly {@link proto.SyncActionValue.PaymentInfoAction.verify|verify} messages. + * @function encode + * @memberof proto.SyncActionValue.PaymentInfoAction + * @static + * @param {proto.SyncActionValue.IPaymentInfoAction} message PaymentInfoAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PaymentInfoAction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cpi != null && Object.hasOwnProperty.call(message, "cpi")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.cpi); + return writer; + }; + + /** + * Encodes the specified PaymentInfoAction message, length delimited. Does not implicitly {@link proto.SyncActionValue.PaymentInfoAction.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.SyncActionValue.PaymentInfoAction + * @static + * @param {proto.SyncActionValue.IPaymentInfoAction} message PaymentInfoAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PaymentInfoAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PaymentInfoAction message from the specified reader or buffer. + * @function decode + * @memberof proto.SyncActionValue.PaymentInfoAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.SyncActionValue.PaymentInfoAction} PaymentInfoAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PaymentInfoAction.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.SyncActionValue.PaymentInfoAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.cpi = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PaymentInfoAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.SyncActionValue.PaymentInfoAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.SyncActionValue.PaymentInfoAction} PaymentInfoAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PaymentInfoAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PaymentInfoAction message. + * @function verify + * @memberof proto.SyncActionValue.PaymentInfoAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PaymentInfoAction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cpi != null && message.hasOwnProperty("cpi")) + if (!$util.isString(message.cpi)) + return "cpi: string expected"; + return null; + }; + + /** + * Creates a PaymentInfoAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.SyncActionValue.PaymentInfoAction + * @static + * @param {Object.} object Plain object + * @returns {proto.SyncActionValue.PaymentInfoAction} PaymentInfoAction + */ + PaymentInfoAction.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SyncActionValue.PaymentInfoAction) + return object; + var message = new $root.proto.SyncActionValue.PaymentInfoAction(); + if (object.cpi != null) + message.cpi = String(object.cpi); + return message; + }; + + /** + * Creates a plain object from a PaymentInfoAction message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.SyncActionValue.PaymentInfoAction + * @static + * @param {proto.SyncActionValue.PaymentInfoAction} message PaymentInfoAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PaymentInfoAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.cpi = ""; + if (message.cpi != null && message.hasOwnProperty("cpi")) + object.cpi = message.cpi; + return object; + }; + + /** + * Converts this PaymentInfoAction to JSON. + * @function toJSON + * @memberof proto.SyncActionValue.PaymentInfoAction + * @instance + * @returns {Object.} JSON object + */ + PaymentInfoAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PaymentInfoAction; + })(); + SyncActionValue.PinAction = (function() { /** @@ -76702,6 +89279,266 @@ $root.proto = (function() { return StarAction; })(); + SyncActionValue.StatusPrivacyAction = (function() { + + /** + * Properties of a StatusPrivacyAction. + * @memberof proto.SyncActionValue + * @interface IStatusPrivacyAction + * @property {proto.SyncActionValue.StatusPrivacyAction.StatusDistributionMode|null} [mode] StatusPrivacyAction mode + * @property {Array.|null} [userJid] StatusPrivacyAction userJid + */ + + /** + * Constructs a new StatusPrivacyAction. + * @memberof proto.SyncActionValue + * @classdesc Represents a StatusPrivacyAction. + * @implements IStatusPrivacyAction + * @constructor + * @param {proto.SyncActionValue.IStatusPrivacyAction=} [properties] Properties to set + */ + function StatusPrivacyAction(properties) { + this.userJid = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StatusPrivacyAction mode. + * @member {proto.SyncActionValue.StatusPrivacyAction.StatusDistributionMode} mode + * @memberof proto.SyncActionValue.StatusPrivacyAction + * @instance + */ + StatusPrivacyAction.prototype.mode = 0; + + /** + * StatusPrivacyAction userJid. + * @member {Array.} userJid + * @memberof proto.SyncActionValue.StatusPrivacyAction + * @instance + */ + StatusPrivacyAction.prototype.userJid = $util.emptyArray; + + /** + * Creates a new StatusPrivacyAction instance using the specified properties. + * @function create + * @memberof proto.SyncActionValue.StatusPrivacyAction + * @static + * @param {proto.SyncActionValue.IStatusPrivacyAction=} [properties] Properties to set + * @returns {proto.SyncActionValue.StatusPrivacyAction} StatusPrivacyAction instance + */ + StatusPrivacyAction.create = function create(properties) { + return new StatusPrivacyAction(properties); + }; + + /** + * Encodes the specified StatusPrivacyAction message. Does not implicitly {@link proto.SyncActionValue.StatusPrivacyAction.verify|verify} messages. + * @function encode + * @memberof proto.SyncActionValue.StatusPrivacyAction + * @static + * @param {proto.SyncActionValue.IStatusPrivacyAction} message StatusPrivacyAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StatusPrivacyAction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.mode); + if (message.userJid != null && message.userJid.length) + for (var i = 0; i < message.userJid.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.userJid[i]); + return writer; + }; + + /** + * Encodes the specified StatusPrivacyAction message, length delimited. Does not implicitly {@link proto.SyncActionValue.StatusPrivacyAction.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.SyncActionValue.StatusPrivacyAction + * @static + * @param {proto.SyncActionValue.IStatusPrivacyAction} message StatusPrivacyAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StatusPrivacyAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StatusPrivacyAction message from the specified reader or buffer. + * @function decode + * @memberof proto.SyncActionValue.StatusPrivacyAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.SyncActionValue.StatusPrivacyAction} StatusPrivacyAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StatusPrivacyAction.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.SyncActionValue.StatusPrivacyAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.mode = reader.int32(); + break; + case 2: + if (!(message.userJid && message.userJid.length)) + message.userJid = []; + message.userJid.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StatusPrivacyAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.SyncActionValue.StatusPrivacyAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.SyncActionValue.StatusPrivacyAction} StatusPrivacyAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StatusPrivacyAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StatusPrivacyAction message. + * @function verify + * @memberof proto.SyncActionValue.StatusPrivacyAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StatusPrivacyAction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.mode != null && message.hasOwnProperty("mode")) + switch (message.mode) { + default: + return "mode: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.userJid != null && message.hasOwnProperty("userJid")) { + if (!Array.isArray(message.userJid)) + return "userJid: array expected"; + for (var i = 0; i < message.userJid.length; ++i) + if (!$util.isString(message.userJid[i])) + return "userJid: string[] expected"; + } + return null; + }; + + /** + * Creates a StatusPrivacyAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.SyncActionValue.StatusPrivacyAction + * @static + * @param {Object.} object Plain object + * @returns {proto.SyncActionValue.StatusPrivacyAction} StatusPrivacyAction + */ + StatusPrivacyAction.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SyncActionValue.StatusPrivacyAction) + return object; + var message = new $root.proto.SyncActionValue.StatusPrivacyAction(); + switch (object.mode) { + case "ALLOW_LIST": + case 0: + message.mode = 0; + break; + case "DENY_LIST": + case 1: + message.mode = 1; + break; + case "CONTACTS": + case 2: + message.mode = 2; + break; + } + if (object.userJid) { + if (!Array.isArray(object.userJid)) + throw TypeError(".proto.SyncActionValue.StatusPrivacyAction.userJid: array expected"); + message.userJid = []; + for (var i = 0; i < object.userJid.length; ++i) + message.userJid[i] = String(object.userJid[i]); + } + return message; + }; + + /** + * Creates a plain object from a StatusPrivacyAction message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.SyncActionValue.StatusPrivacyAction + * @static + * @param {proto.SyncActionValue.StatusPrivacyAction} message StatusPrivacyAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StatusPrivacyAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.userJid = []; + if (options.defaults) + object.mode = options.enums === String ? "ALLOW_LIST" : 0; + if (message.mode != null && message.hasOwnProperty("mode")) + object.mode = options.enums === String ? $root.proto.SyncActionValue.StatusPrivacyAction.StatusDistributionMode[message.mode] : message.mode; + if (message.userJid && message.userJid.length) { + object.userJid = []; + for (var j = 0; j < message.userJid.length; ++j) + object.userJid[j] = message.userJid[j]; + } + return object; + }; + + /** + * Converts this StatusPrivacyAction to JSON. + * @function toJSON + * @memberof proto.SyncActionValue.StatusPrivacyAction + * @instance + * @returns {Object.} JSON object + */ + StatusPrivacyAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * StatusDistributionMode enum. + * @name proto.SyncActionValue.StatusPrivacyAction.StatusDistributionMode + * @enum {number} + * @property {number} ALLOW_LIST=0 ALLOW_LIST value + * @property {number} DENY_LIST=1 DENY_LIST value + * @property {number} CONTACTS=2 CONTACTS value + */ + StatusPrivacyAction.StatusDistributionMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ALLOW_LIST"] = 0; + values[valuesById[1] = "DENY_LIST"] = 1; + values[valuesById[2] = "CONTACTS"] = 2; + return values; + })(); + + return StatusPrivacyAction; + })(); + SyncActionValue.StickerAction = (function() { /** @@ -79101,6 +91938,7 @@ $root.proto = (function() { * @property {proto.IKeyId|null} [keyId] SyncdPatch keyId * @property {proto.IExitCode|null} [exitCode] SyncdPatch exitCode * @property {number|null} [deviceIndex] SyncdPatch deviceIndex + * @property {Uint8Array|null} [clientDebugData] SyncdPatch clientDebugData */ /** @@ -79183,6 +92021,14 @@ $root.proto = (function() { */ SyncdPatch.prototype.deviceIndex = 0; + /** + * SyncdPatch clientDebugData. + * @member {Uint8Array} clientDebugData + * @memberof proto.SyncdPatch + * @instance + */ + SyncdPatch.prototype.clientDebugData = $util.newBuffer([]); + /** * Creates a new SyncdPatch instance using the specified properties. * @function create @@ -79224,6 +92070,8 @@ $root.proto = (function() { $root.proto.ExitCode.encode(message.exitCode, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); if (message.deviceIndex != null && Object.hasOwnProperty.call(message, "deviceIndex")) writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.deviceIndex); + if (message.clientDebugData != null && Object.hasOwnProperty.call(message, "clientDebugData")) + writer.uint32(/* id 9, wireType 2 =*/74).bytes(message.clientDebugData); return writer; }; @@ -79284,6 +92132,9 @@ $root.proto = (function() { case 8: message.deviceIndex = reader.uint32(); break; + case 9: + message.clientDebugData = reader.bytes(); + break; default: reader.skipType(tag & 7); break; @@ -79357,6 +92208,9 @@ $root.proto = (function() { if (message.deviceIndex != null && message.hasOwnProperty("deviceIndex")) if (!$util.isInteger(message.deviceIndex)) return "deviceIndex: integer expected"; + if (message.clientDebugData != null && message.hasOwnProperty("clientDebugData")) + if (!(message.clientDebugData && typeof message.clientDebugData.length === "number" || $util.isString(message.clientDebugData))) + return "clientDebugData: buffer expected"; return null; }; @@ -79414,6 +92268,11 @@ $root.proto = (function() { } if (object.deviceIndex != null) message.deviceIndex = object.deviceIndex >>> 0; + if (object.clientDebugData != null) + if (typeof object.clientDebugData === "string") + $util.base64.decode(object.clientDebugData, message.clientDebugData = $util.newBuffer($util.base64.length(object.clientDebugData)), 0); + else if (object.clientDebugData.length) + message.clientDebugData = object.clientDebugData; return message; }; @@ -79452,6 +92311,13 @@ $root.proto = (function() { object.keyId = null; object.exitCode = null; object.deviceIndex = 0; + if (options.bytes === String) + object.clientDebugData = ""; + else { + object.clientDebugData = []; + if (options.bytes !== Array) + object.clientDebugData = $util.newBuffer(object.clientDebugData); + } } if (message.version != null && message.hasOwnProperty("version")) object.version = $root.proto.SyncdVersion.toObject(message.version, options); @@ -79472,6 +92338,8 @@ $root.proto = (function() { object.exitCode = $root.proto.ExitCode.toObject(message.exitCode, options); if (message.deviceIndex != null && message.hasOwnProperty("deviceIndex")) object.deviceIndex = message.deviceIndex; + if (message.clientDebugData != null && message.hasOwnProperty("clientDebugData")) + object.clientDebugData = options.bytes === String ? $util.base64.encode(message.clientDebugData, 0, message.clientDebugData.length) : options.bytes === Array ? Array.prototype.slice.call(message.clientDebugData) : message.clientDebugData; return object; }; @@ -84813,6 +97681,14 @@ $root.proto = (function() { * @property {string|null} [originalSelfAuthorUserJidString] WebMessageInfo originalSelfAuthorUserJidString * @property {number|Long|null} [revokeMessageTimestamp] WebMessageInfo revokeMessageTimestamp * @property {proto.IPinInChat|null} [pinInChat] WebMessageInfo pinInChat + * @property {proto.IPremiumMessageInfo|null} [premiumMessageInfo] WebMessageInfo premiumMessageInfo + * @property {boolean|null} [is1PBizBotMessage] WebMessageInfo is1PBizBotMessage + * @property {boolean|null} [isGroupHistoryMessage] WebMessageInfo isGroupHistoryMessage + * @property {string|null} [botMessageInvokerJid] WebMessageInfo botMessageInvokerJid + * @property {proto.ICommentMetadata|null} [commentMetadata] WebMessageInfo commentMetadata + * @property {Array.|null} [eventResponses] WebMessageInfo eventResponses + * @property {proto.IReportingTokenInfo|null} [reportingTokenInfo] WebMessageInfo reportingTokenInfo + * @property {number|Long|null} [newsletterServerId] WebMessageInfo newsletterServerId */ /** @@ -84829,6 +97705,7 @@ $root.proto = (function() { this.userReceipt = []; this.reactions = []; this.pollUpdates = []; + this.eventResponses = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -85187,6 +98064,70 @@ $root.proto = (function() { */ WebMessageInfo.prototype.pinInChat = null; + /** + * WebMessageInfo premiumMessageInfo. + * @member {proto.IPremiumMessageInfo|null|undefined} premiumMessageInfo + * @memberof proto.WebMessageInfo + * @instance + */ + WebMessageInfo.prototype.premiumMessageInfo = null; + + /** + * WebMessageInfo is1PBizBotMessage. + * @member {boolean} is1PBizBotMessage + * @memberof proto.WebMessageInfo + * @instance + */ + WebMessageInfo.prototype.is1PBizBotMessage = false; + + /** + * WebMessageInfo isGroupHistoryMessage. + * @member {boolean} isGroupHistoryMessage + * @memberof proto.WebMessageInfo + * @instance + */ + WebMessageInfo.prototype.isGroupHistoryMessage = false; + + /** + * WebMessageInfo botMessageInvokerJid. + * @member {string} botMessageInvokerJid + * @memberof proto.WebMessageInfo + * @instance + */ + WebMessageInfo.prototype.botMessageInvokerJid = ""; + + /** + * WebMessageInfo commentMetadata. + * @member {proto.ICommentMetadata|null|undefined} commentMetadata + * @memberof proto.WebMessageInfo + * @instance + */ + WebMessageInfo.prototype.commentMetadata = null; + + /** + * WebMessageInfo eventResponses. + * @member {Array.} eventResponses + * @memberof proto.WebMessageInfo + * @instance + */ + WebMessageInfo.prototype.eventResponses = $util.emptyArray; + + /** + * WebMessageInfo reportingTokenInfo. + * @member {proto.IReportingTokenInfo|null|undefined} reportingTokenInfo + * @memberof proto.WebMessageInfo + * @instance + */ + WebMessageInfo.prototype.reportingTokenInfo = null; + + /** + * WebMessageInfo newsletterServerId. + * @member {number|Long} newsletterServerId + * @memberof proto.WebMessageInfo + * @instance + */ + WebMessageInfo.prototype.newsletterServerId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + /** * Creates a new WebMessageInfo instance using the specified properties. * @function create @@ -85303,6 +98244,23 @@ $root.proto = (function() { writer.uint32(/* id 52, wireType 0 =*/416).uint64(message.revokeMessageTimestamp); if (message.pinInChat != null && Object.hasOwnProperty.call(message, "pinInChat")) $root.proto.PinInChat.encode(message.pinInChat, writer.uint32(/* id 54, wireType 2 =*/434).fork()).ldelim(); + if (message.premiumMessageInfo != null && Object.hasOwnProperty.call(message, "premiumMessageInfo")) + $root.proto.PremiumMessageInfo.encode(message.premiumMessageInfo, writer.uint32(/* id 55, wireType 2 =*/442).fork()).ldelim(); + if (message.is1PBizBotMessage != null && Object.hasOwnProperty.call(message, "is1PBizBotMessage")) + writer.uint32(/* id 56, wireType 0 =*/448).bool(message.is1PBizBotMessage); + if (message.isGroupHistoryMessage != null && Object.hasOwnProperty.call(message, "isGroupHistoryMessage")) + writer.uint32(/* id 57, wireType 0 =*/456).bool(message.isGroupHistoryMessage); + if (message.botMessageInvokerJid != null && Object.hasOwnProperty.call(message, "botMessageInvokerJid")) + writer.uint32(/* id 58, wireType 2 =*/466).string(message.botMessageInvokerJid); + if (message.commentMetadata != null && Object.hasOwnProperty.call(message, "commentMetadata")) + $root.proto.CommentMetadata.encode(message.commentMetadata, writer.uint32(/* id 59, wireType 2 =*/474).fork()).ldelim(); + if (message.eventResponses != null && message.eventResponses.length) + for (var i = 0; i < message.eventResponses.length; ++i) + $root.proto.EventResponse.encode(message.eventResponses[i], writer.uint32(/* id 61, wireType 2 =*/490).fork()).ldelim(); + if (message.reportingTokenInfo != null && Object.hasOwnProperty.call(message, "reportingTokenInfo")) + $root.proto.ReportingTokenInfo.encode(message.reportingTokenInfo, writer.uint32(/* id 62, wireType 2 =*/498).fork()).ldelim(); + if (message.newsletterServerId != null && Object.hasOwnProperty.call(message, "newsletterServerId")) + writer.uint32(/* id 63, wireType 0 =*/504).uint64(message.newsletterServerId); return writer; }; @@ -85479,6 +98437,32 @@ $root.proto = (function() { case 54: message.pinInChat = $root.proto.PinInChat.decode(reader, reader.uint32()); break; + case 55: + message.premiumMessageInfo = $root.proto.PremiumMessageInfo.decode(reader, reader.uint32()); + break; + case 56: + message.is1PBizBotMessage = reader.bool(); + break; + case 57: + message.isGroupHistoryMessage = reader.bool(); + break; + case 58: + message.botMessageInvokerJid = reader.string(); + break; + case 59: + message.commentMetadata = $root.proto.CommentMetadata.decode(reader, reader.uint32()); + break; + case 61: + if (!(message.eventResponses && message.eventResponses.length)) + message.eventResponses = []; + message.eventResponses.push($root.proto.EventResponse.decode(reader, reader.uint32())); + break; + case 62: + message.reportingTokenInfo = $root.proto.ReportingTokenInfo.decode(reader, reader.uint32()); + break; + case 63: + message.newsletterServerId = reader.uint64(); + break; default: reader.skipType(tag & 7); break; @@ -85759,6 +98743,23 @@ $root.proto = (function() { case 181: case 182: case 183: + case 184: + case 185: + case 186: + case 187: + case 188: + case 189: + case 190: + case 191: + case 192: + case 193: + case 194: + case 195: + case 196: + case 197: + case 198: + case 199: + case 200: break; } if (message.clearMedia != null && message.hasOwnProperty("clearMedia")) @@ -85901,6 +98902,42 @@ $root.proto = (function() { if (error) return "pinInChat." + error; } + if (message.premiumMessageInfo != null && message.hasOwnProperty("premiumMessageInfo")) { + var error = $root.proto.PremiumMessageInfo.verify(message.premiumMessageInfo); + if (error) + return "premiumMessageInfo." + error; + } + if (message.is1PBizBotMessage != null && message.hasOwnProperty("is1PBizBotMessage")) + if (typeof message.is1PBizBotMessage !== "boolean") + return "is1PBizBotMessage: boolean expected"; + if (message.isGroupHistoryMessage != null && message.hasOwnProperty("isGroupHistoryMessage")) + if (typeof message.isGroupHistoryMessage !== "boolean") + return "isGroupHistoryMessage: boolean expected"; + if (message.botMessageInvokerJid != null && message.hasOwnProperty("botMessageInvokerJid")) + if (!$util.isString(message.botMessageInvokerJid)) + return "botMessageInvokerJid: string expected"; + if (message.commentMetadata != null && message.hasOwnProperty("commentMetadata")) { + var error = $root.proto.CommentMetadata.verify(message.commentMetadata); + if (error) + return "commentMetadata." + error; + } + if (message.eventResponses != null && message.hasOwnProperty("eventResponses")) { + if (!Array.isArray(message.eventResponses)) + return "eventResponses: array expected"; + for (var i = 0; i < message.eventResponses.length; ++i) { + var error = $root.proto.EventResponse.verify(message.eventResponses[i]); + if (error) + return "eventResponses." + error; + } + } + if (message.reportingTokenInfo != null && message.hasOwnProperty("reportingTokenInfo")) { + var error = $root.proto.ReportingTokenInfo.verify(message.reportingTokenInfo); + if (error) + return "reportingTokenInfo." + error; + } + if (message.newsletterServerId != null && message.hasOwnProperty("newsletterServerId")) + if (!$util.isInteger(message.newsletterServerId) && !(message.newsletterServerId && $util.isInteger(message.newsletterServerId.low) && $util.isInteger(message.newsletterServerId.high))) + return "newsletterServerId: integer|Long expected"; return null; }; @@ -86728,6 +99765,74 @@ $root.proto = (function() { case 183: message.messageStubType = 183; break; + case "SCHEDULED_CALL_CANCEL": + case 184: + message.messageStubType = 184; + break; + case "SUBGROUP_ADMIN_TRIGGERED_AUTO_ADD_RICH": + case 185: + message.messageStubType = 185; + break; + case "GROUP_CHANGE_RECENT_HISTORY_SHARING": + case 186: + message.messageStubType = 186; + break; + case "PAID_MESSAGE_SERVER_CAMPAIGN_ID": + case 187: + message.messageStubType = 187; + break; + case "GENERAL_CHAT_CREATE": + case 188: + message.messageStubType = 188; + break; + case "GENERAL_CHAT_ADD": + case 189: + message.messageStubType = 189; + break; + case "GENERAL_CHAT_AUTO_ADD_DISABLED": + case 190: + message.messageStubType = 190; + break; + case "SUGGESTED_SUBGROUP_ANNOUNCE": + case 191: + message.messageStubType = 191; + break; + case "BIZ_BOT_1P_MESSAGING_ENABLED": + case 192: + message.messageStubType = 192; + break; + case "CHANGE_USERNAME": + case 193: + message.messageStubType = 193; + break; + case "BIZ_COEX_PRIVACY_INIT_SELF": + case 194: + message.messageStubType = 194; + break; + case "BIZ_COEX_PRIVACY_TRANSITION_SELF": + case 195: + message.messageStubType = 195; + break; + case "SUPPORT_AI_EDUCATION": + case 196: + message.messageStubType = 196; + break; + case "BIZ_BOT_3P_MESSAGING_ENABLED": + case 197: + message.messageStubType = 197; + break; + case "REMINDER_SETUP_MESSAGE": + case 198: + message.messageStubType = 198; + break; + case "REMINDER_SENT_MESSAGE": + case 199: + message.messageStubType = 199; + break; + case "REMINDER_CANCEL_MESSAGE": + case 200: + message.messageStubType = 200; + break; } if (object.clearMedia != null) message.clearMedia = Boolean(object.clearMedia); @@ -86887,6 +99992,46 @@ $root.proto = (function() { throw TypeError(".proto.WebMessageInfo.pinInChat: object expected"); message.pinInChat = $root.proto.PinInChat.fromObject(object.pinInChat); } + if (object.premiumMessageInfo != null) { + if (typeof object.premiumMessageInfo !== "object") + throw TypeError(".proto.WebMessageInfo.premiumMessageInfo: object expected"); + message.premiumMessageInfo = $root.proto.PremiumMessageInfo.fromObject(object.premiumMessageInfo); + } + if (object.is1PBizBotMessage != null) + message.is1PBizBotMessage = Boolean(object.is1PBizBotMessage); + if (object.isGroupHistoryMessage != null) + message.isGroupHistoryMessage = Boolean(object.isGroupHistoryMessage); + if (object.botMessageInvokerJid != null) + message.botMessageInvokerJid = String(object.botMessageInvokerJid); + if (object.commentMetadata != null) { + if (typeof object.commentMetadata !== "object") + throw TypeError(".proto.WebMessageInfo.commentMetadata: object expected"); + message.commentMetadata = $root.proto.CommentMetadata.fromObject(object.commentMetadata); + } + if (object.eventResponses) { + if (!Array.isArray(object.eventResponses)) + throw TypeError(".proto.WebMessageInfo.eventResponses: array expected"); + message.eventResponses = []; + for (var i = 0; i < object.eventResponses.length; ++i) { + if (typeof object.eventResponses[i] !== "object") + throw TypeError(".proto.WebMessageInfo.eventResponses: object expected"); + message.eventResponses[i] = $root.proto.EventResponse.fromObject(object.eventResponses[i]); + } + } + if (object.reportingTokenInfo != null) { + if (typeof object.reportingTokenInfo !== "object") + throw TypeError(".proto.WebMessageInfo.reportingTokenInfo: object expected"); + message.reportingTokenInfo = $root.proto.ReportingTokenInfo.fromObject(object.reportingTokenInfo); + } + if (object.newsletterServerId != null) + if ($util.Long) + (message.newsletterServerId = $util.Long.fromValue(object.newsletterServerId)).unsigned = true; + else if (typeof object.newsletterServerId === "string") + message.newsletterServerId = parseInt(object.newsletterServerId, 10); + else if (typeof object.newsletterServerId === "number") + message.newsletterServerId = object.newsletterServerId; + else if (typeof object.newsletterServerId === "object") + message.newsletterServerId = new $util.LongBits(object.newsletterServerId.low >>> 0, object.newsletterServerId.high >>> 0).toNumber(true); return message; }; @@ -86909,6 +100054,7 @@ $root.proto = (function() { object.userReceipt = []; object.reactions = []; object.pollUpdates = []; + object.eventResponses = []; } if (options.defaults) { object.key = null; @@ -86984,6 +100130,17 @@ $root.proto = (function() { } else object.revokeMessageTimestamp = options.longs === String ? "0" : 0; object.pinInChat = null; + object.premiumMessageInfo = null; + object.is1PBizBotMessage = false; + object.isGroupHistoryMessage = false; + object.botMessageInvokerJid = ""; + object.commentMetadata = null; + object.reportingTokenInfo = null; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.newsletterServerId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.newsletterServerId = options.longs === String ? "0" : 0; } if (message.key != null && message.hasOwnProperty("key")) object.key = $root.proto.MessageKey.toObject(message.key, options); @@ -87100,6 +100257,28 @@ $root.proto = (function() { object.revokeMessageTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.revokeMessageTimestamp) : options.longs === Number ? new $util.LongBits(message.revokeMessageTimestamp.low >>> 0, message.revokeMessageTimestamp.high >>> 0).toNumber(true) : message.revokeMessageTimestamp; if (message.pinInChat != null && message.hasOwnProperty("pinInChat")) object.pinInChat = $root.proto.PinInChat.toObject(message.pinInChat, options); + if (message.premiumMessageInfo != null && message.hasOwnProperty("premiumMessageInfo")) + object.premiumMessageInfo = $root.proto.PremiumMessageInfo.toObject(message.premiumMessageInfo, options); + if (message.is1PBizBotMessage != null && message.hasOwnProperty("is1PBizBotMessage")) + object.is1PBizBotMessage = message.is1PBizBotMessage; + if (message.isGroupHistoryMessage != null && message.hasOwnProperty("isGroupHistoryMessage")) + object.isGroupHistoryMessage = message.isGroupHistoryMessage; + if (message.botMessageInvokerJid != null && message.hasOwnProperty("botMessageInvokerJid")) + object.botMessageInvokerJid = message.botMessageInvokerJid; + if (message.commentMetadata != null && message.hasOwnProperty("commentMetadata")) + object.commentMetadata = $root.proto.CommentMetadata.toObject(message.commentMetadata, options); + if (message.eventResponses && message.eventResponses.length) { + object.eventResponses = []; + for (var j = 0; j < message.eventResponses.length; ++j) + object.eventResponses[j] = $root.proto.EventResponse.toObject(message.eventResponses[j], options); + } + if (message.reportingTokenInfo != null && message.hasOwnProperty("reportingTokenInfo")) + object.reportingTokenInfo = $root.proto.ReportingTokenInfo.toObject(message.reportingTokenInfo, options); + if (message.newsletterServerId != null && message.hasOwnProperty("newsletterServerId")) + if (typeof message.newsletterServerId === "number") + object.newsletterServerId = options.longs === String ? String(message.newsletterServerId) : message.newsletterServerId; + else + object.newsletterServerId = options.longs === String ? $util.Long.prototype.toString.call(message.newsletterServerId) : options.longs === Number ? new $util.LongBits(message.newsletterServerId.low >>> 0, message.newsletterServerId.high >>> 0).toNumber(true) : message.newsletterServerId; return object; }; @@ -87342,6 +100521,23 @@ $root.proto = (function() { * @property {number} LINKED_GROUP_CALL_START=181 LINKED_GROUP_CALL_START value * @property {number} REPORT_TO_ADMIN_ENABLED_STATUS=182 REPORT_TO_ADMIN_ENABLED_STATUS value * @property {number} EMPTY_SUBGROUP_CREATE=183 EMPTY_SUBGROUP_CREATE value + * @property {number} SCHEDULED_CALL_CANCEL=184 SCHEDULED_CALL_CANCEL value + * @property {number} SUBGROUP_ADMIN_TRIGGERED_AUTO_ADD_RICH=185 SUBGROUP_ADMIN_TRIGGERED_AUTO_ADD_RICH value + * @property {number} GROUP_CHANGE_RECENT_HISTORY_SHARING=186 GROUP_CHANGE_RECENT_HISTORY_SHARING value + * @property {number} PAID_MESSAGE_SERVER_CAMPAIGN_ID=187 PAID_MESSAGE_SERVER_CAMPAIGN_ID value + * @property {number} GENERAL_CHAT_CREATE=188 GENERAL_CHAT_CREATE value + * @property {number} GENERAL_CHAT_ADD=189 GENERAL_CHAT_ADD value + * @property {number} GENERAL_CHAT_AUTO_ADD_DISABLED=190 GENERAL_CHAT_AUTO_ADD_DISABLED value + * @property {number} SUGGESTED_SUBGROUP_ANNOUNCE=191 SUGGESTED_SUBGROUP_ANNOUNCE value + * @property {number} BIZ_BOT_1P_MESSAGING_ENABLED=192 BIZ_BOT_1P_MESSAGING_ENABLED value + * @property {number} CHANGE_USERNAME=193 CHANGE_USERNAME value + * @property {number} BIZ_COEX_PRIVACY_INIT_SELF=194 BIZ_COEX_PRIVACY_INIT_SELF value + * @property {number} BIZ_COEX_PRIVACY_TRANSITION_SELF=195 BIZ_COEX_PRIVACY_TRANSITION_SELF value + * @property {number} SUPPORT_AI_EDUCATION=196 SUPPORT_AI_EDUCATION value + * @property {number} BIZ_BOT_3P_MESSAGING_ENABLED=197 BIZ_BOT_3P_MESSAGING_ENABLED value + * @property {number} REMINDER_SETUP_MESSAGE=198 REMINDER_SETUP_MESSAGE value + * @property {number} REMINDER_SENT_MESSAGE=199 REMINDER_SENT_MESSAGE value + * @property {number} REMINDER_CANCEL_MESSAGE=200 REMINDER_CANCEL_MESSAGE value */ WebMessageInfo.StubType = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -87529,6 +100725,23 @@ $root.proto = (function() { values[valuesById[181] = "LINKED_GROUP_CALL_START"] = 181; values[valuesById[182] = "REPORT_TO_ADMIN_ENABLED_STATUS"] = 182; values[valuesById[183] = "EMPTY_SUBGROUP_CREATE"] = 183; + values[valuesById[184] = "SCHEDULED_CALL_CANCEL"] = 184; + values[valuesById[185] = "SUBGROUP_ADMIN_TRIGGERED_AUTO_ADD_RICH"] = 185; + values[valuesById[186] = "GROUP_CHANGE_RECENT_HISTORY_SHARING"] = 186; + values[valuesById[187] = "PAID_MESSAGE_SERVER_CAMPAIGN_ID"] = 187; + values[valuesById[188] = "GENERAL_CHAT_CREATE"] = 188; + values[valuesById[189] = "GENERAL_CHAT_ADD"] = 189; + values[valuesById[190] = "GENERAL_CHAT_AUTO_ADD_DISABLED"] = 190; + values[valuesById[191] = "SUGGESTED_SUBGROUP_ANNOUNCE"] = 191; + values[valuesById[192] = "BIZ_BOT_1P_MESSAGING_ENABLED"] = 192; + values[valuesById[193] = "CHANGE_USERNAME"] = 193; + values[valuesById[194] = "BIZ_COEX_PRIVACY_INIT_SELF"] = 194; + values[valuesById[195] = "BIZ_COEX_PRIVACY_TRANSITION_SELF"] = 195; + values[valuesById[196] = "SUPPORT_AI_EDUCATION"] = 196; + values[valuesById[197] = "BIZ_BOT_3P_MESSAGING_ENABLED"] = 197; + values[valuesById[198] = "REMINDER_SETUP_MESSAGE"] = 198; + values[valuesById[199] = "REMINDER_SENT_MESSAGE"] = 199; + values[valuesById[200] = "REMINDER_CANCEL_MESSAGE"] = 200; return values; })(); diff --git a/src/Defaults/baileys-version.json b/src/Defaults/baileys-version.json index 3195789bc79..5afd54773ee 100644 --- a/src/Defaults/baileys-version.json +++ b/src/Defaults/baileys-version.json @@ -1,3 +1,3 @@ { - "version": [2, 2329, 9] + "version": [2, 2403, 2] }