From 552afe5c24f418087aecb3e8e5862dfe4f49b365 Mon Sep 17 00:00:00 2001 From: Ibnu syawal <46734417+ibnusyawall@users.noreply.github.com> Date: Wed, 7 Jul 2021 23:26:04 +0700 Subject: [PATCH 01/23] Added method to send list message (#574) * Added method to send list message * Added method to send list message --- src/WAConnection/6.MessagesSend.ts | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/src/WAConnection/6.MessagesSend.ts b/src/WAConnection/6.MessagesSend.ts index 3dd2fe4..6bf700f 100644 --- a/src/WAConnection/6.MessagesSend.ts +++ b/src/WAConnection/6.MessagesSend.ts @@ -35,6 +35,34 @@ export class WAConnection extends Base { await this.relayWAMessage (waMessage, { waitForAck: options.waitForAck !== false }) return waMessage } + /** + * Send a list message + * @param id the id to send to + * @param button the optional button text, title and description button + * @param rows the rows of sections list message + */ + async sendListMessage( + id: string, + button: { buttonText?: string; description?: string; title?: string }, + rows: any = [], + ) { + let messageList = WAMessageProto.Message.fromObject({ + listMessage: WAMessageProto.ListMessage.fromObject({ + buttonText: button.buttonText, + description: button.description, + listType: 1, + sections: [ + { + title: button.title, + rows: [ ...rows ] + } + ] + }) + }) + let waMessageList = await this.prepareMessageFromContent(id, messageList, {}) + await this.relayWAMessage (waMessageList, { waitForAck: true }) + return waMessageList + } /** Prepares a message for sending via sendWAMessage () */ async prepareMessage( id: string, From bc4dc9625d65cc872639e4257b509000ca06f8fb Mon Sep 17 00:00:00 2001 From: Ibnu syawal <46734417+ibnusyawall@users.noreply.github.com> Date: Fri, 9 Jul 2021 15:58:20 +0700 Subject: [PATCH 02/23] Added support for send list message (#583) --- src/WAConnection/6.MessagesSend.ts | 10 +++++++--- src/WAConnection/Constants.ts | 2 ++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/WAConnection/6.MessagesSend.ts b/src/WAConnection/6.MessagesSend.ts index 6bf700f..4f6c9db 100644 --- a/src/WAConnection/6.MessagesSend.ts +++ b/src/WAConnection/6.MessagesSend.ts @@ -10,6 +10,7 @@ import { WAContactMessage, WAContactsArrayMessage, WAGroupInviteMessage, + WAListMessage, WATextMessage, WAMessageContent, WAMetric, WAFlag, WAMessage, BaileysError, WA_MESSAGE_STATUS_TYPE, WAMessageProto, MediaConnInfo, MessageTypeProto, URL_REGEX, WAUrlInfo, WA_DEFAULT_EPHEMERAL, WAMediaUpload } from './Constants' @@ -27,7 +28,7 @@ export class WAConnection extends Base { */ async sendMessage( id: string, - message: string | WATextMessage | WALocationMessage | WAContactMessage | WAContactsArrayMessage | WAGroupInviteMessage | WAMediaUpload, + message: string | WATextMessage | WALocationMessage | WAContactMessage | WAContactsArrayMessage | WAGroupInviteMessage | WAMediaUpload | WAListMessage, type: MessageType, options: MessageOptions = {}, ) { @@ -66,7 +67,7 @@ export class WAConnection extends Base { /** Prepares a message for sending via sendWAMessage () */ async prepareMessage( id: string, - message: string | WATextMessage | WALocationMessage | WAContactMessage | WAContactsArrayMessage | WAGroupInviteMessage | WAMediaUpload, + message: string | WATextMessage | WALocationMessage | WAContactMessage | WAContactsArrayMessage | WAGroupInviteMessage | WAMediaUpload | WAListMessage, type: MessageType, options: MessageOptions = {}, ) { @@ -105,7 +106,7 @@ export class WAConnection extends Base { } } /** Prepares the message content */ - async prepareMessageContent (message: string | WATextMessage | WALocationMessage | WAContactMessage | WAContactsArrayMessage | WAGroupInviteMessage | WAMediaUpload, type: MessageType, options: MessageOptions) { + async prepareMessageContent (message: string | WATextMessage | WALocationMessage | WAContactMessage | WAContactsArrayMessage | WAGroupInviteMessage | WAMediaUpload | WAListMessage, type: MessageType, options: MessageOptions) { let m: WAMessageContent = {} switch (type) { case MessageType.text: @@ -138,6 +139,9 @@ export class WAConnection extends Base { case MessageType.groupInviteMessage: m.groupInviteMessage = WAMessageProto.GroupInviteMessage.fromObject(message as any) break + case MessageType.listMessage: + m.listMessage = WAMessageProto.ListMessage.fromObject(message as any) + break case MessageType.image: case MessageType.sticker: case MessageType.document: diff --git a/src/WAConnection/Constants.ts b/src/WAConnection/Constants.ts index df47251..1829cad 100644 --- a/src/WAConnection/Constants.ts +++ b/src/WAConnection/Constants.ts @@ -18,6 +18,7 @@ export type WAMessageContent = proto.IMessage export type WAContactMessage = proto.ContactMessage export type WAContactsArrayMessage = proto.ContactsArrayMessage export type WAGroupInviteMessage = proto.GroupInviteMessage +export type WAListMessage = proto.ListMessage export type WAMessageKey = proto.IMessageKey export type WATextMessage = proto.ExtendedTextMessage export type WAContextInfo = proto.IContextInfo @@ -331,6 +332,7 @@ export enum MessageType { contact = 'contactMessage', contactsArray = 'contactsArrayMessage', groupInviteMessage = 'groupInviteMessage', + listMessage = 'listMessage', location = 'locationMessage', liveLocation = 'liveLocationMessage', From e40b2f98a60d1a769fba987c43ce60950bed45ed Mon Sep 17 00:00:00 2001 From: Perol_Notsfsssf Date: Tue, 13 Jul 2021 14:01:57 +0800 Subject: [PATCH 03/23] fix groupSettingChange read me (#589) --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c51a2bc..3949c04 100644 --- a/README.md +++ b/README.md @@ -502,9 +502,9 @@ Of course, replace ``` xyz ``` with an actual ID. // only allow admins to send messages await conn.groupSettingChange ("abcd-xyz@g.us", GroupSettingChange.messageSend, true) // allow everyone to modify the group's settings -- like display picture etc. - await conn.groupSettingChange ("abcd-xyz@g.us", GroupSettingChange.settingChange, false) + await conn.groupSettingChange ("abcd-xyz@g.us", GroupSettingChange.settingsChange, false) // only allow admins to modify the group's settings - await conn.groupSettingChange ("abcd-xyz@g.us", GroupSettingChange.settingChange, true) + await conn.groupSettingChange ("abcd-xyz@g.us", GroupSettingChange.settingsChange, true) ``` - To leave a group ``` ts From 3ce4f6cc6ed46e48782de7f7ba8c7d6192a8723c Mon Sep 17 00:00:00 2001 From: Ryn's <39035843+RynKings@users.noreply.github.com> Date: Tue, 13 Jul 2021 20:02:27 +0800 Subject: [PATCH 04/23] Add support for buttons message (#584) * Add list message example * New protobuf extracted by @tulir It now supported sending for buttonsMessage * New protobuf by @tulir * Added support for buttons message * Sorry i am sleepy..... * Sorry my typo :3 * just tidying up --- README.md | 30 + WAMessage/WAMessage.d.ts | 11489 ++++++++- WAMessage/WAMessage.js | 35199 +++++++++++++++++++++++---- src/Binary/WAMessage.proto | 2134 +- src/WAConnection/6.MessagesSend.ts | 10 +- src/WAConnection/Constants.ts | 2 + 6 files changed, 42558 insertions(+), 6306 deletions(-) diff --git a/README.md b/README.md index 3949c04..86985a9 100644 --- a/README.md +++ b/README.md @@ -231,6 +231,36 @@ const vcard = 'BEGIN:VCARD\n' // metadata of the contact card + 'TEL;type=CELL;type=VOICE;waid=911234567890:+91 12345 67890\n' // WhatsApp ID + phone number + 'END:VCARD' const sentMsg = await conn.sendMessage(id, {displayname: "Jeff", vcard: vcard}, MessageType.contact) +// send a list message! +const rows = [ + {title: 'Row 1', description: "Hello it's description 1", rowId:"rowid1"}, + {title: 'Row 2', description: "Hello it's description 2", rowId:"rowid2"} +] + +const sections = [{title: "Section 1", rows: rows}] + +const button = { + buttonText: 'Click Me!', + description: "Hello it's list message", + sections: sections +} + +const sendMsg = await conn.sendMessage(id, button, MessageType.listMessage) + +// send a buttons message! +const buttons = [ + {buttonId: 'id1', buttonText: {displayText: 'Button 1'}, type: 1}, + {buttonId: 'id2', buttonText: {displayText: 'Button 2'}, type: 1} +] + +const buttonMessage = { + contentText: "Hi it's button message", + footerText: 'Hello World', + buttons: buttons, + headerType: 1 +} + +const sendMsg = await conn.sendMessage(id, buttonMessage, MessageType.buttonsMessage) ``` ### Media Messages diff --git a/WAMessage/WAMessage.d.ts b/WAMessage/WAMessage.d.ts index ab2ea9d..51d9d1b 100644 --- a/WAMessage/WAMessage.d.ts +++ b/WAMessage/WAMessage.d.ts @@ -2,1128 +2,7181 @@ import * as $protobuf from "protobufjs"; /** Namespace proto. */ export namespace proto { - /** Properties of a WebFeatures. */ - interface IWebFeatures { + /** Properties of an AppVersion. */ + interface IAppVersion { - /** WebFeatures labelsDisplay */ - labelsDisplay?: (proto.WebFeatures.WebFeaturesFlag|null); + /** AppVersion primary */ + primary?: (number|null); - /** WebFeatures voipIndividualOutgoing */ - voipIndividualOutgoing?: (proto.WebFeatures.WebFeaturesFlag|null); + /** AppVersion secondary */ + secondary?: (number|null); - /** WebFeatures groupsV3 */ - groupsV3?: (proto.WebFeatures.WebFeaturesFlag|null); + /** AppVersion tertiary */ + tertiary?: (number|null); - /** WebFeatures groupsV3Create */ - groupsV3Create?: (proto.WebFeatures.WebFeaturesFlag|null); + /** AppVersion quaternary */ + quaternary?: (number|null); - /** WebFeatures changeNumberV2 */ - changeNumberV2?: (proto.WebFeatures.WebFeaturesFlag|null); - - /** WebFeatures queryStatusV3Thumbnail */ - queryStatusV3Thumbnail?: (proto.WebFeatures.WebFeaturesFlag|null); - - /** WebFeatures liveLocations */ - liveLocations?: (proto.WebFeatures.WebFeaturesFlag|null); - - /** WebFeatures queryVname */ - queryVname?: (proto.WebFeatures.WebFeaturesFlag|null); - - /** WebFeatures voipIndividualIncoming */ - voipIndividualIncoming?: (proto.WebFeatures.WebFeaturesFlag|null); - - /** WebFeatures quickRepliesQuery */ - quickRepliesQuery?: (proto.WebFeatures.WebFeaturesFlag|null); - - /** WebFeatures payments */ - payments?: (proto.WebFeatures.WebFeaturesFlag|null); - - /** WebFeatures stickerPackQuery */ - stickerPackQuery?: (proto.WebFeatures.WebFeaturesFlag|null); - - /** WebFeatures liveLocationsFinal */ - liveLocationsFinal?: (proto.WebFeatures.WebFeaturesFlag|null); - - /** WebFeatures labelsEdit */ - labelsEdit?: (proto.WebFeatures.WebFeaturesFlag|null); - - /** WebFeatures mediaUpload */ - mediaUpload?: (proto.WebFeatures.WebFeaturesFlag|null); - - /** WebFeatures mediaUploadRichQuickReplies */ - mediaUploadRichQuickReplies?: (proto.WebFeatures.WebFeaturesFlag|null); - - /** WebFeatures vnameV2 */ - vnameV2?: (proto.WebFeatures.WebFeaturesFlag|null); - - /** WebFeatures videoPlaybackUrl */ - videoPlaybackUrl?: (proto.WebFeatures.WebFeaturesFlag|null); - - /** WebFeatures statusRanking */ - statusRanking?: (proto.WebFeatures.WebFeaturesFlag|null); - - /** WebFeatures voipIndividualVideo */ - voipIndividualVideo?: (proto.WebFeatures.WebFeaturesFlag|null); - - /** WebFeatures thirdPartyStickers */ - thirdPartyStickers?: (proto.WebFeatures.WebFeaturesFlag|null); - - /** WebFeatures frequentlyForwardedSetting */ - frequentlyForwardedSetting?: (proto.WebFeatures.WebFeaturesFlag|null); - - /** WebFeatures groupsV4JoinPermission */ - groupsV4JoinPermission?: (proto.WebFeatures.WebFeaturesFlag|null); - - /** WebFeatures recentStickers */ - recentStickers?: (proto.WebFeatures.WebFeaturesFlag|null); - - /** WebFeatures catalog */ - catalog?: (proto.WebFeatures.WebFeaturesFlag|null); - - /** WebFeatures starredStickers */ - starredStickers?: (proto.WebFeatures.WebFeaturesFlag|null); - - /** WebFeatures voipGroupCall */ - voipGroupCall?: (proto.WebFeatures.WebFeaturesFlag|null); - - /** WebFeatures templateMessage */ - templateMessage?: (proto.WebFeatures.WebFeaturesFlag|null); - - /** WebFeatures templateMessageInteractivity */ - templateMessageInteractivity?: (proto.WebFeatures.WebFeaturesFlag|null); - - /** WebFeatures ephemeralMessages */ - ephemeralMessages?: (proto.WebFeatures.WebFeaturesFlag|null); - - /** WebFeatures e2ENotificationSync */ - e2ENotificationSync?: (proto.WebFeatures.WebFeaturesFlag|null); - - /** WebFeatures recentStickersV2 */ - recentStickersV2?: (proto.WebFeatures.WebFeaturesFlag|null); - - /** WebFeatures syncdRelease1 */ - syncdRelease1?: (proto.WebFeatures.WebFeaturesFlag|null); - - /** WebFeatures recentStickersV3 */ - recentStickersV3?: (proto.WebFeatures.WebFeaturesFlag|null); - - /** WebFeatures userNotice */ - userNotice?: (proto.WebFeatures.WebFeaturesFlag|null); - - /** WebFeatures syncdRelease11 */ - syncdRelease11?: (proto.WebFeatures.WebFeaturesFlag|null); - - /** WebFeatures support */ - support?: (proto.WebFeatures.WebFeaturesFlag|null); + /** AppVersion quinary */ + quinary?: (number|null); } - /** Represents a WebFeatures. */ - class WebFeatures implements IWebFeatures { + /** Represents an AppVersion. */ + class AppVersion implements IAppVersion { /** - * Constructs a new WebFeatures. + * Constructs a new AppVersion. * @param [properties] Properties to set */ - constructor(properties?: proto.IWebFeatures); + constructor(properties?: proto.IAppVersion); - /** WebFeatures labelsDisplay. */ - public labelsDisplay: proto.WebFeatures.WebFeaturesFlag; + /** AppVersion primary. */ + public primary: number; - /** WebFeatures voipIndividualOutgoing. */ - public voipIndividualOutgoing: proto.WebFeatures.WebFeaturesFlag; + /** AppVersion secondary. */ + public secondary: number; - /** WebFeatures groupsV3. */ - public groupsV3: proto.WebFeatures.WebFeaturesFlag; + /** AppVersion tertiary. */ + public tertiary: number; - /** WebFeatures groupsV3Create. */ - public groupsV3Create: proto.WebFeatures.WebFeaturesFlag; + /** AppVersion quaternary. */ + public quaternary: number; - /** WebFeatures changeNumberV2. */ - public changeNumberV2: proto.WebFeatures.WebFeaturesFlag; - - /** WebFeatures queryStatusV3Thumbnail. */ - public queryStatusV3Thumbnail: proto.WebFeatures.WebFeaturesFlag; - - /** WebFeatures liveLocations. */ - public liveLocations: proto.WebFeatures.WebFeaturesFlag; - - /** WebFeatures queryVname. */ - public queryVname: proto.WebFeatures.WebFeaturesFlag; - - /** WebFeatures voipIndividualIncoming. */ - public voipIndividualIncoming: proto.WebFeatures.WebFeaturesFlag; - - /** WebFeatures quickRepliesQuery. */ - public quickRepliesQuery: proto.WebFeatures.WebFeaturesFlag; - - /** WebFeatures payments. */ - public payments: proto.WebFeatures.WebFeaturesFlag; - - /** WebFeatures stickerPackQuery. */ - public stickerPackQuery: proto.WebFeatures.WebFeaturesFlag; - - /** WebFeatures liveLocationsFinal. */ - public liveLocationsFinal: proto.WebFeatures.WebFeaturesFlag; - - /** WebFeatures labelsEdit. */ - public labelsEdit: proto.WebFeatures.WebFeaturesFlag; - - /** WebFeatures mediaUpload. */ - public mediaUpload: proto.WebFeatures.WebFeaturesFlag; - - /** WebFeatures mediaUploadRichQuickReplies. */ - public mediaUploadRichQuickReplies: proto.WebFeatures.WebFeaturesFlag; - - /** WebFeatures vnameV2. */ - public vnameV2: proto.WebFeatures.WebFeaturesFlag; - - /** WebFeatures videoPlaybackUrl. */ - public videoPlaybackUrl: proto.WebFeatures.WebFeaturesFlag; - - /** WebFeatures statusRanking. */ - public statusRanking: proto.WebFeatures.WebFeaturesFlag; - - /** WebFeatures voipIndividualVideo. */ - public voipIndividualVideo: proto.WebFeatures.WebFeaturesFlag; - - /** WebFeatures thirdPartyStickers. */ - public thirdPartyStickers: proto.WebFeatures.WebFeaturesFlag; - - /** WebFeatures frequentlyForwardedSetting. */ - public frequentlyForwardedSetting: proto.WebFeatures.WebFeaturesFlag; - - /** WebFeatures groupsV4JoinPermission. */ - public groupsV4JoinPermission: proto.WebFeatures.WebFeaturesFlag; - - /** WebFeatures recentStickers. */ - public recentStickers: proto.WebFeatures.WebFeaturesFlag; - - /** WebFeatures catalog. */ - public catalog: proto.WebFeatures.WebFeaturesFlag; - - /** WebFeatures starredStickers. */ - public starredStickers: proto.WebFeatures.WebFeaturesFlag; - - /** WebFeatures voipGroupCall. */ - public voipGroupCall: proto.WebFeatures.WebFeaturesFlag; - - /** WebFeatures templateMessage. */ - public templateMessage: proto.WebFeatures.WebFeaturesFlag; - - /** WebFeatures templateMessageInteractivity. */ - public templateMessageInteractivity: proto.WebFeatures.WebFeaturesFlag; - - /** WebFeatures ephemeralMessages. */ - public ephemeralMessages: proto.WebFeatures.WebFeaturesFlag; - - /** WebFeatures e2ENotificationSync. */ - public e2ENotificationSync: proto.WebFeatures.WebFeaturesFlag; - - /** WebFeatures recentStickersV2. */ - public recentStickersV2: proto.WebFeatures.WebFeaturesFlag; - - /** WebFeatures syncdRelease1. */ - public syncdRelease1: proto.WebFeatures.WebFeaturesFlag; - - /** WebFeatures recentStickersV3. */ - public recentStickersV3: proto.WebFeatures.WebFeaturesFlag; - - /** WebFeatures userNotice. */ - public userNotice: proto.WebFeatures.WebFeaturesFlag; - - /** WebFeatures syncdRelease11. */ - public syncdRelease11: proto.WebFeatures.WebFeaturesFlag; - - /** WebFeatures support. */ - public support: proto.WebFeatures.WebFeaturesFlag; + /** AppVersion quinary. */ + public quinary: number; /** - * Creates a new WebFeatures instance using the specified properties. + * Creates a new AppVersion instance using the specified properties. * @param [properties] Properties to set - * @returns WebFeatures instance + * @returns AppVersion instance */ - public static create(properties?: proto.IWebFeatures): proto.WebFeatures; + public static create(properties?: proto.IAppVersion): proto.AppVersion; /** - * Encodes the specified WebFeatures message. Does not implicitly {@link proto.WebFeatures.verify|verify} messages. - * @param message WebFeatures message or plain object to encode + * Encodes the specified AppVersion message. Does not implicitly {@link proto.AppVersion.verify|verify} messages. + * @param message AppVersion message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: proto.IWebFeatures, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: proto.IAppVersion, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified WebFeatures message, length delimited. Does not implicitly {@link proto.WebFeatures.verify|verify} messages. - * @param message WebFeatures message or plain object to encode + * Encodes the specified AppVersion message, length delimited. Does not implicitly {@link proto.AppVersion.verify|verify} messages. + * @param message AppVersion message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: proto.IWebFeatures, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: proto.IAppVersion, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a WebFeatures message from the specified reader or buffer. + * Decodes an AppVersion message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns WebFeatures + * @returns AppVersion * @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.WebFeatures; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.AppVersion; /** - * Decodes a WebFeatures message from the specified reader or buffer, length delimited. + * Decodes an AppVersion message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns WebFeatures + * @returns AppVersion * @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.WebFeatures; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.AppVersion; /** - * Verifies a WebFeatures message. + * Verifies an AppVersion 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 WebFeatures 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. * @param object Plain object - * @returns WebFeatures + * @returns AppVersion */ - public static fromObject(object: { [k: string]: any }): proto.WebFeatures; + public static fromObject(object: { [k: string]: any }): proto.AppVersion; /** - * Creates a plain object from a WebFeatures message. Also converts values to other types if specified. - * @param message WebFeatures + * Creates a plain object from an AppVersion message. Also converts values to other types if specified. + * @param message AppVersion * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: proto.WebFeatures, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: proto.AppVersion, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this WebFeatures to JSON. + * Converts this AppVersion to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace WebFeatures { + /** Properties of a UserAgent. */ + interface IUserAgent { - /** WebFeaturesFlag enum. */ - enum WebFeaturesFlag { - NOT_STARTED = 0, - FORCE_UPGRADE = 1, - DEVELOPMENT = 2, - PRODUCTION = 3 - } + /** UserAgent platform */ + platform?: (proto.UserAgent.UserAgentPlatform|null); + + /** UserAgent appVersion */ + appVersion?: (proto.IAppVersion|null); + + /** UserAgent mcc */ + mcc?: (string|null); + + /** UserAgent mnc */ + mnc?: (string|null); + + /** UserAgent osVersion */ + osVersion?: (string|null); + + /** UserAgent manufacturer */ + manufacturer?: (string|null); + + /** UserAgent device */ + device?: (string|null); + + /** UserAgent osBuildNumber */ + osBuildNumber?: (string|null); + + /** UserAgent phoneId */ + phoneId?: (string|null); + + /** UserAgent releaseChannel */ + releaseChannel?: (proto.UserAgent.UserAgentReleaseChannel|null); + + /** UserAgent localeLanguageIso6391 */ + localeLanguageIso6391?: (string|null); + + /** UserAgent localeCountryIso31661Alpha2 */ + localeCountryIso31661Alpha2?: (string|null); + + /** UserAgent deviceBoard */ + deviceBoard?: (string|null); } - /** Properties of a NotificationMessageInfo. */ - interface INotificationMessageInfo { - - /** NotificationMessageInfo key */ - key?: (proto.IMessageKey|null); - - /** NotificationMessageInfo message */ - message?: (proto.IMessage|null); - - /** NotificationMessageInfo messageTimestamp */ - messageTimestamp?: (number|Long|null); - - /** NotificationMessageInfo participant */ - participant?: (string|null); - } - - /** Represents a NotificationMessageInfo. */ - class NotificationMessageInfo implements INotificationMessageInfo { + /** Represents a UserAgent. */ + class UserAgent implements IUserAgent { /** - * Constructs a new NotificationMessageInfo. + * Constructs a new UserAgent. * @param [properties] Properties to set */ - constructor(properties?: proto.INotificationMessageInfo); + constructor(properties?: proto.IUserAgent); - /** NotificationMessageInfo key. */ - public key?: (proto.IMessageKey|null); + /** UserAgent platform. */ + public platform: proto.UserAgent.UserAgentPlatform; - /** NotificationMessageInfo message. */ - public message?: (proto.IMessage|null); + /** UserAgent appVersion. */ + public appVersion?: (proto.IAppVersion|null); - /** NotificationMessageInfo messageTimestamp. */ - public messageTimestamp: (number|Long); + /** UserAgent mcc. */ + public mcc: string; - /** NotificationMessageInfo participant. */ - public participant: string; + /** UserAgent mnc. */ + public mnc: string; + + /** UserAgent osVersion. */ + public osVersion: string; + + /** UserAgent manufacturer. */ + public manufacturer: string; + + /** UserAgent device. */ + public device: string; + + /** UserAgent osBuildNumber. */ + public osBuildNumber: string; + + /** UserAgent phoneId. */ + public phoneId: string; + + /** UserAgent releaseChannel. */ + public releaseChannel: proto.UserAgent.UserAgentReleaseChannel; + + /** UserAgent localeLanguageIso6391. */ + public localeLanguageIso6391: string; + + /** UserAgent localeCountryIso31661Alpha2. */ + public localeCountryIso31661Alpha2: string; + + /** UserAgent deviceBoard. */ + public deviceBoard: string; /** - * Creates a new NotificationMessageInfo instance using the specified properties. + * Creates a new UserAgent instance using the specified properties. * @param [properties] Properties to set - * @returns NotificationMessageInfo instance + * @returns UserAgent instance */ - public static create(properties?: proto.INotificationMessageInfo): proto.NotificationMessageInfo; + public static create(properties?: proto.IUserAgent): proto.UserAgent; /** - * Encodes the specified NotificationMessageInfo message. Does not implicitly {@link proto.NotificationMessageInfo.verify|verify} messages. - * @param message NotificationMessageInfo message or plain object to encode + * Encodes the specified UserAgent message. Does not implicitly {@link proto.UserAgent.verify|verify} messages. + * @param message UserAgent message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: proto.INotificationMessageInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: proto.IUserAgent, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified NotificationMessageInfo message, length delimited. Does not implicitly {@link proto.NotificationMessageInfo.verify|verify} messages. - * @param message NotificationMessageInfo message or plain object to encode + * Encodes the specified UserAgent message, length delimited. Does not implicitly {@link proto.UserAgent.verify|verify} messages. + * @param message UserAgent message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: proto.INotificationMessageInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: proto.IUserAgent, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a NotificationMessageInfo message from the specified reader or buffer. + * Decodes a UserAgent message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns NotificationMessageInfo + * @returns UserAgent * @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.NotificationMessageInfo; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.UserAgent; /** - * Decodes a NotificationMessageInfo message from the specified reader or buffer, length delimited. + * Decodes a UserAgent message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns NotificationMessageInfo + * @returns UserAgent * @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.NotificationMessageInfo; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.UserAgent; /** - * Verifies a NotificationMessageInfo message. + * Verifies a UserAgent 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 NotificationMessageInfo message from a plain object. Also converts values to their respective internal types. + * Creates a UserAgent message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns NotificationMessageInfo + * @returns UserAgent */ - public static fromObject(object: { [k: string]: any }): proto.NotificationMessageInfo; + public static fromObject(object: { [k: string]: any }): proto.UserAgent; /** - * Creates a plain object from a NotificationMessageInfo message. Also converts values to other types if specified. - * @param message NotificationMessageInfo + * Creates a plain object from a UserAgent message. Also converts values to other types if specified. + * @param message UserAgent * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: proto.NotificationMessageInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: proto.UserAgent, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this NotificationMessageInfo to JSON. + * Converts this UserAgent to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a WebNotificationsInfo. */ - interface IWebNotificationsInfo { + namespace UserAgent { - /** WebNotificationsInfo timestamp */ - timestamp?: (number|Long|null); + /** UserAgentPlatform enum. */ + enum UserAgentPlatform { + ANDROID = 0, + IOS = 1, + WINDOWS_PHONE = 2, + BLACKBERRY = 3, + BLACKBERRYX = 4, + S40 = 5, + S60 = 6, + PYTHON_CLIENT = 7, + TIZEN = 8, + ENTERPRISE = 9, + SMB_ANDROID = 10, + KAIOS = 11, + SMB_IOS = 12, + WINDOWS = 13, + WEB = 14, + PORTAL = 15, + GREEN_ANDROID = 16, + GREEN_IPHONE = 17, + BLUE_ANDROID = 18, + BLUE_IPHONE = 19, + FBLITE_ANDROID = 20, + MLITE_ANDROID = 21, + IGLITE_ANDROID = 22, + PAGE = 23, + MACOS = 24, + VR = 25 + } - /** WebNotificationsInfo unreadChats */ - unreadChats?: (number|null); - - /** WebNotificationsInfo notifyMessageCount */ - notifyMessageCount?: (number|null); - - /** WebNotificationsInfo notifyMessages */ - notifyMessages?: (proto.IWebMessageInfo[]|null); + /** UserAgentReleaseChannel enum. */ + enum UserAgentReleaseChannel { + RELEASE = 0, + BETA = 1, + ALPHA = 2, + DEBUG = 3 + } } - /** Represents a WebNotificationsInfo. */ - class WebNotificationsInfo implements IWebNotificationsInfo { + /** Properties of a WebdPayload. */ + interface IWebdPayload { + + /** WebdPayload usesParticipantInKey */ + usesParticipantInKey?: (boolean|null); + + /** WebdPayload supportsStarredMessages */ + supportsStarredMessages?: (boolean|null); + + /** WebdPayload supportsDocumentMessages */ + supportsDocumentMessages?: (boolean|null); + + /** WebdPayload supportsUrlMessages */ + supportsUrlMessages?: (boolean|null); + + /** WebdPayload supportsMediaRetry */ + supportsMediaRetry?: (boolean|null); + + /** WebdPayload supportsE2EImage */ + supportsE2EImage?: (boolean|null); + + /** WebdPayload supportsE2EVideo */ + supportsE2EVideo?: (boolean|null); + + /** WebdPayload supportsE2EAudio */ + supportsE2EAudio?: (boolean|null); + + /** WebdPayload supportsE2EDocument */ + supportsE2EDocument?: (boolean|null); + + /** WebdPayload documentTypes */ + documentTypes?: (string|null); + + /** WebdPayload features */ + features?: (Uint8Array|null); + } + + /** Represents a WebdPayload. */ + class WebdPayload implements IWebdPayload { /** - * Constructs a new WebNotificationsInfo. + * Constructs a new WebdPayload. * @param [properties] Properties to set */ - constructor(properties?: proto.IWebNotificationsInfo); + constructor(properties?: proto.IWebdPayload); - /** WebNotificationsInfo timestamp. */ - public timestamp: (number|Long); + /** WebdPayload usesParticipantInKey. */ + public usesParticipantInKey: boolean; - /** WebNotificationsInfo unreadChats. */ - public unreadChats: number; + /** WebdPayload supportsStarredMessages. */ + public supportsStarredMessages: boolean; - /** WebNotificationsInfo notifyMessageCount. */ - public notifyMessageCount: number; + /** WebdPayload supportsDocumentMessages. */ + public supportsDocumentMessages: boolean; - /** WebNotificationsInfo notifyMessages. */ - public notifyMessages: proto.IWebMessageInfo[]; + /** WebdPayload supportsUrlMessages. */ + public supportsUrlMessages: boolean; + + /** WebdPayload supportsMediaRetry. */ + public supportsMediaRetry: boolean; + + /** WebdPayload supportsE2EImage. */ + public supportsE2EImage: boolean; + + /** WebdPayload supportsE2EVideo. */ + public supportsE2EVideo: boolean; + + /** WebdPayload supportsE2EAudio. */ + public supportsE2EAudio: boolean; + + /** WebdPayload supportsE2EDocument. */ + public supportsE2EDocument: boolean; + + /** WebdPayload documentTypes. */ + public documentTypes: string; + + /** WebdPayload features. */ + public features: Uint8Array; /** - * Creates a new WebNotificationsInfo instance using the specified properties. + * Creates a new WebdPayload instance using the specified properties. * @param [properties] Properties to set - * @returns WebNotificationsInfo instance + * @returns WebdPayload instance */ - public static create(properties?: proto.IWebNotificationsInfo): proto.WebNotificationsInfo; + public static create(properties?: proto.IWebdPayload): proto.WebdPayload; /** - * Encodes the specified WebNotificationsInfo message. Does not implicitly {@link proto.WebNotificationsInfo.verify|verify} messages. - * @param message WebNotificationsInfo message or plain object to encode + * Encodes the specified WebdPayload message. Does not implicitly {@link proto.WebdPayload.verify|verify} messages. + * @param message WebdPayload message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: proto.IWebNotificationsInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: proto.IWebdPayload, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified WebNotificationsInfo message, length delimited. Does not implicitly {@link proto.WebNotificationsInfo.verify|verify} messages. - * @param message WebNotificationsInfo message or plain object to encode + * Encodes the specified WebdPayload message, length delimited. Does not implicitly {@link proto.WebdPayload.verify|verify} messages. + * @param message WebdPayload message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: proto.IWebNotificationsInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: proto.IWebdPayload, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a WebNotificationsInfo message from the specified reader or buffer. + * Decodes a WebdPayload message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns WebNotificationsInfo + * @returns WebdPayload * @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.WebNotificationsInfo; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.WebdPayload; /** - * Decodes a WebNotificationsInfo message from the specified reader or buffer, length delimited. + * Decodes a WebdPayload message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns WebNotificationsInfo + * @returns WebdPayload * @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.WebNotificationsInfo; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.WebdPayload; /** - * Verifies a WebNotificationsInfo message. + * Verifies a WebdPayload 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 WebNotificationsInfo message from a plain object. Also converts values to their respective internal types. + * Creates a WebdPayload message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns WebNotificationsInfo + * @returns WebdPayload */ - public static fromObject(object: { [k: string]: any }): proto.WebNotificationsInfo; + public static fromObject(object: { [k: string]: any }): proto.WebdPayload; /** - * Creates a plain object from a WebNotificationsInfo message. Also converts values to other types if specified. - * @param message WebNotificationsInfo + * Creates a plain object from a WebdPayload message. Also converts values to other types if specified. + * @param message WebdPayload * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: proto.WebNotificationsInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: proto.WebdPayload, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this WebNotificationsInfo to JSON. + * Converts this WebdPayload to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a PaymentInfo. */ - interface IPaymentInfo { + /** Properties of a WebInfo. */ + interface IWebInfo { - /** PaymentInfo currencyDeprecated */ - currencyDeprecated?: (proto.PaymentInfo.PaymentInfoCurrency|null); + /** WebInfo refToken */ + refToken?: (string|null); - /** PaymentInfo amount1000 */ - amount1000?: (number|Long|null); + /** WebInfo version */ + version?: (string|null); - /** PaymentInfo receiverJid */ - receiverJid?: (string|null); + /** WebInfo webdPayload */ + webdPayload?: (proto.IWebdPayload|null); - /** PaymentInfo status */ - status?: (proto.PaymentInfo.PaymentInfoStatus|null); - - /** PaymentInfo transactionTimestamp */ - transactionTimestamp?: (number|Long|null); - - /** PaymentInfo requestMessageKey */ - requestMessageKey?: (proto.IMessageKey|null); - - /** PaymentInfo expiryTimestamp */ - expiryTimestamp?: (number|Long|null); - - /** PaymentInfo futureproofed */ - futureproofed?: (boolean|null); - - /** PaymentInfo currency */ - currency?: (string|null); - - /** PaymentInfo txnStatus */ - txnStatus?: (proto.PaymentInfo.PaymentInfoTxnStatus|null); + /** WebInfo webSubPlatform */ + webSubPlatform?: (proto.WebInfo.WebInfoWebSubPlatform|null); } - /** Represents a PaymentInfo. */ - class PaymentInfo implements IPaymentInfo { + /** Represents a WebInfo. */ + class WebInfo implements IWebInfo { /** - * Constructs a new PaymentInfo. + * Constructs a new WebInfo. * @param [properties] Properties to set */ - constructor(properties?: proto.IPaymentInfo); + constructor(properties?: proto.IWebInfo); - /** PaymentInfo currencyDeprecated. */ - public currencyDeprecated: proto.PaymentInfo.PaymentInfoCurrency; + /** WebInfo refToken. */ + public refToken: string; - /** PaymentInfo amount1000. */ - public amount1000: (number|Long); + /** WebInfo version. */ + public version: string; - /** PaymentInfo receiverJid. */ - public receiverJid: string; + /** WebInfo webdPayload. */ + public webdPayload?: (proto.IWebdPayload|null); - /** PaymentInfo status. */ - public status: proto.PaymentInfo.PaymentInfoStatus; - - /** PaymentInfo transactionTimestamp. */ - public transactionTimestamp: (number|Long); - - /** PaymentInfo requestMessageKey. */ - public requestMessageKey?: (proto.IMessageKey|null); - - /** PaymentInfo expiryTimestamp. */ - public expiryTimestamp: (number|Long); - - /** PaymentInfo futureproofed. */ - public futureproofed: boolean; - - /** PaymentInfo currency. */ - public currency: string; - - /** PaymentInfo txnStatus. */ - public txnStatus: proto.PaymentInfo.PaymentInfoTxnStatus; + /** WebInfo webSubPlatform. */ + public webSubPlatform: proto.WebInfo.WebInfoWebSubPlatform; /** - * Creates a new PaymentInfo instance using the specified properties. + * Creates a new WebInfo instance using the specified properties. * @param [properties] Properties to set - * @returns PaymentInfo instance + * @returns WebInfo instance */ - public static create(properties?: proto.IPaymentInfo): proto.PaymentInfo; + public static create(properties?: proto.IWebInfo): proto.WebInfo; /** - * Encodes the specified PaymentInfo message. Does not implicitly {@link proto.PaymentInfo.verify|verify} messages. - * @param message PaymentInfo message or plain object to encode + * Encodes the specified WebInfo message. Does not implicitly {@link proto.WebInfo.verify|verify} messages. + * @param message WebInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: proto.IPaymentInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: proto.IWebInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified PaymentInfo message, length delimited. Does not implicitly {@link proto.PaymentInfo.verify|verify} messages. - * @param message PaymentInfo message or plain object to encode + * Encodes the specified WebInfo message, length delimited. Does not implicitly {@link proto.WebInfo.verify|verify} messages. + * @param message WebInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: proto.IPaymentInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: proto.IWebInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PaymentInfo message from the specified reader or buffer. + * Decodes a WebInfo message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns PaymentInfo + * @returns WebInfo * @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.PaymentInfo; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.WebInfo; /** - * Decodes a PaymentInfo message from the specified reader or buffer, length delimited. + * Decodes a WebInfo message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PaymentInfo + * @returns WebInfo * @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.PaymentInfo; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.WebInfo; /** - * Verifies a PaymentInfo message. + * Verifies a WebInfo 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 PaymentInfo message from a plain object. Also converts values to their respective internal types. + * Creates a WebInfo message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PaymentInfo + * @returns WebInfo */ - public static fromObject(object: { [k: string]: any }): proto.PaymentInfo; + public static fromObject(object: { [k: string]: any }): proto.WebInfo; /** - * Creates a plain object from a PaymentInfo message. Also converts values to other types if specified. - * @param message PaymentInfo + * Creates a plain object from a WebInfo message. Also converts values to other types if specified. + * @param message WebInfo * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: proto.PaymentInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: proto.WebInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PaymentInfo to JSON. + * Converts this WebInfo to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace PaymentInfo { + namespace WebInfo { - /** PaymentInfoCurrency enum. */ - enum PaymentInfoCurrency { - UNKNOWN_CURRENCY = 0, - INR = 1 - } - - /** PaymentInfoStatus enum. */ - enum PaymentInfoStatus { - UNKNOWN_STATUS = 0, - PROCESSING = 1, - SENT = 2, - NEED_TO_ACCEPT = 3, - COMPLETE = 4, - COULD_NOT_COMPLETE = 5, - REFUNDED = 6, - EXPIRED = 7, - REJECTED = 8, - CANCELLED = 9, - WAITING_FOR_PAYER = 10, - WAITING = 11 - } - - /** PaymentInfoTxnStatus enum. */ - enum PaymentInfoTxnStatus { - UNKNOWN = 0, - PENDING_SETUP = 1, - PENDING_RECEIVER_SETUP = 2, - INIT = 3, - SUCCESS = 4, - COMPLETED = 5, - FAILED = 6, - FAILED_RISK = 7, - FAILED_PROCESSING = 8, - FAILED_RECEIVER_PROCESSING = 9, - FAILED_DA = 10, - FAILED_DA_FINAL = 11, - REFUNDED_TXN = 12, - REFUND_FAILED = 13, - REFUND_FAILED_PROCESSING = 14, - REFUND_FAILED_DA = 15, - EXPIRED_TXN = 16, - AUTH_CANCELED = 17, - AUTH_CANCEL_FAILED_PROCESSING = 18, - AUTH_CANCEL_FAILED = 19, - COLLECT_INIT = 20, - COLLECT_SUCCESS = 21, - COLLECT_FAILED = 22, - COLLECT_FAILED_RISK = 23, - COLLECT_REJECTED = 24, - COLLECT_EXPIRED = 25, - COLLECT_CANCELED = 26, - COLLECT_CANCELLING = 27 + /** WebInfoWebSubPlatform enum. */ + enum WebInfoWebSubPlatform { + WEB_BROWSER = 0, + APP_STORE = 1, + WIN_STORE = 2, + DARWIN = 3, + WIN32 = 4 } } - /** Properties of a WebMessageInfo. */ - interface IWebMessageInfo { + /** Properties of a DNSSource. */ + interface IDNSSource { - /** WebMessageInfo key */ - key: proto.IMessageKey; + /** DNSSource dnsMethod */ + dnsMethod?: (proto.DNSSource.DNSSourceDNSResolutionMethod|null); - /** WebMessageInfo message */ - message?: (proto.IMessage|null); + /** DNSSource appCached */ + appCached?: (boolean|null); + } - /** WebMessageInfo messageTimestamp */ - messageTimestamp?: (number|Long|null); + /** Represents a DNSSource. */ + class DNSSource implements IDNSSource { - /** WebMessageInfo status */ - status?: (proto.WebMessageInfo.WebMessageInfoStatus|null); + /** + * Constructs a new DNSSource. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IDNSSource); - /** WebMessageInfo participant */ - participant?: (string|null); + /** DNSSource dnsMethod. */ + public dnsMethod: proto.DNSSource.DNSSourceDNSResolutionMethod; - /** WebMessageInfo ignore */ - ignore?: (boolean|null); + /** DNSSource appCached. */ + public appCached: boolean; - /** WebMessageInfo starred */ - starred?: (boolean|null); + /** + * Creates a new DNSSource instance using the specified properties. + * @param [properties] Properties to set + * @returns DNSSource instance + */ + public static create(properties?: proto.IDNSSource): proto.DNSSource; - /** WebMessageInfo broadcast */ - broadcast?: (boolean|null); + /** + * Encodes the specified DNSSource message. Does not implicitly {@link proto.DNSSource.verify|verify} messages. + * @param message DNSSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IDNSSource, writer?: $protobuf.Writer): $protobuf.Writer; - /** WebMessageInfo pushName */ + /** + * Encodes the specified DNSSource message, length delimited. Does not implicitly {@link proto.DNSSource.verify|verify} messages. + * @param message DNSSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IDNSSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DNSSource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DNSSource + * @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.DNSSource; + + /** + * Decodes a DNSSource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DNSSource + * @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.DNSSource; + + /** + * Verifies a DNSSource 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 DNSSource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DNSSource + */ + public static fromObject(object: { [k: string]: any }): proto.DNSSource; + + /** + * Creates a plain object from a DNSSource message. Also converts values to other types if specified. + * @param message DNSSource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.DNSSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DNSSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace DNSSource { + + /** DNSSourceDNSResolutionMethod enum. */ + enum DNSSourceDNSResolutionMethod { + SYSTEM = 0, + GOOGLE = 1, + HARDCODED = 2, + OVERRIDE = 3, + FALLBACK = 4 + } + } + + /** Properties of a CompanionRegData. */ + interface ICompanionRegData { + + /** CompanionRegData eRegid */ + eRegid?: (Uint8Array|null); + + /** CompanionRegData eKeytype */ + eKeytype?: (Uint8Array|null); + + /** CompanionRegData eIdent */ + eIdent?: (Uint8Array|null); + + /** CompanionRegData eSkeyId */ + eSkeyId?: (Uint8Array|null); + + /** CompanionRegData eSkeyVal */ + eSkeyVal?: (Uint8Array|null); + + /** CompanionRegData eSkeySig */ + eSkeySig?: (Uint8Array|null); + + /** CompanionRegData buildHash */ + buildHash?: (Uint8Array|null); + + /** CompanionRegData companionProps */ + companionProps?: (Uint8Array|null); + } + + /** Represents a CompanionRegData. */ + class CompanionRegData implements ICompanionRegData { + + /** + * Constructs a new CompanionRegData. + * @param [properties] Properties to set + */ + constructor(properties?: proto.ICompanionRegData); + + /** CompanionRegData eRegid. */ + public eRegid: Uint8Array; + + /** CompanionRegData eKeytype. */ + public eKeytype: Uint8Array; + + /** CompanionRegData eIdent. */ + public eIdent: Uint8Array; + + /** CompanionRegData eSkeyId. */ + public eSkeyId: Uint8Array; + + /** CompanionRegData eSkeyVal. */ + public eSkeyVal: Uint8Array; + + /** CompanionRegData eSkeySig. */ + public eSkeySig: Uint8Array; + + /** CompanionRegData buildHash. */ + public buildHash: Uint8Array; + + /** CompanionRegData companionProps. */ + public companionProps: Uint8Array; + + /** + * Creates a new CompanionRegData instance using the specified properties. + * @param [properties] Properties to set + * @returns CompanionRegData instance + */ + public static create(properties?: proto.ICompanionRegData): proto.CompanionRegData; + + /** + * Encodes the specified CompanionRegData message. Does not implicitly {@link proto.CompanionRegData.verify|verify} messages. + * @param message CompanionRegData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.ICompanionRegData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CompanionRegData message, length delimited. Does not implicitly {@link proto.CompanionRegData.verify|verify} messages. + * @param message CompanionRegData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.ICompanionRegData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CompanionRegData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CompanionRegData + * @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.CompanionRegData; + + /** + * Decodes a CompanionRegData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CompanionRegData + * @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.CompanionRegData; + + /** + * Verifies a CompanionRegData 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 CompanionRegData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CompanionRegData + */ + public static fromObject(object: { [k: string]: any }): proto.CompanionRegData; + + /** + * Creates a plain object from a CompanionRegData message. Also converts values to other types if specified. + * @param message CompanionRegData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.CompanionRegData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CompanionRegData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ClientPayload. */ + interface IClientPayload { + + /** ClientPayload username */ + username?: (number|Long|null); + + /** ClientPayload passive */ + passive?: (boolean|null); + + /** ClientPayload clientFeatures */ + clientFeatures?: (proto.ClientPayload.ClientPayloadClientFeature[]|null); + + /** ClientPayload userAgent */ + userAgent?: (proto.IUserAgent|null); + + /** ClientPayload webInfo */ + webInfo?: (proto.IWebInfo|null); + + /** ClientPayload pushName */ pushName?: (string|null); - /** WebMessageInfo mediaCiphertextSha256 */ - mediaCiphertextSha256?: (Uint8Array|null); + /** ClientPayload sessionId */ + sessionId?: (number|null); - /** WebMessageInfo multicast */ - multicast?: (boolean|null); + /** ClientPayload shortConnect */ + shortConnect?: (boolean|null); - /** WebMessageInfo urlText */ - urlText?: (boolean|null); + /** ClientPayload iosAppExtension */ + iosAppExtension?: (proto.ClientPayload.ClientPayloadIOSAppExtension|null); - /** WebMessageInfo urlNumber */ - urlNumber?: (boolean|null); + /** ClientPayload connectType */ + connectType?: (proto.ClientPayload.ClientPayloadConnectType|null); - /** WebMessageInfo messageStubType */ - messageStubType?: (proto.WebMessageInfo.WebMessageInfoStubType|null); + /** ClientPayload connectReason */ + connectReason?: (proto.ClientPayload.ClientPayloadConnectReason|null); - /** WebMessageInfo clearMedia */ - clearMedia?: (boolean|null); + /** ClientPayload shards */ + shards?: (number[]|null); - /** WebMessageInfo messageStubParameters */ - messageStubParameters?: (string[]|null); + /** ClientPayload dnsSource */ + dnsSource?: (proto.IDNSSource|null); - /** WebMessageInfo duration */ - duration?: (number|null); + /** ClientPayload connectAttemptCount */ + connectAttemptCount?: (number|null); - /** WebMessageInfo labels */ - labels?: (string[]|null); + /** ClientPayload agent */ + agent?: (number|null); - /** WebMessageInfo paymentInfo */ - paymentInfo?: (proto.IPaymentInfo|null); + /** ClientPayload device */ + device?: (number|null); - /** WebMessageInfo finalLiveLocation */ - finalLiveLocation?: (proto.ILiveLocationMessage|null); + /** ClientPayload regData */ + regData?: (proto.ICompanionRegData|null); - /** WebMessageInfo quotedPaymentInfo */ - quotedPaymentInfo?: (proto.IPaymentInfo|null); + /** ClientPayload product */ + product?: (proto.ClientPayload.ClientPayloadProduct|null); - /** WebMessageInfo ephemeralStartTimestamp */ - ephemeralStartTimestamp?: (number|Long|null); + /** ClientPayload fbCat */ + fbCat?: (Uint8Array|null); - /** WebMessageInfo ephemeralDuration */ - ephemeralDuration?: (number|null); + /** ClientPayload fbUserAgent */ + fbUserAgent?: (Uint8Array|null); - /** WebMessageInfo ephemeralOffToOn */ - ephemeralOffToOn?: (boolean|null); - - /** WebMessageInfo ephemeralOutOfSync */ - ephemeralOutOfSync?: (boolean|null); - - /** WebMessageInfo bizPrivacyStatus */ - bizPrivacyStatus?: (proto.WebMessageInfo.WebMessageInfoBizPrivacyStatus|null); - - /** WebMessageInfo verifiedBizName */ - verifiedBizName?: (string|null); + /** ClientPayload oc */ + oc?: (boolean|null); } - /** Represents a WebMessageInfo. */ - class WebMessageInfo implements IWebMessageInfo { + /** Represents a ClientPayload. */ + class ClientPayload implements IClientPayload { /** - * Constructs a new WebMessageInfo. + * Constructs a new ClientPayload. * @param [properties] Properties to set */ - constructor(properties?: proto.IWebMessageInfo); + constructor(properties?: proto.IClientPayload); - /** WebMessageInfo key. */ - public key: proto.IMessageKey; + /** ClientPayload username. */ + public username: (number|Long); - /** WebMessageInfo message. */ - public message?: (proto.IMessage|null); + /** ClientPayload passive. */ + public passive: boolean; - /** WebMessageInfo messageTimestamp. */ - public messageTimestamp: (number|Long); + /** ClientPayload clientFeatures. */ + public clientFeatures: proto.ClientPayload.ClientPayloadClientFeature[]; - /** WebMessageInfo status. */ - public status: proto.WebMessageInfo.WebMessageInfoStatus; + /** ClientPayload userAgent. */ + public userAgent?: (proto.IUserAgent|null); - /** WebMessageInfo participant. */ - public participant: string; + /** ClientPayload webInfo. */ + public webInfo?: (proto.IWebInfo|null); - /** WebMessageInfo ignore. */ - public ignore: boolean; - - /** WebMessageInfo starred. */ - public starred: boolean; - - /** WebMessageInfo broadcast. */ - public broadcast: boolean; - - /** WebMessageInfo pushName. */ + /** ClientPayload pushName. */ public pushName: string; - /** WebMessageInfo mediaCiphertextSha256. */ - public mediaCiphertextSha256: Uint8Array; + /** ClientPayload sessionId. */ + public sessionId: number; - /** WebMessageInfo multicast. */ - public multicast: boolean; + /** ClientPayload shortConnect. */ + public shortConnect: boolean; - /** WebMessageInfo urlText. */ - public urlText: boolean; + /** ClientPayload iosAppExtension. */ + public iosAppExtension: proto.ClientPayload.ClientPayloadIOSAppExtension; - /** WebMessageInfo urlNumber. */ - public urlNumber: boolean; + /** ClientPayload connectType. */ + public connectType: proto.ClientPayload.ClientPayloadConnectType; - /** WebMessageInfo messageStubType. */ - public messageStubType: proto.WebMessageInfo.WebMessageInfoStubType; + /** ClientPayload connectReason. */ + public connectReason: proto.ClientPayload.ClientPayloadConnectReason; - /** WebMessageInfo clearMedia. */ - public clearMedia: boolean; + /** ClientPayload shards. */ + public shards: number[]; - /** WebMessageInfo messageStubParameters. */ - public messageStubParameters: string[]; + /** ClientPayload dnsSource. */ + public dnsSource?: (proto.IDNSSource|null); - /** WebMessageInfo duration. */ - public duration: number; + /** ClientPayload connectAttemptCount. */ + public connectAttemptCount: number; - /** WebMessageInfo labels. */ - public labels: string[]; + /** ClientPayload agent. */ + public agent: number; - /** WebMessageInfo paymentInfo. */ - public paymentInfo?: (proto.IPaymentInfo|null); + /** ClientPayload device. */ + public device: number; - /** WebMessageInfo finalLiveLocation. */ - public finalLiveLocation?: (proto.ILiveLocationMessage|null); + /** ClientPayload regData. */ + public regData?: (proto.ICompanionRegData|null); - /** WebMessageInfo quotedPaymentInfo. */ - public quotedPaymentInfo?: (proto.IPaymentInfo|null); + /** ClientPayload product. */ + public product: proto.ClientPayload.ClientPayloadProduct; - /** WebMessageInfo ephemeralStartTimestamp. */ - public ephemeralStartTimestamp: (number|Long); + /** ClientPayload fbCat. */ + public fbCat: Uint8Array; - /** WebMessageInfo ephemeralDuration. */ - public ephemeralDuration: number; + /** ClientPayload fbUserAgent. */ + public fbUserAgent: Uint8Array; - /** WebMessageInfo ephemeralOffToOn. */ - public ephemeralOffToOn: boolean; - - /** WebMessageInfo ephemeralOutOfSync. */ - public ephemeralOutOfSync: boolean; - - /** WebMessageInfo bizPrivacyStatus. */ - public bizPrivacyStatus: proto.WebMessageInfo.WebMessageInfoBizPrivacyStatus; - - /** WebMessageInfo verifiedBizName. */ - public verifiedBizName: string; + /** ClientPayload oc. */ + public oc: boolean; /** - * Creates a new WebMessageInfo instance using the specified properties. + * Creates a new ClientPayload instance using the specified properties. * @param [properties] Properties to set - * @returns WebMessageInfo instance + * @returns ClientPayload instance */ - public static create(properties?: proto.IWebMessageInfo): proto.WebMessageInfo; + public static create(properties?: proto.IClientPayload): proto.ClientPayload; /** - * Encodes the specified WebMessageInfo message. Does not implicitly {@link proto.WebMessageInfo.verify|verify} messages. - * @param message WebMessageInfo message or plain object to encode + * Encodes the specified ClientPayload message. Does not implicitly {@link proto.ClientPayload.verify|verify} messages. + * @param message ClientPayload message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: proto.IWebMessageInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: proto.IClientPayload, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified WebMessageInfo message, length delimited. Does not implicitly {@link proto.WebMessageInfo.verify|verify} messages. - * @param message WebMessageInfo message or plain object to encode + * Encodes the specified ClientPayload message, length delimited. Does not implicitly {@link proto.ClientPayload.verify|verify} messages. + * @param message ClientPayload message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: proto.IWebMessageInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: proto.IClientPayload, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a WebMessageInfo message from the specified reader or buffer. + * Decodes a ClientPayload message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns WebMessageInfo + * @returns ClientPayload * @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.WebMessageInfo; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.ClientPayload; /** - * Decodes a WebMessageInfo message from the specified reader or buffer, length delimited. + * Decodes a ClientPayload message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns WebMessageInfo + * @returns ClientPayload * @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.WebMessageInfo; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.ClientPayload; /** - * Verifies a WebMessageInfo message. + * Verifies a ClientPayload 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 WebMessageInfo message from a plain object. Also converts values to their respective internal types. + * Creates a ClientPayload message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns WebMessageInfo + * @returns ClientPayload */ - public static fromObject(object: { [k: string]: any }): proto.WebMessageInfo; + public static fromObject(object: { [k: string]: any }): proto.ClientPayload; /** - * Creates a plain object from a WebMessageInfo message. Also converts values to other types if specified. - * @param message WebMessageInfo + * Creates a plain object from a ClientPayload message. Also converts values to other types if specified. + * @param message ClientPayload * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: proto.WebMessageInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: proto.ClientPayload, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this WebMessageInfo to JSON. + * Converts this ClientPayload to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace WebMessageInfo { + namespace ClientPayload { - /** WebMessageInfoStatus enum. */ - enum WebMessageInfoStatus { - ERROR = 0, - PENDING = 1, - SERVER_ACK = 2, - DELIVERY_ACK = 3, - READ = 4, - PLAYED = 5 + /** ClientPayloadClientFeature enum. */ + enum ClientPayloadClientFeature { + NONE = 0 } - /** WebMessageInfoStubType enum. */ - enum WebMessageInfoStubType { + /** ClientPayloadIOSAppExtension enum. */ + enum ClientPayloadIOSAppExtension { + SHARE_EXTENSION = 0, + SERVICE_EXTENSION = 1, + INTENTS_EXTENSION = 2 + } + + /** ClientPayloadConnectType enum. */ + enum ClientPayloadConnectType { + CELLULAR_UNKNOWN = 0, + WIFI_UNKNOWN = 1, + CELLULAR_EDGE = 100, + CELLULAR_IDEN = 101, + CELLULAR_UMTS = 102, + CELLULAR_EVDO = 103, + CELLULAR_GPRS = 104, + CELLULAR_HSDPA = 105, + CELLULAR_HSUPA = 106, + CELLULAR_HSPA = 107, + CELLULAR_CDMA = 108, + CELLULAR_1XRTT = 109, + CELLULAR_EHRPD = 110, + CELLULAR_LTE = 111, + CELLULAR_HSPAP = 112 + } + + /** ClientPayloadConnectReason enum. */ + enum ClientPayloadConnectReason { + PUSH = 0, + USER_ACTIVATED = 1, + SCHEDULED = 2, + ERROR_RECONNECT = 3, + NETWORK_SWITCH = 4, + PING_RECONNECT = 5 + } + + /** ClientPayloadProduct enum. */ + enum ClientPayloadProduct { + WHATSAPP = 0, + MESSENGER = 1 + } + } + + /** Properties of a NoiseCertificate. */ + interface INoiseCertificate { + + /** NoiseCertificate details */ + details?: (Uint8Array|null); + + /** NoiseCertificate signature */ + signature?: (Uint8Array|null); + } + + /** Represents a NoiseCertificate. */ + class NoiseCertificate implements INoiseCertificate { + + /** + * Constructs a new NoiseCertificate. + * @param [properties] Properties to set + */ + constructor(properties?: proto.INoiseCertificate); + + /** NoiseCertificate details. */ + public details: Uint8Array; + + /** NoiseCertificate signature. */ + public signature: Uint8Array; + + /** + * Creates a new NoiseCertificate instance using the specified properties. + * @param [properties] Properties to set + * @returns NoiseCertificate instance + */ + public static create(properties?: proto.INoiseCertificate): proto.NoiseCertificate; + + /** + * Encodes the specified NoiseCertificate message. Does not implicitly {@link proto.NoiseCertificate.verify|verify} messages. + * @param message NoiseCertificate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.INoiseCertificate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NoiseCertificate message, length delimited. Does not implicitly {@link proto.NoiseCertificate.verify|verify} messages. + * @param message NoiseCertificate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.INoiseCertificate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NoiseCertificate message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NoiseCertificate + * @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.NoiseCertificate; + + /** + * Decodes a NoiseCertificate message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NoiseCertificate + * @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.NoiseCertificate; + + /** + * Verifies a NoiseCertificate 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 NoiseCertificate message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NoiseCertificate + */ + public static fromObject(object: { [k: string]: any }): proto.NoiseCertificate; + + /** + * Creates a plain object from a NoiseCertificate message. Also converts values to other types if specified. + * @param message NoiseCertificate + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.NoiseCertificate, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NoiseCertificate to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ClientHello. */ + interface IClientHello { + + /** ClientHello ephemeral */ + ephemeral?: (Uint8Array|null); + + /** ClientHello static */ + "static"?: (Uint8Array|null); + + /** ClientHello payload */ + payload?: (Uint8Array|null); + } + + /** Represents a ClientHello. */ + class ClientHello implements IClientHello { + + /** + * Constructs a new ClientHello. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IClientHello); + + /** ClientHello ephemeral. */ + public ephemeral: Uint8Array; + + /** ClientHello static. */ + public static: Uint8Array; + + /** ClientHello payload. */ + public payload: Uint8Array; + + /** + * Creates a new ClientHello instance using the specified properties. + * @param [properties] Properties to set + * @returns ClientHello instance + */ + public static create(properties?: proto.IClientHello): proto.ClientHello; + + /** + * Encodes the specified ClientHello message. Does not implicitly {@link proto.ClientHello.verify|verify} messages. + * @param message ClientHello message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IClientHello, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ClientHello message, length delimited. Does not implicitly {@link proto.ClientHello.verify|verify} messages. + * @param message ClientHello message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IClientHello, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ClientHello message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ClientHello + * @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.ClientHello; + + /** + * Decodes a ClientHello message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ClientHello + * @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.ClientHello; + + /** + * Verifies a ClientHello 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 ClientHello message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ClientHello + */ + public static fromObject(object: { [k: string]: any }): proto.ClientHello; + + /** + * Creates a plain object from a ClientHello message. Also converts values to other types if specified. + * @param message ClientHello + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.ClientHello, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ClientHello to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ServerHello. */ + interface IServerHello { + + /** ServerHello ephemeral */ + ephemeral?: (Uint8Array|null); + + /** ServerHello static */ + "static"?: (Uint8Array|null); + + /** ServerHello payload */ + payload?: (Uint8Array|null); + } + + /** Represents a ServerHello. */ + class ServerHello implements IServerHello { + + /** + * Constructs a new ServerHello. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IServerHello); + + /** ServerHello ephemeral. */ + public ephemeral: Uint8Array; + + /** ServerHello static. */ + public static: Uint8Array; + + /** ServerHello payload. */ + public payload: Uint8Array; + + /** + * Creates a new ServerHello instance using the specified properties. + * @param [properties] Properties to set + * @returns ServerHello instance + */ + public static create(properties?: proto.IServerHello): proto.ServerHello; + + /** + * Encodes the specified ServerHello message. Does not implicitly {@link proto.ServerHello.verify|verify} messages. + * @param message ServerHello message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IServerHello, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServerHello message, length delimited. Does not implicitly {@link proto.ServerHello.verify|verify} messages. + * @param message ServerHello message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IServerHello, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServerHello message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServerHello + * @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.ServerHello; + + /** + * Decodes a ServerHello message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServerHello + * @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.ServerHello; + + /** + * Verifies a ServerHello 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 ServerHello message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServerHello + */ + public static fromObject(object: { [k: string]: any }): proto.ServerHello; + + /** + * Creates a plain object from a ServerHello message. Also converts values to other types if specified. + * @param message ServerHello + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.ServerHello, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServerHello to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ClientFinish. */ + interface IClientFinish { + + /** ClientFinish static */ + "static"?: (Uint8Array|null); + + /** ClientFinish payload */ + payload?: (Uint8Array|null); + } + + /** Represents a ClientFinish. */ + class ClientFinish implements IClientFinish { + + /** + * Constructs a new ClientFinish. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IClientFinish); + + /** ClientFinish static. */ + public static: Uint8Array; + + /** ClientFinish payload. */ + public payload: Uint8Array; + + /** + * Creates a new ClientFinish instance using the specified properties. + * @param [properties] Properties to set + * @returns ClientFinish instance + */ + public static create(properties?: proto.IClientFinish): proto.ClientFinish; + + /** + * Encodes the specified ClientFinish message. Does not implicitly {@link proto.ClientFinish.verify|verify} messages. + * @param message ClientFinish message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IClientFinish, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ClientFinish message, length delimited. Does not implicitly {@link proto.ClientFinish.verify|verify} messages. + * @param message ClientFinish message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IClientFinish, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ClientFinish message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ClientFinish + * @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.ClientFinish; + + /** + * Decodes a ClientFinish message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ClientFinish + * @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.ClientFinish; + + /** + * Verifies a ClientFinish 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 ClientFinish message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ClientFinish + */ + public static fromObject(object: { [k: string]: any }): proto.ClientFinish; + + /** + * Creates a plain object from a ClientFinish message. Also converts values to other types if specified. + * @param message ClientFinish + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.ClientFinish, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ClientFinish to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a HandshakeMessage. */ + interface IHandshakeMessage { + + /** HandshakeMessage clientHello */ + clientHello?: (proto.IClientHello|null); + + /** HandshakeMessage serverHello */ + serverHello?: (proto.IServerHello|null); + + /** HandshakeMessage clientFinish */ + clientFinish?: (proto.IClientFinish|null); + } + + /** Represents a HandshakeMessage. */ + class HandshakeMessage implements IHandshakeMessage { + + /** + * Constructs a new HandshakeMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IHandshakeMessage); + + /** HandshakeMessage clientHello. */ + public clientHello?: (proto.IClientHello|null); + + /** HandshakeMessage serverHello. */ + public serverHello?: (proto.IServerHello|null); + + /** HandshakeMessage clientFinish. */ + public clientFinish?: (proto.IClientFinish|null); + + /** + * Creates a new HandshakeMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns HandshakeMessage instance + */ + public static create(properties?: proto.IHandshakeMessage): proto.HandshakeMessage; + + /** + * Encodes the specified HandshakeMessage message. Does not implicitly {@link proto.HandshakeMessage.verify|verify} messages. + * @param message HandshakeMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IHandshakeMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HandshakeMessage message, length delimited. Does not implicitly {@link proto.HandshakeMessage.verify|verify} messages. + * @param message HandshakeMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IHandshakeMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HandshakeMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HandshakeMessage + * @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.HandshakeMessage; + + /** + * Decodes a HandshakeMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HandshakeMessage + * @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.HandshakeMessage; + + /** + * Verifies a HandshakeMessage 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 HandshakeMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HandshakeMessage + */ + public static fromObject(object: { [k: string]: any }): proto.HandshakeMessage; + + /** + * Creates a plain object from a HandshakeMessage message. Also converts values to other types if specified. + * @param message HandshakeMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.HandshakeMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HandshakeMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a BizIdentityInfo. */ + interface IBizIdentityInfo { + + /** BizIdentityInfo vlevel */ + vlevel?: (proto.BizIdentityInfo.BizIdentityInfoVerifiedLevelValue|null); + + /** BizIdentityInfo vnameCert */ + vnameCert?: (proto.IVerifiedNameCertificate|null); + + /** BizIdentityInfo signed */ + signed?: (boolean|null); + + /** BizIdentityInfo revoked */ + revoked?: (boolean|null); + + /** BizIdentityInfo hostStorage */ + hostStorage?: (proto.BizIdentityInfo.BizIdentityInfoHostStorageType|null); + + /** BizIdentityInfo actualActors */ + actualActors?: (proto.BizIdentityInfo.BizIdentityInfoActualActorsType|null); + + /** BizIdentityInfo privacyModeTs */ + privacyModeTs?: (number|Long|null); + } + + /** Represents a BizIdentityInfo. */ + class BizIdentityInfo implements IBizIdentityInfo { + + /** + * Constructs a new BizIdentityInfo. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IBizIdentityInfo); + + /** BizIdentityInfo vlevel. */ + public vlevel: proto.BizIdentityInfo.BizIdentityInfoVerifiedLevelValue; + + /** BizIdentityInfo vnameCert. */ + public vnameCert?: (proto.IVerifiedNameCertificate|null); + + /** BizIdentityInfo signed. */ + public signed: boolean; + + /** BizIdentityInfo revoked. */ + public revoked: boolean; + + /** BizIdentityInfo hostStorage. */ + public hostStorage: proto.BizIdentityInfo.BizIdentityInfoHostStorageType; + + /** BizIdentityInfo actualActors. */ + public actualActors: proto.BizIdentityInfo.BizIdentityInfoActualActorsType; + + /** BizIdentityInfo privacyModeTs. */ + public privacyModeTs: (number|Long); + + /** + * Creates a new BizIdentityInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns BizIdentityInfo instance + */ + public static create(properties?: proto.IBizIdentityInfo): proto.BizIdentityInfo; + + /** + * Encodes the specified BizIdentityInfo message. Does not implicitly {@link proto.BizIdentityInfo.verify|verify} messages. + * @param message BizIdentityInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IBizIdentityInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BizIdentityInfo message, length delimited. Does not implicitly {@link proto.BizIdentityInfo.verify|verify} messages. + * @param message BizIdentityInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IBizIdentityInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BizIdentityInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BizIdentityInfo + * @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.BizIdentityInfo; + + /** + * Decodes a BizIdentityInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BizIdentityInfo + * @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.BizIdentityInfo; + + /** + * Verifies a BizIdentityInfo 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 BizIdentityInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BizIdentityInfo + */ + public static fromObject(object: { [k: string]: any }): proto.BizIdentityInfo; + + /** + * Creates a plain object from a BizIdentityInfo message. Also converts values to other types if specified. + * @param message BizIdentityInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.BizIdentityInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BizIdentityInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace BizIdentityInfo { + + /** BizIdentityInfoVerifiedLevelValue enum. */ + enum BizIdentityInfoVerifiedLevelValue { UNKNOWN = 0, - REVOKE = 1, - CIPHERTEXT = 2, - FUTUREPROOF = 3, - NON_VERIFIED_TRANSITION = 4, - UNVERIFIED_TRANSITION = 5, - VERIFIED_TRANSITION = 6, - VERIFIED_LOW_UNKNOWN = 7, - VERIFIED_HIGH = 8, - VERIFIED_INITIAL_UNKNOWN = 9, - VERIFIED_INITIAL_LOW = 10, - VERIFIED_INITIAL_HIGH = 11, - VERIFIED_TRANSITION_ANY_TO_NONE = 12, - VERIFIED_TRANSITION_ANY_TO_HIGH = 13, - VERIFIED_TRANSITION_HIGH_TO_LOW = 14, - VERIFIED_TRANSITION_HIGH_TO_UNKNOWN = 15, - VERIFIED_TRANSITION_UNKNOWN_TO_LOW = 16, - VERIFIED_TRANSITION_LOW_TO_UNKNOWN = 17, - VERIFIED_TRANSITION_NONE_TO_LOW = 18, - VERIFIED_TRANSITION_NONE_TO_UNKNOWN = 19, - GROUP_CREATE = 20, - GROUP_CHANGE_SUBJECT = 21, - GROUP_CHANGE_ICON = 22, - GROUP_CHANGE_INVITE_LINK = 23, - GROUP_CHANGE_DESCRIPTION = 24, - GROUP_CHANGE_RESTRICT = 25, - GROUP_CHANGE_ANNOUNCE = 26, - GROUP_PARTICIPANT_ADD = 27, - GROUP_PARTICIPANT_REMOVE = 28, - GROUP_PARTICIPANT_PROMOTE = 29, - GROUP_PARTICIPANT_DEMOTE = 30, - GROUP_PARTICIPANT_INVITE = 31, - GROUP_PARTICIPANT_LEAVE = 32, - GROUP_PARTICIPANT_CHANGE_NUMBER = 33, - BROADCAST_CREATE = 34, - BROADCAST_ADD = 35, - BROADCAST_REMOVE = 36, - GENERIC_NOTIFICATION = 37, - E2E_IDENTITY_CHANGED = 38, - E2E_ENCRYPTED = 39, - CALL_MISSED_VOICE = 40, - CALL_MISSED_VIDEO = 41, - INDIVIDUAL_CHANGE_NUMBER = 42, - GROUP_DELETE = 43, - GROUP_ANNOUNCE_MODE_MESSAGE_BOUNCE = 44, - CALL_MISSED_GROUP_VOICE = 45, - CALL_MISSED_GROUP_VIDEO = 46, - PAYMENT_CIPHERTEXT = 47, - PAYMENT_FUTUREPROOF = 48, - PAYMENT_TRANSACTION_STATUS_UPDATE_FAILED = 49, - PAYMENT_TRANSACTION_STATUS_UPDATE_REFUNDED = 50, - PAYMENT_TRANSACTION_STATUS_UPDATE_REFUND_FAILED = 51, - PAYMENT_TRANSACTION_STATUS_RECEIVER_PENDING_SETUP = 52, - PAYMENT_TRANSACTION_STATUS_RECEIVER_SUCCESS_AFTER_HICCUP = 53, - PAYMENT_ACTION_ACCOUNT_SETUP_REMINDER = 54, - PAYMENT_ACTION_SEND_PAYMENT_REMINDER = 55, - PAYMENT_ACTION_SEND_PAYMENT_INVITATION = 56, - PAYMENT_ACTION_REQUEST_DECLINED = 57, - PAYMENT_ACTION_REQUEST_EXPIRED = 58, - PAYMENT_ACTION_REQUEST_CANCELLED = 59, - BIZ_VERIFIED_TRANSITION_TOP_TO_BOTTOM = 60, - BIZ_VERIFIED_TRANSITION_BOTTOM_TO_TOP = 61, - BIZ_INTRO_TOP = 62, - BIZ_INTRO_BOTTOM = 63, - BIZ_NAME_CHANGE = 64, - BIZ_MOVE_TO_CONSUMER_APP = 65, - BIZ_TWO_TIER_MIGRATION_TOP = 66, - BIZ_TWO_TIER_MIGRATION_BOTTOM = 67, - OVERSIZED = 68, - GROUP_CHANGE_NO_FREQUENTLY_FORWARDED = 69, - GROUP_V4_ADD_INVITE_SENT = 70, - GROUP_PARTICIPANT_ADD_REQUEST_JOIN = 71, - CHANGE_EPHEMERAL_SETTING = 72, - E2E_DEVICE_CHANGED = 73, - VIEWED_ONCE = 74, - E2E_ENCRYPTED_NOW = 75, - BLUE_MSG_BSP_FB_TO_BSP_PREMISE = 76, - BLUE_MSG_BSP_FB_TO_SELF_FB = 77, - BLUE_MSG_BSP_FB_TO_SELF_PREMISE = 78, - BLUE_MSG_BSP_FB_UNVERIFIED = 79, - BLUE_MSG_BSP_FB_UNVERIFIED_TO_SELF_PREMISE_VERIFIED = 80, - BLUE_MSG_BSP_FB_VERIFIED = 81, - BLUE_MSG_BSP_FB_VERIFIED_TO_SELF_PREMISE_UNVERIFIED = 82, - BLUE_MSG_BSP_PREMISE_TO_SELF_PREMISE = 83, - BLUE_MSG_BSP_PREMISE_UNVERIFIED = 84, - BLUE_MSG_BSP_PREMISE_UNVERIFIED_TO_SELF_PREMISE_VERIFIED = 85, - BLUE_MSG_BSP_PREMISE_VERIFIED = 86, - BLUE_MSG_BSP_PREMISE_VERIFIED_TO_SELF_PREMISE_UNVERIFIED = 87, - BLUE_MSG_CONSUMER_TO_BSP_FB_UNVERIFIED = 88, - BLUE_MSG_CONSUMER_TO_BSP_PREMISE_UNVERIFIED = 89, - BLUE_MSG_CONSUMER_TO_SELF_FB_UNVERIFIED = 90, - BLUE_MSG_CONSUMER_TO_SELF_PREMISE_UNVERIFIED = 91, - BLUE_MSG_SELF_FB_TO_BSP_PREMISE = 92, - BLUE_MSG_SELF_FB_TO_SELF_PREMISE = 93, - BLUE_MSG_SELF_FB_UNVERIFIED = 94, - BLUE_MSG_SELF_FB_UNVERIFIED_TO_SELF_PREMISE_VERIFIED = 95, - BLUE_MSG_SELF_FB_VERIFIED = 96, - BLUE_MSG_SELF_FB_VERIFIED_TO_SELF_PREMISE_UNVERIFIED = 97, - BLUE_MSG_SELF_PREMISE_TO_BSP_PREMISE = 98, - BLUE_MSG_SELF_PREMISE_UNVERIFIED = 99, - BLUE_MSG_SELF_PREMISE_VERIFIED = 100, - BLUE_MSG_TO_BSP_FB = 101, - BLUE_MSG_TO_CONSUMER = 102, - BLUE_MSG_TO_SELF_FB = 103, - BLUE_MSG_UNVERIFIED_TO_BSP_FB_VERIFIED = 104, - BLUE_MSG_UNVERIFIED_TO_BSP_PREMISE_VERIFIED = 105, - BLUE_MSG_UNVERIFIED_TO_SELF_FB_VERIFIED = 106, - BLUE_MSG_UNVERIFIED_TO_VERIFIED = 107, - BLUE_MSG_VERIFIED_TO_BSP_FB_UNVERIFIED = 108, - BLUE_MSG_VERIFIED_TO_BSP_PREMISE_UNVERIFIED = 109, - BLUE_MSG_VERIFIED_TO_SELF_FB_UNVERIFIED = 110, - BLUE_MSG_VERIFIED_TO_UNVERIFIED = 111, - BLUE_MSG_BSP_FB_UNVERIFIED_TO_BSP_PREMISE_VERIFIED = 112, - BLUE_MSG_BSP_FB_UNVERIFIED_TO_SELF_FB_VERIFIED = 113, - BLUE_MSG_BSP_FB_VERIFIED_TO_BSP_PREMISE_UNVERIFIED = 114, - BLUE_MSG_BSP_FB_VERIFIED_TO_SELF_FB_UNVERIFIED = 115, - BLUE_MSG_SELF_FB_UNVERIFIED_TO_BSP_PREMISE_VERIFIED = 116, - BLUE_MSG_SELF_FB_VERIFIED_TO_BSP_PREMISE_UNVERIFIED = 117, - E2E_IDENTITY_UNAVAILABLE = 118 + LOW = 1, + HIGH = 2 } - /** WebMessageInfoBizPrivacyStatus enum. */ - enum WebMessageInfoBizPrivacyStatus { - E2EE = 0, - FB = 2, - BSP = 1, - BSP_AND_FB = 3 + /** BizIdentityInfoHostStorageType enum. */ + enum BizIdentityInfoHostStorageType { + ON_PREMISE = 0, + FACEBOOK = 1 } + + /** BizIdentityInfoActualActorsType enum. */ + enum BizIdentityInfoActualActorsType { + SELF = 0, + BSP = 1 + } + } + + /** Properties of a BizAccountLinkInfo. */ + interface IBizAccountLinkInfo { + + /** BizAccountLinkInfo whatsappBizAcctFbid */ + whatsappBizAcctFbid?: (number|Long|null); + + /** BizAccountLinkInfo whatsappAcctNumber */ + whatsappAcctNumber?: (string|null); + + /** BizAccountLinkInfo issueTime */ + issueTime?: (number|Long|null); + + /** BizAccountLinkInfo hostStorage */ + hostStorage?: (proto.BizAccountLinkInfo.BizAccountLinkInfoHostStorageType|null); + + /** BizAccountLinkInfo accountType */ + accountType?: (proto.BizAccountLinkInfo.BizAccountLinkInfoAccountType|null); + } + + /** Represents a BizAccountLinkInfo. */ + class BizAccountLinkInfo implements IBizAccountLinkInfo { + + /** + * Constructs a new BizAccountLinkInfo. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IBizAccountLinkInfo); + + /** BizAccountLinkInfo whatsappBizAcctFbid. */ + public whatsappBizAcctFbid: (number|Long); + + /** BizAccountLinkInfo whatsappAcctNumber. */ + public whatsappAcctNumber: string; + + /** BizAccountLinkInfo issueTime. */ + public issueTime: (number|Long); + + /** BizAccountLinkInfo hostStorage. */ + public hostStorage: proto.BizAccountLinkInfo.BizAccountLinkInfoHostStorageType; + + /** BizAccountLinkInfo accountType. */ + public accountType: proto.BizAccountLinkInfo.BizAccountLinkInfoAccountType; + + /** + * Creates a new BizAccountLinkInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns BizAccountLinkInfo instance + */ + public static create(properties?: proto.IBizAccountLinkInfo): proto.BizAccountLinkInfo; + + /** + * Encodes the specified BizAccountLinkInfo message. Does not implicitly {@link proto.BizAccountLinkInfo.verify|verify} messages. + * @param message BizAccountLinkInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IBizAccountLinkInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BizAccountLinkInfo message, length delimited. Does not implicitly {@link proto.BizAccountLinkInfo.verify|verify} messages. + * @param message BizAccountLinkInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IBizAccountLinkInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BizAccountLinkInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BizAccountLinkInfo + * @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.BizAccountLinkInfo; + + /** + * Decodes a BizAccountLinkInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BizAccountLinkInfo + * @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.BizAccountLinkInfo; + + /** + * Verifies a BizAccountLinkInfo 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 BizAccountLinkInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BizAccountLinkInfo + */ + public static fromObject(object: { [k: string]: any }): proto.BizAccountLinkInfo; + + /** + * Creates a plain object from a BizAccountLinkInfo message. Also converts values to other types if specified. + * @param message BizAccountLinkInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.BizAccountLinkInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BizAccountLinkInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace BizAccountLinkInfo { + + /** BizAccountLinkInfoHostStorageType enum. */ + enum BizAccountLinkInfoHostStorageType { + ON_PREMISE = 0, + FACEBOOK = 1 + } + + /** BizAccountLinkInfoAccountType enum. */ + enum BizAccountLinkInfoAccountType { + ENTERPRISE = 0, + PAGE = 1 + } + } + + /** Properties of a BizAccountPayload. */ + interface IBizAccountPayload { + + /** BizAccountPayload vnameCert */ + vnameCert?: (proto.IVerifiedNameCertificate|null); + + /** BizAccountPayload bizAcctLinkInfo */ + bizAcctLinkInfo?: (Uint8Array|null); + } + + /** Represents a BizAccountPayload. */ + class BizAccountPayload implements IBizAccountPayload { + + /** + * Constructs a new BizAccountPayload. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IBizAccountPayload); + + /** BizAccountPayload vnameCert. */ + public vnameCert?: (proto.IVerifiedNameCertificate|null); + + /** BizAccountPayload bizAcctLinkInfo. */ + public bizAcctLinkInfo: Uint8Array; + + /** + * Creates a new BizAccountPayload instance using the specified properties. + * @param [properties] Properties to set + * @returns BizAccountPayload instance + */ + public static create(properties?: proto.IBizAccountPayload): proto.BizAccountPayload; + + /** + * Encodes the specified BizAccountPayload message. Does not implicitly {@link proto.BizAccountPayload.verify|verify} messages. + * @param message BizAccountPayload message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IBizAccountPayload, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BizAccountPayload message, length delimited. Does not implicitly {@link proto.BizAccountPayload.verify|verify} messages. + * @param message BizAccountPayload message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IBizAccountPayload, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BizAccountPayload message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BizAccountPayload + * @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.BizAccountPayload; + + /** + * Decodes a BizAccountPayload message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BizAccountPayload + * @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.BizAccountPayload; + + /** + * Verifies a BizAccountPayload 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 BizAccountPayload message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BizAccountPayload + */ + public static fromObject(object: { [k: string]: any }): proto.BizAccountPayload; + + /** + * Creates a plain object from a BizAccountPayload message. Also converts values to other types if specified. + * @param message BizAccountPayload + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.BizAccountPayload, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BizAccountPayload to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a VerifiedNameCertificate. */ + interface IVerifiedNameCertificate { + + /** VerifiedNameCertificate details */ + details?: (Uint8Array|null); + + /** VerifiedNameCertificate signature */ + signature?: (Uint8Array|null); + + /** VerifiedNameCertificate serverSignature */ + serverSignature?: (Uint8Array|null); + } + + /** Represents a VerifiedNameCertificate. */ + class VerifiedNameCertificate implements IVerifiedNameCertificate { + + /** + * Constructs a new VerifiedNameCertificate. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IVerifiedNameCertificate); + + /** VerifiedNameCertificate details. */ + public details: Uint8Array; + + /** VerifiedNameCertificate signature. */ + public signature: Uint8Array; + + /** VerifiedNameCertificate serverSignature. */ + public serverSignature: Uint8Array; + + /** + * Creates a new VerifiedNameCertificate instance using the specified properties. + * @param [properties] Properties to set + * @returns VerifiedNameCertificate instance + */ + public static create(properties?: proto.IVerifiedNameCertificate): proto.VerifiedNameCertificate; + + /** + * Encodes the specified VerifiedNameCertificate message. Does not implicitly {@link proto.VerifiedNameCertificate.verify|verify} messages. + * @param message VerifiedNameCertificate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IVerifiedNameCertificate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VerifiedNameCertificate message, length delimited. Does not implicitly {@link proto.VerifiedNameCertificate.verify|verify} messages. + * @param message VerifiedNameCertificate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IVerifiedNameCertificate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VerifiedNameCertificate message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VerifiedNameCertificate + * @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.VerifiedNameCertificate; + + /** + * Decodes a VerifiedNameCertificate message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VerifiedNameCertificate + * @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.VerifiedNameCertificate; + + /** + * Verifies a VerifiedNameCertificate 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 VerifiedNameCertificate message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VerifiedNameCertificate + */ + public static fromObject(object: { [k: string]: any }): proto.VerifiedNameCertificate; + + /** + * Creates a plain object from a VerifiedNameCertificate message. Also converts values to other types if specified. + * @param message VerifiedNameCertificate + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.VerifiedNameCertificate, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VerifiedNameCertificate to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a LocalizedName. */ + interface ILocalizedName { + + /** LocalizedName lg */ + lg?: (string|null); + + /** LocalizedName lc */ + lc?: (string|null); + + /** LocalizedName verifiedName */ + verifiedName?: (string|null); + } + + /** Represents a LocalizedName. */ + class LocalizedName implements ILocalizedName { + + /** + * Constructs a new LocalizedName. + * @param [properties] Properties to set + */ + constructor(properties?: proto.ILocalizedName); + + /** LocalizedName lg. */ + public lg: string; + + /** LocalizedName lc. */ + public lc: string; + + /** LocalizedName verifiedName. */ + public verifiedName: string; + + /** + * Creates a new LocalizedName instance using the specified properties. + * @param [properties] Properties to set + * @returns LocalizedName instance + */ + public static create(properties?: proto.ILocalizedName): proto.LocalizedName; + + /** + * Encodes the specified LocalizedName message. Does not implicitly {@link proto.LocalizedName.verify|verify} messages. + * @param message LocalizedName message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.ILocalizedName, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LocalizedName message, length delimited. Does not implicitly {@link proto.LocalizedName.verify|verify} messages. + * @param message LocalizedName message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.ILocalizedName, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LocalizedName message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LocalizedName + * @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.LocalizedName; + + /** + * Decodes a LocalizedName message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LocalizedName + * @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.LocalizedName; + + /** + * Verifies a LocalizedName 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 LocalizedName message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LocalizedName + */ + public static fromObject(object: { [k: string]: any }): proto.LocalizedName; + + /** + * Creates a plain object from a LocalizedName message. Also converts values to other types if specified. + * @param message LocalizedName + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.LocalizedName, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LocalizedName to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a SyncActionData. */ + interface ISyncActionData { + + /** SyncActionData index */ + index?: (Uint8Array|null); + + /** SyncActionData value */ + value?: (proto.ISyncActionValue|null); + + /** SyncActionData padding */ + padding?: (Uint8Array|null); + + /** SyncActionData version */ + version?: (number|null); + } + + /** Represents a SyncActionData. */ + class SyncActionData implements ISyncActionData { + + /** + * Constructs a new SyncActionData. + * @param [properties] Properties to set + */ + constructor(properties?: proto.ISyncActionData); + + /** SyncActionData index. */ + public index: Uint8Array; + + /** SyncActionData value. */ + public value?: (proto.ISyncActionValue|null); + + /** SyncActionData padding. */ + public padding: Uint8Array; + + /** SyncActionData version. */ + public version: number; + + /** + * Creates a new SyncActionData instance using the specified properties. + * @param [properties] Properties to set + * @returns SyncActionData instance + */ + public static create(properties?: proto.ISyncActionData): proto.SyncActionData; + + /** + * Encodes the specified SyncActionData message. Does not implicitly {@link proto.SyncActionData.verify|verify} messages. + * @param message SyncActionData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.ISyncActionData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SyncActionData message, length delimited. Does not implicitly {@link proto.SyncActionData.verify|verify} messages. + * @param message SyncActionData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.ISyncActionData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SyncActionData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SyncActionData + * @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.SyncActionData; + + /** + * Decodes a SyncActionData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SyncActionData + * @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.SyncActionData; + + /** + * Verifies a SyncActionData 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 SyncActionData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SyncActionData + */ + public static fromObject(object: { [k: string]: any }): proto.SyncActionData; + + /** + * Creates a plain object from a SyncActionData message. Also converts values to other types if specified. + * @param message SyncActionData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.SyncActionData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SyncActionData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a StarAction. */ + interface IStarAction { + + /** StarAction starred */ + starred?: (boolean|null); + } + + /** Represents a StarAction. */ + class StarAction implements IStarAction { + + /** + * Constructs a new StarAction. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IStarAction); + + /** StarAction starred. */ + public starred: boolean; + + /** + * Creates a new StarAction instance using the specified properties. + * @param [properties] Properties to set + * @returns StarAction instance + */ + public static create(properties?: proto.IStarAction): proto.StarAction; + + /** + * Encodes the specified StarAction message. Does not implicitly {@link proto.StarAction.verify|verify} messages. + * @param message StarAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IStarAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StarAction message, length delimited. Does not implicitly {@link proto.StarAction.verify|verify} messages. + * @param message StarAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IStarAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StarAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StarAction + * @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.StarAction; + + /** + * Decodes a StarAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StarAction + * @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.StarAction; + + /** + * Verifies a StarAction 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 StarAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StarAction + */ + public static fromObject(object: { [k: string]: any }): proto.StarAction; + + /** + * Creates a plain object from a StarAction message. Also converts values to other types if specified. + * @param message StarAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.StarAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StarAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ContactAction. */ + interface IContactAction { + + /** ContactAction fullName */ + fullName?: (string|null); + + /** ContactAction firstName */ + firstName?: (string|null); + } + + /** Represents a ContactAction. */ + class ContactAction implements IContactAction { + + /** + * Constructs a new ContactAction. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IContactAction); + + /** ContactAction fullName. */ + public fullName: string; + + /** ContactAction firstName. */ + public firstName: string; + + /** + * Creates a new ContactAction instance using the specified properties. + * @param [properties] Properties to set + * @returns ContactAction instance + */ + public static create(properties?: proto.IContactAction): proto.ContactAction; + + /** + * Encodes the specified ContactAction message. Does not implicitly {@link proto.ContactAction.verify|verify} messages. + * @param message ContactAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IContactAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ContactAction message, length delimited. Does not implicitly {@link proto.ContactAction.verify|verify} messages. + * @param message ContactAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IContactAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ContactAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ContactAction + * @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.ContactAction; + + /** + * Decodes a ContactAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ContactAction + * @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.ContactAction; + + /** + * Verifies a ContactAction 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 ContactAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ContactAction + */ + public static fromObject(object: { [k: string]: any }): proto.ContactAction; + + /** + * Creates a plain object from a ContactAction message. Also converts values to other types if specified. + * @param message ContactAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.ContactAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ContactAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MuteAction. */ + interface IMuteAction { + + /** MuteAction muted */ + muted?: (boolean|null); + + /** MuteAction muteEndTimestamp */ + muteEndTimestamp?: (number|Long|null); + } + + /** Represents a MuteAction. */ + class MuteAction implements IMuteAction { + + /** + * Constructs a new MuteAction. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IMuteAction); + + /** MuteAction muted. */ + public muted: boolean; + + /** MuteAction muteEndTimestamp. */ + public muteEndTimestamp: (number|Long); + + /** + * Creates a new MuteAction instance using the specified properties. + * @param [properties] Properties to set + * @returns MuteAction instance + */ + public static create(properties?: proto.IMuteAction): proto.MuteAction; + + /** + * Encodes the specified MuteAction message. Does not implicitly {@link proto.MuteAction.verify|verify} messages. + * @param message MuteAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IMuteAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MuteAction message, length delimited. Does not implicitly {@link proto.MuteAction.verify|verify} messages. + * @param message MuteAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IMuteAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MuteAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MuteAction + * @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.MuteAction; + + /** + * Decodes a MuteAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MuteAction + * @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.MuteAction; + + /** + * Verifies a MuteAction 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 MuteAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MuteAction + */ + public static fromObject(object: { [k: string]: any }): proto.MuteAction; + + /** + * Creates a plain object from a MuteAction message. Also converts values to other types if specified. + * @param message MuteAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.MuteAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MuteAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a PinAction. */ + interface IPinAction { + + /** PinAction pinned */ + pinned?: (boolean|null); + } + + /** Represents a PinAction. */ + class PinAction implements IPinAction { + + /** + * Constructs a new PinAction. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IPinAction); + + /** PinAction pinned. */ + public pinned: boolean; + + /** + * Creates a new PinAction instance using the specified properties. + * @param [properties] Properties to set + * @returns PinAction instance + */ + public static create(properties?: proto.IPinAction): proto.PinAction; + + /** + * Encodes the specified PinAction message. Does not implicitly {@link proto.PinAction.verify|verify} messages. + * @param message PinAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IPinAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PinAction message, length delimited. Does not implicitly {@link proto.PinAction.verify|verify} messages. + * @param message PinAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IPinAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PinAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PinAction + * @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.PinAction; + + /** + * Decodes a PinAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PinAction + * @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.PinAction; + + /** + * Verifies a PinAction 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 PinAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PinAction + */ + public static fromObject(object: { [k: string]: any }): proto.PinAction; + + /** + * Creates a plain object from a PinAction message. Also converts values to other types if specified. + * @param message PinAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.PinAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PinAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a SecurityNotificationSetting. */ + interface ISecurityNotificationSetting { + + /** SecurityNotificationSetting showNotification */ + showNotification?: (boolean|null); + } + + /** Represents a SecurityNotificationSetting. */ + class SecurityNotificationSetting implements ISecurityNotificationSetting { + + /** + * Constructs a new SecurityNotificationSetting. + * @param [properties] Properties to set + */ + constructor(properties?: proto.ISecurityNotificationSetting); + + /** SecurityNotificationSetting showNotification. */ + public showNotification: boolean; + + /** + * Creates a new SecurityNotificationSetting instance using the specified properties. + * @param [properties] Properties to set + * @returns SecurityNotificationSetting instance + */ + public static create(properties?: proto.ISecurityNotificationSetting): proto.SecurityNotificationSetting; + + /** + * Encodes the specified SecurityNotificationSetting message. Does not implicitly {@link proto.SecurityNotificationSetting.verify|verify} messages. + * @param message SecurityNotificationSetting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.ISecurityNotificationSetting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SecurityNotificationSetting message, length delimited. Does not implicitly {@link proto.SecurityNotificationSetting.verify|verify} messages. + * @param message SecurityNotificationSetting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.ISecurityNotificationSetting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SecurityNotificationSetting message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SecurityNotificationSetting + * @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.SecurityNotificationSetting; + + /** + * Decodes a SecurityNotificationSetting message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SecurityNotificationSetting + * @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.SecurityNotificationSetting; + + /** + * Verifies a SecurityNotificationSetting 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 SecurityNotificationSetting message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SecurityNotificationSetting + */ + public static fromObject(object: { [k: string]: any }): proto.SecurityNotificationSetting; + + /** + * Creates a plain object from a SecurityNotificationSetting message. Also converts values to other types if specified. + * @param message SecurityNotificationSetting + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.SecurityNotificationSetting, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SecurityNotificationSetting to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a PushNameSetting. */ + interface IPushNameSetting { + + /** PushNameSetting name */ + name?: (string|null); + } + + /** Represents a PushNameSetting. */ + class PushNameSetting implements IPushNameSetting { + + /** + * Constructs a new PushNameSetting. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IPushNameSetting); + + /** PushNameSetting name. */ + public name: string; + + /** + * Creates a new PushNameSetting instance using the specified properties. + * @param [properties] Properties to set + * @returns PushNameSetting instance + */ + public static create(properties?: proto.IPushNameSetting): proto.PushNameSetting; + + /** + * Encodes the specified PushNameSetting message. Does not implicitly {@link proto.PushNameSetting.verify|verify} messages. + * @param message PushNameSetting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IPushNameSetting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PushNameSetting message, length delimited. Does not implicitly {@link proto.PushNameSetting.verify|verify} messages. + * @param message PushNameSetting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IPushNameSetting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PushNameSetting message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PushNameSetting + * @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.PushNameSetting; + + /** + * Decodes a PushNameSetting message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PushNameSetting + * @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.PushNameSetting; + + /** + * Verifies a PushNameSetting 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 PushNameSetting message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PushNameSetting + */ + public static fromObject(object: { [k: string]: any }): proto.PushNameSetting; + + /** + * Creates a plain object from a PushNameSetting message. Also converts values to other types if specified. + * @param message PushNameSetting + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.PushNameSetting, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PushNameSetting to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a LocaleSetting. */ + interface ILocaleSetting { + + /** LocaleSetting locale */ + locale?: (string|null); + } + + /** Represents a LocaleSetting. */ + class LocaleSetting implements ILocaleSetting { + + /** + * Constructs a new LocaleSetting. + * @param [properties] Properties to set + */ + constructor(properties?: proto.ILocaleSetting); + + /** LocaleSetting locale. */ + public locale: string; + + /** + * Creates a new LocaleSetting instance using the specified properties. + * @param [properties] Properties to set + * @returns LocaleSetting instance + */ + public static create(properties?: proto.ILocaleSetting): proto.LocaleSetting; + + /** + * Encodes the specified LocaleSetting message. Does not implicitly {@link proto.LocaleSetting.verify|verify} messages. + * @param message LocaleSetting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.ILocaleSetting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LocaleSetting message, length delimited. Does not implicitly {@link proto.LocaleSetting.verify|verify} messages. + * @param message LocaleSetting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.ILocaleSetting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LocaleSetting message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LocaleSetting + * @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.LocaleSetting; + + /** + * Decodes a LocaleSetting message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LocaleSetting + * @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.LocaleSetting; + + /** + * Verifies a LocaleSetting 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 LocaleSetting message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LocaleSetting + */ + public static fromObject(object: { [k: string]: any }): proto.LocaleSetting; + + /** + * Creates a plain object from a LocaleSetting message. Also converts values to other types if specified. + * @param message LocaleSetting + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.LocaleSetting, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LocaleSetting to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a QuickReplyAction. */ + interface IQuickReplyAction { + + /** QuickReplyAction shortcut */ + shortcut?: (string|null); + + /** QuickReplyAction message */ + message?: (string|null); + + /** QuickReplyAction keywords */ + keywords?: (string[]|null); + + /** QuickReplyAction count */ + count?: (number|null); + + /** QuickReplyAction deleted */ + deleted?: (boolean|null); + } + + /** Represents a QuickReplyAction. */ + class QuickReplyAction implements IQuickReplyAction { + + /** + * Constructs a new QuickReplyAction. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IQuickReplyAction); + + /** QuickReplyAction shortcut. */ + public shortcut: string; + + /** QuickReplyAction message. */ + public message: string; + + /** QuickReplyAction keywords. */ + public keywords: string[]; + + /** QuickReplyAction count. */ + public count: number; + + /** QuickReplyAction deleted. */ + public deleted: boolean; + + /** + * Creates a new QuickReplyAction instance using the specified properties. + * @param [properties] Properties to set + * @returns QuickReplyAction instance + */ + public static create(properties?: proto.IQuickReplyAction): proto.QuickReplyAction; + + /** + * Encodes the specified QuickReplyAction message. Does not implicitly {@link proto.QuickReplyAction.verify|verify} messages. + * @param message QuickReplyAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IQuickReplyAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QuickReplyAction message, length delimited. Does not implicitly {@link proto.QuickReplyAction.verify|verify} messages. + * @param message QuickReplyAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IQuickReplyAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QuickReplyAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QuickReplyAction + * @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.QuickReplyAction; + + /** + * Decodes a QuickReplyAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QuickReplyAction + * @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.QuickReplyAction; + + /** + * Verifies a QuickReplyAction 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 QuickReplyAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QuickReplyAction + */ + public static fromObject(object: { [k: string]: any }): proto.QuickReplyAction; + + /** + * Creates a plain object from a QuickReplyAction message. Also converts values to other types if specified. + * @param message QuickReplyAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.QuickReplyAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QuickReplyAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a LabelAssociationAction. */ + interface ILabelAssociationAction { + + /** LabelAssociationAction labeled */ + labeled?: (boolean|null); + } + + /** Represents a LabelAssociationAction. */ + class LabelAssociationAction implements ILabelAssociationAction { + + /** + * Constructs a new LabelAssociationAction. + * @param [properties] Properties to set + */ + constructor(properties?: proto.ILabelAssociationAction); + + /** LabelAssociationAction labeled. */ + public labeled: boolean; + + /** + * Creates a new LabelAssociationAction instance using the specified properties. + * @param [properties] Properties to set + * @returns LabelAssociationAction instance + */ + public static create(properties?: proto.ILabelAssociationAction): proto.LabelAssociationAction; + + /** + * Encodes the specified LabelAssociationAction message. Does not implicitly {@link proto.LabelAssociationAction.verify|verify} messages. + * @param message LabelAssociationAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.ILabelAssociationAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LabelAssociationAction message, length delimited. Does not implicitly {@link proto.LabelAssociationAction.verify|verify} messages. + * @param message LabelAssociationAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.ILabelAssociationAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LabelAssociationAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LabelAssociationAction + * @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.LabelAssociationAction; + + /** + * Decodes a LabelAssociationAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LabelAssociationAction + * @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.LabelAssociationAction; + + /** + * Verifies a LabelAssociationAction 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 LabelAssociationAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LabelAssociationAction + */ + public static fromObject(object: { [k: string]: any }): proto.LabelAssociationAction; + + /** + * Creates a plain object from a LabelAssociationAction message. Also converts values to other types if specified. + * @param message LabelAssociationAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.LabelAssociationAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LabelAssociationAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a LabelEditAction. */ + interface ILabelEditAction { + + /** LabelEditAction name */ + name?: (string|null); + + /** LabelEditAction color */ + color?: (number|null); + + /** LabelEditAction predefinedId */ + predefinedId?: (number|null); + + /** LabelEditAction deleted */ + deleted?: (boolean|null); + } + + /** Represents a LabelEditAction. */ + class LabelEditAction implements ILabelEditAction { + + /** + * Constructs a new LabelEditAction. + * @param [properties] Properties to set + */ + constructor(properties?: proto.ILabelEditAction); + + /** LabelEditAction name. */ + public name: string; + + /** LabelEditAction color. */ + public color: number; + + /** LabelEditAction predefinedId. */ + public predefinedId: number; + + /** LabelEditAction deleted. */ + public deleted: boolean; + + /** + * Creates a new LabelEditAction instance using the specified properties. + * @param [properties] Properties to set + * @returns LabelEditAction instance + */ + public static create(properties?: proto.ILabelEditAction): proto.LabelEditAction; + + /** + * Encodes the specified LabelEditAction message. Does not implicitly {@link proto.LabelEditAction.verify|verify} messages. + * @param message LabelEditAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.ILabelEditAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LabelEditAction message, length delimited. Does not implicitly {@link proto.LabelEditAction.verify|verify} messages. + * @param message LabelEditAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.ILabelEditAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LabelEditAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LabelEditAction + * @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.LabelEditAction; + + /** + * Decodes a LabelEditAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LabelEditAction + * @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.LabelEditAction; + + /** + * Verifies a LabelEditAction 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 LabelEditAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LabelEditAction + */ + public static fromObject(object: { [k: string]: any }): proto.LabelEditAction; + + /** + * Creates a plain object from a LabelEditAction message. Also converts values to other types if specified. + * @param message LabelEditAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.LabelEditAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LabelEditAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a RecentStickerWeightsAction. */ + interface IRecentStickerWeightsAction { + + /** RecentStickerWeightsAction weights */ + weights?: (proto.IRecentStickerWeight[]|null); + } + + /** Represents a RecentStickerWeightsAction. */ + class RecentStickerWeightsAction implements IRecentStickerWeightsAction { + + /** + * Constructs a new RecentStickerWeightsAction. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IRecentStickerWeightsAction); + + /** RecentStickerWeightsAction weights. */ + public weights: proto.IRecentStickerWeight[]; + + /** + * Creates a new RecentStickerWeightsAction instance using the specified properties. + * @param [properties] Properties to set + * @returns RecentStickerWeightsAction instance + */ + public static create(properties?: proto.IRecentStickerWeightsAction): proto.RecentStickerWeightsAction; + + /** + * Encodes the specified RecentStickerWeightsAction message. Does not implicitly {@link proto.RecentStickerWeightsAction.verify|verify} messages. + * @param message RecentStickerWeightsAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IRecentStickerWeightsAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RecentStickerWeightsAction message, length delimited. Does not implicitly {@link proto.RecentStickerWeightsAction.verify|verify} messages. + * @param message RecentStickerWeightsAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IRecentStickerWeightsAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RecentStickerWeightsAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RecentStickerWeightsAction + * @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.RecentStickerWeightsAction; + + /** + * Decodes a RecentStickerWeightsAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RecentStickerWeightsAction + * @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.RecentStickerWeightsAction; + + /** + * Verifies a RecentStickerWeightsAction 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 RecentStickerWeightsAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RecentStickerWeightsAction + */ + public static fromObject(object: { [k: string]: any }): proto.RecentStickerWeightsAction; + + /** + * Creates a plain object from a RecentStickerWeightsAction message. Also converts values to other types if specified. + * @param message RecentStickerWeightsAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.RecentStickerWeightsAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RecentStickerWeightsAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a RecentStickerMetadata. */ + interface IRecentStickerMetadata { + + /** RecentStickerMetadata directPath */ + directPath?: (string|null); + + /** RecentStickerMetadata encFilehash */ + encFilehash?: (string|null); + + /** RecentStickerMetadata mediaKey */ + mediaKey?: (string|null); + + /** RecentStickerMetadata stanzaId */ + stanzaId?: (string|null); + + /** RecentStickerMetadata chatJid */ + chatJid?: (string|null); + + /** RecentStickerMetadata participant */ + participant?: (string|null); + + /** RecentStickerMetadata isSentByMe */ + isSentByMe?: (boolean|null); + } + + /** Represents a RecentStickerMetadata. */ + class RecentStickerMetadata implements IRecentStickerMetadata { + + /** + * Constructs a new RecentStickerMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IRecentStickerMetadata); + + /** RecentStickerMetadata directPath. */ + public directPath: string; + + /** RecentStickerMetadata encFilehash. */ + public encFilehash: string; + + /** RecentStickerMetadata mediaKey. */ + public mediaKey: string; + + /** RecentStickerMetadata stanzaId. */ + public stanzaId: string; + + /** RecentStickerMetadata chatJid. */ + public chatJid: string; + + /** RecentStickerMetadata participant. */ + public participant: string; + + /** RecentStickerMetadata isSentByMe. */ + public isSentByMe: boolean; + + /** + * Creates a new RecentStickerMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns RecentStickerMetadata instance + */ + public static create(properties?: proto.IRecentStickerMetadata): proto.RecentStickerMetadata; + + /** + * Encodes the specified RecentStickerMetadata message. Does not implicitly {@link proto.RecentStickerMetadata.verify|verify} messages. + * @param message RecentStickerMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IRecentStickerMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RecentStickerMetadata message, length delimited. Does not implicitly {@link proto.RecentStickerMetadata.verify|verify} messages. + * @param message RecentStickerMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IRecentStickerMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RecentStickerMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RecentStickerMetadata + * @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.RecentStickerMetadata; + + /** + * Decodes a RecentStickerMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RecentStickerMetadata + * @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.RecentStickerMetadata; + + /** + * Verifies a RecentStickerMetadata 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 RecentStickerMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RecentStickerMetadata + */ + public static fromObject(object: { [k: string]: any }): proto.RecentStickerMetadata; + + /** + * Creates a plain object from a RecentStickerMetadata message. Also converts values to other types if specified. + * @param message RecentStickerMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.RecentStickerMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RecentStickerMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a RecentEmojiWeightsAction. */ + interface IRecentEmojiWeightsAction { + + /** RecentEmojiWeightsAction weights */ + weights?: (proto.IRecentEmojiWeight[]|null); + } + + /** Represents a RecentEmojiWeightsAction. */ + class RecentEmojiWeightsAction implements IRecentEmojiWeightsAction { + + /** + * Constructs a new RecentEmojiWeightsAction. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IRecentEmojiWeightsAction); + + /** RecentEmojiWeightsAction weights. */ + public weights: proto.IRecentEmojiWeight[]; + + /** + * Creates a new RecentEmojiWeightsAction instance using the specified properties. + * @param [properties] Properties to set + * @returns RecentEmojiWeightsAction instance + */ + public static create(properties?: proto.IRecentEmojiWeightsAction): proto.RecentEmojiWeightsAction; + + /** + * Encodes the specified RecentEmojiWeightsAction message. Does not implicitly {@link proto.RecentEmojiWeightsAction.verify|verify} messages. + * @param message RecentEmojiWeightsAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IRecentEmojiWeightsAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RecentEmojiWeightsAction message, length delimited. Does not implicitly {@link proto.RecentEmojiWeightsAction.verify|verify} messages. + * @param message RecentEmojiWeightsAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IRecentEmojiWeightsAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RecentEmojiWeightsAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RecentEmojiWeightsAction + * @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.RecentEmojiWeightsAction; + + /** + * Decodes a RecentEmojiWeightsAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RecentEmojiWeightsAction + * @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.RecentEmojiWeightsAction; + + /** + * Verifies a RecentEmojiWeightsAction 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 RecentEmojiWeightsAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RecentEmojiWeightsAction + */ + public static fromObject(object: { [k: string]: any }): proto.RecentEmojiWeightsAction; + + /** + * Creates a plain object from a RecentEmojiWeightsAction message. Also converts values to other types if specified. + * @param message RecentEmojiWeightsAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.RecentEmojiWeightsAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RecentEmojiWeightsAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an ArchiveChatAction. */ + interface IArchiveChatAction { + + /** ArchiveChatAction archived */ + archived?: (boolean|null); + + /** ArchiveChatAction messageRange */ + messageRange?: (proto.ISyncActionMessageRange|null); + } + + /** Represents an ArchiveChatAction. */ + class ArchiveChatAction implements IArchiveChatAction { + + /** + * Constructs a new ArchiveChatAction. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IArchiveChatAction); + + /** ArchiveChatAction archived. */ + public archived: boolean; + + /** ArchiveChatAction messageRange. */ + public messageRange?: (proto.ISyncActionMessageRange|null); + + /** + * Creates a new ArchiveChatAction instance using the specified properties. + * @param [properties] Properties to set + * @returns ArchiveChatAction instance + */ + public static create(properties?: proto.IArchiveChatAction): proto.ArchiveChatAction; + + /** + * Encodes the specified ArchiveChatAction message. Does not implicitly {@link proto.ArchiveChatAction.verify|verify} messages. + * @param message ArchiveChatAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IArchiveChatAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ArchiveChatAction message, length delimited. Does not implicitly {@link proto.ArchiveChatAction.verify|verify} messages. + * @param message ArchiveChatAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IArchiveChatAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ArchiveChatAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ArchiveChatAction + * @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.ArchiveChatAction; + + /** + * Decodes an ArchiveChatAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ArchiveChatAction + * @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.ArchiveChatAction; + + /** + * Verifies an ArchiveChatAction 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 ArchiveChatAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ArchiveChatAction + */ + public static fromObject(object: { [k: string]: any }): proto.ArchiveChatAction; + + /** + * Creates a plain object from an ArchiveChatAction message. Also converts values to other types if specified. + * @param message ArchiveChatAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.ArchiveChatAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ArchiveChatAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteMessageForMeAction. */ + interface IDeleteMessageForMeAction { + + /** DeleteMessageForMeAction deleteMedia */ + deleteMedia?: (boolean|null); + + /** DeleteMessageForMeAction messageTimestamp */ + messageTimestamp?: (number|Long|null); + } + + /** Represents a DeleteMessageForMeAction. */ + class DeleteMessageForMeAction implements IDeleteMessageForMeAction { + + /** + * Constructs a new DeleteMessageForMeAction. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IDeleteMessageForMeAction); + + /** DeleteMessageForMeAction deleteMedia. */ + public deleteMedia: boolean; + + /** DeleteMessageForMeAction messageTimestamp. */ + public messageTimestamp: (number|Long); + + /** + * Creates a new DeleteMessageForMeAction instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteMessageForMeAction instance + */ + public static create(properties?: proto.IDeleteMessageForMeAction): proto.DeleteMessageForMeAction; + + /** + * Encodes the specified DeleteMessageForMeAction message. Does not implicitly {@link proto.DeleteMessageForMeAction.verify|verify} messages. + * @param message DeleteMessageForMeAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IDeleteMessageForMeAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteMessageForMeAction message, length delimited. Does not implicitly {@link proto.DeleteMessageForMeAction.verify|verify} messages. + * @param message DeleteMessageForMeAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IDeleteMessageForMeAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteMessageForMeAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteMessageForMeAction + * @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.DeleteMessageForMeAction; + + /** + * Decodes a DeleteMessageForMeAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteMessageForMeAction + * @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.DeleteMessageForMeAction; + + /** + * Verifies a DeleteMessageForMeAction 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 DeleteMessageForMeAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteMessageForMeAction + */ + public static fromObject(object: { [k: string]: any }): proto.DeleteMessageForMeAction; + + /** + * Creates a plain object from a DeleteMessageForMeAction message. Also converts values to other types if specified. + * @param message DeleteMessageForMeAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.DeleteMessageForMeAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteMessageForMeAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MarkChatAsReadAction. */ + interface IMarkChatAsReadAction { + + /** MarkChatAsReadAction read */ + read?: (boolean|null); + + /** MarkChatAsReadAction messageRange */ + messageRange?: (proto.ISyncActionMessageRange|null); + } + + /** Represents a MarkChatAsReadAction. */ + class MarkChatAsReadAction implements IMarkChatAsReadAction { + + /** + * Constructs a new MarkChatAsReadAction. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IMarkChatAsReadAction); + + /** MarkChatAsReadAction read. */ + public read: boolean; + + /** MarkChatAsReadAction messageRange. */ + public messageRange?: (proto.ISyncActionMessageRange|null); + + /** + * Creates a new MarkChatAsReadAction instance using the specified properties. + * @param [properties] Properties to set + * @returns MarkChatAsReadAction instance + */ + public static create(properties?: proto.IMarkChatAsReadAction): proto.MarkChatAsReadAction; + + /** + * Encodes the specified MarkChatAsReadAction message. Does not implicitly {@link proto.MarkChatAsReadAction.verify|verify} messages. + * @param message MarkChatAsReadAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IMarkChatAsReadAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MarkChatAsReadAction message, length delimited. Does not implicitly {@link proto.MarkChatAsReadAction.verify|verify} messages. + * @param message MarkChatAsReadAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IMarkChatAsReadAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MarkChatAsReadAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MarkChatAsReadAction + * @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.MarkChatAsReadAction; + + /** + * Decodes a MarkChatAsReadAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MarkChatAsReadAction + * @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.MarkChatAsReadAction; + + /** + * Verifies a MarkChatAsReadAction 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 MarkChatAsReadAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MarkChatAsReadAction + */ + public static fromObject(object: { [k: string]: any }): proto.MarkChatAsReadAction; + + /** + * Creates a plain object from a MarkChatAsReadAction message. Also converts values to other types if specified. + * @param message MarkChatAsReadAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.MarkChatAsReadAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MarkChatAsReadAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ClearChatAction. */ + interface IClearChatAction { + + /** ClearChatAction messageRange */ + messageRange?: (proto.ISyncActionMessageRange|null); + } + + /** Represents a ClearChatAction. */ + class ClearChatAction implements IClearChatAction { + + /** + * Constructs a new ClearChatAction. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IClearChatAction); + + /** ClearChatAction messageRange. */ + public messageRange?: (proto.ISyncActionMessageRange|null); + + /** + * Creates a new ClearChatAction instance using the specified properties. + * @param [properties] Properties to set + * @returns ClearChatAction instance + */ + public static create(properties?: proto.IClearChatAction): proto.ClearChatAction; + + /** + * Encodes the specified ClearChatAction message. Does not implicitly {@link proto.ClearChatAction.verify|verify} messages. + * @param message ClearChatAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IClearChatAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ClearChatAction message, length delimited. Does not implicitly {@link proto.ClearChatAction.verify|verify} messages. + * @param message ClearChatAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IClearChatAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ClearChatAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ClearChatAction + * @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.ClearChatAction; + + /** + * Decodes a ClearChatAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ClearChatAction + * @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.ClearChatAction; + + /** + * Verifies a ClearChatAction 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 ClearChatAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ClearChatAction + */ + public static fromObject(object: { [k: string]: any }): proto.ClearChatAction; + + /** + * Creates a plain object from a ClearChatAction message. Also converts values to other types if specified. + * @param message ClearChatAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.ClearChatAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ClearChatAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteChatAction. */ + interface IDeleteChatAction { + + /** DeleteChatAction messageRange */ + messageRange?: (proto.ISyncActionMessageRange|null); + } + + /** Represents a DeleteChatAction. */ + class DeleteChatAction implements IDeleteChatAction { + + /** + * Constructs a new DeleteChatAction. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IDeleteChatAction); + + /** DeleteChatAction messageRange. */ + public messageRange?: (proto.ISyncActionMessageRange|null); + + /** + * Creates a new DeleteChatAction instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteChatAction instance + */ + public static create(properties?: proto.IDeleteChatAction): proto.DeleteChatAction; + + /** + * Encodes the specified DeleteChatAction message. Does not implicitly {@link proto.DeleteChatAction.verify|verify} messages. + * @param message DeleteChatAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IDeleteChatAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteChatAction message, length delimited. Does not implicitly {@link proto.DeleteChatAction.verify|verify} messages. + * @param message DeleteChatAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IDeleteChatAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteChatAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteChatAction + * @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.DeleteChatAction; + + /** + * Decodes a DeleteChatAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteChatAction + * @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.DeleteChatAction; + + /** + * Verifies a DeleteChatAction 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 DeleteChatAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteChatAction + */ + public static fromObject(object: { [k: string]: any }): proto.DeleteChatAction; + + /** + * Creates a plain object from a DeleteChatAction message. Also converts values to other types if specified. + * @param message DeleteChatAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.DeleteChatAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteChatAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UnarchiveChatsSetting. */ + interface IUnarchiveChatsSetting { + + /** UnarchiveChatsSetting unarchiveChats */ + unarchiveChats?: (boolean|null); + } + + /** Represents an UnarchiveChatsSetting. */ + class UnarchiveChatsSetting implements IUnarchiveChatsSetting { + + /** + * Constructs a new UnarchiveChatsSetting. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IUnarchiveChatsSetting); + + /** UnarchiveChatsSetting unarchiveChats. */ + public unarchiveChats: boolean; + + /** + * Creates a new UnarchiveChatsSetting instance using the specified properties. + * @param [properties] Properties to set + * @returns UnarchiveChatsSetting instance + */ + public static create(properties?: proto.IUnarchiveChatsSetting): proto.UnarchiveChatsSetting; + + /** + * Encodes the specified UnarchiveChatsSetting message. Does not implicitly {@link proto.UnarchiveChatsSetting.verify|verify} messages. + * @param message UnarchiveChatsSetting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IUnarchiveChatsSetting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UnarchiveChatsSetting message, length delimited. Does not implicitly {@link proto.UnarchiveChatsSetting.verify|verify} messages. + * @param message UnarchiveChatsSetting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IUnarchiveChatsSetting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UnarchiveChatsSetting message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UnarchiveChatsSetting + * @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.UnarchiveChatsSetting; + + /** + * Decodes an UnarchiveChatsSetting message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UnarchiveChatsSetting + * @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.UnarchiveChatsSetting; + + /** + * Verifies an UnarchiveChatsSetting 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 UnarchiveChatsSetting message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UnarchiveChatsSetting + */ + public static fromObject(object: { [k: string]: any }): proto.UnarchiveChatsSetting; + + /** + * Creates a plain object from an UnarchiveChatsSetting message. Also converts values to other types if specified. + * @param message UnarchiveChatsSetting + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.UnarchiveChatsSetting, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UnarchiveChatsSetting to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a SyncActionMessageRange. */ + interface ISyncActionMessageRange { + + /** SyncActionMessageRange lastMessageTimestamp */ + lastMessageTimestamp?: (number|Long|null); + + /** SyncActionMessageRange lastSystemMessageTimestamp */ + lastSystemMessageTimestamp?: (number|Long|null); + + /** SyncActionMessageRange messages */ + messages?: (proto.ISyncActionMessage[]|null); + } + + /** Represents a SyncActionMessageRange. */ + class SyncActionMessageRange implements ISyncActionMessageRange { + + /** + * Constructs a new SyncActionMessageRange. + * @param [properties] Properties to set + */ + constructor(properties?: proto.ISyncActionMessageRange); + + /** SyncActionMessageRange lastMessageTimestamp. */ + public lastMessageTimestamp: (number|Long); + + /** SyncActionMessageRange lastSystemMessageTimestamp. */ + public lastSystemMessageTimestamp: (number|Long); + + /** SyncActionMessageRange messages. */ + public messages: proto.ISyncActionMessage[]; + + /** + * Creates a new SyncActionMessageRange instance using the specified properties. + * @param [properties] Properties to set + * @returns SyncActionMessageRange instance + */ + public static create(properties?: proto.ISyncActionMessageRange): proto.SyncActionMessageRange; + + /** + * Encodes the specified SyncActionMessageRange message. Does not implicitly {@link proto.SyncActionMessageRange.verify|verify} messages. + * @param message SyncActionMessageRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.ISyncActionMessageRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SyncActionMessageRange message, length delimited. Does not implicitly {@link proto.SyncActionMessageRange.verify|verify} messages. + * @param message SyncActionMessageRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.ISyncActionMessageRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SyncActionMessageRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SyncActionMessageRange + * @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.SyncActionMessageRange; + + /** + * Decodes a SyncActionMessageRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SyncActionMessageRange + * @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.SyncActionMessageRange; + + /** + * Verifies a SyncActionMessageRange 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 SyncActionMessageRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SyncActionMessageRange + */ + public static fromObject(object: { [k: string]: any }): proto.SyncActionMessageRange; + + /** + * Creates a plain object from a SyncActionMessageRange message. Also converts values to other types if specified. + * @param message SyncActionMessageRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.SyncActionMessageRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SyncActionMessageRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a SyncActionMessage. */ + interface ISyncActionMessage { + + /** SyncActionMessage key */ + key?: (proto.IMessageKey|null); + + /** SyncActionMessage timestamp */ + timestamp?: (number|Long|null); + } + + /** Represents a SyncActionMessage. */ + class SyncActionMessage implements ISyncActionMessage { + + /** + * Constructs a new SyncActionMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.ISyncActionMessage); + + /** SyncActionMessage key. */ + public key?: (proto.IMessageKey|null); + + /** SyncActionMessage timestamp. */ + public timestamp: (number|Long); + + /** + * Creates a new SyncActionMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns SyncActionMessage instance + */ + public static create(properties?: proto.ISyncActionMessage): proto.SyncActionMessage; + + /** + * Encodes the specified SyncActionMessage message. Does not implicitly {@link proto.SyncActionMessage.verify|verify} messages. + * @param message SyncActionMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.ISyncActionMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SyncActionMessage message, length delimited. Does not implicitly {@link proto.SyncActionMessage.verify|verify} messages. + * @param message SyncActionMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.ISyncActionMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SyncActionMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SyncActionMessage + * @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.SyncActionMessage; + + /** + * Decodes a SyncActionMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SyncActionMessage + * @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.SyncActionMessage; + + /** + * Verifies a SyncActionMessage 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 SyncActionMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SyncActionMessage + */ + public static fromObject(object: { [k: string]: any }): proto.SyncActionMessage; + + /** + * Creates a plain object from a SyncActionMessage message. Also converts values to other types if specified. + * @param message SyncActionMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.SyncActionMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SyncActionMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a KeyExpiration. */ + interface IKeyExpiration { + + /** KeyExpiration expiredKeyEpoch */ + expiredKeyEpoch?: (number|null); + } + + /** Represents a KeyExpiration. */ + class KeyExpiration implements IKeyExpiration { + + /** + * Constructs a new KeyExpiration. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IKeyExpiration); + + /** KeyExpiration expiredKeyEpoch. */ + public expiredKeyEpoch: number; + + /** + * Creates a new KeyExpiration instance using the specified properties. + * @param [properties] Properties to set + * @returns KeyExpiration instance + */ + public static create(properties?: proto.IKeyExpiration): proto.KeyExpiration; + + /** + * Encodes the specified KeyExpiration message. Does not implicitly {@link proto.KeyExpiration.verify|verify} messages. + * @param message KeyExpiration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IKeyExpiration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified KeyExpiration message, length delimited. Does not implicitly {@link proto.KeyExpiration.verify|verify} messages. + * @param message KeyExpiration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IKeyExpiration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a KeyExpiration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns KeyExpiration + * @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.KeyExpiration; + + /** + * Decodes a KeyExpiration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns KeyExpiration + * @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.KeyExpiration; + + /** + * Verifies a KeyExpiration 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 KeyExpiration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns KeyExpiration + */ + public static fromObject(object: { [k: string]: any }): proto.KeyExpiration; + + /** + * Creates a plain object from a KeyExpiration message. Also converts values to other types if specified. + * @param message KeyExpiration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.KeyExpiration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this KeyExpiration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a SyncActionValue. */ + interface ISyncActionValue { + + /** SyncActionValue timestamp */ + timestamp?: (number|Long|null); + + /** SyncActionValue starAction */ + starAction?: (proto.IStarAction|null); + + /** SyncActionValue contactAction */ + contactAction?: (proto.IContactAction|null); + + /** SyncActionValue muteAction */ + muteAction?: (proto.IMuteAction|null); + + /** SyncActionValue pinAction */ + pinAction?: (proto.IPinAction|null); + + /** SyncActionValue securityNotificationSetting */ + securityNotificationSetting?: (proto.ISecurityNotificationSetting|null); + + /** SyncActionValue pushNameSetting */ + pushNameSetting?: (proto.IPushNameSetting|null); + + /** SyncActionValue quickReplyAction */ + quickReplyAction?: (proto.IQuickReplyAction|null); + + /** SyncActionValue recentStickerWeightsAction */ + recentStickerWeightsAction?: (proto.IRecentStickerWeightsAction|null); + + /** SyncActionValue recentStickerMetadata */ + recentStickerMetadata?: (proto.IRecentStickerMetadata|null); + + /** SyncActionValue recentEmojiWeightsAction */ + recentEmojiWeightsAction?: (proto.IRecentEmojiWeightsAction|null); + + /** SyncActionValue labelEditAction */ + labelEditAction?: (proto.ILabelEditAction|null); + + /** SyncActionValue labelAssociationAction */ + labelAssociationAction?: (proto.ILabelAssociationAction|null); + + /** SyncActionValue localeSetting */ + localeSetting?: (proto.ILocaleSetting|null); + + /** SyncActionValue archiveChatAction */ + archiveChatAction?: (proto.IArchiveChatAction|null); + + /** SyncActionValue deleteMessageForMeAction */ + deleteMessageForMeAction?: (proto.IDeleteMessageForMeAction|null); + + /** SyncActionValue keyExpiration */ + keyExpiration?: (proto.IKeyExpiration|null); + + /** SyncActionValue markChatAsReadAction */ + markChatAsReadAction?: (proto.IMarkChatAsReadAction|null); + + /** SyncActionValue clearChatAction */ + clearChatAction?: (proto.IClearChatAction|null); + + /** SyncActionValue deleteChatAction */ + deleteChatAction?: (proto.IDeleteChatAction|null); + + /** SyncActionValue unarchiveChatsSetting */ + unarchiveChatsSetting?: (proto.IUnarchiveChatsSetting|null); + } + + /** Represents a SyncActionValue. */ + class SyncActionValue implements ISyncActionValue { + + /** + * Constructs a new SyncActionValue. + * @param [properties] Properties to set + */ + constructor(properties?: proto.ISyncActionValue); + + /** SyncActionValue timestamp. */ + public timestamp: (number|Long); + + /** SyncActionValue starAction. */ + public starAction?: (proto.IStarAction|null); + + /** SyncActionValue contactAction. */ + public contactAction?: (proto.IContactAction|null); + + /** SyncActionValue muteAction. */ + public muteAction?: (proto.IMuteAction|null); + + /** SyncActionValue pinAction. */ + public pinAction?: (proto.IPinAction|null); + + /** SyncActionValue securityNotificationSetting. */ + public securityNotificationSetting?: (proto.ISecurityNotificationSetting|null); + + /** SyncActionValue pushNameSetting. */ + public pushNameSetting?: (proto.IPushNameSetting|null); + + /** SyncActionValue quickReplyAction. */ + public quickReplyAction?: (proto.IQuickReplyAction|null); + + /** SyncActionValue recentStickerWeightsAction. */ + public recentStickerWeightsAction?: (proto.IRecentStickerWeightsAction|null); + + /** SyncActionValue recentStickerMetadata. */ + public recentStickerMetadata?: (proto.IRecentStickerMetadata|null); + + /** SyncActionValue recentEmojiWeightsAction. */ + public recentEmojiWeightsAction?: (proto.IRecentEmojiWeightsAction|null); + + /** SyncActionValue labelEditAction. */ + public labelEditAction?: (proto.ILabelEditAction|null); + + /** SyncActionValue labelAssociationAction. */ + public labelAssociationAction?: (proto.ILabelAssociationAction|null); + + /** SyncActionValue localeSetting. */ + public localeSetting?: (proto.ILocaleSetting|null); + + /** SyncActionValue archiveChatAction. */ + public archiveChatAction?: (proto.IArchiveChatAction|null); + + /** SyncActionValue deleteMessageForMeAction. */ + public deleteMessageForMeAction?: (proto.IDeleteMessageForMeAction|null); + + /** SyncActionValue keyExpiration. */ + public keyExpiration?: (proto.IKeyExpiration|null); + + /** SyncActionValue markChatAsReadAction. */ + public markChatAsReadAction?: (proto.IMarkChatAsReadAction|null); + + /** SyncActionValue clearChatAction. */ + public clearChatAction?: (proto.IClearChatAction|null); + + /** SyncActionValue deleteChatAction. */ + public deleteChatAction?: (proto.IDeleteChatAction|null); + + /** SyncActionValue unarchiveChatsSetting. */ + public unarchiveChatsSetting?: (proto.IUnarchiveChatsSetting|null); + + /** + * Creates a new SyncActionValue instance using the specified properties. + * @param [properties] Properties to set + * @returns SyncActionValue instance + */ + public static create(properties?: proto.ISyncActionValue): proto.SyncActionValue; + + /** + * Encodes the specified SyncActionValue message. Does not implicitly {@link proto.SyncActionValue.verify|verify} messages. + * @param message SyncActionValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.ISyncActionValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SyncActionValue message, length delimited. Does not implicitly {@link proto.SyncActionValue.verify|verify} messages. + * @param message SyncActionValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.ISyncActionValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SyncActionValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SyncActionValue + * @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; + + /** + * Decodes a SyncActionValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SyncActionValue + * @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; + + /** + * Verifies a SyncActionValue 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 SyncActionValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SyncActionValue + */ + public static fromObject(object: { [k: string]: any }): proto.SyncActionValue; + + /** + * Creates a plain object from a SyncActionValue message. Also converts values to other types if specified. + * @param message SyncActionValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.SyncActionValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SyncActionValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a RecentEmojiWeight. */ + interface IRecentEmojiWeight { + + /** RecentEmojiWeight emoji */ + emoji?: (string|null); + + /** RecentEmojiWeight weight */ + weight?: (number|null); + } + + /** Represents a RecentEmojiWeight. */ + class RecentEmojiWeight implements IRecentEmojiWeight { + + /** + * Constructs a new RecentEmojiWeight. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IRecentEmojiWeight); + + /** RecentEmojiWeight emoji. */ + public emoji: string; + + /** RecentEmojiWeight weight. */ + public weight: number; + + /** + * Creates a new RecentEmojiWeight instance using the specified properties. + * @param [properties] Properties to set + * @returns RecentEmojiWeight instance + */ + public static create(properties?: proto.IRecentEmojiWeight): proto.RecentEmojiWeight; + + /** + * Encodes the specified RecentEmojiWeight message. Does not implicitly {@link proto.RecentEmojiWeight.verify|verify} messages. + * @param message RecentEmojiWeight message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IRecentEmojiWeight, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RecentEmojiWeight message, length delimited. Does not implicitly {@link proto.RecentEmojiWeight.verify|verify} messages. + * @param message RecentEmojiWeight message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IRecentEmojiWeight, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RecentEmojiWeight message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RecentEmojiWeight + * @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.RecentEmojiWeight; + + /** + * Decodes a RecentEmojiWeight message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RecentEmojiWeight + * @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.RecentEmojiWeight; + + /** + * Verifies a RecentEmojiWeight 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 RecentEmojiWeight message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RecentEmojiWeight + */ + public static fromObject(object: { [k: string]: any }): proto.RecentEmojiWeight; + + /** + * Creates a plain object from a RecentEmojiWeight message. Also converts values to other types if specified. + * @param message RecentEmojiWeight + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.RecentEmojiWeight, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RecentEmojiWeight to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a RecentStickerWeight. */ + interface IRecentStickerWeight { + + /** RecentStickerWeight filehash */ + filehash?: (string|null); + + /** RecentStickerWeight weight */ + weight?: (number|null); + } + + /** Represents a RecentStickerWeight. */ + class RecentStickerWeight implements IRecentStickerWeight { + + /** + * Constructs a new RecentStickerWeight. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IRecentStickerWeight); + + /** RecentStickerWeight filehash. */ + public filehash: string; + + /** RecentStickerWeight weight. */ + public weight: number; + + /** + * Creates a new RecentStickerWeight instance using the specified properties. + * @param [properties] Properties to set + * @returns RecentStickerWeight instance + */ + public static create(properties?: proto.IRecentStickerWeight): proto.RecentStickerWeight; + + /** + * Encodes the specified RecentStickerWeight message. Does not implicitly {@link proto.RecentStickerWeight.verify|verify} messages. + * @param message RecentStickerWeight message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IRecentStickerWeight, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RecentStickerWeight message, length delimited. Does not implicitly {@link proto.RecentStickerWeight.verify|verify} messages. + * @param message RecentStickerWeight message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IRecentStickerWeight, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RecentStickerWeight message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RecentStickerWeight + * @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.RecentStickerWeight; + + /** + * Decodes a RecentStickerWeight message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RecentStickerWeight + * @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.RecentStickerWeight; + + /** + * Verifies a RecentStickerWeight 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 RecentStickerWeight message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RecentStickerWeight + */ + public static fromObject(object: { [k: string]: any }): proto.RecentStickerWeight; + + /** + * Creates a plain object from a RecentStickerWeight message. Also converts values to other types if specified. + * @param message RecentStickerWeight + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.RecentStickerWeight, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RecentStickerWeight to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a SyncdPatch. */ + interface ISyncdPatch { + + /** SyncdPatch version */ + version?: (proto.ISyncdVersion|null); + + /** SyncdPatch mutations */ + mutations?: (proto.ISyncdMutation[]|null); + + /** SyncdPatch externalMutations */ + externalMutations?: (proto.IExternalBlobReference|null); + + /** SyncdPatch snapshotMac */ + snapshotMac?: (Uint8Array|null); + + /** SyncdPatch patchMac */ + patchMac?: (Uint8Array|null); + + /** SyncdPatch keyId */ + keyId?: (proto.IKeyId|null); + + /** SyncdPatch exitCode */ + exitCode?: (proto.IExitCode|null); + + /** SyncdPatch deviceIndex */ + deviceIndex?: (number|null); + } + + /** Represents a SyncdPatch. */ + class SyncdPatch implements ISyncdPatch { + + /** + * Constructs a new SyncdPatch. + * @param [properties] Properties to set + */ + constructor(properties?: proto.ISyncdPatch); + + /** SyncdPatch version. */ + public version?: (proto.ISyncdVersion|null); + + /** SyncdPatch mutations. */ + public mutations: proto.ISyncdMutation[]; + + /** SyncdPatch externalMutations. */ + public externalMutations?: (proto.IExternalBlobReference|null); + + /** SyncdPatch snapshotMac. */ + public snapshotMac: Uint8Array; + + /** SyncdPatch patchMac. */ + public patchMac: Uint8Array; + + /** SyncdPatch keyId. */ + public keyId?: (proto.IKeyId|null); + + /** SyncdPatch exitCode. */ + public exitCode?: (proto.IExitCode|null); + + /** SyncdPatch deviceIndex. */ + public deviceIndex: number; + + /** + * Creates a new SyncdPatch instance using the specified properties. + * @param [properties] Properties to set + * @returns SyncdPatch instance + */ + public static create(properties?: proto.ISyncdPatch): proto.SyncdPatch; + + /** + * Encodes the specified SyncdPatch message. Does not implicitly {@link proto.SyncdPatch.verify|verify} messages. + * @param message SyncdPatch message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.ISyncdPatch, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SyncdPatch message, length delimited. Does not implicitly {@link proto.SyncdPatch.verify|verify} messages. + * @param message SyncdPatch message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.ISyncdPatch, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SyncdPatch message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SyncdPatch + * @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.SyncdPatch; + + /** + * Decodes a SyncdPatch message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SyncdPatch + * @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.SyncdPatch; + + /** + * Verifies a SyncdPatch 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 SyncdPatch message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SyncdPatch + */ + public static fromObject(object: { [k: string]: any }): proto.SyncdPatch; + + /** + * Creates a plain object from a SyncdPatch message. Also converts values to other types if specified. + * @param message SyncdPatch + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.SyncdPatch, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SyncdPatch to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a SyncdMutation. */ + interface ISyncdMutation { + + /** SyncdMutation operation */ + operation?: (proto.SyncdMutation.SyncdMutationSyncdOperation|null); + + /** SyncdMutation record */ + record?: (proto.ISyncdRecord|null); + } + + /** Represents a SyncdMutation. */ + class SyncdMutation implements ISyncdMutation { + + /** + * Constructs a new SyncdMutation. + * @param [properties] Properties to set + */ + constructor(properties?: proto.ISyncdMutation); + + /** SyncdMutation operation. */ + public operation: proto.SyncdMutation.SyncdMutationSyncdOperation; + + /** SyncdMutation record. */ + public record?: (proto.ISyncdRecord|null); + + /** + * Creates a new SyncdMutation instance using the specified properties. + * @param [properties] Properties to set + * @returns SyncdMutation instance + */ + public static create(properties?: proto.ISyncdMutation): proto.SyncdMutation; + + /** + * Encodes the specified SyncdMutation message. Does not implicitly {@link proto.SyncdMutation.verify|verify} messages. + * @param message SyncdMutation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.ISyncdMutation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SyncdMutation message, length delimited. Does not implicitly {@link proto.SyncdMutation.verify|verify} messages. + * @param message SyncdMutation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.ISyncdMutation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SyncdMutation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SyncdMutation + * @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.SyncdMutation; + + /** + * Decodes a SyncdMutation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SyncdMutation + * @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.SyncdMutation; + + /** + * Verifies a SyncdMutation 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 SyncdMutation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SyncdMutation + */ + public static fromObject(object: { [k: string]: any }): proto.SyncdMutation; + + /** + * Creates a plain object from a SyncdMutation message. Also converts values to other types if specified. + * @param message SyncdMutation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.SyncdMutation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SyncdMutation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace SyncdMutation { + + /** SyncdMutationSyncdOperation enum. */ + enum SyncdMutationSyncdOperation { + SET = 0, + REMOVE = 1 + } + } + + /** Properties of a SyncdMutations. */ + interface ISyncdMutations { + + /** SyncdMutations mutations */ + mutations?: (proto.ISyncdMutation[]|null); + } + + /** Represents a SyncdMutations. */ + class SyncdMutations implements ISyncdMutations { + + /** + * Constructs a new SyncdMutations. + * @param [properties] Properties to set + */ + constructor(properties?: proto.ISyncdMutations); + + /** SyncdMutations mutations. */ + public mutations: proto.ISyncdMutation[]; + + /** + * Creates a new SyncdMutations instance using the specified properties. + * @param [properties] Properties to set + * @returns SyncdMutations instance + */ + public static create(properties?: proto.ISyncdMutations): proto.SyncdMutations; + + /** + * Encodes the specified SyncdMutations message. Does not implicitly {@link proto.SyncdMutations.verify|verify} messages. + * @param message SyncdMutations message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.ISyncdMutations, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SyncdMutations message, length delimited. Does not implicitly {@link proto.SyncdMutations.verify|verify} messages. + * @param message SyncdMutations message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.ISyncdMutations, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SyncdMutations message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SyncdMutations + * @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.SyncdMutations; + + /** + * Decodes a SyncdMutations message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SyncdMutations + * @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.SyncdMutations; + + /** + * Verifies a SyncdMutations 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 SyncdMutations message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SyncdMutations + */ + public static fromObject(object: { [k: string]: any }): proto.SyncdMutations; + + /** + * Creates a plain object from a SyncdMutations message. Also converts values to other types if specified. + * @param message SyncdMutations + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.SyncdMutations, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SyncdMutations to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a SyncdSnapshot. */ + interface ISyncdSnapshot { + + /** SyncdSnapshot version */ + version?: (proto.ISyncdVersion|null); + + /** SyncdSnapshot records */ + records?: (proto.ISyncdRecord[]|null); + + /** SyncdSnapshot mac */ + mac?: (Uint8Array|null); + + /** SyncdSnapshot keyId */ + keyId?: (proto.IKeyId|null); + } + + /** Represents a SyncdSnapshot. */ + class SyncdSnapshot implements ISyncdSnapshot { + + /** + * Constructs a new SyncdSnapshot. + * @param [properties] Properties to set + */ + constructor(properties?: proto.ISyncdSnapshot); + + /** SyncdSnapshot version. */ + public version?: (proto.ISyncdVersion|null); + + /** SyncdSnapshot records. */ + public records: proto.ISyncdRecord[]; + + /** SyncdSnapshot mac. */ + public mac: Uint8Array; + + /** SyncdSnapshot keyId. */ + public keyId?: (proto.IKeyId|null); + + /** + * Creates a new SyncdSnapshot instance using the specified properties. + * @param [properties] Properties to set + * @returns SyncdSnapshot instance + */ + public static create(properties?: proto.ISyncdSnapshot): proto.SyncdSnapshot; + + /** + * Encodes the specified SyncdSnapshot message. Does not implicitly {@link proto.SyncdSnapshot.verify|verify} messages. + * @param message SyncdSnapshot message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.ISyncdSnapshot, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SyncdSnapshot message, length delimited. Does not implicitly {@link proto.SyncdSnapshot.verify|verify} messages. + * @param message SyncdSnapshot message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.ISyncdSnapshot, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SyncdSnapshot message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SyncdSnapshot + * @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.SyncdSnapshot; + + /** + * Decodes a SyncdSnapshot message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SyncdSnapshot + * @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.SyncdSnapshot; + + /** + * Verifies a SyncdSnapshot 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 SyncdSnapshot message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SyncdSnapshot + */ + public static fromObject(object: { [k: string]: any }): proto.SyncdSnapshot; + + /** + * Creates a plain object from a SyncdSnapshot message. Also converts values to other types if specified. + * @param message SyncdSnapshot + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.SyncdSnapshot, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SyncdSnapshot to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an ExternalBlobReference. */ + interface IExternalBlobReference { + + /** ExternalBlobReference mediaKey */ + mediaKey?: (Uint8Array|null); + + /** ExternalBlobReference directPath */ + directPath?: (string|null); + + /** ExternalBlobReference handle */ + handle?: (string|null); + + /** ExternalBlobReference fileSizeBytes */ + fileSizeBytes?: (number|Long|null); + + /** ExternalBlobReference fileSha256 */ + fileSha256?: (Uint8Array|null); + + /** ExternalBlobReference fileEncSha256 */ + fileEncSha256?: (Uint8Array|null); + } + + /** Represents an ExternalBlobReference. */ + class ExternalBlobReference implements IExternalBlobReference { + + /** + * Constructs a new ExternalBlobReference. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IExternalBlobReference); + + /** ExternalBlobReference mediaKey. */ + public mediaKey: Uint8Array; + + /** ExternalBlobReference directPath. */ + public directPath: string; + + /** ExternalBlobReference handle. */ + public handle: string; + + /** ExternalBlobReference fileSizeBytes. */ + public fileSizeBytes: (number|Long); + + /** ExternalBlobReference fileSha256. */ + public fileSha256: Uint8Array; + + /** ExternalBlobReference fileEncSha256. */ + public fileEncSha256: Uint8Array; + + /** + * Creates a new ExternalBlobReference instance using the specified properties. + * @param [properties] Properties to set + * @returns ExternalBlobReference instance + */ + public static create(properties?: proto.IExternalBlobReference): proto.ExternalBlobReference; + + /** + * Encodes the specified ExternalBlobReference message. Does not implicitly {@link proto.ExternalBlobReference.verify|verify} messages. + * @param message ExternalBlobReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IExternalBlobReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExternalBlobReference message, length delimited. Does not implicitly {@link proto.ExternalBlobReference.verify|verify} messages. + * @param message ExternalBlobReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IExternalBlobReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExternalBlobReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExternalBlobReference + * @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.ExternalBlobReference; + + /** + * Decodes an ExternalBlobReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExternalBlobReference + * @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.ExternalBlobReference; + + /** + * Verifies an ExternalBlobReference 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 ExternalBlobReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExternalBlobReference + */ + public static fromObject(object: { [k: string]: any }): proto.ExternalBlobReference; + + /** + * Creates a plain object from an ExternalBlobReference message. Also converts values to other types if specified. + * @param message ExternalBlobReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.ExternalBlobReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExternalBlobReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a SyncdRecord. */ + interface ISyncdRecord { + + /** SyncdRecord index */ + index?: (proto.ISyncdIndex|null); + + /** SyncdRecord value */ + value?: (proto.ISyncdValue|null); + + /** SyncdRecord keyId */ + keyId?: (proto.IKeyId|null); + } + + /** Represents a SyncdRecord. */ + class SyncdRecord implements ISyncdRecord { + + /** + * Constructs a new SyncdRecord. + * @param [properties] Properties to set + */ + constructor(properties?: proto.ISyncdRecord); + + /** SyncdRecord index. */ + public index?: (proto.ISyncdIndex|null); + + /** SyncdRecord value. */ + public value?: (proto.ISyncdValue|null); + + /** SyncdRecord keyId. */ + public keyId?: (proto.IKeyId|null); + + /** + * Creates a new SyncdRecord instance using the specified properties. + * @param [properties] Properties to set + * @returns SyncdRecord instance + */ + public static create(properties?: proto.ISyncdRecord): proto.SyncdRecord; + + /** + * Encodes the specified SyncdRecord message. Does not implicitly {@link proto.SyncdRecord.verify|verify} messages. + * @param message SyncdRecord message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.ISyncdRecord, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SyncdRecord message, length delimited. Does not implicitly {@link proto.SyncdRecord.verify|verify} messages. + * @param message SyncdRecord message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.ISyncdRecord, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SyncdRecord message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SyncdRecord + * @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.SyncdRecord; + + /** + * Decodes a SyncdRecord message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SyncdRecord + * @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.SyncdRecord; + + /** + * Verifies a SyncdRecord 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 SyncdRecord message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SyncdRecord + */ + public static fromObject(object: { [k: string]: any }): proto.SyncdRecord; + + /** + * Creates a plain object from a SyncdRecord message. Also converts values to other types if specified. + * @param message SyncdRecord + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.SyncdRecord, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SyncdRecord to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a KeyId. */ + interface IKeyId { + + /** KeyId id */ + id?: (Uint8Array|null); + } + + /** Represents a KeyId. */ + class KeyId implements IKeyId { + + /** + * Constructs a new KeyId. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IKeyId); + + /** KeyId id. */ + public id: Uint8Array; + + /** + * Creates a new KeyId instance using the specified properties. + * @param [properties] Properties to set + * @returns KeyId instance + */ + public static create(properties?: proto.IKeyId): proto.KeyId; + + /** + * Encodes the specified KeyId message. Does not implicitly {@link proto.KeyId.verify|verify} messages. + * @param message KeyId message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IKeyId, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified KeyId message, length delimited. Does not implicitly {@link proto.KeyId.verify|verify} messages. + * @param message KeyId message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IKeyId, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a KeyId message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns KeyId + * @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.KeyId; + + /** + * Decodes a KeyId message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns KeyId + * @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.KeyId; + + /** + * Verifies a KeyId 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 KeyId message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns KeyId + */ + public static fromObject(object: { [k: string]: any }): proto.KeyId; + + /** + * Creates a plain object from a KeyId message. Also converts values to other types if specified. + * @param message KeyId + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.KeyId, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this KeyId to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a SyncdValue. */ + interface ISyncdValue { + + /** SyncdValue blob */ + blob?: (Uint8Array|null); + } + + /** Represents a SyncdValue. */ + class SyncdValue implements ISyncdValue { + + /** + * Constructs a new SyncdValue. + * @param [properties] Properties to set + */ + constructor(properties?: proto.ISyncdValue); + + /** SyncdValue blob. */ + public blob: Uint8Array; + + /** + * Creates a new SyncdValue instance using the specified properties. + * @param [properties] Properties to set + * @returns SyncdValue instance + */ + public static create(properties?: proto.ISyncdValue): proto.SyncdValue; + + /** + * Encodes the specified SyncdValue message. Does not implicitly {@link proto.SyncdValue.verify|verify} messages. + * @param message SyncdValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.ISyncdValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SyncdValue message, length delimited. Does not implicitly {@link proto.SyncdValue.verify|verify} messages. + * @param message SyncdValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.ISyncdValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SyncdValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SyncdValue + * @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.SyncdValue; + + /** + * Decodes a SyncdValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SyncdValue + * @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.SyncdValue; + + /** + * Verifies a SyncdValue 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 SyncdValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SyncdValue + */ + public static fromObject(object: { [k: string]: any }): proto.SyncdValue; + + /** + * Creates a plain object from a SyncdValue message. Also converts values to other types if specified. + * @param message SyncdValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.SyncdValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SyncdValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a SyncdIndex. */ + interface ISyncdIndex { + + /** SyncdIndex blob */ + blob?: (Uint8Array|null); + } + + /** Represents a SyncdIndex. */ + class SyncdIndex implements ISyncdIndex { + + /** + * Constructs a new SyncdIndex. + * @param [properties] Properties to set + */ + constructor(properties?: proto.ISyncdIndex); + + /** SyncdIndex blob. */ + public blob: Uint8Array; + + /** + * Creates a new SyncdIndex instance using the specified properties. + * @param [properties] Properties to set + * @returns SyncdIndex instance + */ + public static create(properties?: proto.ISyncdIndex): proto.SyncdIndex; + + /** + * Encodes the specified SyncdIndex message. Does not implicitly {@link proto.SyncdIndex.verify|verify} messages. + * @param message SyncdIndex message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.ISyncdIndex, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SyncdIndex message, length delimited. Does not implicitly {@link proto.SyncdIndex.verify|verify} messages. + * @param message SyncdIndex message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.ISyncdIndex, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SyncdIndex message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SyncdIndex + * @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.SyncdIndex; + + /** + * Decodes a SyncdIndex message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SyncdIndex + * @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.SyncdIndex; + + /** + * Verifies a SyncdIndex 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 SyncdIndex message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SyncdIndex + */ + public static fromObject(object: { [k: string]: any }): proto.SyncdIndex; + + /** + * Creates a plain object from a SyncdIndex message. Also converts values to other types if specified. + * @param message SyncdIndex + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.SyncdIndex, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SyncdIndex to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an ExitCode. */ + interface IExitCode { + + /** ExitCode code */ + code?: (number|Long|null); + + /** ExitCode text */ + text?: (string|null); + } + + /** Represents an ExitCode. */ + class ExitCode implements IExitCode { + + /** + * Constructs a new ExitCode. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IExitCode); + + /** ExitCode code. */ + public code: (number|Long); + + /** ExitCode text. */ + public text: string; + + /** + * Creates a new ExitCode instance using the specified properties. + * @param [properties] Properties to set + * @returns ExitCode instance + */ + public static create(properties?: proto.IExitCode): proto.ExitCode; + + /** + * Encodes the specified ExitCode message. Does not implicitly {@link proto.ExitCode.verify|verify} messages. + * @param message ExitCode message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IExitCode, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExitCode message, length delimited. Does not implicitly {@link proto.ExitCode.verify|verify} messages. + * @param message ExitCode message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IExitCode, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExitCode message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExitCode + * @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.ExitCode; + + /** + * Decodes an ExitCode message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExitCode + * @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.ExitCode; + + /** + * Verifies an ExitCode 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 ExitCode message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExitCode + */ + public static fromObject(object: { [k: string]: any }): proto.ExitCode; + + /** + * Creates a plain object from an ExitCode message. Also converts values to other types if specified. + * @param message ExitCode + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.ExitCode, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExitCode to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a SyncdVersion. */ + interface ISyncdVersion { + + /** SyncdVersion version */ + version?: (number|Long|null); + } + + /** Represents a SyncdVersion. */ + class SyncdVersion implements ISyncdVersion { + + /** + * Constructs a new SyncdVersion. + * @param [properties] Properties to set + */ + constructor(properties?: proto.ISyncdVersion); + + /** SyncdVersion version. */ + public version: (number|Long); + + /** + * Creates a new SyncdVersion instance using the specified properties. + * @param [properties] Properties to set + * @returns SyncdVersion instance + */ + public static create(properties?: proto.ISyncdVersion): proto.SyncdVersion; + + /** + * Encodes the specified SyncdVersion message. Does not implicitly {@link proto.SyncdVersion.verify|verify} messages. + * @param message SyncdVersion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.ISyncdVersion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SyncdVersion message, length delimited. Does not implicitly {@link proto.SyncdVersion.verify|verify} messages. + * @param message SyncdVersion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.ISyncdVersion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SyncdVersion message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SyncdVersion + * @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.SyncdVersion; + + /** + * Decodes a SyncdVersion message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SyncdVersion + * @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.SyncdVersion; + + /** + * Verifies a SyncdVersion 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 SyncdVersion message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SyncdVersion + */ + public static fromObject(object: { [k: string]: any }): proto.SyncdVersion; + + /** + * Creates a plain object from a SyncdVersion message. Also converts values to other types if specified. + * @param message SyncdVersion + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.SyncdVersion, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SyncdVersion to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ServerErrorReceipt. */ + interface IServerErrorReceipt { + + /** ServerErrorReceipt stanzaId */ + stanzaId?: (string|null); + } + + /** Represents a ServerErrorReceipt. */ + class ServerErrorReceipt implements IServerErrorReceipt { + + /** + * Constructs a new ServerErrorReceipt. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IServerErrorReceipt); + + /** ServerErrorReceipt stanzaId. */ + public stanzaId: string; + + /** + * Creates a new ServerErrorReceipt instance using the specified properties. + * @param [properties] Properties to set + * @returns ServerErrorReceipt instance + */ + public static create(properties?: proto.IServerErrorReceipt): proto.ServerErrorReceipt; + + /** + * Encodes the specified ServerErrorReceipt message. Does not implicitly {@link proto.ServerErrorReceipt.verify|verify} messages. + * @param message ServerErrorReceipt message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IServerErrorReceipt, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServerErrorReceipt message, length delimited. Does not implicitly {@link proto.ServerErrorReceipt.verify|verify} messages. + * @param message ServerErrorReceipt message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IServerErrorReceipt, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServerErrorReceipt message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServerErrorReceipt + * @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.ServerErrorReceipt; + + /** + * Decodes a ServerErrorReceipt message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServerErrorReceipt + * @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.ServerErrorReceipt; + + /** + * Verifies a ServerErrorReceipt 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 ServerErrorReceipt message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServerErrorReceipt + */ + public static fromObject(object: { [k: string]: any }): proto.ServerErrorReceipt; + + /** + * Creates a plain object from a ServerErrorReceipt message. Also converts values to other types if specified. + * @param message ServerErrorReceipt + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.ServerErrorReceipt, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServerErrorReceipt to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MediaRetryNotification. */ + interface IMediaRetryNotification { + + /** MediaRetryNotification stanzaId */ + stanzaId?: (string|null); + + /** MediaRetryNotification directPath */ + directPath?: (string|null); + + /** MediaRetryNotification result */ + result?: (proto.MediaRetryNotification.MediaRetryNotificationResultType|null); + } + + /** Represents a MediaRetryNotification. */ + class MediaRetryNotification implements IMediaRetryNotification { + + /** + * Constructs a new MediaRetryNotification. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IMediaRetryNotification); + + /** MediaRetryNotification stanzaId. */ + public stanzaId: string; + + /** MediaRetryNotification directPath. */ + public directPath: string; + + /** MediaRetryNotification result. */ + public result: proto.MediaRetryNotification.MediaRetryNotificationResultType; + + /** + * Creates a new MediaRetryNotification instance using the specified properties. + * @param [properties] Properties to set + * @returns MediaRetryNotification instance + */ + public static create(properties?: proto.IMediaRetryNotification): proto.MediaRetryNotification; + + /** + * Encodes the specified MediaRetryNotification message. Does not implicitly {@link proto.MediaRetryNotification.verify|verify} messages. + * @param message MediaRetryNotification message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IMediaRetryNotification, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MediaRetryNotification message, length delimited. Does not implicitly {@link proto.MediaRetryNotification.verify|verify} messages. + * @param message MediaRetryNotification message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IMediaRetryNotification, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MediaRetryNotification message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MediaRetryNotification + * @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.MediaRetryNotification; + + /** + * Decodes a MediaRetryNotification message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MediaRetryNotification + * @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.MediaRetryNotification; + + /** + * Verifies a MediaRetryNotification 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 MediaRetryNotification message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MediaRetryNotification + */ + public static fromObject(object: { [k: string]: any }): proto.MediaRetryNotification; + + /** + * Creates a plain object from a MediaRetryNotification message. Also converts values to other types if specified. + * @param message MediaRetryNotification + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.MediaRetryNotification, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MediaRetryNotification to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace MediaRetryNotification { + + /** MediaRetryNotificationResultType enum. */ + enum MediaRetryNotificationResultType { + GENERAL_ERROR = 0, + SUCCESS = 1, + NOT_FOUND = 2, + DECRYPTION_ERROR = 3 + } + } + + /** Properties of a MsgOpaqueData. */ + interface IMsgOpaqueData { + + /** MsgOpaqueData body */ + body?: (string|null); + + /** MsgOpaqueData caption */ + caption?: (string|null); + + /** MsgOpaqueData clientUrl */ + clientUrl?: (string|null); + + /** MsgOpaqueData lng */ + lng?: (number|null); + + /** MsgOpaqueData lat */ + lat?: (number|null); + + /** MsgOpaqueData paymentAmount1000 */ + paymentAmount1000?: (number|null); + + /** MsgOpaqueData paymentNoteMsgBody */ + paymentNoteMsgBody?: (string|null); + + /** MsgOpaqueData canonicalUrl */ + canonicalUrl?: (string|null); + + /** MsgOpaqueData matchedText */ + matchedText?: (string|null); + + /** MsgOpaqueData title */ + title?: (string|null); + + /** MsgOpaqueData description */ + description?: (string|null); + } + + /** Represents a MsgOpaqueData. */ + class MsgOpaqueData implements IMsgOpaqueData { + + /** + * Constructs a new MsgOpaqueData. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IMsgOpaqueData); + + /** MsgOpaqueData body. */ + public body: string; + + /** MsgOpaqueData caption. */ + public caption: string; + + /** MsgOpaqueData clientUrl. */ + public clientUrl: string; + + /** MsgOpaqueData lng. */ + public lng: number; + + /** MsgOpaqueData lat. */ + public lat: number; + + /** MsgOpaqueData paymentAmount1000. */ + public paymentAmount1000: number; + + /** MsgOpaqueData paymentNoteMsgBody. */ + public paymentNoteMsgBody: string; + + /** MsgOpaqueData canonicalUrl. */ + public canonicalUrl: string; + + /** MsgOpaqueData matchedText. */ + public matchedText: string; + + /** MsgOpaqueData title. */ + public title: string; + + /** MsgOpaqueData description. */ + public description: string; + + /** + * Creates a new MsgOpaqueData instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgOpaqueData instance + */ + public static create(properties?: proto.IMsgOpaqueData): proto.MsgOpaqueData; + + /** + * Encodes the specified MsgOpaqueData message. Does not implicitly {@link proto.MsgOpaqueData.verify|verify} messages. + * @param message MsgOpaqueData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IMsgOpaqueData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MsgOpaqueData message, length delimited. Does not implicitly {@link proto.MsgOpaqueData.verify|verify} messages. + * @param message MsgOpaqueData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IMsgOpaqueData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MsgOpaqueData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MsgOpaqueData + * @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.MsgOpaqueData; + + /** + * Decodes a MsgOpaqueData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MsgOpaqueData + * @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.MsgOpaqueData; + + /** + * Verifies a MsgOpaqueData 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 MsgOpaqueData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MsgOpaqueData + */ + public static fromObject(object: { [k: string]: any }): proto.MsgOpaqueData; + + /** + * Creates a plain object from a MsgOpaqueData message. Also converts values to other types if specified. + * @param message MsgOpaqueData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.MsgOpaqueData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MsgOpaqueData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MsgRowOpaqueData. */ + interface IMsgRowOpaqueData { + + /** MsgRowOpaqueData currentMsg */ + currentMsg?: (proto.IMsgOpaqueData|null); + + /** MsgRowOpaqueData quotedMsg */ + quotedMsg?: (proto.IMsgOpaqueData|null); + } + + /** Represents a MsgRowOpaqueData. */ + class MsgRowOpaqueData implements IMsgRowOpaqueData { + + /** + * Constructs a new MsgRowOpaqueData. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IMsgRowOpaqueData); + + /** MsgRowOpaqueData currentMsg. */ + public currentMsg?: (proto.IMsgOpaqueData|null); + + /** MsgRowOpaqueData quotedMsg. */ + public quotedMsg?: (proto.IMsgOpaqueData|null); + + /** + * Creates a new MsgRowOpaqueData instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgRowOpaqueData instance + */ + public static create(properties?: proto.IMsgRowOpaqueData): proto.MsgRowOpaqueData; + + /** + * Encodes the specified MsgRowOpaqueData message. Does not implicitly {@link proto.MsgRowOpaqueData.verify|verify} messages. + * @param message MsgRowOpaqueData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IMsgRowOpaqueData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MsgRowOpaqueData message, length delimited. Does not implicitly {@link proto.MsgRowOpaqueData.verify|verify} messages. + * @param message MsgRowOpaqueData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IMsgRowOpaqueData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MsgRowOpaqueData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MsgRowOpaqueData + * @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.MsgRowOpaqueData; + + /** + * Decodes a MsgRowOpaqueData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MsgRowOpaqueData + * @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.MsgRowOpaqueData; + + /** + * Verifies a MsgRowOpaqueData 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 MsgRowOpaqueData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MsgRowOpaqueData + */ + public static fromObject(object: { [k: string]: any }): proto.MsgRowOpaqueData; + + /** + * Creates a plain object from a MsgRowOpaqueData message. Also converts values to other types if specified. + * @param message MsgRowOpaqueData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.MsgRowOpaqueData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MsgRowOpaqueData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Pushname. */ + interface IPushname { + + /** Pushname id */ + id?: (string|null); + + /** Pushname pushname */ + pushname?: (string|null); + } + + /** Represents a Pushname. */ + class Pushname implements IPushname { + + /** + * Constructs a new Pushname. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IPushname); + + /** Pushname id. */ + public id: string; + + /** Pushname pushname. */ + public pushname: string; + + /** + * Creates a new Pushname instance using the specified properties. + * @param [properties] Properties to set + * @returns Pushname instance + */ + public static create(properties?: proto.IPushname): proto.Pushname; + + /** + * Encodes the specified Pushname message. Does not implicitly {@link proto.Pushname.verify|verify} messages. + * @param message Pushname message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IPushname, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Pushname message, length delimited. Does not implicitly {@link proto.Pushname.verify|verify} messages. + * @param message Pushname message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IPushname, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Pushname message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Pushname + * @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.Pushname; + + /** + * Decodes a Pushname message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Pushname + * @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.Pushname; + + /** + * Verifies a Pushname 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 Pushname message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Pushname + */ + public static fromObject(object: { [k: string]: any }): proto.Pushname; + + /** + * Creates a plain object from a Pushname message. Also converts values to other types if specified. + * @param message Pushname + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Pushname, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Pushname to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a HistorySyncMsg. */ + interface IHistorySyncMsg { + + /** HistorySyncMsg message */ + message?: (proto.IWebMessageInfo|null); + + /** HistorySyncMsg msgOrderId */ + msgOrderId?: (number|Long|null); + } + + /** Represents a HistorySyncMsg. */ + class HistorySyncMsg implements IHistorySyncMsg { + + /** + * Constructs a new HistorySyncMsg. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IHistorySyncMsg); + + /** HistorySyncMsg message. */ + public message?: (proto.IWebMessageInfo|null); + + /** HistorySyncMsg msgOrderId. */ + public msgOrderId: (number|Long); + + /** + * Creates a new HistorySyncMsg instance using the specified properties. + * @param [properties] Properties to set + * @returns HistorySyncMsg instance + */ + public static create(properties?: proto.IHistorySyncMsg): proto.HistorySyncMsg; + + /** + * Encodes the specified HistorySyncMsg message. Does not implicitly {@link proto.HistorySyncMsg.verify|verify} messages. + * @param message HistorySyncMsg message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IHistorySyncMsg, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HistorySyncMsg message, length delimited. Does not implicitly {@link proto.HistorySyncMsg.verify|verify} messages. + * @param message HistorySyncMsg message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IHistorySyncMsg, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HistorySyncMsg message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HistorySyncMsg + * @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.HistorySyncMsg; + + /** + * Decodes a HistorySyncMsg message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HistorySyncMsg + * @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.HistorySyncMsg; + + /** + * Verifies a HistorySyncMsg 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 HistorySyncMsg message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HistorySyncMsg + */ + public static fromObject(object: { [k: string]: any }): proto.HistorySyncMsg; + + /** + * Creates a plain object from a HistorySyncMsg message. Also converts values to other types if specified. + * @param message HistorySyncMsg + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.HistorySyncMsg, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HistorySyncMsg to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Conversation. */ + interface IConversation { + + /** Conversation id */ + id: string; + + /** Conversation messages */ + messages?: (proto.IHistorySyncMsg[]|null); + + /** Conversation newJid */ + newJid?: (string|null); + + /** Conversation oldJid */ + oldJid?: (string|null); + + /** Conversation lastMsgTimestamp */ + lastMsgTimestamp?: (number|Long|null); + + /** Conversation unreadCount */ + unreadCount?: (number|null); + + /** Conversation readOnly */ + readOnly?: (boolean|null); + + /** Conversation endOfHistoryTransfer */ + endOfHistoryTransfer?: (boolean|null); + + /** Conversation ephemeralExpiration */ + ephemeralExpiration?: (number|null); + + /** Conversation ephemeralSettingTimestamp */ + ephemeralSettingTimestamp?: (number|Long|null); + + /** Conversation endOfHistoryTransferType */ + endOfHistoryTransferType?: (proto.Conversation.ConversationEndOfHistoryTransferType|null); + + /** Conversation conversationTimestamp */ + conversationTimestamp?: (number|Long|null); + + /** Conversation name */ + name?: (string|null); + + /** Conversation pHash */ + pHash?: (string|null); + + /** Conversation notSpam */ + notSpam?: (boolean|null); + } + + /** Represents a Conversation. */ + class Conversation implements IConversation { + + /** + * Constructs a new Conversation. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IConversation); + + /** Conversation id. */ + public id: string; + + /** Conversation messages. */ + public messages: proto.IHistorySyncMsg[]; + + /** Conversation newJid. */ + public newJid: string; + + /** Conversation oldJid. */ + public oldJid: string; + + /** Conversation lastMsgTimestamp. */ + public lastMsgTimestamp: (number|Long); + + /** Conversation unreadCount. */ + public unreadCount: number; + + /** Conversation readOnly. */ + public readOnly: boolean; + + /** Conversation endOfHistoryTransfer. */ + public endOfHistoryTransfer: boolean; + + /** Conversation ephemeralExpiration. */ + public ephemeralExpiration: number; + + /** Conversation ephemeralSettingTimestamp. */ + public ephemeralSettingTimestamp: (number|Long); + + /** Conversation endOfHistoryTransferType. */ + public endOfHistoryTransferType: proto.Conversation.ConversationEndOfHistoryTransferType; + + /** Conversation conversationTimestamp. */ + public conversationTimestamp: (number|Long); + + /** Conversation name. */ + public name: string; + + /** Conversation pHash. */ + public pHash: string; + + /** Conversation notSpam. */ + public notSpam: boolean; + + /** + * Creates a new Conversation instance using the specified properties. + * @param [properties] Properties to set + * @returns Conversation instance + */ + public static create(properties?: proto.IConversation): proto.Conversation; + + /** + * Encodes the specified Conversation message. Does not implicitly {@link proto.Conversation.verify|verify} messages. + * @param message Conversation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IConversation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Conversation message, length delimited. Does not implicitly {@link proto.Conversation.verify|verify} messages. + * @param message Conversation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IConversation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Conversation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Conversation + * @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.Conversation; + + /** + * Decodes a Conversation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Conversation + * @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.Conversation; + + /** + * Verifies a Conversation 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 Conversation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Conversation + */ + public static fromObject(object: { [k: string]: any }): proto.Conversation; + + /** + * Creates a plain object from a Conversation message. Also converts values to other types if specified. + * @param message Conversation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Conversation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Conversation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Conversation { + + /** ConversationEndOfHistoryTransferType enum. */ + enum ConversationEndOfHistoryTransferType { + COMPLETE_BUT_MORE_MESSAGES_REMAIN_ON_PRIMARY = 0, + COMPLETE_AND_NO_MORE_MESSAGE_REMAIN_ON_PRIMARY = 1 + } + } + + /** Properties of a HistorySync. */ + interface IHistorySync { + + /** HistorySync syncType */ + syncType: proto.HistorySync.HistorySyncHistorySyncType; + + /** HistorySync conversations */ + conversations?: (proto.IConversation[]|null); + + /** HistorySync statusV3Messages */ + statusV3Messages?: (proto.IWebMessageInfo[]|null); + + /** HistorySync chunkOrder */ + chunkOrder?: (number|null); + + /** HistorySync progress */ + progress?: (number|null); + + /** HistorySync pushnames */ + pushnames?: (proto.IPushname[]|null); + } + + /** Represents a HistorySync. */ + class HistorySync implements IHistorySync { + + /** + * Constructs a new HistorySync. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IHistorySync); + + /** HistorySync syncType. */ + public syncType: proto.HistorySync.HistorySyncHistorySyncType; + + /** HistorySync conversations. */ + public conversations: proto.IConversation[]; + + /** HistorySync statusV3Messages. */ + public statusV3Messages: proto.IWebMessageInfo[]; + + /** HistorySync chunkOrder. */ + public chunkOrder: number; + + /** HistorySync progress. */ + public progress: number; + + /** HistorySync pushnames. */ + public pushnames: proto.IPushname[]; + + /** + * Creates a new HistorySync instance using the specified properties. + * @param [properties] Properties to set + * @returns HistorySync instance + */ + public static create(properties?: proto.IHistorySync): proto.HistorySync; + + /** + * Encodes the specified HistorySync message. Does not implicitly {@link proto.HistorySync.verify|verify} messages. + * @param message HistorySync message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IHistorySync, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HistorySync message, length delimited. Does not implicitly {@link proto.HistorySync.verify|verify} messages. + * @param message HistorySync message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IHistorySync, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HistorySync message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HistorySync + * @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.HistorySync; + + /** + * Decodes a HistorySync message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HistorySync + * @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.HistorySync; + + /** + * Verifies a HistorySync 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 HistorySync message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HistorySync + */ + public static fromObject(object: { [k: string]: any }): proto.HistorySync; + + /** + * Creates a plain object from a HistorySync message. Also converts values to other types if specified. + * @param message HistorySync + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.HistorySync, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HistorySync to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace HistorySync { + + /** HistorySyncHistorySyncType enum. */ + enum HistorySyncHistorySyncType { + INITIAL_BOOTSTRAP = 0, + INITIAL_STATUS_V3 = 1, + FULL = 2, + RECENT = 3, + PUSH_NAME = 4 + } + } + + /** Properties of an EphemeralSetting. */ + interface IEphemeralSetting { + + /** EphemeralSetting duration */ + duration?: (number|null); + + /** EphemeralSetting timestamp */ + timestamp?: (number|Long|null); + } + + /** Represents an EphemeralSetting. */ + class EphemeralSetting implements IEphemeralSetting { + + /** + * Constructs a new EphemeralSetting. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IEphemeralSetting); + + /** EphemeralSetting duration. */ + public duration: number; + + /** EphemeralSetting timestamp. */ + public timestamp: (number|Long); + + /** + * Creates a new EphemeralSetting instance using the specified properties. + * @param [properties] Properties to set + * @returns EphemeralSetting instance + */ + public static create(properties?: proto.IEphemeralSetting): proto.EphemeralSetting; + + /** + * Encodes the specified EphemeralSetting message. Does not implicitly {@link proto.EphemeralSetting.verify|verify} messages. + * @param message EphemeralSetting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IEphemeralSetting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EphemeralSetting message, length delimited. Does not implicitly {@link proto.EphemeralSetting.verify|verify} messages. + * @param message EphemeralSetting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IEphemeralSetting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EphemeralSetting message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EphemeralSetting + * @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.EphemeralSetting; + + /** + * Decodes an EphemeralSetting message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EphemeralSetting + * @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.EphemeralSetting; + + /** + * Verifies an EphemeralSetting 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 EphemeralSetting message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EphemeralSetting + */ + public static fromObject(object: { [k: string]: any }): proto.EphemeralSetting; + + /** + * Creates a plain object from an EphemeralSetting message. Also converts values to other types if specified. + * @param message EphemeralSetting + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.EphemeralSetting, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EphemeralSetting to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a PaymentBackground. */ + interface IPaymentBackground { + + /** PaymentBackground id */ + id?: (string|null); + + /** PaymentBackground fileLength */ + fileLength?: (string|null); + + /** PaymentBackground width */ + width?: (number|null); + + /** PaymentBackground height */ + height?: (number|null); + + /** PaymentBackground mimetype */ + mimetype?: (string|null); + + /** PaymentBackground placeholderArgb */ + placeholderArgb?: (number|null); + + /** PaymentBackground textArgb */ + textArgb?: (number|null); + + /** PaymentBackground subtextArgb */ + subtextArgb?: (number|null); + } + + /** Represents a PaymentBackground. */ + class PaymentBackground implements IPaymentBackground { + + /** + * Constructs a new PaymentBackground. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IPaymentBackground); + + /** PaymentBackground id. */ + public id: string; + + /** PaymentBackground fileLength. */ + public fileLength: string; + + /** PaymentBackground width. */ + public width: number; + + /** PaymentBackground height. */ + public height: number; + + /** PaymentBackground mimetype. */ + public mimetype: string; + + /** PaymentBackground placeholderArgb. */ + public placeholderArgb: number; + + /** PaymentBackground textArgb. */ + public textArgb: number; + + /** PaymentBackground subtextArgb. */ + public subtextArgb: number; + + /** + * Creates a new PaymentBackground instance using the specified properties. + * @param [properties] Properties to set + * @returns PaymentBackground instance + */ + public static create(properties?: proto.IPaymentBackground): proto.PaymentBackground; + + /** + * Encodes the specified PaymentBackground message. Does not implicitly {@link proto.PaymentBackground.verify|verify} messages. + * @param message PaymentBackground message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IPaymentBackground, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PaymentBackground message, length delimited. Does not implicitly {@link proto.PaymentBackground.verify|verify} messages. + * @param message PaymentBackground message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IPaymentBackground, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PaymentBackground message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PaymentBackground + * @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.PaymentBackground; + + /** + * Decodes a PaymentBackground message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PaymentBackground + * @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.PaymentBackground; + + /** + * Verifies a PaymentBackground 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 PaymentBackground message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PaymentBackground + */ + public static fromObject(object: { [k: string]: any }): proto.PaymentBackground; + + /** + * Creates a plain object from a PaymentBackground message. Also converts values to other types if specified. + * @param message PaymentBackground + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.PaymentBackground, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PaymentBackground to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Money. */ + interface IMoney { + + /** Money value */ + value?: (number|Long|null); + + /** Money offset */ + offset?: (number|null); + + /** Money currencyCode */ + currencyCode?: (string|null); + } + + /** Represents a Money. */ + class Money implements IMoney { + + /** + * Constructs a new Money. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IMoney); + + /** Money value. */ + public value: (number|Long); + + /** Money offset. */ + public offset: number; + + /** Money currencyCode. */ + public currencyCode: string; + + /** + * Creates a new Money instance using the specified properties. + * @param [properties] Properties to set + * @returns Money instance + */ + public static create(properties?: proto.IMoney): proto.Money; + + /** + * Encodes the specified Money message. Does not implicitly {@link proto.Money.verify|verify} messages. + * @param message Money message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IMoney, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Money message, length delimited. Does not implicitly {@link proto.Money.verify|verify} messages. + * @param message Money message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IMoney, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Money message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Money + * @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.Money; + + /** + * Decodes a Money message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Money + * @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.Money; + + /** + * Verifies a Money 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 Money message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Money + */ + public static fromObject(object: { [k: string]: any }): proto.Money; + + /** + * Creates a plain object from a Money message. Also converts values to other types if specified. + * @param message Money + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Money, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Money to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; } /** Properties of a HydratedQuickReplyButton. */ @@ -2233,6 +8286,222 @@ export namespace proto { public toJSON(): { [k: string]: any }; } + /** Properties of a DeviceListMetadata. */ + interface IDeviceListMetadata { + + /** DeviceListMetadata senderKeyHash */ + senderKeyHash?: (Uint8Array|null); + + /** DeviceListMetadata senderTimestamp */ + senderTimestamp?: (number|Long|null); + + /** DeviceListMetadata senderKeyIndexes */ + senderKeyIndexes?: (number[]|null); + + /** DeviceListMetadata recipientKeyHash */ + recipientKeyHash?: (Uint8Array|null); + + /** DeviceListMetadata recipientTimestamp */ + recipientTimestamp?: (number|Long|null); + + /** DeviceListMetadata recipientKeyIndexes */ + recipientKeyIndexes?: (number[]|null); + } + + /** Represents a DeviceListMetadata. */ + class DeviceListMetadata implements IDeviceListMetadata { + + /** + * Constructs a new DeviceListMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IDeviceListMetadata); + + /** DeviceListMetadata senderKeyHash. */ + public senderKeyHash: Uint8Array; + + /** DeviceListMetadata senderTimestamp. */ + public senderTimestamp: (number|Long); + + /** DeviceListMetadata senderKeyIndexes. */ + public senderKeyIndexes: number[]; + + /** DeviceListMetadata recipientKeyHash. */ + public recipientKeyHash: Uint8Array; + + /** DeviceListMetadata recipientTimestamp. */ + public recipientTimestamp: (number|Long); + + /** DeviceListMetadata recipientKeyIndexes. */ + public recipientKeyIndexes: number[]; + + /** + * Creates a new DeviceListMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns DeviceListMetadata instance + */ + public static create(properties?: proto.IDeviceListMetadata): proto.DeviceListMetadata; + + /** + * Encodes the specified DeviceListMetadata message. Does not implicitly {@link proto.DeviceListMetadata.verify|verify} messages. + * @param message DeviceListMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IDeviceListMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeviceListMetadata message, length delimited. Does not implicitly {@link proto.DeviceListMetadata.verify|verify} messages. + * @param message DeviceListMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IDeviceListMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeviceListMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeviceListMetadata + * @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.DeviceListMetadata; + + /** + * Decodes a DeviceListMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeviceListMetadata + * @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.DeviceListMetadata; + + /** + * Verifies a DeviceListMetadata 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 DeviceListMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeviceListMetadata + */ + public static fromObject(object: { [k: string]: any }): proto.DeviceListMetadata; + + /** + * Creates a plain object from a DeviceListMetadata message. Also converts values to other types if specified. + * @param message DeviceListMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.DeviceListMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeviceListMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MessageContextInfo. */ + interface IMessageContextInfo { + + /** MessageContextInfo deviceListMetadata */ + deviceListMetadata?: (proto.IDeviceListMetadata|null); + + /** MessageContextInfo deviceListMetadataVersion */ + deviceListMetadataVersion?: (number|null); + } + + /** Represents a MessageContextInfo. */ + class MessageContextInfo implements IMessageContextInfo { + + /** + * Constructs a new MessageContextInfo. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IMessageContextInfo); + + /** MessageContextInfo deviceListMetadata. */ + public deviceListMetadata?: (proto.IDeviceListMetadata|null); + + /** MessageContextInfo deviceListMetadataVersion. */ + public deviceListMetadataVersion: number; + + /** + * Creates a new MessageContextInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns MessageContextInfo instance + */ + public static create(properties?: proto.IMessageContextInfo): proto.MessageContextInfo; + + /** + * Encodes the specified MessageContextInfo message. Does not implicitly {@link proto.MessageContextInfo.verify|verify} messages. + * @param message MessageContextInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IMessageContextInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MessageContextInfo message, length delimited. Does not implicitly {@link proto.MessageContextInfo.verify|verify} messages. + * @param message MessageContextInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IMessageContextInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MessageContextInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MessageContextInfo + * @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.MessageContextInfo; + + /** + * Decodes a MessageContextInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MessageContextInfo + * @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.MessageContextInfo; + + /** + * Verifies a MessageContextInfo 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 MessageContextInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MessageContextInfo + */ + public static fromObject(object: { [k: string]: any }): proto.MessageContextInfo; + + /** + * Creates a plain object from a MessageContextInfo message. Also converts values to other types if specified. + * @param message MessageContextInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.MessageContextInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MessageContextInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of an AdReplyInfo. */ interface IAdReplyInfo { @@ -2549,6 +8818,15 @@ export namespace proto { /** ContextInfo externalAdReply */ externalAdReply?: (proto.IExternalAdReplyInfo|null); + + /** ContextInfo entryPointConversionSource */ + entryPointConversionSource?: (string|null); + + /** ContextInfo entryPointConversionApp */ + entryPointConversionApp?: (string|null); + + /** ContextInfo entryPointConversionDelaySeconds */ + entryPointConversionDelaySeconds?: (number|null); } /** Represents a ContextInfo. */ @@ -2608,6 +8886,15 @@ export namespace proto { /** ContextInfo externalAdReply. */ public externalAdReply?: (proto.IExternalAdReplyInfo|null); + /** ContextInfo entryPointConversionSource. */ + public entryPointConversionSource: string; + + /** ContextInfo entryPointConversionApp. */ + public entryPointConversionApp: string; + + /** ContextInfo entryPointConversionDelaySeconds. */ + public entryPointConversionDelaySeconds: number; + /** * Creates a new ContextInfo instance using the specified properties. * @param [properties] Properties to set @@ -2843,6 +9130,15 @@ export namespace proto { /** ImageMessage viewOnce */ viewOnce?: (boolean|null); + + /** ImageMessage thumbnailDirectPath */ + thumbnailDirectPath?: (string|null); + + /** ImageMessage thumbnailSha256 */ + thumbnailSha256?: (Uint8Array|null); + + /** ImageMessage thumbnailEncSha256 */ + thumbnailEncSha256?: (Uint8Array|null); } /** Represents an ImageMessage. */ @@ -2920,6 +9216,15 @@ export namespace proto { /** ImageMessage viewOnce. */ public viewOnce: boolean; + /** ImageMessage thumbnailDirectPath. */ + public thumbnailDirectPath: string; + + /** ImageMessage thumbnailSha256. */ + public thumbnailSha256: Uint8Array; + + /** ImageMessage thumbnailEncSha256. */ + public thumbnailEncSha256: Uint8Array; + /** * Creates a new ImageMessage instance using the specified properties. * @param [properties] Properties to set @@ -2991,6 +9296,159 @@ export namespace proto { public toJSON(): { [k: string]: any }; } + /** Properties of an InvoiceMessage. */ + interface IInvoiceMessage { + + /** InvoiceMessage note */ + note?: (string|null); + + /** InvoiceMessage token */ + token?: (string|null); + + /** InvoiceMessage attachmentType */ + attachmentType?: (proto.InvoiceMessage.InvoiceMessageAttachmentType|null); + + /** InvoiceMessage attachmentMimetype */ + attachmentMimetype?: (string|null); + + /** InvoiceMessage attachmentMediaKey */ + attachmentMediaKey?: (Uint8Array|null); + + /** InvoiceMessage attachmentMediaKeyTimestamp */ + attachmentMediaKeyTimestamp?: (number|Long|null); + + /** InvoiceMessage attachmentFileSha256 */ + attachmentFileSha256?: (Uint8Array|null); + + /** InvoiceMessage attachmentFileEncSha256 */ + attachmentFileEncSha256?: (Uint8Array|null); + + /** InvoiceMessage attachmentDirectPath */ + attachmentDirectPath?: (string|null); + + /** InvoiceMessage attachmentJpegThumbnail */ + attachmentJpegThumbnail?: (Uint8Array|null); + } + + /** Represents an InvoiceMessage. */ + class InvoiceMessage implements IInvoiceMessage { + + /** + * Constructs a new InvoiceMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IInvoiceMessage); + + /** InvoiceMessage note. */ + public note: string; + + /** InvoiceMessage token. */ + public token: string; + + /** InvoiceMessage attachmentType. */ + public attachmentType: proto.InvoiceMessage.InvoiceMessageAttachmentType; + + /** InvoiceMessage attachmentMimetype. */ + public attachmentMimetype: string; + + /** InvoiceMessage attachmentMediaKey. */ + public attachmentMediaKey: Uint8Array; + + /** InvoiceMessage attachmentMediaKeyTimestamp. */ + public attachmentMediaKeyTimestamp: (number|Long); + + /** InvoiceMessage attachmentFileSha256. */ + public attachmentFileSha256: Uint8Array; + + /** InvoiceMessage attachmentFileEncSha256. */ + public attachmentFileEncSha256: Uint8Array; + + /** InvoiceMessage attachmentDirectPath. */ + public attachmentDirectPath: string; + + /** InvoiceMessage attachmentJpegThumbnail. */ + public attachmentJpegThumbnail: Uint8Array; + + /** + * Creates a new InvoiceMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns InvoiceMessage instance + */ + public static create(properties?: proto.IInvoiceMessage): proto.InvoiceMessage; + + /** + * Encodes the specified InvoiceMessage message. Does not implicitly {@link proto.InvoiceMessage.verify|verify} messages. + * @param message InvoiceMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IInvoiceMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InvoiceMessage message, length delimited. Does not implicitly {@link proto.InvoiceMessage.verify|verify} messages. + * @param message InvoiceMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IInvoiceMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InvoiceMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InvoiceMessage + * @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.InvoiceMessage; + + /** + * Decodes an InvoiceMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InvoiceMessage + * @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.InvoiceMessage; + + /** + * Verifies an InvoiceMessage 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 InvoiceMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InvoiceMessage + */ + public static fromObject(object: { [k: string]: any }): proto.InvoiceMessage; + + /** + * Creates a plain object from an InvoiceMessage message. Also converts values to other types if specified. + * @param message InvoiceMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.InvoiceMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InvoiceMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace InvoiceMessage { + + /** InvoiceMessageAttachmentType enum. */ + enum InvoiceMessageAttachmentType { + IMAGE = 0, + PDF = 1 + } + } + /** Properties of a ContactMessage. */ interface IContactMessage { @@ -3287,6 +9745,27 @@ export namespace proto { /** ExtendedTextMessage doNotPlayInline */ doNotPlayInline?: (boolean|null); + + /** ExtendedTextMessage thumbnailDirectPath */ + thumbnailDirectPath?: (string|null); + + /** ExtendedTextMessage thumbnailSha256 */ + thumbnailSha256?: (Uint8Array|null); + + /** ExtendedTextMessage thumbnailEncSha256 */ + thumbnailEncSha256?: (Uint8Array|null); + + /** ExtendedTextMessage mediaKey */ + mediaKey?: (Uint8Array|null); + + /** ExtendedTextMessage mediaKeyTimestamp */ + mediaKeyTimestamp?: (number|Long|null); + + /** ExtendedTextMessage thumbnailHeight */ + thumbnailHeight?: (number|null); + + /** ExtendedTextMessage thumbnailWidth */ + thumbnailWidth?: (number|null); } /** Represents an ExtendedTextMessage. */ @@ -3334,6 +9813,27 @@ export namespace proto { /** ExtendedTextMessage doNotPlayInline. */ public doNotPlayInline: boolean; + /** ExtendedTextMessage thumbnailDirectPath. */ + public thumbnailDirectPath: string; + + /** ExtendedTextMessage thumbnailSha256. */ + public thumbnailSha256: Uint8Array; + + /** ExtendedTextMessage thumbnailEncSha256. */ + public thumbnailEncSha256: Uint8Array; + + /** ExtendedTextMessage mediaKey. */ + public mediaKey: Uint8Array; + + /** ExtendedTextMessage mediaKeyTimestamp. */ + public mediaKeyTimestamp: (number|Long); + + /** ExtendedTextMessage thumbnailHeight. */ + public thumbnailHeight: number; + + /** ExtendedTextMessage thumbnailWidth. */ + public thumbnailWidth: number; + /** * Creates a new ExtendedTextMessage instance using the specified properties. * @param [properties] Properties to set @@ -3837,6 +10337,15 @@ export namespace proto { /** VideoMessage viewOnce */ viewOnce?: (boolean|null); + + /** VideoMessage thumbnailDirectPath */ + thumbnailDirectPath?: (string|null); + + /** VideoMessage thumbnailSha256 */ + thumbnailSha256?: (Uint8Array|null); + + /** VideoMessage thumbnailEncSha256 */ + thumbnailEncSha256?: (Uint8Array|null); } /** Represents a VideoMessage. */ @@ -3905,6 +10414,15 @@ export namespace proto { /** VideoMessage viewOnce. */ public viewOnce: boolean; + /** VideoMessage thumbnailDirectPath. */ + public thumbnailDirectPath: string; + + /** VideoMessage thumbnailSha256. */ + public thumbnailSha256: Uint8Array; + + /** VideoMessage thumbnailEncSha256. */ + public thumbnailEncSha256: Uint8Array; + /** * Creates a new VideoMessage instance using the specified properties. * @param [properties] Properties to set @@ -3991,6 +10509,15 @@ export namespace proto { /** Call callKey */ callKey?: (Uint8Array|null); + + /** Call conversionSource */ + conversionSource?: (string|null); + + /** Call conversionData */ + conversionData?: (Uint8Array|null); + + /** Call conversionDelaySeconds */ + conversionDelaySeconds?: (number|null); } /** Represents a Call. */ @@ -4005,6 +10532,15 @@ export namespace proto { /** Call callKey. */ public callKey: Uint8Array; + /** Call conversionSource. */ + public conversionSource: string; + + /** Call conversionData. */ + public conversionData: Uint8Array; + + /** Call conversionDelaySeconds. */ + public conversionDelaySeconds: number; + /** * Creates a new Call instance using the specified properties. * @param [properties] Properties to set @@ -4198,6 +10734,9 @@ export namespace proto { /** ProtocolMessage initialSecurityNotificationSettingSync */ initialSecurityNotificationSettingSync?: (proto.IInitialSecurityNotificationSettingSync|null); + + /** ProtocolMessage appStateFatalExceptionNotification */ + appStateFatalExceptionNotification?: (proto.IAppStateFatalExceptionNotification|null); } /** Represents a ProtocolMessage. */ @@ -4233,6 +10772,9 @@ export namespace proto { /** ProtocolMessage initialSecurityNotificationSettingSync. */ public initialSecurityNotificationSettingSync?: (proto.IInitialSecurityNotificationSettingSync|null); + /** ProtocolMessage appStateFatalExceptionNotification. */ + public appStateFatalExceptionNotification?: (proto.IAppStateFatalExceptionNotification|null); + /** * Creates a new ProtocolMessage instance using the specified properties. * @param [properties] Properties to set @@ -4315,7 +10857,8 @@ export namespace proto { APP_STATE_SYNC_KEY_SHARE = 6, APP_STATE_SYNC_KEY_REQUEST = 7, MSG_FANOUT_BACKFILL_REQUEST = 8, - INITIAL_SECURITY_NOTIFICATION_SETTING_SYNC = 9 + INITIAL_SECURITY_NOTIFICATION_SETTING_SYNC = 9, + APP_STATE_FATAL_EXCEPTION_NOTIFICATION = 10 } } @@ -4458,7 +11001,8 @@ export namespace proto { INITIAL_BOOTSTRAP = 0, INITIAL_STATUS_V3 = 1, FULL = 2, - RECENT = 3 + RECENT = 3, + PUSH_NAME = 4 } } @@ -4656,6 +11200,9 @@ export namespace proto { /** AppStateSyncKeyFingerprint currentIndex */ currentIndex?: (number|null); + + /** AppStateSyncKeyFingerprint deviceIndexes */ + deviceIndexes?: (number[]|null); } /** Represents an AppStateSyncKeyFingerprint. */ @@ -4673,6 +11220,9 @@ export namespace proto { /** AppStateSyncKeyFingerprint currentIndex. */ public currentIndex: number; + /** AppStateSyncKeyFingerprint deviceIndexes. */ + public deviceIndexes: number[]; + /** * Creates a new AppStateSyncKeyFingerprint instance using the specified properties. * @param [properties] Properties to set @@ -5026,6 +11576,102 @@ export namespace proto { public toJSON(): { [k: string]: any }; } + /** Properties of an AppStateFatalExceptionNotification. */ + interface IAppStateFatalExceptionNotification { + + /** AppStateFatalExceptionNotification collectionNames */ + collectionNames?: (string[]|null); + + /** AppStateFatalExceptionNotification timestamp */ + timestamp?: (number|Long|null); + } + + /** Represents an AppStateFatalExceptionNotification. */ + class AppStateFatalExceptionNotification implements IAppStateFatalExceptionNotification { + + /** + * Constructs a new AppStateFatalExceptionNotification. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IAppStateFatalExceptionNotification); + + /** AppStateFatalExceptionNotification collectionNames. */ + public collectionNames: string[]; + + /** AppStateFatalExceptionNotification timestamp. */ + public timestamp: (number|Long); + + /** + * Creates a new AppStateFatalExceptionNotification instance using the specified properties. + * @param [properties] Properties to set + * @returns AppStateFatalExceptionNotification instance + */ + public static create(properties?: proto.IAppStateFatalExceptionNotification): proto.AppStateFatalExceptionNotification; + + /** + * Encodes the specified AppStateFatalExceptionNotification message. Does not implicitly {@link proto.AppStateFatalExceptionNotification.verify|verify} messages. + * @param message AppStateFatalExceptionNotification message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IAppStateFatalExceptionNotification, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AppStateFatalExceptionNotification message, length delimited. Does not implicitly {@link proto.AppStateFatalExceptionNotification.verify|verify} messages. + * @param message AppStateFatalExceptionNotification message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IAppStateFatalExceptionNotification, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AppStateFatalExceptionNotification message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AppStateFatalExceptionNotification + * @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.AppStateFatalExceptionNotification; + + /** + * Decodes an AppStateFatalExceptionNotification message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AppStateFatalExceptionNotification + * @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.AppStateFatalExceptionNotification; + + /** + * Verifies an AppStateFatalExceptionNotification 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 AppStateFatalExceptionNotification message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AppStateFatalExceptionNotification + */ + public static fromObject(object: { [k: string]: any }): proto.AppStateFatalExceptionNotification; + + /** + * Creates a plain object from an AppStateFatalExceptionNotification message. Also converts values to other types if specified. + * @param message AppStateFatalExceptionNotification + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.AppStateFatalExceptionNotification, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AppStateFatalExceptionNotification to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of an InitialSecurityNotificationSettingSync. */ interface IInitialSecurityNotificationSettingSync { @@ -5900,6 +12546,9 @@ export namespace proto { /** SendPaymentMessage requestMessageKey */ requestMessageKey?: (proto.IMessageKey|null); + + /** SendPaymentMessage background */ + background?: (proto.IPaymentBackground|null); } /** Represents a SendPaymentMessage. */ @@ -5917,6 +12566,9 @@ export namespace proto { /** SendPaymentMessage requestMessageKey. */ public requestMessageKey?: (proto.IMessageKey|null); + /** SendPaymentMessage background. */ + public background?: (proto.IPaymentBackground|null); + /** * Creates a new SendPaymentMessage instance using the specified properties. * @param [properties] Properties to set @@ -6005,6 +12657,12 @@ export namespace proto { /** RequestPaymentMessage expiryTimestamp */ expiryTimestamp?: (number|Long|null); + + /** RequestPaymentMessage amount */ + amount?: (proto.IMoney|null); + + /** RequestPaymentMessage background */ + background?: (proto.IPaymentBackground|null); } /** Represents a RequestPaymentMessage. */ @@ -6031,6 +12689,12 @@ export namespace proto { /** RequestPaymentMessage expiryTimestamp. */ public expiryTimestamp: (number|Long); + /** RequestPaymentMessage amount. */ + public amount?: (proto.IMoney|null); + + /** RequestPaymentMessage background. */ + public background?: (proto.IPaymentBackground|null); + /** * Creates a new RequestPaymentMessage instance using the specified properties. * @param [properties] Properties to set @@ -6282,6 +12946,113 @@ export namespace proto { public toJSON(): { [k: string]: any }; } + /** Properties of a PaymentInviteMessage. */ + interface IPaymentInviteMessage { + + /** PaymentInviteMessage serviceType */ + serviceType?: (proto.PaymentInviteMessage.PaymentInviteMessageServiceType|null); + + /** PaymentInviteMessage expiryTimestamp */ + expiryTimestamp?: (number|Long|null); + } + + /** Represents a PaymentInviteMessage. */ + class PaymentInviteMessage implements IPaymentInviteMessage { + + /** + * Constructs a new PaymentInviteMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IPaymentInviteMessage); + + /** PaymentInviteMessage serviceType. */ + public serviceType: proto.PaymentInviteMessage.PaymentInviteMessageServiceType; + + /** PaymentInviteMessage expiryTimestamp. */ + public expiryTimestamp: (number|Long); + + /** + * Creates a new PaymentInviteMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns PaymentInviteMessage instance + */ + public static create(properties?: proto.IPaymentInviteMessage): proto.PaymentInviteMessage; + + /** + * Encodes the specified PaymentInviteMessage message. Does not implicitly {@link proto.PaymentInviteMessage.verify|verify} messages. + * @param message PaymentInviteMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IPaymentInviteMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PaymentInviteMessage message, length delimited. Does not implicitly {@link proto.PaymentInviteMessage.verify|verify} messages. + * @param message PaymentInviteMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IPaymentInviteMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PaymentInviteMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PaymentInviteMessage + * @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.PaymentInviteMessage; + + /** + * Decodes a PaymentInviteMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PaymentInviteMessage + * @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.PaymentInviteMessage; + + /** + * Verifies a PaymentInviteMessage 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 PaymentInviteMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PaymentInviteMessage + */ + public static fromObject(object: { [k: string]: any }): proto.PaymentInviteMessage; + + /** + * Creates a plain object from a PaymentInviteMessage message. Also converts values to other types if specified. + * @param message PaymentInviteMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.PaymentInviteMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PaymentInviteMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace PaymentInviteMessage { + + /** PaymentInviteMessageServiceType enum. */ + enum PaymentInviteMessageServiceType { + UNKNOWN = 0, + FBPAY = 1, + NOVI = 2, + UPI = 3 + } + } + /** Properties of a LiveLocationMessage. */ interface ILiveLocationMessage { @@ -6791,7 +13562,7 @@ export namespace proto { public documentMessage?: (proto.IDocumentMessage|null); /** HydratedFourRowTemplate hydratedTitleText. */ - public hydratedTitleText: string; + public hydratedTitleText?: (string|null); /** HydratedFourRowTemplate imageMessage. */ public imageMessage?: (proto.IImageMessage|null); @@ -7229,6 +14000,9 @@ export namespace proto { /** ProductSnapshot firstImageId */ firstImageId?: (string|null); + + /** ProductSnapshot salePriceAmount1000 */ + salePriceAmount1000?: (number|Long|null); } /** Represents a ProductSnapshot. */ @@ -7270,6 +14044,9 @@ export namespace proto { /** ProductSnapshot firstImageId. */ public firstImageId: string; + /** ProductSnapshot salePriceAmount1000. */ + public salePriceAmount1000: (number|Long); + /** * Creates a new ProductSnapshot instance using the specified properties. * @param [properties] Properties to set @@ -7479,6 +14256,12 @@ export namespace proto { /** OrderMessage token */ token?: (string|null); + /** OrderMessage totalAmount1000 */ + totalAmount1000?: (number|Long|null); + + /** OrderMessage totalCurrencyCode */ + totalCurrencyCode?: (string|null); + /** OrderMessage contextInfo */ contextInfo?: (proto.IContextInfo|null); } @@ -7519,6 +14302,12 @@ export namespace proto { /** OrderMessage token. */ public token: string; + /** OrderMessage totalAmount1000. */ + public totalAmount1000: (number|Long); + + /** OrderMessage totalCurrencyCode. */ + public totalCurrencyCode: string; + /** OrderMessage contextInfo. */ public contextInfo?: (proto.IContextInfo|null); @@ -7804,6 +14593,390 @@ export namespace proto { public toJSON(): { [k: string]: any }; } + /** Properties of a Product. */ + interface IProduct { + + /** Product productId */ + productId?: (string|null); + } + + /** Represents a Product. */ + class Product implements IProduct { + + /** + * Constructs a new Product. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IProduct); + + /** Product productId. */ + public productId: string; + + /** + * Creates a new Product instance using the specified properties. + * @param [properties] Properties to set + * @returns Product instance + */ + public static create(properties?: proto.IProduct): proto.Product; + + /** + * Encodes the specified Product message. Does not implicitly {@link proto.Product.verify|verify} messages. + * @param message Product message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IProduct, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Product message, length delimited. Does not implicitly {@link proto.Product.verify|verify} messages. + * @param message Product message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IProduct, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Product message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Product + * @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.Product; + + /** + * Decodes a Product message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Product + * @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.Product; + + /** + * Verifies a Product 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 Product message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Product + */ + public static fromObject(object: { [k: string]: any }): proto.Product; + + /** + * Creates a plain object from a Product message. Also converts values to other types if specified. + * @param message Product + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Product, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Product to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ProductSection. */ + interface IProductSection { + + /** ProductSection title */ + title?: (string|null); + + /** ProductSection products */ + products?: (proto.IProduct[]|null); + } + + /** Represents a ProductSection. */ + class ProductSection implements IProductSection { + + /** + * Constructs a new ProductSection. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IProductSection); + + /** ProductSection title. */ + public title: string; + + /** ProductSection products. */ + public products: proto.IProduct[]; + + /** + * Creates a new ProductSection instance using the specified properties. + * @param [properties] Properties to set + * @returns ProductSection instance + */ + public static create(properties?: proto.IProductSection): proto.ProductSection; + + /** + * Encodes the specified ProductSection message. Does not implicitly {@link proto.ProductSection.verify|verify} messages. + * @param message ProductSection message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IProductSection, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ProductSection message, length delimited. Does not implicitly {@link proto.ProductSection.verify|verify} messages. + * @param message ProductSection message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IProductSection, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ProductSection message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ProductSection + * @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.ProductSection; + + /** + * Decodes a ProductSection message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ProductSection + * @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.ProductSection; + + /** + * Verifies a ProductSection 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 ProductSection message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ProductSection + */ + public static fromObject(object: { [k: string]: any }): proto.ProductSection; + + /** + * Creates a plain object from a ProductSection message. Also converts values to other types if specified. + * @param message ProductSection + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.ProductSection, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ProductSection to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ProductListHeaderImage. */ + interface IProductListHeaderImage { + + /** ProductListHeaderImage productId */ + productId?: (string|null); + + /** ProductListHeaderImage jpegThumbnail */ + jpegThumbnail?: (Uint8Array|null); + } + + /** Represents a ProductListHeaderImage. */ + class ProductListHeaderImage implements IProductListHeaderImage { + + /** + * Constructs a new ProductListHeaderImage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IProductListHeaderImage); + + /** ProductListHeaderImage productId. */ + public productId: string; + + /** ProductListHeaderImage jpegThumbnail. */ + public jpegThumbnail: Uint8Array; + + /** + * Creates a new ProductListHeaderImage instance using the specified properties. + * @param [properties] Properties to set + * @returns ProductListHeaderImage instance + */ + public static create(properties?: proto.IProductListHeaderImage): proto.ProductListHeaderImage; + + /** + * Encodes the specified ProductListHeaderImage message. Does not implicitly {@link proto.ProductListHeaderImage.verify|verify} messages. + * @param message ProductListHeaderImage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IProductListHeaderImage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ProductListHeaderImage message, length delimited. Does not implicitly {@link proto.ProductListHeaderImage.verify|verify} messages. + * @param message ProductListHeaderImage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IProductListHeaderImage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ProductListHeaderImage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ProductListHeaderImage + * @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.ProductListHeaderImage; + + /** + * Decodes a ProductListHeaderImage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ProductListHeaderImage + * @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.ProductListHeaderImage; + + /** + * Verifies a ProductListHeaderImage 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 ProductListHeaderImage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ProductListHeaderImage + */ + public static fromObject(object: { [k: string]: any }): proto.ProductListHeaderImage; + + /** + * Creates a plain object from a ProductListHeaderImage message. Also converts values to other types if specified. + * @param message ProductListHeaderImage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.ProductListHeaderImage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ProductListHeaderImage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ProductListInfo. */ + interface IProductListInfo { + + /** ProductListInfo productSections */ + productSections?: (proto.IProductSection[]|null); + + /** ProductListInfo headerImage */ + headerImage?: (proto.IProductListHeaderImage|null); + + /** ProductListInfo businessOwnerJid */ + businessOwnerJid?: (string|null); + } + + /** Represents a ProductListInfo. */ + class ProductListInfo implements IProductListInfo { + + /** + * Constructs a new ProductListInfo. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IProductListInfo); + + /** ProductListInfo productSections. */ + public productSections: proto.IProductSection[]; + + /** ProductListInfo headerImage. */ + public headerImage?: (proto.IProductListHeaderImage|null); + + /** ProductListInfo businessOwnerJid. */ + public businessOwnerJid: string; + + /** + * Creates a new ProductListInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns ProductListInfo instance + */ + public static create(properties?: proto.IProductListInfo): proto.ProductListInfo; + + /** + * Encodes the specified ProductListInfo message. Does not implicitly {@link proto.ProductListInfo.verify|verify} messages. + * @param message ProductListInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IProductListInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ProductListInfo message, length delimited. Does not implicitly {@link proto.ProductListInfo.verify|verify} messages. + * @param message ProductListInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IProductListInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ProductListInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ProductListInfo + * @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.ProductListInfo; + + /** + * Decodes a ProductListInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ProductListInfo + * @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.ProductListInfo; + + /** + * Verifies a ProductListInfo 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 ProductListInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ProductListInfo + */ + public static fromObject(object: { [k: string]: any }): proto.ProductListInfo; + + /** + * Creates a plain object from a ProductListInfo message. Also converts values to other types if specified. + * @param message ProductListInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.ProductListInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ProductListInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of a ListMessage. */ interface IListMessage { @@ -7821,6 +14994,15 @@ export namespace proto { /** ListMessage sections */ sections?: (proto.ISection[]|null); + + /** ListMessage productListInfo */ + productListInfo?: (proto.IProductListInfo|null); + + /** ListMessage footerText */ + footerText?: (string|null); + + /** ListMessage contextInfo */ + contextInfo?: (proto.IContextInfo|null); } /** Represents a ListMessage. */ @@ -7847,6 +15029,15 @@ export namespace proto { /** ListMessage sections. */ public sections: proto.ISection[]; + /** ListMessage productListInfo. */ + public productListInfo?: (proto.IProductListInfo|null); + + /** ListMessage footerText. */ + public footerText: string; + + /** ListMessage contextInfo. */ + public contextInfo?: (proto.IContextInfo|null); + /** * Creates a new ListMessage instance using the specified properties. * @param [properties] Properties to set @@ -7923,7 +15114,8 @@ export namespace proto { /** ListMessageListType enum. */ enum ListMessageListType { UNKNOWN = 0, - SINGLE_SELECT = 1 + SINGLE_SELECT = 1, + PRODUCT_LIST = 2 } } @@ -8020,8 +15212,8 @@ export namespace proto { /** Properties of a ListResponseMessage. */ interface IListResponseMessage { - /** ListResponseMessage selectedDisplayText */ - selectedDisplayText?: (string|null); + /** ListResponseMessage title */ + title?: (string|null); /** ListResponseMessage listType */ listType?: (proto.ListResponseMessage.ListResponseMessageListType|null); @@ -8031,6 +15223,9 @@ export namespace proto { /** ListResponseMessage contextInfo */ contextInfo?: (proto.IContextInfo|null); + + /** ListResponseMessage description */ + description?: (string|null); } /** Represents a ListResponseMessage. */ @@ -8042,8 +15237,8 @@ export namespace proto { */ constructor(properties?: proto.IListResponseMessage); - /** ListResponseMessage selectedDisplayText. */ - public selectedDisplayText: string; + /** ListResponseMessage title. */ + public title: string; /** ListResponseMessage listType. */ public listType: proto.ListResponseMessage.ListResponseMessageListType; @@ -8054,6 +15249,9 @@ export namespace proto { /** ListResponseMessage contextInfo. */ public contextInfo?: (proto.IContextInfo|null); + /** ListResponseMessage description. */ + public description: string; + /** * Creates a new ListResponseMessage instance using the specified properties. * @param [properties] Properties to set @@ -8260,108 +15458,6 @@ export namespace proto { public toJSON(): { [k: string]: any }; } - /** Properties of an EphemeralSetting. */ - interface IEphemeralSetting { - - /** EphemeralSetting chatJid */ - chatJid?: (string|null); - - /** EphemeralSetting ephemeralExpiration */ - ephemeralExpiration?: (number|null); - - /** EphemeralSetting ephemeralSettingTimestamp */ - ephemeralSettingTimestamp?: (number|Long|null); - } - - /** Represents an EphemeralSetting. */ - class EphemeralSetting implements IEphemeralSetting { - - /** - * Constructs a new EphemeralSetting. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IEphemeralSetting); - - /** EphemeralSetting chatJid. */ - public chatJid: string; - - /** EphemeralSetting ephemeralExpiration. */ - public ephemeralExpiration: number; - - /** EphemeralSetting ephemeralSettingTimestamp. */ - public ephemeralSettingTimestamp: (number|Long); - - /** - * Creates a new EphemeralSetting instance using the specified properties. - * @param [properties] Properties to set - * @returns EphemeralSetting instance - */ - public static create(properties?: proto.IEphemeralSetting): proto.EphemeralSetting; - - /** - * Encodes the specified EphemeralSetting message. Does not implicitly {@link proto.EphemeralSetting.verify|verify} messages. - * @param message EphemeralSetting message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IEphemeralSetting, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EphemeralSetting message, length delimited. Does not implicitly {@link proto.EphemeralSetting.verify|verify} messages. - * @param message EphemeralSetting message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IEphemeralSetting, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EphemeralSetting message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EphemeralSetting - * @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.EphemeralSetting; - - /** - * Decodes an EphemeralSetting message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EphemeralSetting - * @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.EphemeralSetting; - - /** - * Verifies an EphemeralSetting 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 EphemeralSetting message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EphemeralSetting - */ - public static fromObject(object: { [k: string]: any }): proto.EphemeralSetting; - - /** - * Creates a plain object from an EphemeralSetting message. Also converts values to other types if specified. - * @param message EphemeralSetting - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.EphemeralSetting, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EphemeralSetting to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - /** Properties of a DeviceSentMessage. */ interface IDeviceSentMessage { @@ -8373,9 +15469,6 @@ export namespace proto { /** DeviceSentMessage phash */ phash?: (string|null); - - /** DeviceSentMessage broadcastEphemeralSettings */ - broadcastEphemeralSettings?: (proto.IEphemeralSetting[]|null); } /** Represents a DeviceSentMessage. */ @@ -8396,9 +15489,6 @@ export namespace proto { /** DeviceSentMessage phash. */ public phash: string; - /** DeviceSentMessage broadcastEphemeralSettings. */ - public broadcastEphemeralSettings: proto.IEphemeralSetting[]; - /** * Creates a new DeviceSentMessage instance using the specified properties. * @param [properties] Properties to set @@ -8560,6 +15650,591 @@ export namespace proto { public toJSON(): { [k: string]: any }; } + /** Properties of a ButtonText. */ + interface IButtonText { + + /** ButtonText displayText */ + displayText?: (string|null); + } + + /** Represents a ButtonText. */ + class ButtonText implements IButtonText { + + /** + * Constructs a new ButtonText. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IButtonText); + + /** ButtonText displayText. */ + public displayText: string; + + /** + * Creates a new ButtonText instance using the specified properties. + * @param [properties] Properties to set + * @returns ButtonText instance + */ + public static create(properties?: proto.IButtonText): proto.ButtonText; + + /** + * Encodes the specified ButtonText message. Does not implicitly {@link proto.ButtonText.verify|verify} messages. + * @param message ButtonText message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IButtonText, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ButtonText message, length delimited. Does not implicitly {@link proto.ButtonText.verify|verify} messages. + * @param message ButtonText message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IButtonText, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ButtonText message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ButtonText + * @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.ButtonText; + + /** + * Decodes a ButtonText message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ButtonText + * @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.ButtonText; + + /** + * Verifies a ButtonText 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 ButtonText message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ButtonText + */ + public static fromObject(object: { [k: string]: any }): proto.ButtonText; + + /** + * Creates a plain object from a ButtonText message. Also converts values to other types if specified. + * @param message ButtonText + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.ButtonText, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ButtonText to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a NativeFlowInfo. */ + interface INativeFlowInfo { + + /** NativeFlowInfo name */ + name?: (string|null); + + /** NativeFlowInfo paramsJson */ + paramsJson?: (string|null); + } + + /** Represents a NativeFlowInfo. */ + class NativeFlowInfo implements INativeFlowInfo { + + /** + * Constructs a new NativeFlowInfo. + * @param [properties] Properties to set + */ + constructor(properties?: proto.INativeFlowInfo); + + /** NativeFlowInfo name. */ + public name: string; + + /** NativeFlowInfo paramsJson. */ + public paramsJson: string; + + /** + * Creates a new NativeFlowInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns NativeFlowInfo instance + */ + public static create(properties?: proto.INativeFlowInfo): proto.NativeFlowInfo; + + /** + * Encodes the specified NativeFlowInfo message. Does not implicitly {@link proto.NativeFlowInfo.verify|verify} messages. + * @param message NativeFlowInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.INativeFlowInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NativeFlowInfo message, length delimited. Does not implicitly {@link proto.NativeFlowInfo.verify|verify} messages. + * @param message NativeFlowInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.INativeFlowInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NativeFlowInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NativeFlowInfo + * @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.NativeFlowInfo; + + /** + * Decodes a NativeFlowInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NativeFlowInfo + * @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.NativeFlowInfo; + + /** + * Verifies a NativeFlowInfo 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 NativeFlowInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NativeFlowInfo + */ + public static fromObject(object: { [k: string]: any }): proto.NativeFlowInfo; + + /** + * Creates a plain object from a NativeFlowInfo message. Also converts values to other types if specified. + * @param message NativeFlowInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.NativeFlowInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NativeFlowInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Button. */ + interface IButton { + + /** Button buttonId */ + buttonId?: (string|null); + + /** Button buttonText */ + buttonText?: (proto.IButtonText|null); + + /** Button type */ + type?: (proto.Button.ButtonType|null); + + /** Button nativeFlowInfo */ + nativeFlowInfo?: (proto.INativeFlowInfo|null); + } + + /** Represents a Button. */ + class Button implements IButton { + + /** + * Constructs a new Button. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IButton); + + /** Button buttonId. */ + public buttonId: string; + + /** Button buttonText. */ + public buttonText?: (proto.IButtonText|null); + + /** Button type. */ + public type: proto.Button.ButtonType; + + /** Button nativeFlowInfo. */ + public nativeFlowInfo?: (proto.INativeFlowInfo|null); + + /** + * Creates a new Button instance using the specified properties. + * @param [properties] Properties to set + * @returns Button instance + */ + public static create(properties?: proto.IButton): proto.Button; + + /** + * Encodes the specified Button message. Does not implicitly {@link proto.Button.verify|verify} messages. + * @param message Button message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IButton, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Button message, length delimited. Does not implicitly {@link proto.Button.verify|verify} messages. + * @param message Button message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IButton, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Button message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Button + * @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.Button; + + /** + * Decodes a Button message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Button + * @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.Button; + + /** + * Verifies a Button 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 Button message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Button + */ + public static fromObject(object: { [k: string]: any }): proto.Button; + + /** + * Creates a plain object from a Button message. Also converts values to other types if specified. + * @param message Button + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Button, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Button to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Button { + + /** ButtonType enum. */ + enum ButtonType { + UNKNOWN = 0, + RESPONSE = 1, + NATIVE_FLOW = 2 + } + } + + /** Properties of a ButtonsMessage. */ + interface IButtonsMessage { + + /** ButtonsMessage contentText */ + contentText?: (string|null); + + /** ButtonsMessage footerText */ + footerText?: (string|null); + + /** ButtonsMessage contextInfo */ + contextInfo?: (proto.IContextInfo|null); + + /** ButtonsMessage buttons */ + buttons?: (proto.IButton[]|null); + + /** ButtonsMessage headerType */ + headerType?: (proto.ButtonsMessage.ButtonsMessageHeaderType|null); + + /** ButtonsMessage text */ + text?: (string|null); + + /** ButtonsMessage documentMessage */ + documentMessage?: (proto.IDocumentMessage|null); + + /** ButtonsMessage imageMessage */ + imageMessage?: (proto.IImageMessage|null); + + /** ButtonsMessage videoMessage */ + videoMessage?: (proto.IVideoMessage|null); + + /** ButtonsMessage locationMessage */ + locationMessage?: (proto.ILocationMessage|null); + } + + /** Represents a ButtonsMessage. */ + class ButtonsMessage implements IButtonsMessage { + + /** + * Constructs a new ButtonsMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IButtonsMessage); + + /** ButtonsMessage contentText. */ + public contentText: string; + + /** ButtonsMessage footerText. */ + public footerText: string; + + /** ButtonsMessage contextInfo. */ + public contextInfo?: (proto.IContextInfo|null); + + /** ButtonsMessage buttons. */ + public buttons: proto.IButton[]; + + /** ButtonsMessage headerType. */ + public headerType: proto.ButtonsMessage.ButtonsMessageHeaderType; + + /** ButtonsMessage text. */ + public text?: (string|null); + + /** ButtonsMessage documentMessage. */ + public documentMessage?: (proto.IDocumentMessage|null); + + /** ButtonsMessage imageMessage. */ + public imageMessage?: (proto.IImageMessage|null); + + /** ButtonsMessage videoMessage. */ + public videoMessage?: (proto.IVideoMessage|null); + + /** ButtonsMessage locationMessage. */ + public locationMessage?: (proto.ILocationMessage|null); + + /** ButtonsMessage header. */ + public header?: ("text"|"documentMessage"|"imageMessage"|"videoMessage"|"locationMessage"); + + /** + * Creates a new ButtonsMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns ButtonsMessage instance + */ + public static create(properties?: proto.IButtonsMessage): proto.ButtonsMessage; + + /** + * Encodes the specified ButtonsMessage message. Does not implicitly {@link proto.ButtonsMessage.verify|verify} messages. + * @param message ButtonsMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IButtonsMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ButtonsMessage message, length delimited. Does not implicitly {@link proto.ButtonsMessage.verify|verify} messages. + * @param message ButtonsMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IButtonsMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ButtonsMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ButtonsMessage + * @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.ButtonsMessage; + + /** + * Decodes a ButtonsMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ButtonsMessage + * @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.ButtonsMessage; + + /** + * Verifies a ButtonsMessage 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 ButtonsMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ButtonsMessage + */ + public static fromObject(object: { [k: string]: any }): proto.ButtonsMessage; + + /** + * Creates a plain object from a ButtonsMessage message. Also converts values to other types if specified. + * @param message ButtonsMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.ButtonsMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ButtonsMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace ButtonsMessage { + + /** ButtonsMessageHeaderType enum. */ + enum ButtonsMessageHeaderType { + UNKNOWN = 0, + EMPTY = 1, + TEXT = 2, + DOCUMENT = 3, + IMAGE = 4, + VIDEO = 5, + LOCATION = 6 + } + } + + /** Properties of a ButtonsResponseMessage. */ + interface IButtonsResponseMessage { + + /** ButtonsResponseMessage selectedButtonId */ + selectedButtonId?: (string|null); + + /** ButtonsResponseMessage contextInfo */ + contextInfo?: (proto.IContextInfo|null); + + /** ButtonsResponseMessage type */ + type?: (proto.ButtonsResponseMessage.ButtonsResponseMessageType|null); + + /** ButtonsResponseMessage selectedDisplayText */ + selectedDisplayText?: (string|null); + } + + /** Represents a ButtonsResponseMessage. */ + class ButtonsResponseMessage implements IButtonsResponseMessage { + + /** + * Constructs a new ButtonsResponseMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IButtonsResponseMessage); + + /** ButtonsResponseMessage selectedButtonId. */ + public selectedButtonId: string; + + /** ButtonsResponseMessage contextInfo. */ + public contextInfo?: (proto.IContextInfo|null); + + /** ButtonsResponseMessage type. */ + public type: proto.ButtonsResponseMessage.ButtonsResponseMessageType; + + /** ButtonsResponseMessage selectedDisplayText. */ + public selectedDisplayText?: (string|null); + + /** ButtonsResponseMessage response. */ + public response?: "selectedDisplayText"; + + /** + * Creates a new ButtonsResponseMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns ButtonsResponseMessage instance + */ + public static create(properties?: proto.IButtonsResponseMessage): proto.ButtonsResponseMessage; + + /** + * Encodes the specified ButtonsResponseMessage message. Does not implicitly {@link proto.ButtonsResponseMessage.verify|verify} messages. + * @param message ButtonsResponseMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IButtonsResponseMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ButtonsResponseMessage message, length delimited. Does not implicitly {@link proto.ButtonsResponseMessage.verify|verify} messages. + * @param message ButtonsResponseMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IButtonsResponseMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ButtonsResponseMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ButtonsResponseMessage + * @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.ButtonsResponseMessage; + + /** + * Decodes a ButtonsResponseMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ButtonsResponseMessage + * @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.ButtonsResponseMessage; + + /** + * Verifies a ButtonsResponseMessage 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 ButtonsResponseMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ButtonsResponseMessage + */ + public static fromObject(object: { [k: string]: any }): proto.ButtonsResponseMessage; + + /** + * Creates a plain object from a ButtonsResponseMessage message. Also converts values to other types if specified. + * @param message ButtonsResponseMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.ButtonsResponseMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ButtonsResponseMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace ButtonsResponseMessage { + + /** ButtonsResponseMessageType enum. */ + enum ButtonsResponseMessageType { + UNKNOWN = 0, + DISPLAY_TEXT = 1 + } + } + /** Properties of a Message. */ interface IMessage { @@ -8641,6 +16316,9 @@ export namespace proto { /** Message deviceSentMessage */ deviceSentMessage?: (proto.IDeviceSentMessage|null); + /** Message messageContextInfo */ + messageContextInfo?: (proto.IMessageContextInfo|null); + /** Message listMessage */ listMessage?: (proto.IListMessage|null); @@ -8655,6 +16333,18 @@ export namespace proto { /** Message ephemeralMessage */ ephemeralMessage?: (proto.IFutureProofMessage|null); + + /** Message invoiceMessage */ + invoiceMessage?: (proto.IInvoiceMessage|null); + + /** Message buttonsMessage */ + buttonsMessage?: (proto.IButtonsMessage|null); + + /** Message buttonsResponseMessage */ + buttonsResponseMessage?: (proto.IButtonsResponseMessage|null); + + /** Message paymentInviteMessage */ + paymentInviteMessage?: (proto.IPaymentInviteMessage|null); } /** Represents a Message. */ @@ -8744,6 +16434,9 @@ export namespace proto { /** Message deviceSentMessage. */ public deviceSentMessage?: (proto.IDeviceSentMessage|null); + /** Message messageContextInfo. */ + public messageContextInfo?: (proto.IMessageContextInfo|null); + /** Message listMessage. */ public listMessage?: (proto.IListMessage|null); @@ -8759,6 +16452,18 @@ export namespace proto { /** Message ephemeralMessage. */ public ephemeralMessage?: (proto.IFutureProofMessage|null); + /** Message invoiceMessage. */ + public invoiceMessage?: (proto.IInvoiceMessage|null); + + /** Message buttonsMessage. */ + public buttonsMessage?: (proto.IButtonsMessage|null); + + /** Message buttonsResponseMessage. */ + public buttonsResponseMessage?: (proto.IButtonsResponseMessage|null); + + /** Message paymentInviteMessage. */ + public paymentInviteMessage?: (proto.IPaymentInviteMessage|null); + /** * Creates a new Message instance using the specified properties. * @param [properties] Properties to set @@ -8830,6 +16535,644 @@ export namespace proto { public toJSON(): { [k: string]: any }; } + /** Properties of a CompanionProps. */ + interface ICompanionProps { + + /** CompanionProps os */ + os?: (string|null); + + /** CompanionProps version */ + version?: (proto.IAppVersion|null); + + /** CompanionProps platformType */ + platformType?: (proto.CompanionProps.CompanionPropsPlatformType|null); + + /** CompanionProps requireFullSync */ + requireFullSync?: (boolean|null); + } + + /** Represents a CompanionProps. */ + class CompanionProps implements ICompanionProps { + + /** + * Constructs a new CompanionProps. + * @param [properties] Properties to set + */ + constructor(properties?: proto.ICompanionProps); + + /** CompanionProps os. */ + public os: string; + + /** CompanionProps version. */ + public version?: (proto.IAppVersion|null); + + /** CompanionProps platformType. */ + public platformType: proto.CompanionProps.CompanionPropsPlatformType; + + /** CompanionProps requireFullSync. */ + public requireFullSync: boolean; + + /** + * Creates a new CompanionProps instance using the specified properties. + * @param [properties] Properties to set + * @returns CompanionProps instance + */ + public static create(properties?: proto.ICompanionProps): proto.CompanionProps; + + /** + * Encodes the specified CompanionProps message. Does not implicitly {@link proto.CompanionProps.verify|verify} messages. + * @param message CompanionProps message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.ICompanionProps, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CompanionProps message, length delimited. Does not implicitly {@link proto.CompanionProps.verify|verify} messages. + * @param message CompanionProps message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.ICompanionProps, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CompanionProps message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CompanionProps + * @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.CompanionProps; + + /** + * Decodes a CompanionProps message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CompanionProps + * @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.CompanionProps; + + /** + * Verifies a CompanionProps 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 CompanionProps message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CompanionProps + */ + public static fromObject(object: { [k: string]: any }): proto.CompanionProps; + + /** + * Creates a plain object from a CompanionProps message. Also converts values to other types if specified. + * @param message CompanionProps + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.CompanionProps, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CompanionProps to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace CompanionProps { + + /** CompanionPropsPlatformType enum. */ + enum CompanionPropsPlatformType { + UNKNOWN = 0, + CHROME = 1, + FIREFOX = 2, + IE = 3, + OPERA = 4, + SAFARI = 5, + EDGE = 6, + DESKTOP = 7, + IPAD = 8, + ANDROID_TABLET = 9, + OHANA = 10, + ALOHA = 11, + CATALINA = 12 + } + } + + /** Properties of a ADVSignedDeviceIdentityHMAC. */ + interface IADVSignedDeviceIdentityHMAC { + + /** ADVSignedDeviceIdentityHMAC details */ + details?: (Uint8Array|null); + + /** ADVSignedDeviceIdentityHMAC hmac */ + hmac?: (Uint8Array|null); + } + + /** Represents a ADVSignedDeviceIdentityHMAC. */ + class ADVSignedDeviceIdentityHMAC implements IADVSignedDeviceIdentityHMAC { + + /** + * Constructs a new ADVSignedDeviceIdentityHMAC. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IADVSignedDeviceIdentityHMAC); + + /** ADVSignedDeviceIdentityHMAC details. */ + public details: Uint8Array; + + /** ADVSignedDeviceIdentityHMAC hmac. */ + public hmac: Uint8Array; + + /** + * Creates a new ADVSignedDeviceIdentityHMAC instance using the specified properties. + * @param [properties] Properties to set + * @returns ADVSignedDeviceIdentityHMAC instance + */ + public static create(properties?: proto.IADVSignedDeviceIdentityHMAC): proto.ADVSignedDeviceIdentityHMAC; + + /** + * Encodes the specified ADVSignedDeviceIdentityHMAC message. Does not implicitly {@link proto.ADVSignedDeviceIdentityHMAC.verify|verify} messages. + * @param message ADVSignedDeviceIdentityHMAC message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IADVSignedDeviceIdentityHMAC, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ADVSignedDeviceIdentityHMAC message, length delimited. Does not implicitly {@link proto.ADVSignedDeviceIdentityHMAC.verify|verify} messages. + * @param message ADVSignedDeviceIdentityHMAC message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IADVSignedDeviceIdentityHMAC, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ADVSignedDeviceIdentityHMAC message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ADVSignedDeviceIdentityHMAC + * @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.ADVSignedDeviceIdentityHMAC; + + /** + * Decodes a ADVSignedDeviceIdentityHMAC message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ADVSignedDeviceIdentityHMAC + * @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.ADVSignedDeviceIdentityHMAC; + + /** + * Verifies a ADVSignedDeviceIdentityHMAC 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 ADVSignedDeviceIdentityHMAC message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ADVSignedDeviceIdentityHMAC + */ + public static fromObject(object: { [k: string]: any }): proto.ADVSignedDeviceIdentityHMAC; + + /** + * Creates a plain object from a ADVSignedDeviceIdentityHMAC message. Also converts values to other types if specified. + * @param message ADVSignedDeviceIdentityHMAC + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.ADVSignedDeviceIdentityHMAC, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ADVSignedDeviceIdentityHMAC to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ADVSignedDeviceIdentity. */ + interface IADVSignedDeviceIdentity { + + /** ADVSignedDeviceIdentity details */ + details?: (Uint8Array|null); + + /** ADVSignedDeviceIdentity accountSignatureKey */ + accountSignatureKey?: (Uint8Array|null); + + /** ADVSignedDeviceIdentity accountSignature */ + accountSignature?: (Uint8Array|null); + + /** ADVSignedDeviceIdentity deviceSignature */ + deviceSignature?: (Uint8Array|null); + } + + /** Represents a ADVSignedDeviceIdentity. */ + class ADVSignedDeviceIdentity implements IADVSignedDeviceIdentity { + + /** + * Constructs a new ADVSignedDeviceIdentity. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IADVSignedDeviceIdentity); + + /** ADVSignedDeviceIdentity details. */ + public details: Uint8Array; + + /** ADVSignedDeviceIdentity accountSignatureKey. */ + public accountSignatureKey: Uint8Array; + + /** ADVSignedDeviceIdentity accountSignature. */ + public accountSignature: Uint8Array; + + /** ADVSignedDeviceIdentity deviceSignature. */ + public deviceSignature: Uint8Array; + + /** + * Creates a new ADVSignedDeviceIdentity instance using the specified properties. + * @param [properties] Properties to set + * @returns ADVSignedDeviceIdentity instance + */ + public static create(properties?: proto.IADVSignedDeviceIdentity): proto.ADVSignedDeviceIdentity; + + /** + * Encodes the specified ADVSignedDeviceIdentity message. Does not implicitly {@link proto.ADVSignedDeviceIdentity.verify|verify} messages. + * @param message ADVSignedDeviceIdentity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IADVSignedDeviceIdentity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ADVSignedDeviceIdentity message, length delimited. Does not implicitly {@link proto.ADVSignedDeviceIdentity.verify|verify} messages. + * @param message ADVSignedDeviceIdentity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IADVSignedDeviceIdentity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ADVSignedDeviceIdentity message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ADVSignedDeviceIdentity + * @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.ADVSignedDeviceIdentity; + + /** + * Decodes a ADVSignedDeviceIdentity message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ADVSignedDeviceIdentity + * @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.ADVSignedDeviceIdentity; + + /** + * Verifies a ADVSignedDeviceIdentity 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 ADVSignedDeviceIdentity message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ADVSignedDeviceIdentity + */ + public static fromObject(object: { [k: string]: any }): proto.ADVSignedDeviceIdentity; + + /** + * Creates a plain object from a ADVSignedDeviceIdentity message. Also converts values to other types if specified. + * @param message ADVSignedDeviceIdentity + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.ADVSignedDeviceIdentity, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ADVSignedDeviceIdentity to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ADVDeviceIdentity. */ + interface IADVDeviceIdentity { + + /** ADVDeviceIdentity rawId */ + rawId?: (number|null); + + /** ADVDeviceIdentity timestamp */ + timestamp?: (number|Long|null); + + /** ADVDeviceIdentity keyIndex */ + keyIndex?: (number|null); + } + + /** Represents a ADVDeviceIdentity. */ + class ADVDeviceIdentity implements IADVDeviceIdentity { + + /** + * Constructs a new ADVDeviceIdentity. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IADVDeviceIdentity); + + /** ADVDeviceIdentity rawId. */ + public rawId: number; + + /** ADVDeviceIdentity timestamp. */ + public timestamp: (number|Long); + + /** ADVDeviceIdentity keyIndex. */ + public keyIndex: number; + + /** + * Creates a new ADVDeviceIdentity instance using the specified properties. + * @param [properties] Properties to set + * @returns ADVDeviceIdentity instance + */ + public static create(properties?: proto.IADVDeviceIdentity): proto.ADVDeviceIdentity; + + /** + * Encodes the specified ADVDeviceIdentity message. Does not implicitly {@link proto.ADVDeviceIdentity.verify|verify} messages. + * @param message ADVDeviceIdentity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IADVDeviceIdentity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ADVDeviceIdentity message, length delimited. Does not implicitly {@link proto.ADVDeviceIdentity.verify|verify} messages. + * @param message ADVDeviceIdentity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IADVDeviceIdentity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ADVDeviceIdentity message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ADVDeviceIdentity + * @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.ADVDeviceIdentity; + + /** + * Decodes a ADVDeviceIdentity message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ADVDeviceIdentity + * @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.ADVDeviceIdentity; + + /** + * Verifies a ADVDeviceIdentity 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 ADVDeviceIdentity message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ADVDeviceIdentity + */ + public static fromObject(object: { [k: string]: any }): proto.ADVDeviceIdentity; + + /** + * Creates a plain object from a ADVDeviceIdentity message. Also converts values to other types if specified. + * @param message ADVDeviceIdentity + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.ADVDeviceIdentity, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ADVDeviceIdentity to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ADVSignedKeyIndexList. */ + interface IADVSignedKeyIndexList { + + /** ADVSignedKeyIndexList details */ + details?: (Uint8Array|null); + + /** ADVSignedKeyIndexList accountSignature */ + accountSignature?: (Uint8Array|null); + } + + /** Represents a ADVSignedKeyIndexList. */ + class ADVSignedKeyIndexList implements IADVSignedKeyIndexList { + + /** + * Constructs a new ADVSignedKeyIndexList. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IADVSignedKeyIndexList); + + /** ADVSignedKeyIndexList details. */ + public details: Uint8Array; + + /** ADVSignedKeyIndexList accountSignature. */ + public accountSignature: Uint8Array; + + /** + * Creates a new ADVSignedKeyIndexList instance using the specified properties. + * @param [properties] Properties to set + * @returns ADVSignedKeyIndexList instance + */ + public static create(properties?: proto.IADVSignedKeyIndexList): proto.ADVSignedKeyIndexList; + + /** + * Encodes the specified ADVSignedKeyIndexList message. Does not implicitly {@link proto.ADVSignedKeyIndexList.verify|verify} messages. + * @param message ADVSignedKeyIndexList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IADVSignedKeyIndexList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ADVSignedKeyIndexList message, length delimited. Does not implicitly {@link proto.ADVSignedKeyIndexList.verify|verify} messages. + * @param message ADVSignedKeyIndexList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IADVSignedKeyIndexList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ADVSignedKeyIndexList message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ADVSignedKeyIndexList + * @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.ADVSignedKeyIndexList; + + /** + * Decodes a ADVSignedKeyIndexList message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ADVSignedKeyIndexList + * @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.ADVSignedKeyIndexList; + + /** + * Verifies a ADVSignedKeyIndexList 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 ADVSignedKeyIndexList message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ADVSignedKeyIndexList + */ + public static fromObject(object: { [k: string]: any }): proto.ADVSignedKeyIndexList; + + /** + * Creates a plain object from a ADVSignedKeyIndexList message. Also converts values to other types if specified. + * @param message ADVSignedKeyIndexList + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.ADVSignedKeyIndexList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ADVSignedKeyIndexList to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ADVKeyIndexList. */ + interface IADVKeyIndexList { + + /** ADVKeyIndexList rawId */ + rawId?: (number|null); + + /** ADVKeyIndexList timestamp */ + timestamp?: (number|Long|null); + + /** ADVKeyIndexList currentIndex */ + currentIndex?: (number|null); + + /** ADVKeyIndexList validIndexes */ + validIndexes?: (number[]|null); + } + + /** Represents a ADVKeyIndexList. */ + class ADVKeyIndexList implements IADVKeyIndexList { + + /** + * Constructs a new ADVKeyIndexList. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IADVKeyIndexList); + + /** ADVKeyIndexList rawId. */ + public rawId: number; + + /** ADVKeyIndexList timestamp. */ + public timestamp: (number|Long); + + /** ADVKeyIndexList currentIndex. */ + public currentIndex: number; + + /** ADVKeyIndexList validIndexes. */ + public validIndexes: number[]; + + /** + * Creates a new ADVKeyIndexList instance using the specified properties. + * @param [properties] Properties to set + * @returns ADVKeyIndexList instance + */ + public static create(properties?: proto.IADVKeyIndexList): proto.ADVKeyIndexList; + + /** + * Encodes the specified ADVKeyIndexList message. Does not implicitly {@link proto.ADVKeyIndexList.verify|verify} messages. + * @param message ADVKeyIndexList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IADVKeyIndexList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ADVKeyIndexList message, length delimited. Does not implicitly {@link proto.ADVKeyIndexList.verify|verify} messages. + * @param message ADVKeyIndexList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IADVKeyIndexList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ADVKeyIndexList message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ADVKeyIndexList + * @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.ADVKeyIndexList; + + /** + * Decodes a ADVKeyIndexList message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ADVKeyIndexList + * @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.ADVKeyIndexList; + + /** + * Verifies a ADVKeyIndexList 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 ADVKeyIndexList message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ADVKeyIndexList + */ + public static fromObject(object: { [k: string]: any }): proto.ADVKeyIndexList; + + /** + * Creates a plain object from a ADVKeyIndexList message. Also converts values to other types if specified. + * @param message ADVKeyIndexList + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.ADVKeyIndexList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ADVKeyIndexList to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of a MessageKey. */ interface IMessageKey { @@ -8937,4 +17280,1398 @@ export namespace proto { */ public toJSON(): { [k: string]: any }; } + + /** Properties of a PhotoChange. */ + interface IPhotoChange { + + /** PhotoChange oldPhoto */ + oldPhoto?: (Uint8Array|null); + + /** PhotoChange newPhoto */ + newPhoto?: (Uint8Array|null); + + /** PhotoChange newPhotoId */ + newPhotoId?: (number|null); + } + + /** Represents a PhotoChange. */ + class PhotoChange implements IPhotoChange { + + /** + * Constructs a new PhotoChange. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IPhotoChange); + + /** PhotoChange oldPhoto. */ + public oldPhoto: Uint8Array; + + /** PhotoChange newPhoto. */ + public newPhoto: Uint8Array; + + /** PhotoChange newPhotoId. */ + public newPhotoId: number; + + /** + * Creates a new PhotoChange instance using the specified properties. + * @param [properties] Properties to set + * @returns PhotoChange instance + */ + public static create(properties?: proto.IPhotoChange): proto.PhotoChange; + + /** + * Encodes the specified PhotoChange message. Does not implicitly {@link proto.PhotoChange.verify|verify} messages. + * @param message PhotoChange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IPhotoChange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PhotoChange message, length delimited. Does not implicitly {@link proto.PhotoChange.verify|verify} messages. + * @param message PhotoChange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IPhotoChange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PhotoChange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PhotoChange + * @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.PhotoChange; + + /** + * Decodes a PhotoChange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PhotoChange + * @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.PhotoChange; + + /** + * Verifies a PhotoChange 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 PhotoChange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PhotoChange + */ + public static fromObject(object: { [k: string]: any }): proto.PhotoChange; + + /** + * Creates a plain object from a PhotoChange message. Also converts values to other types if specified. + * @param message PhotoChange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.PhotoChange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PhotoChange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MediaData. */ + interface IMediaData { + + /** MediaData localPath */ + localPath?: (string|null); + } + + /** Represents a MediaData. */ + class MediaData implements IMediaData { + + /** + * Constructs a new MediaData. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IMediaData); + + /** MediaData localPath. */ + public localPath: string; + + /** + * Creates a new MediaData instance using the specified properties. + * @param [properties] Properties to set + * @returns MediaData instance + */ + public static create(properties?: proto.IMediaData): proto.MediaData; + + /** + * Encodes the specified MediaData message. Does not implicitly {@link proto.MediaData.verify|verify} messages. + * @param message MediaData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IMediaData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MediaData message, length delimited. Does not implicitly {@link proto.MediaData.verify|verify} messages. + * @param message MediaData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IMediaData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MediaData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MediaData + * @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.MediaData; + + /** + * Decodes a MediaData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MediaData + * @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.MediaData; + + /** + * Verifies a MediaData 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 MediaData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MediaData + */ + public static fromObject(object: { [k: string]: any }): proto.MediaData; + + /** + * Creates a plain object from a MediaData message. Also converts values to other types if specified. + * @param message MediaData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.MediaData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MediaData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a WebFeatures. */ + interface IWebFeatures { + + /** WebFeatures labelsDisplay */ + labelsDisplay?: (proto.WebFeatures.WebFeaturesFlag|null); + + /** WebFeatures voipIndividualOutgoing */ + voipIndividualOutgoing?: (proto.WebFeatures.WebFeaturesFlag|null); + + /** WebFeatures groupsV3 */ + groupsV3?: (proto.WebFeatures.WebFeaturesFlag|null); + + /** WebFeatures groupsV3Create */ + groupsV3Create?: (proto.WebFeatures.WebFeaturesFlag|null); + + /** WebFeatures changeNumberV2 */ + changeNumberV2?: (proto.WebFeatures.WebFeaturesFlag|null); + + /** WebFeatures queryStatusV3Thumbnail */ + queryStatusV3Thumbnail?: (proto.WebFeatures.WebFeaturesFlag|null); + + /** WebFeatures liveLocations */ + liveLocations?: (proto.WebFeatures.WebFeaturesFlag|null); + + /** WebFeatures queryVname */ + queryVname?: (proto.WebFeatures.WebFeaturesFlag|null); + + /** WebFeatures voipIndividualIncoming */ + voipIndividualIncoming?: (proto.WebFeatures.WebFeaturesFlag|null); + + /** WebFeatures quickRepliesQuery */ + quickRepliesQuery?: (proto.WebFeatures.WebFeaturesFlag|null); + + /** WebFeatures payments */ + payments?: (proto.WebFeatures.WebFeaturesFlag|null); + + /** WebFeatures stickerPackQuery */ + stickerPackQuery?: (proto.WebFeatures.WebFeaturesFlag|null); + + /** WebFeatures liveLocationsFinal */ + liveLocationsFinal?: (proto.WebFeatures.WebFeaturesFlag|null); + + /** WebFeatures labelsEdit */ + labelsEdit?: (proto.WebFeatures.WebFeaturesFlag|null); + + /** WebFeatures mediaUpload */ + mediaUpload?: (proto.WebFeatures.WebFeaturesFlag|null); + + /** WebFeatures mediaUploadRichQuickReplies */ + mediaUploadRichQuickReplies?: (proto.WebFeatures.WebFeaturesFlag|null); + + /** WebFeatures vnameV2 */ + vnameV2?: (proto.WebFeatures.WebFeaturesFlag|null); + + /** WebFeatures videoPlaybackUrl */ + videoPlaybackUrl?: (proto.WebFeatures.WebFeaturesFlag|null); + + /** WebFeatures statusRanking */ + statusRanking?: (proto.WebFeatures.WebFeaturesFlag|null); + + /** WebFeatures voipIndividualVideo */ + voipIndividualVideo?: (proto.WebFeatures.WebFeaturesFlag|null); + + /** WebFeatures thirdPartyStickers */ + thirdPartyStickers?: (proto.WebFeatures.WebFeaturesFlag|null); + + /** WebFeatures frequentlyForwardedSetting */ + frequentlyForwardedSetting?: (proto.WebFeatures.WebFeaturesFlag|null); + + /** WebFeatures groupsV4JoinPermission */ + groupsV4JoinPermission?: (proto.WebFeatures.WebFeaturesFlag|null); + + /** WebFeatures recentStickers */ + recentStickers?: (proto.WebFeatures.WebFeaturesFlag|null); + + /** WebFeatures catalog */ + catalog?: (proto.WebFeatures.WebFeaturesFlag|null); + + /** WebFeatures starredStickers */ + starredStickers?: (proto.WebFeatures.WebFeaturesFlag|null); + + /** WebFeatures voipGroupCall */ + voipGroupCall?: (proto.WebFeatures.WebFeaturesFlag|null); + + /** WebFeatures templateMessage */ + templateMessage?: (proto.WebFeatures.WebFeaturesFlag|null); + + /** WebFeatures templateMessageInteractivity */ + templateMessageInteractivity?: (proto.WebFeatures.WebFeaturesFlag|null); + + /** WebFeatures ephemeralMessages */ + ephemeralMessages?: (proto.WebFeatures.WebFeaturesFlag|null); + + /** WebFeatures e2ENotificationSync */ + e2ENotificationSync?: (proto.WebFeatures.WebFeaturesFlag|null); + + /** WebFeatures recentStickersV2 */ + recentStickersV2?: (proto.WebFeatures.WebFeaturesFlag|null); + + /** WebFeatures recentStickersV3 */ + recentStickersV3?: (proto.WebFeatures.WebFeaturesFlag|null); + + /** WebFeatures userNotice */ + userNotice?: (proto.WebFeatures.WebFeaturesFlag|null); + + /** WebFeatures support */ + support?: (proto.WebFeatures.WebFeaturesFlag|null); + + /** WebFeatures groupUiiCleanup */ + groupUiiCleanup?: (proto.WebFeatures.WebFeaturesFlag|null); + + /** WebFeatures groupDogfoodingInternalOnly */ + groupDogfoodingInternalOnly?: (proto.WebFeatures.WebFeaturesFlag|null); + + /** WebFeatures settingsSync */ + settingsSync?: (proto.WebFeatures.WebFeaturesFlag|null); + + /** WebFeatures archiveV2 */ + archiveV2?: (proto.WebFeatures.WebFeaturesFlag|null); + + /** WebFeatures ephemeralAllowGroupMembers */ + ephemeralAllowGroupMembers?: (proto.WebFeatures.WebFeaturesFlag|null); + + /** WebFeatures ephemeral24HDuration */ + ephemeral24HDuration?: (proto.WebFeatures.WebFeaturesFlag|null); + + /** WebFeatures mdForceUpgrade */ + mdForceUpgrade?: (proto.WebFeatures.WebFeaturesFlag|null); + } + + /** Represents a WebFeatures. */ + class WebFeatures implements IWebFeatures { + + /** + * Constructs a new WebFeatures. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IWebFeatures); + + /** WebFeatures labelsDisplay. */ + public labelsDisplay: proto.WebFeatures.WebFeaturesFlag; + + /** WebFeatures voipIndividualOutgoing. */ + public voipIndividualOutgoing: proto.WebFeatures.WebFeaturesFlag; + + /** WebFeatures groupsV3. */ + public groupsV3: proto.WebFeatures.WebFeaturesFlag; + + /** WebFeatures groupsV3Create. */ + public groupsV3Create: proto.WebFeatures.WebFeaturesFlag; + + /** WebFeatures changeNumberV2. */ + public changeNumberV2: proto.WebFeatures.WebFeaturesFlag; + + /** WebFeatures queryStatusV3Thumbnail. */ + public queryStatusV3Thumbnail: proto.WebFeatures.WebFeaturesFlag; + + /** WebFeatures liveLocations. */ + public liveLocations: proto.WebFeatures.WebFeaturesFlag; + + /** WebFeatures queryVname. */ + public queryVname: proto.WebFeatures.WebFeaturesFlag; + + /** WebFeatures voipIndividualIncoming. */ + public voipIndividualIncoming: proto.WebFeatures.WebFeaturesFlag; + + /** WebFeatures quickRepliesQuery. */ + public quickRepliesQuery: proto.WebFeatures.WebFeaturesFlag; + + /** WebFeatures payments. */ + public payments: proto.WebFeatures.WebFeaturesFlag; + + /** WebFeatures stickerPackQuery. */ + public stickerPackQuery: proto.WebFeatures.WebFeaturesFlag; + + /** WebFeatures liveLocationsFinal. */ + public liveLocationsFinal: proto.WebFeatures.WebFeaturesFlag; + + /** WebFeatures labelsEdit. */ + public labelsEdit: proto.WebFeatures.WebFeaturesFlag; + + /** WebFeatures mediaUpload. */ + public mediaUpload: proto.WebFeatures.WebFeaturesFlag; + + /** WebFeatures mediaUploadRichQuickReplies. */ + public mediaUploadRichQuickReplies: proto.WebFeatures.WebFeaturesFlag; + + /** WebFeatures vnameV2. */ + public vnameV2: proto.WebFeatures.WebFeaturesFlag; + + /** WebFeatures videoPlaybackUrl. */ + public videoPlaybackUrl: proto.WebFeatures.WebFeaturesFlag; + + /** WebFeatures statusRanking. */ + public statusRanking: proto.WebFeatures.WebFeaturesFlag; + + /** WebFeatures voipIndividualVideo. */ + public voipIndividualVideo: proto.WebFeatures.WebFeaturesFlag; + + /** WebFeatures thirdPartyStickers. */ + public thirdPartyStickers: proto.WebFeatures.WebFeaturesFlag; + + /** WebFeatures frequentlyForwardedSetting. */ + public frequentlyForwardedSetting: proto.WebFeatures.WebFeaturesFlag; + + /** WebFeatures groupsV4JoinPermission. */ + public groupsV4JoinPermission: proto.WebFeatures.WebFeaturesFlag; + + /** WebFeatures recentStickers. */ + public recentStickers: proto.WebFeatures.WebFeaturesFlag; + + /** WebFeatures catalog. */ + public catalog: proto.WebFeatures.WebFeaturesFlag; + + /** WebFeatures starredStickers. */ + public starredStickers: proto.WebFeatures.WebFeaturesFlag; + + /** WebFeatures voipGroupCall. */ + public voipGroupCall: proto.WebFeatures.WebFeaturesFlag; + + /** WebFeatures templateMessage. */ + public templateMessage: proto.WebFeatures.WebFeaturesFlag; + + /** WebFeatures templateMessageInteractivity. */ + public templateMessageInteractivity: proto.WebFeatures.WebFeaturesFlag; + + /** WebFeatures ephemeralMessages. */ + public ephemeralMessages: proto.WebFeatures.WebFeaturesFlag; + + /** WebFeatures e2ENotificationSync. */ + public e2ENotificationSync: proto.WebFeatures.WebFeaturesFlag; + + /** WebFeatures recentStickersV2. */ + public recentStickersV2: proto.WebFeatures.WebFeaturesFlag; + + /** WebFeatures recentStickersV3. */ + public recentStickersV3: proto.WebFeatures.WebFeaturesFlag; + + /** WebFeatures userNotice. */ + public userNotice: proto.WebFeatures.WebFeaturesFlag; + + /** WebFeatures support. */ + public support: proto.WebFeatures.WebFeaturesFlag; + + /** WebFeatures groupUiiCleanup. */ + public groupUiiCleanup: proto.WebFeatures.WebFeaturesFlag; + + /** WebFeatures groupDogfoodingInternalOnly. */ + public groupDogfoodingInternalOnly: proto.WebFeatures.WebFeaturesFlag; + + /** WebFeatures settingsSync. */ + public settingsSync: proto.WebFeatures.WebFeaturesFlag; + + /** WebFeatures archiveV2. */ + public archiveV2: proto.WebFeatures.WebFeaturesFlag; + + /** WebFeatures ephemeralAllowGroupMembers. */ + public ephemeralAllowGroupMembers: proto.WebFeatures.WebFeaturesFlag; + + /** WebFeatures ephemeral24HDuration. */ + public ephemeral24HDuration: proto.WebFeatures.WebFeaturesFlag; + + /** WebFeatures mdForceUpgrade. */ + public mdForceUpgrade: proto.WebFeatures.WebFeaturesFlag; + + /** + * Creates a new WebFeatures instance using the specified properties. + * @param [properties] Properties to set + * @returns WebFeatures instance + */ + public static create(properties?: proto.IWebFeatures): proto.WebFeatures; + + /** + * Encodes the specified WebFeatures message. Does not implicitly {@link proto.WebFeatures.verify|verify} messages. + * @param message WebFeatures message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IWebFeatures, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WebFeatures message, length delimited. Does not implicitly {@link proto.WebFeatures.verify|verify} messages. + * @param message WebFeatures message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IWebFeatures, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WebFeatures message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WebFeatures + * @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.WebFeatures; + + /** + * Decodes a WebFeatures message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WebFeatures + * @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.WebFeatures; + + /** + * Verifies a WebFeatures 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 WebFeatures message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WebFeatures + */ + public static fromObject(object: { [k: string]: any }): proto.WebFeatures; + + /** + * Creates a plain object from a WebFeatures message. Also converts values to other types if specified. + * @param message WebFeatures + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.WebFeatures, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WebFeatures to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace WebFeatures { + + /** WebFeaturesFlag enum. */ + enum WebFeaturesFlag { + NOT_STARTED = 0, + FORCE_UPGRADE = 1, + DEVELOPMENT = 2, + PRODUCTION = 3 + } + } + + /** Properties of a NotificationMessageInfo. */ + interface INotificationMessageInfo { + + /** NotificationMessageInfo key */ + key?: (proto.IMessageKey|null); + + /** NotificationMessageInfo message */ + message?: (proto.IMessage|null); + + /** NotificationMessageInfo messageTimestamp */ + messageTimestamp?: (number|Long|null); + + /** NotificationMessageInfo participant */ + participant?: (string|null); + } + + /** Represents a NotificationMessageInfo. */ + class NotificationMessageInfo implements INotificationMessageInfo { + + /** + * Constructs a new NotificationMessageInfo. + * @param [properties] Properties to set + */ + constructor(properties?: proto.INotificationMessageInfo); + + /** NotificationMessageInfo key. */ + public key?: (proto.IMessageKey|null); + + /** NotificationMessageInfo message. */ + public message?: (proto.IMessage|null); + + /** NotificationMessageInfo messageTimestamp. */ + public messageTimestamp: (number|Long); + + /** NotificationMessageInfo participant. */ + public participant: string; + + /** + * Creates a new NotificationMessageInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns NotificationMessageInfo instance + */ + public static create(properties?: proto.INotificationMessageInfo): proto.NotificationMessageInfo; + + /** + * Encodes the specified NotificationMessageInfo message. Does not implicitly {@link proto.NotificationMessageInfo.verify|verify} messages. + * @param message NotificationMessageInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.INotificationMessageInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NotificationMessageInfo message, length delimited. Does not implicitly {@link proto.NotificationMessageInfo.verify|verify} messages. + * @param message NotificationMessageInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.INotificationMessageInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NotificationMessageInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NotificationMessageInfo + * @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.NotificationMessageInfo; + + /** + * Decodes a NotificationMessageInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NotificationMessageInfo + * @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.NotificationMessageInfo; + + /** + * Verifies a NotificationMessageInfo 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 NotificationMessageInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NotificationMessageInfo + */ + public static fromObject(object: { [k: string]: any }): proto.NotificationMessageInfo; + + /** + * Creates a plain object from a NotificationMessageInfo message. Also converts values to other types if specified. + * @param message NotificationMessageInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.NotificationMessageInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NotificationMessageInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a WebNotificationsInfo. */ + interface IWebNotificationsInfo { + + /** WebNotificationsInfo timestamp */ + timestamp?: (number|Long|null); + + /** WebNotificationsInfo unreadChats */ + unreadChats?: (number|null); + + /** WebNotificationsInfo notifyMessageCount */ + notifyMessageCount?: (number|null); + + /** WebNotificationsInfo notifyMessages */ + notifyMessages?: (proto.IWebMessageInfo[]|null); + } + + /** Represents a WebNotificationsInfo. */ + class WebNotificationsInfo implements IWebNotificationsInfo { + + /** + * Constructs a new WebNotificationsInfo. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IWebNotificationsInfo); + + /** WebNotificationsInfo timestamp. */ + public timestamp: (number|Long); + + /** WebNotificationsInfo unreadChats. */ + public unreadChats: number; + + /** WebNotificationsInfo notifyMessageCount. */ + public notifyMessageCount: number; + + /** WebNotificationsInfo notifyMessages. */ + public notifyMessages: proto.IWebMessageInfo[]; + + /** + * Creates a new WebNotificationsInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns WebNotificationsInfo instance + */ + public static create(properties?: proto.IWebNotificationsInfo): proto.WebNotificationsInfo; + + /** + * Encodes the specified WebNotificationsInfo message. Does not implicitly {@link proto.WebNotificationsInfo.verify|verify} messages. + * @param message WebNotificationsInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IWebNotificationsInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WebNotificationsInfo message, length delimited. Does not implicitly {@link proto.WebNotificationsInfo.verify|verify} messages. + * @param message WebNotificationsInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IWebNotificationsInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WebNotificationsInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WebNotificationsInfo + * @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.WebNotificationsInfo; + + /** + * Decodes a WebNotificationsInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WebNotificationsInfo + * @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.WebNotificationsInfo; + + /** + * Verifies a WebNotificationsInfo 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 WebNotificationsInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WebNotificationsInfo + */ + public static fromObject(object: { [k: string]: any }): proto.WebNotificationsInfo; + + /** + * Creates a plain object from a WebNotificationsInfo message. Also converts values to other types if specified. + * @param message WebNotificationsInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.WebNotificationsInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WebNotificationsInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a PaymentInfo. */ + interface IPaymentInfo { + + /** PaymentInfo currencyDeprecated */ + currencyDeprecated?: (proto.PaymentInfo.PaymentInfoCurrency|null); + + /** PaymentInfo amount1000 */ + amount1000?: (number|Long|null); + + /** PaymentInfo receiverJid */ + receiverJid?: (string|null); + + /** PaymentInfo status */ + status?: (proto.PaymentInfo.PaymentInfoStatus|null); + + /** PaymentInfo transactionTimestamp */ + transactionTimestamp?: (number|Long|null); + + /** PaymentInfo requestMessageKey */ + requestMessageKey?: (proto.IMessageKey|null); + + /** PaymentInfo expiryTimestamp */ + expiryTimestamp?: (number|Long|null); + + /** PaymentInfo futureproofed */ + futureproofed?: (boolean|null); + + /** PaymentInfo currency */ + currency?: (string|null); + + /** PaymentInfo txnStatus */ + txnStatus?: (proto.PaymentInfo.PaymentInfoTxnStatus|null); + + /** PaymentInfo useNoviFiatFormat */ + useNoviFiatFormat?: (boolean|null); + + /** PaymentInfo primaryAmount */ + primaryAmount?: (proto.IMoney|null); + + /** PaymentInfo exchangeAmount */ + exchangeAmount?: (proto.IMoney|null); + } + + /** Represents a PaymentInfo. */ + class PaymentInfo implements IPaymentInfo { + + /** + * Constructs a new PaymentInfo. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IPaymentInfo); + + /** PaymentInfo currencyDeprecated. */ + public currencyDeprecated: proto.PaymentInfo.PaymentInfoCurrency; + + /** PaymentInfo amount1000. */ + public amount1000: (number|Long); + + /** PaymentInfo receiverJid. */ + public receiverJid: string; + + /** PaymentInfo status. */ + public status: proto.PaymentInfo.PaymentInfoStatus; + + /** PaymentInfo transactionTimestamp. */ + public transactionTimestamp: (number|Long); + + /** PaymentInfo requestMessageKey. */ + public requestMessageKey?: (proto.IMessageKey|null); + + /** PaymentInfo expiryTimestamp. */ + public expiryTimestamp: (number|Long); + + /** PaymentInfo futureproofed. */ + public futureproofed: boolean; + + /** PaymentInfo currency. */ + public currency: string; + + /** PaymentInfo txnStatus. */ + public txnStatus: proto.PaymentInfo.PaymentInfoTxnStatus; + + /** PaymentInfo useNoviFiatFormat. */ + public useNoviFiatFormat: boolean; + + /** PaymentInfo primaryAmount. */ + public primaryAmount?: (proto.IMoney|null); + + /** PaymentInfo exchangeAmount. */ + public exchangeAmount?: (proto.IMoney|null); + + /** + * Creates a new PaymentInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns PaymentInfo instance + */ + public static create(properties?: proto.IPaymentInfo): proto.PaymentInfo; + + /** + * Encodes the specified PaymentInfo message. Does not implicitly {@link proto.PaymentInfo.verify|verify} messages. + * @param message PaymentInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IPaymentInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PaymentInfo message, length delimited. Does not implicitly {@link proto.PaymentInfo.verify|verify} messages. + * @param message PaymentInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IPaymentInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PaymentInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PaymentInfo + * @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.PaymentInfo; + + /** + * Decodes a PaymentInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PaymentInfo + * @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.PaymentInfo; + + /** + * Verifies a PaymentInfo 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 PaymentInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PaymentInfo + */ + public static fromObject(object: { [k: string]: any }): proto.PaymentInfo; + + /** + * Creates a plain object from a PaymentInfo message. Also converts values to other types if specified. + * @param message PaymentInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.PaymentInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PaymentInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace PaymentInfo { + + /** PaymentInfoCurrency enum. */ + enum PaymentInfoCurrency { + UNKNOWN_CURRENCY = 0, + INR = 1 + } + + /** PaymentInfoStatus enum. */ + enum PaymentInfoStatus { + UNKNOWN_STATUS = 0, + PROCESSING = 1, + SENT = 2, + NEED_TO_ACCEPT = 3, + COMPLETE = 4, + COULD_NOT_COMPLETE = 5, + REFUNDED = 6, + EXPIRED = 7, + REJECTED = 8, + CANCELLED = 9, + WAITING_FOR_PAYER = 10, + WAITING = 11 + } + + /** PaymentInfoTxnStatus enum. */ + enum PaymentInfoTxnStatus { + UNKNOWN = 0, + PENDING_SETUP = 1, + PENDING_RECEIVER_SETUP = 2, + INIT = 3, + SUCCESS = 4, + COMPLETED = 5, + FAILED = 6, + FAILED_RISK = 7, + FAILED_PROCESSING = 8, + FAILED_RECEIVER_PROCESSING = 9, + FAILED_DA = 10, + FAILED_DA_FINAL = 11, + REFUNDED_TXN = 12, + REFUND_FAILED = 13, + REFUND_FAILED_PROCESSING = 14, + REFUND_FAILED_DA = 15, + EXPIRED_TXN = 16, + AUTH_CANCELED = 17, + AUTH_CANCEL_FAILED_PROCESSING = 18, + AUTH_CANCEL_FAILED = 19, + COLLECT_INIT = 20, + COLLECT_SUCCESS = 21, + COLLECT_FAILED = 22, + COLLECT_FAILED_RISK = 23, + COLLECT_REJECTED = 24, + COLLECT_EXPIRED = 25, + COLLECT_CANCELED = 26, + COLLECT_CANCELLING = 27, + IN_REVIEW = 28 + } + } + + /** Properties of a WebMessageInfo. */ + interface IWebMessageInfo { + + /** WebMessageInfo key */ + key: proto.IMessageKey; + + /** WebMessageInfo message */ + message?: (proto.IMessage|null); + + /** WebMessageInfo messageTimestamp */ + messageTimestamp?: (number|Long|null); + + /** WebMessageInfo status */ + status?: (proto.WebMessageInfo.WebMessageInfoStatus|null); + + /** WebMessageInfo participant */ + participant?: (string|null); + + /** WebMessageInfo messageC2STimestamp */ + messageC2STimestamp?: (number|Long|null); + + /** WebMessageInfo ignore */ + ignore?: (boolean|null); + + /** WebMessageInfo starred */ + starred?: (boolean|null); + + /** WebMessageInfo broadcast */ + broadcast?: (boolean|null); + + /** WebMessageInfo pushName */ + pushName?: (string|null); + + /** WebMessageInfo mediaCiphertextSha256 */ + mediaCiphertextSha256?: (Uint8Array|null); + + /** WebMessageInfo multicast */ + multicast?: (boolean|null); + + /** WebMessageInfo urlText */ + urlText?: (boolean|null); + + /** WebMessageInfo urlNumber */ + urlNumber?: (boolean|null); + + /** WebMessageInfo messageStubType */ + messageStubType?: (proto.WebMessageInfo.WebMessageInfoStubType|null); + + /** WebMessageInfo clearMedia */ + clearMedia?: (boolean|null); + + /** WebMessageInfo messageStubParameters */ + messageStubParameters?: (string[]|null); + + /** WebMessageInfo duration */ + duration?: (number|null); + + /** WebMessageInfo labels */ + labels?: (string[]|null); + + /** WebMessageInfo paymentInfo */ + paymentInfo?: (proto.IPaymentInfo|null); + + /** WebMessageInfo finalLiveLocation */ + finalLiveLocation?: (proto.ILiveLocationMessage|null); + + /** WebMessageInfo quotedPaymentInfo */ + quotedPaymentInfo?: (proto.IPaymentInfo|null); + + /** WebMessageInfo ephemeralStartTimestamp */ + ephemeralStartTimestamp?: (number|Long|null); + + /** WebMessageInfo ephemeralDuration */ + ephemeralDuration?: (number|null); + + /** WebMessageInfo ephemeralOffToOn */ + ephemeralOffToOn?: (boolean|null); + + /** WebMessageInfo ephemeralOutOfSync */ + ephemeralOutOfSync?: (boolean|null); + + /** WebMessageInfo bizPrivacyStatus */ + bizPrivacyStatus?: (proto.WebMessageInfo.WebMessageInfoBizPrivacyStatus|null); + + /** WebMessageInfo verifiedBizName */ + verifiedBizName?: (string|null); + + /** WebMessageInfo mediaData */ + mediaData?: (proto.IMediaData|null); + + /** WebMessageInfo photoChange */ + photoChange?: (proto.IPhotoChange|null); + } + + /** Represents a WebMessageInfo. */ + class WebMessageInfo implements IWebMessageInfo { + + /** + * Constructs a new WebMessageInfo. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IWebMessageInfo); + + /** WebMessageInfo key. */ + public key: proto.IMessageKey; + + /** WebMessageInfo message. */ + public message?: (proto.IMessage|null); + + /** WebMessageInfo messageTimestamp. */ + public messageTimestamp: (number|Long); + + /** WebMessageInfo status. */ + public status: proto.WebMessageInfo.WebMessageInfoStatus; + + /** WebMessageInfo participant. */ + public participant: string; + + /** WebMessageInfo messageC2STimestamp. */ + public messageC2STimestamp: (number|Long); + + /** WebMessageInfo ignore. */ + public ignore: boolean; + + /** WebMessageInfo starred. */ + public starred: boolean; + + /** WebMessageInfo broadcast. */ + public broadcast: boolean; + + /** WebMessageInfo pushName. */ + public pushName: string; + + /** WebMessageInfo mediaCiphertextSha256. */ + public mediaCiphertextSha256: Uint8Array; + + /** WebMessageInfo multicast. */ + public multicast: boolean; + + /** WebMessageInfo urlText. */ + public urlText: boolean; + + /** WebMessageInfo urlNumber. */ + public urlNumber: boolean; + + /** WebMessageInfo messageStubType. */ + public messageStubType: proto.WebMessageInfo.WebMessageInfoStubType; + + /** WebMessageInfo clearMedia. */ + public clearMedia: boolean; + + /** WebMessageInfo messageStubParameters. */ + public messageStubParameters: string[]; + + /** WebMessageInfo duration. */ + public duration: number; + + /** WebMessageInfo labels. */ + public labels: string[]; + + /** WebMessageInfo paymentInfo. */ + public paymentInfo?: (proto.IPaymentInfo|null); + + /** WebMessageInfo finalLiveLocation. */ + public finalLiveLocation?: (proto.ILiveLocationMessage|null); + + /** WebMessageInfo quotedPaymentInfo. */ + public quotedPaymentInfo?: (proto.IPaymentInfo|null); + + /** WebMessageInfo ephemeralStartTimestamp. */ + public ephemeralStartTimestamp: (number|Long); + + /** WebMessageInfo ephemeralDuration. */ + public ephemeralDuration: number; + + /** WebMessageInfo ephemeralOffToOn. */ + public ephemeralOffToOn: boolean; + + /** WebMessageInfo ephemeralOutOfSync. */ + public ephemeralOutOfSync: boolean; + + /** WebMessageInfo bizPrivacyStatus. */ + public bizPrivacyStatus: proto.WebMessageInfo.WebMessageInfoBizPrivacyStatus; + + /** WebMessageInfo verifiedBizName. */ + public verifiedBizName: string; + + /** WebMessageInfo mediaData. */ + public mediaData?: (proto.IMediaData|null); + + /** WebMessageInfo photoChange. */ + public photoChange?: (proto.IPhotoChange|null); + + /** + * Creates a new WebMessageInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns WebMessageInfo instance + */ + public static create(properties?: proto.IWebMessageInfo): proto.WebMessageInfo; + + /** + * Encodes the specified WebMessageInfo message. Does not implicitly {@link proto.WebMessageInfo.verify|verify} messages. + * @param message WebMessageInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IWebMessageInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WebMessageInfo message, length delimited. Does not implicitly {@link proto.WebMessageInfo.verify|verify} messages. + * @param message WebMessageInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IWebMessageInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WebMessageInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WebMessageInfo + * @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.WebMessageInfo; + + /** + * Decodes a WebMessageInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WebMessageInfo + * @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.WebMessageInfo; + + /** + * Verifies a WebMessageInfo 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 WebMessageInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WebMessageInfo + */ + public static fromObject(object: { [k: string]: any }): proto.WebMessageInfo; + + /** + * Creates a plain object from a WebMessageInfo message. Also converts values to other types if specified. + * @param message WebMessageInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.WebMessageInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WebMessageInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace WebMessageInfo { + + /** WebMessageInfoStatus enum. */ + enum WebMessageInfoStatus { + ERROR = 0, + PENDING = 1, + SERVER_ACK = 2, + DELIVERY_ACK = 3, + READ = 4, + PLAYED = 5 + } + + /** WebMessageInfoStubType enum. */ + enum WebMessageInfoStubType { + UNKNOWN = 0, + REVOKE = 1, + CIPHERTEXT = 2, + FUTUREPROOF = 3, + NON_VERIFIED_TRANSITION = 4, + UNVERIFIED_TRANSITION = 5, + VERIFIED_TRANSITION = 6, + VERIFIED_LOW_UNKNOWN = 7, + VERIFIED_HIGH = 8, + VERIFIED_INITIAL_UNKNOWN = 9, + VERIFIED_INITIAL_LOW = 10, + VERIFIED_INITIAL_HIGH = 11, + VERIFIED_TRANSITION_ANY_TO_NONE = 12, + VERIFIED_TRANSITION_ANY_TO_HIGH = 13, + VERIFIED_TRANSITION_HIGH_TO_LOW = 14, + VERIFIED_TRANSITION_HIGH_TO_UNKNOWN = 15, + VERIFIED_TRANSITION_UNKNOWN_TO_LOW = 16, + VERIFIED_TRANSITION_LOW_TO_UNKNOWN = 17, + VERIFIED_TRANSITION_NONE_TO_LOW = 18, + VERIFIED_TRANSITION_NONE_TO_UNKNOWN = 19, + GROUP_CREATE = 20, + GROUP_CHANGE_SUBJECT = 21, + GROUP_CHANGE_ICON = 22, + GROUP_CHANGE_INVITE_LINK = 23, + GROUP_CHANGE_DESCRIPTION = 24, + GROUP_CHANGE_RESTRICT = 25, + GROUP_CHANGE_ANNOUNCE = 26, + GROUP_PARTICIPANT_ADD = 27, + GROUP_PARTICIPANT_REMOVE = 28, + GROUP_PARTICIPANT_PROMOTE = 29, + GROUP_PARTICIPANT_DEMOTE = 30, + GROUP_PARTICIPANT_INVITE = 31, + GROUP_PARTICIPANT_LEAVE = 32, + GROUP_PARTICIPANT_CHANGE_NUMBER = 33, + BROADCAST_CREATE = 34, + BROADCAST_ADD = 35, + BROADCAST_REMOVE = 36, + GENERIC_NOTIFICATION = 37, + E2E_IDENTITY_CHANGED = 38, + E2E_ENCRYPTED = 39, + CALL_MISSED_VOICE = 40, + CALL_MISSED_VIDEO = 41, + INDIVIDUAL_CHANGE_NUMBER = 42, + GROUP_DELETE = 43, + GROUP_ANNOUNCE_MODE_MESSAGE_BOUNCE = 44, + CALL_MISSED_GROUP_VOICE = 45, + CALL_MISSED_GROUP_VIDEO = 46, + PAYMENT_CIPHERTEXT = 47, + PAYMENT_FUTUREPROOF = 48, + PAYMENT_TRANSACTION_STATUS_UPDATE_FAILED = 49, + PAYMENT_TRANSACTION_STATUS_UPDATE_REFUNDED = 50, + PAYMENT_TRANSACTION_STATUS_UPDATE_REFUND_FAILED = 51, + PAYMENT_TRANSACTION_STATUS_RECEIVER_PENDING_SETUP = 52, + PAYMENT_TRANSACTION_STATUS_RECEIVER_SUCCESS_AFTER_HICCUP = 53, + PAYMENT_ACTION_ACCOUNT_SETUP_REMINDER = 54, + PAYMENT_ACTION_SEND_PAYMENT_REMINDER = 55, + PAYMENT_ACTION_SEND_PAYMENT_INVITATION = 56, + PAYMENT_ACTION_REQUEST_DECLINED = 57, + PAYMENT_ACTION_REQUEST_EXPIRED = 58, + PAYMENT_ACTION_REQUEST_CANCELLED = 59, + BIZ_VERIFIED_TRANSITION_TOP_TO_BOTTOM = 60, + BIZ_VERIFIED_TRANSITION_BOTTOM_TO_TOP = 61, + BIZ_INTRO_TOP = 62, + BIZ_INTRO_BOTTOM = 63, + BIZ_NAME_CHANGE = 64, + BIZ_MOVE_TO_CONSUMER_APP = 65, + BIZ_TWO_TIER_MIGRATION_TOP = 66, + BIZ_TWO_TIER_MIGRATION_BOTTOM = 67, + OVERSIZED = 68, + GROUP_CHANGE_NO_FREQUENTLY_FORWARDED = 69, + GROUP_V4_ADD_INVITE_SENT = 70, + GROUP_PARTICIPANT_ADD_REQUEST_JOIN = 71, + CHANGE_EPHEMERAL_SETTING = 72, + E2E_DEVICE_CHANGED = 73, + VIEWED_ONCE = 74, + E2E_ENCRYPTED_NOW = 75, + BLUE_MSG_BSP_FB_TO_BSP_PREMISE = 76, + BLUE_MSG_BSP_FB_TO_SELF_FB = 77, + BLUE_MSG_BSP_FB_TO_SELF_PREMISE = 78, + BLUE_MSG_BSP_FB_UNVERIFIED = 79, + BLUE_MSG_BSP_FB_UNVERIFIED_TO_SELF_PREMISE_VERIFIED = 80, + BLUE_MSG_BSP_FB_VERIFIED = 81, + BLUE_MSG_BSP_FB_VERIFIED_TO_SELF_PREMISE_UNVERIFIED = 82, + BLUE_MSG_BSP_PREMISE_TO_SELF_PREMISE = 83, + BLUE_MSG_BSP_PREMISE_UNVERIFIED = 84, + BLUE_MSG_BSP_PREMISE_UNVERIFIED_TO_SELF_PREMISE_VERIFIED = 85, + BLUE_MSG_BSP_PREMISE_VERIFIED = 86, + BLUE_MSG_BSP_PREMISE_VERIFIED_TO_SELF_PREMISE_UNVERIFIED = 87, + BLUE_MSG_CONSUMER_TO_BSP_FB_UNVERIFIED = 88, + BLUE_MSG_CONSUMER_TO_BSP_PREMISE_UNVERIFIED = 89, + BLUE_MSG_CONSUMER_TO_SELF_FB_UNVERIFIED = 90, + BLUE_MSG_CONSUMER_TO_SELF_PREMISE_UNVERIFIED = 91, + BLUE_MSG_SELF_FB_TO_BSP_PREMISE = 92, + BLUE_MSG_SELF_FB_TO_SELF_PREMISE = 93, + BLUE_MSG_SELF_FB_UNVERIFIED = 94, + BLUE_MSG_SELF_FB_UNVERIFIED_TO_SELF_PREMISE_VERIFIED = 95, + BLUE_MSG_SELF_FB_VERIFIED = 96, + BLUE_MSG_SELF_FB_VERIFIED_TO_SELF_PREMISE_UNVERIFIED = 97, + BLUE_MSG_SELF_PREMISE_TO_BSP_PREMISE = 98, + BLUE_MSG_SELF_PREMISE_UNVERIFIED = 99, + BLUE_MSG_SELF_PREMISE_VERIFIED = 100, + BLUE_MSG_TO_BSP_FB = 101, + BLUE_MSG_TO_CONSUMER = 102, + BLUE_MSG_TO_SELF_FB = 103, + BLUE_MSG_UNVERIFIED_TO_BSP_FB_VERIFIED = 104, + BLUE_MSG_UNVERIFIED_TO_BSP_PREMISE_VERIFIED = 105, + BLUE_MSG_UNVERIFIED_TO_SELF_FB_VERIFIED = 106, + BLUE_MSG_UNVERIFIED_TO_VERIFIED = 107, + BLUE_MSG_VERIFIED_TO_BSP_FB_UNVERIFIED = 108, + BLUE_MSG_VERIFIED_TO_BSP_PREMISE_UNVERIFIED = 109, + BLUE_MSG_VERIFIED_TO_SELF_FB_UNVERIFIED = 110, + BLUE_MSG_VERIFIED_TO_UNVERIFIED = 111, + BLUE_MSG_BSP_FB_UNVERIFIED_TO_BSP_PREMISE_VERIFIED = 112, + BLUE_MSG_BSP_FB_UNVERIFIED_TO_SELF_FB_VERIFIED = 113, + BLUE_MSG_BSP_FB_VERIFIED_TO_BSP_PREMISE_UNVERIFIED = 114, + BLUE_MSG_BSP_FB_VERIFIED_TO_SELF_FB_UNVERIFIED = 115, + BLUE_MSG_SELF_FB_UNVERIFIED_TO_BSP_PREMISE_VERIFIED = 116, + BLUE_MSG_SELF_FB_VERIFIED_TO_BSP_PREMISE_UNVERIFIED = 117, + E2E_IDENTITY_UNAVAILABLE = 118, + GROUP_CREATING = 119, + GROUP_CREATE_FAILED = 120, + GROUP_BOUNCED = 121, + BLOCK_CONTACT = 122, + EPHEMERAL_SETTING_NOT_APPLIED = 123, + SYNC_FAILED = 124, + SYNCING = 125, + BIZ_PRIVACY_MODE_INIT_FB = 126, + BIZ_PRIVACY_MODE_INIT_BSP = 127, + BIZ_PRIVACY_MODE_TO_FB = 128, + BIZ_PRIVACY_MODE_TO_BSP = 129 + } + + /** WebMessageInfoBizPrivacyStatus enum. */ + enum WebMessageInfoBizPrivacyStatus { + E2EE = 0, + FB = 2, + BSP = 1, + BSP_AND_FB = 3 + } + } } diff --git a/WAMessage/WAMessage.js b/WAMessage/WAMessage.js index 6436c3c..140aede 100644 --- a/WAMessage/WAMessage.js +++ b/WAMessage/WAMessage.js @@ -18,60 +18,28 @@ $root.proto = (function() { */ var proto = {}; - proto.WebFeatures = (function() { + proto.AppVersion = (function() { /** - * Properties of a WebFeatures. + * Properties of an AppVersion. * @memberof proto - * @interface IWebFeatures - * @property {proto.WebFeatures.WebFeaturesFlag|null} [labelsDisplay] WebFeatures labelsDisplay - * @property {proto.WebFeatures.WebFeaturesFlag|null} [voipIndividualOutgoing] WebFeatures voipIndividualOutgoing - * @property {proto.WebFeatures.WebFeaturesFlag|null} [groupsV3] WebFeatures groupsV3 - * @property {proto.WebFeatures.WebFeaturesFlag|null} [groupsV3Create] WebFeatures groupsV3Create - * @property {proto.WebFeatures.WebFeaturesFlag|null} [changeNumberV2] WebFeatures changeNumberV2 - * @property {proto.WebFeatures.WebFeaturesFlag|null} [queryStatusV3Thumbnail] WebFeatures queryStatusV3Thumbnail - * @property {proto.WebFeatures.WebFeaturesFlag|null} [liveLocations] WebFeatures liveLocations - * @property {proto.WebFeatures.WebFeaturesFlag|null} [queryVname] WebFeatures queryVname - * @property {proto.WebFeatures.WebFeaturesFlag|null} [voipIndividualIncoming] WebFeatures voipIndividualIncoming - * @property {proto.WebFeatures.WebFeaturesFlag|null} [quickRepliesQuery] WebFeatures quickRepliesQuery - * @property {proto.WebFeatures.WebFeaturesFlag|null} [payments] WebFeatures payments - * @property {proto.WebFeatures.WebFeaturesFlag|null} [stickerPackQuery] WebFeatures stickerPackQuery - * @property {proto.WebFeatures.WebFeaturesFlag|null} [liveLocationsFinal] WebFeatures liveLocationsFinal - * @property {proto.WebFeatures.WebFeaturesFlag|null} [labelsEdit] WebFeatures labelsEdit - * @property {proto.WebFeatures.WebFeaturesFlag|null} [mediaUpload] WebFeatures mediaUpload - * @property {proto.WebFeatures.WebFeaturesFlag|null} [mediaUploadRichQuickReplies] WebFeatures mediaUploadRichQuickReplies - * @property {proto.WebFeatures.WebFeaturesFlag|null} [vnameV2] WebFeatures vnameV2 - * @property {proto.WebFeatures.WebFeaturesFlag|null} [videoPlaybackUrl] WebFeatures videoPlaybackUrl - * @property {proto.WebFeatures.WebFeaturesFlag|null} [statusRanking] WebFeatures statusRanking - * @property {proto.WebFeatures.WebFeaturesFlag|null} [voipIndividualVideo] WebFeatures voipIndividualVideo - * @property {proto.WebFeatures.WebFeaturesFlag|null} [thirdPartyStickers] WebFeatures thirdPartyStickers - * @property {proto.WebFeatures.WebFeaturesFlag|null} [frequentlyForwardedSetting] WebFeatures frequentlyForwardedSetting - * @property {proto.WebFeatures.WebFeaturesFlag|null} [groupsV4JoinPermission] WebFeatures groupsV4JoinPermission - * @property {proto.WebFeatures.WebFeaturesFlag|null} [recentStickers] WebFeatures recentStickers - * @property {proto.WebFeatures.WebFeaturesFlag|null} [catalog] WebFeatures catalog - * @property {proto.WebFeatures.WebFeaturesFlag|null} [starredStickers] WebFeatures starredStickers - * @property {proto.WebFeatures.WebFeaturesFlag|null} [voipGroupCall] WebFeatures voipGroupCall - * @property {proto.WebFeatures.WebFeaturesFlag|null} [templateMessage] WebFeatures templateMessage - * @property {proto.WebFeatures.WebFeaturesFlag|null} [templateMessageInteractivity] WebFeatures templateMessageInteractivity - * @property {proto.WebFeatures.WebFeaturesFlag|null} [ephemeralMessages] WebFeatures ephemeralMessages - * @property {proto.WebFeatures.WebFeaturesFlag|null} [e2ENotificationSync] WebFeatures e2ENotificationSync - * @property {proto.WebFeatures.WebFeaturesFlag|null} [recentStickersV2] WebFeatures recentStickersV2 - * @property {proto.WebFeatures.WebFeaturesFlag|null} [syncdRelease1] WebFeatures syncdRelease1 - * @property {proto.WebFeatures.WebFeaturesFlag|null} [recentStickersV3] WebFeatures recentStickersV3 - * @property {proto.WebFeatures.WebFeaturesFlag|null} [userNotice] WebFeatures userNotice - * @property {proto.WebFeatures.WebFeaturesFlag|null} [syncdRelease11] WebFeatures syncdRelease11 - * @property {proto.WebFeatures.WebFeaturesFlag|null} [support] WebFeatures support + * @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 WebFeatures. + * Constructs a new AppVersion. * @memberof proto - * @classdesc Represents a WebFeatures. - * @implements IWebFeatures + * @classdesc Represents an AppVersion. + * @implements IAppVersion * @constructor - * @param {proto.IWebFeatures=} [properties] Properties to set + * @param {proto.IAppVersion=} [properties] Properties to set */ - function WebFeatures(properties) { + function AppVersion(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -79,543 +47,515 @@ $root.proto = (function() { } /** - * WebFeatures labelsDisplay. - * @member {proto.WebFeatures.WebFeaturesFlag} labelsDisplay - * @memberof proto.WebFeatures + * AppVersion primary. + * @member {number} primary + * @memberof proto.AppVersion * @instance */ - WebFeatures.prototype.labelsDisplay = 0; + AppVersion.prototype.primary = 0; /** - * WebFeatures voipIndividualOutgoing. - * @member {proto.WebFeatures.WebFeaturesFlag} voipIndividualOutgoing - * @memberof proto.WebFeatures + * AppVersion secondary. + * @member {number} secondary + * @memberof proto.AppVersion * @instance */ - WebFeatures.prototype.voipIndividualOutgoing = 0; + AppVersion.prototype.secondary = 0; /** - * WebFeatures groupsV3. - * @member {proto.WebFeatures.WebFeaturesFlag} groupsV3 - * @memberof proto.WebFeatures + * AppVersion tertiary. + * @member {number} tertiary + * @memberof proto.AppVersion * @instance */ - WebFeatures.prototype.groupsV3 = 0; + AppVersion.prototype.tertiary = 0; /** - * WebFeatures groupsV3Create. - * @member {proto.WebFeatures.WebFeaturesFlag} groupsV3Create - * @memberof proto.WebFeatures + * AppVersion quaternary. + * @member {number} quaternary + * @memberof proto.AppVersion * @instance */ - WebFeatures.prototype.groupsV3Create = 0; + AppVersion.prototype.quaternary = 0; /** - * WebFeatures changeNumberV2. - * @member {proto.WebFeatures.WebFeaturesFlag} changeNumberV2 - * @memberof proto.WebFeatures + * AppVersion quinary. + * @member {number} quinary + * @memberof proto.AppVersion * @instance */ - WebFeatures.prototype.changeNumberV2 = 0; + AppVersion.prototype.quinary = 0; /** - * WebFeatures queryStatusV3Thumbnail. - * @member {proto.WebFeatures.WebFeaturesFlag} queryStatusV3Thumbnail - * @memberof proto.WebFeatures - * @instance - */ - WebFeatures.prototype.queryStatusV3Thumbnail = 0; - - /** - * WebFeatures liveLocations. - * @member {proto.WebFeatures.WebFeaturesFlag} liveLocations - * @memberof proto.WebFeatures - * @instance - */ - WebFeatures.prototype.liveLocations = 0; - - /** - * WebFeatures queryVname. - * @member {proto.WebFeatures.WebFeaturesFlag} queryVname - * @memberof proto.WebFeatures - * @instance - */ - WebFeatures.prototype.queryVname = 0; - - /** - * WebFeatures voipIndividualIncoming. - * @member {proto.WebFeatures.WebFeaturesFlag} voipIndividualIncoming - * @memberof proto.WebFeatures - * @instance - */ - WebFeatures.prototype.voipIndividualIncoming = 0; - - /** - * WebFeatures quickRepliesQuery. - * @member {proto.WebFeatures.WebFeaturesFlag} quickRepliesQuery - * @memberof proto.WebFeatures - * @instance - */ - WebFeatures.prototype.quickRepliesQuery = 0; - - /** - * WebFeatures payments. - * @member {proto.WebFeatures.WebFeaturesFlag} payments - * @memberof proto.WebFeatures - * @instance - */ - WebFeatures.prototype.payments = 0; - - /** - * WebFeatures stickerPackQuery. - * @member {proto.WebFeatures.WebFeaturesFlag} stickerPackQuery - * @memberof proto.WebFeatures - * @instance - */ - WebFeatures.prototype.stickerPackQuery = 0; - - /** - * WebFeatures liveLocationsFinal. - * @member {proto.WebFeatures.WebFeaturesFlag} liveLocationsFinal - * @memberof proto.WebFeatures - * @instance - */ - WebFeatures.prototype.liveLocationsFinal = 0; - - /** - * WebFeatures labelsEdit. - * @member {proto.WebFeatures.WebFeaturesFlag} labelsEdit - * @memberof proto.WebFeatures - * @instance - */ - WebFeatures.prototype.labelsEdit = 0; - - /** - * WebFeatures mediaUpload. - * @member {proto.WebFeatures.WebFeaturesFlag} mediaUpload - * @memberof proto.WebFeatures - * @instance - */ - WebFeatures.prototype.mediaUpload = 0; - - /** - * WebFeatures mediaUploadRichQuickReplies. - * @member {proto.WebFeatures.WebFeaturesFlag} mediaUploadRichQuickReplies - * @memberof proto.WebFeatures - * @instance - */ - WebFeatures.prototype.mediaUploadRichQuickReplies = 0; - - /** - * WebFeatures vnameV2. - * @member {proto.WebFeatures.WebFeaturesFlag} vnameV2 - * @memberof proto.WebFeatures - * @instance - */ - WebFeatures.prototype.vnameV2 = 0; - - /** - * WebFeatures videoPlaybackUrl. - * @member {proto.WebFeatures.WebFeaturesFlag} videoPlaybackUrl - * @memberof proto.WebFeatures - * @instance - */ - WebFeatures.prototype.videoPlaybackUrl = 0; - - /** - * WebFeatures statusRanking. - * @member {proto.WebFeatures.WebFeaturesFlag} statusRanking - * @memberof proto.WebFeatures - * @instance - */ - WebFeatures.prototype.statusRanking = 0; - - /** - * WebFeatures voipIndividualVideo. - * @member {proto.WebFeatures.WebFeaturesFlag} voipIndividualVideo - * @memberof proto.WebFeatures - * @instance - */ - WebFeatures.prototype.voipIndividualVideo = 0; - - /** - * WebFeatures thirdPartyStickers. - * @member {proto.WebFeatures.WebFeaturesFlag} thirdPartyStickers - * @memberof proto.WebFeatures - * @instance - */ - WebFeatures.prototype.thirdPartyStickers = 0; - - /** - * WebFeatures frequentlyForwardedSetting. - * @member {proto.WebFeatures.WebFeaturesFlag} frequentlyForwardedSetting - * @memberof proto.WebFeatures - * @instance - */ - WebFeatures.prototype.frequentlyForwardedSetting = 0; - - /** - * WebFeatures groupsV4JoinPermission. - * @member {proto.WebFeatures.WebFeaturesFlag} groupsV4JoinPermission - * @memberof proto.WebFeatures - * @instance - */ - WebFeatures.prototype.groupsV4JoinPermission = 0; - - /** - * WebFeatures recentStickers. - * @member {proto.WebFeatures.WebFeaturesFlag} recentStickers - * @memberof proto.WebFeatures - * @instance - */ - WebFeatures.prototype.recentStickers = 0; - - /** - * WebFeatures catalog. - * @member {proto.WebFeatures.WebFeaturesFlag} catalog - * @memberof proto.WebFeatures - * @instance - */ - WebFeatures.prototype.catalog = 0; - - /** - * WebFeatures starredStickers. - * @member {proto.WebFeatures.WebFeaturesFlag} starredStickers - * @memberof proto.WebFeatures - * @instance - */ - WebFeatures.prototype.starredStickers = 0; - - /** - * WebFeatures voipGroupCall. - * @member {proto.WebFeatures.WebFeaturesFlag} voipGroupCall - * @memberof proto.WebFeatures - * @instance - */ - WebFeatures.prototype.voipGroupCall = 0; - - /** - * WebFeatures templateMessage. - * @member {proto.WebFeatures.WebFeaturesFlag} templateMessage - * @memberof proto.WebFeatures - * @instance - */ - WebFeatures.prototype.templateMessage = 0; - - /** - * WebFeatures templateMessageInteractivity. - * @member {proto.WebFeatures.WebFeaturesFlag} templateMessageInteractivity - * @memberof proto.WebFeatures - * @instance - */ - WebFeatures.prototype.templateMessageInteractivity = 0; - - /** - * WebFeatures ephemeralMessages. - * @member {proto.WebFeatures.WebFeaturesFlag} ephemeralMessages - * @memberof proto.WebFeatures - * @instance - */ - WebFeatures.prototype.ephemeralMessages = 0; - - /** - * WebFeatures e2ENotificationSync. - * @member {proto.WebFeatures.WebFeaturesFlag} e2ENotificationSync - * @memberof proto.WebFeatures - * @instance - */ - WebFeatures.prototype.e2ENotificationSync = 0; - - /** - * WebFeatures recentStickersV2. - * @member {proto.WebFeatures.WebFeaturesFlag} recentStickersV2 - * @memberof proto.WebFeatures - * @instance - */ - WebFeatures.prototype.recentStickersV2 = 0; - - /** - * WebFeatures syncdRelease1. - * @member {proto.WebFeatures.WebFeaturesFlag} syncdRelease1 - * @memberof proto.WebFeatures - * @instance - */ - WebFeatures.prototype.syncdRelease1 = 0; - - /** - * WebFeatures recentStickersV3. - * @member {proto.WebFeatures.WebFeaturesFlag} recentStickersV3 - * @memberof proto.WebFeatures - * @instance - */ - WebFeatures.prototype.recentStickersV3 = 0; - - /** - * WebFeatures userNotice. - * @member {proto.WebFeatures.WebFeaturesFlag} userNotice - * @memberof proto.WebFeatures - * @instance - */ - WebFeatures.prototype.userNotice = 0; - - /** - * WebFeatures syncdRelease11. - * @member {proto.WebFeatures.WebFeaturesFlag} syncdRelease11 - * @memberof proto.WebFeatures - * @instance - */ - WebFeatures.prototype.syncdRelease11 = 0; - - /** - * WebFeatures support. - * @member {proto.WebFeatures.WebFeaturesFlag} support - * @memberof proto.WebFeatures - * @instance - */ - WebFeatures.prototype.support = 0; - - /** - * Creates a new WebFeatures instance using the specified properties. + * Creates a new AppVersion instance using the specified properties. * @function create - * @memberof proto.WebFeatures + * @memberof proto.AppVersion * @static - * @param {proto.IWebFeatures=} [properties] Properties to set - * @returns {proto.WebFeatures} WebFeatures instance + * @param {proto.IAppVersion=} [properties] Properties to set + * @returns {proto.AppVersion} AppVersion instance */ - WebFeatures.create = function create(properties) { - return new WebFeatures(properties); + AppVersion.create = function create(properties) { + return new AppVersion(properties); }; /** - * Encodes the specified WebFeatures message. Does not implicitly {@link proto.WebFeatures.verify|verify} messages. + * Encodes the specified AppVersion message. Does not implicitly {@link proto.AppVersion.verify|verify} messages. * @function encode - * @memberof proto.WebFeatures + * @memberof proto.AppVersion * @static - * @param {proto.IWebFeatures} message WebFeatures message or plain object to encode + * @param {proto.IAppVersion} message AppVersion message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WebFeatures.encode = function encode(message, writer) { + AppVersion.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.labelsDisplay != null && Object.hasOwnProperty.call(message, "labelsDisplay")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.labelsDisplay); - if (message.voipIndividualOutgoing != null && Object.hasOwnProperty.call(message, "voipIndividualOutgoing")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.voipIndividualOutgoing); - if (message.groupsV3 != null && Object.hasOwnProperty.call(message, "groupsV3")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.groupsV3); - if (message.groupsV3Create != null && Object.hasOwnProperty.call(message, "groupsV3Create")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.groupsV3Create); - if (message.changeNumberV2 != null && Object.hasOwnProperty.call(message, "changeNumberV2")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.changeNumberV2); - if (message.queryStatusV3Thumbnail != null && Object.hasOwnProperty.call(message, "queryStatusV3Thumbnail")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.queryStatusV3Thumbnail); - if (message.liveLocations != null && Object.hasOwnProperty.call(message, "liveLocations")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.liveLocations); - if (message.queryVname != null && Object.hasOwnProperty.call(message, "queryVname")) - writer.uint32(/* id 8, wireType 0 =*/64).int32(message.queryVname); - if (message.voipIndividualIncoming != null && Object.hasOwnProperty.call(message, "voipIndividualIncoming")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.voipIndividualIncoming); - if (message.quickRepliesQuery != null && Object.hasOwnProperty.call(message, "quickRepliesQuery")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.quickRepliesQuery); - if (message.payments != null && Object.hasOwnProperty.call(message, "payments")) - writer.uint32(/* id 11, wireType 0 =*/88).int32(message.payments); - if (message.stickerPackQuery != null && Object.hasOwnProperty.call(message, "stickerPackQuery")) - writer.uint32(/* id 12, wireType 0 =*/96).int32(message.stickerPackQuery); - if (message.liveLocationsFinal != null && Object.hasOwnProperty.call(message, "liveLocationsFinal")) - writer.uint32(/* id 13, wireType 0 =*/104).int32(message.liveLocationsFinal); - if (message.labelsEdit != null && Object.hasOwnProperty.call(message, "labelsEdit")) - writer.uint32(/* id 14, wireType 0 =*/112).int32(message.labelsEdit); - if (message.mediaUpload != null && Object.hasOwnProperty.call(message, "mediaUpload")) - writer.uint32(/* id 15, wireType 0 =*/120).int32(message.mediaUpload); - if (message.mediaUploadRichQuickReplies != null && Object.hasOwnProperty.call(message, "mediaUploadRichQuickReplies")) - writer.uint32(/* id 18, wireType 0 =*/144).int32(message.mediaUploadRichQuickReplies); - if (message.vnameV2 != null && Object.hasOwnProperty.call(message, "vnameV2")) - writer.uint32(/* id 19, wireType 0 =*/152).int32(message.vnameV2); - if (message.videoPlaybackUrl != null && Object.hasOwnProperty.call(message, "videoPlaybackUrl")) - writer.uint32(/* id 20, wireType 0 =*/160).int32(message.videoPlaybackUrl); - if (message.statusRanking != null && Object.hasOwnProperty.call(message, "statusRanking")) - writer.uint32(/* id 21, wireType 0 =*/168).int32(message.statusRanking); - if (message.voipIndividualVideo != null && Object.hasOwnProperty.call(message, "voipIndividualVideo")) - writer.uint32(/* id 22, wireType 0 =*/176).int32(message.voipIndividualVideo); - if (message.thirdPartyStickers != null && Object.hasOwnProperty.call(message, "thirdPartyStickers")) - writer.uint32(/* id 23, wireType 0 =*/184).int32(message.thirdPartyStickers); - if (message.frequentlyForwardedSetting != null && Object.hasOwnProperty.call(message, "frequentlyForwardedSetting")) - writer.uint32(/* id 24, wireType 0 =*/192).int32(message.frequentlyForwardedSetting); - if (message.groupsV4JoinPermission != null && Object.hasOwnProperty.call(message, "groupsV4JoinPermission")) - writer.uint32(/* id 25, wireType 0 =*/200).int32(message.groupsV4JoinPermission); - if (message.recentStickers != null && Object.hasOwnProperty.call(message, "recentStickers")) - writer.uint32(/* id 26, wireType 0 =*/208).int32(message.recentStickers); - if (message.catalog != null && Object.hasOwnProperty.call(message, "catalog")) - writer.uint32(/* id 27, wireType 0 =*/216).int32(message.catalog); - if (message.starredStickers != null && Object.hasOwnProperty.call(message, "starredStickers")) - writer.uint32(/* id 28, wireType 0 =*/224).int32(message.starredStickers); - if (message.voipGroupCall != null && Object.hasOwnProperty.call(message, "voipGroupCall")) - writer.uint32(/* id 29, wireType 0 =*/232).int32(message.voipGroupCall); - if (message.templateMessage != null && Object.hasOwnProperty.call(message, "templateMessage")) - writer.uint32(/* id 30, wireType 0 =*/240).int32(message.templateMessage); - if (message.templateMessageInteractivity != null && Object.hasOwnProperty.call(message, "templateMessageInteractivity")) - writer.uint32(/* id 31, wireType 0 =*/248).int32(message.templateMessageInteractivity); - if (message.ephemeralMessages != null && Object.hasOwnProperty.call(message, "ephemeralMessages")) - writer.uint32(/* id 32, wireType 0 =*/256).int32(message.ephemeralMessages); - if (message.e2ENotificationSync != null && Object.hasOwnProperty.call(message, "e2ENotificationSync")) - writer.uint32(/* id 33, wireType 0 =*/264).int32(message.e2ENotificationSync); - if (message.recentStickersV2 != null && Object.hasOwnProperty.call(message, "recentStickersV2")) - writer.uint32(/* id 34, wireType 0 =*/272).int32(message.recentStickersV2); - if (message.syncdRelease1 != null && Object.hasOwnProperty.call(message, "syncdRelease1")) - writer.uint32(/* id 35, wireType 0 =*/280).int32(message.syncdRelease1); - if (message.recentStickersV3 != null && Object.hasOwnProperty.call(message, "recentStickersV3")) - writer.uint32(/* id 36, wireType 0 =*/288).int32(message.recentStickersV3); - if (message.userNotice != null && Object.hasOwnProperty.call(message, "userNotice")) - writer.uint32(/* id 37, wireType 0 =*/296).int32(message.userNotice); - if (message.syncdRelease11 != null && Object.hasOwnProperty.call(message, "syncdRelease11")) - writer.uint32(/* id 38, wireType 0 =*/304).int32(message.syncdRelease11); - if (message.support != null && Object.hasOwnProperty.call(message, "support")) - writer.uint32(/* id 39, wireType 0 =*/312).int32(message.support); + 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 WebFeatures message, length delimited. Does not implicitly {@link proto.WebFeatures.verify|verify} messages. + * Encodes the specified AppVersion message, length delimited. Does not implicitly {@link proto.AppVersion.verify|verify} messages. * @function encodeDelimited - * @memberof proto.WebFeatures + * @memberof proto.AppVersion * @static - * @param {proto.IWebFeatures} message WebFeatures message or plain object to encode + * @param {proto.IAppVersion} message AppVersion message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WebFeatures.encodeDelimited = function encodeDelimited(message, writer) { + AppVersion.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a WebFeatures message from the specified reader or buffer. + * Decodes an AppVersion message from the specified reader or buffer. * @function decode - * @memberof proto.WebFeatures + * @memberof proto.AppVersion * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {proto.WebFeatures} WebFeatures + * @returns {proto.AppVersion} AppVersion * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - WebFeatures.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.WebFeatures(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.AppVersion(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.labelsDisplay = reader.int32(); + message.primary = reader.uint32(); break; case 2: - message.voipIndividualOutgoing = reader.int32(); + message.secondary = reader.uint32(); break; case 3: - message.groupsV3 = reader.int32(); + message.tertiary = reader.uint32(); break; case 4: - message.groupsV3Create = reader.int32(); + message.quaternary = reader.uint32(); break; case 5: - message.changeNumberV2 = reader.int32(); + 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.AppVersion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.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.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.AppVersion + * @static + * @param {Object.} object Plain object + * @returns {proto.AppVersion} AppVersion + */ + AppVersion.fromObject = function fromObject(object) { + if (object instanceof $root.proto.AppVersion) + return object; + var message = new $root.proto.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.AppVersion + * @static + * @param {proto.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.AppVersion + * @instance + * @returns {Object.} JSON object + */ + AppVersion.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AppVersion; + })(); + + proto.UserAgent = (function() { + + /** + * Properties of a UserAgent. + * @memberof proto + * @interface IUserAgent + * @property {proto.UserAgent.UserAgentPlatform|null} [platform] UserAgent platform + * @property {proto.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.UserAgent.UserAgentReleaseChannel|null} [releaseChannel] UserAgent releaseChannel + * @property {string|null} [localeLanguageIso6391] UserAgent localeLanguageIso6391 + * @property {string|null} [localeCountryIso31661Alpha2] UserAgent localeCountryIso31661Alpha2 + * @property {string|null} [deviceBoard] UserAgent deviceBoard + */ + + /** + * Constructs a new UserAgent. + * @memberof proto + * @classdesc Represents a UserAgent. + * @implements IUserAgent + * @constructor + * @param {proto.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.UserAgent.UserAgentPlatform} platform + * @memberof proto.UserAgent + * @instance + */ + UserAgent.prototype.platform = 0; + + /** + * UserAgent appVersion. + * @member {proto.IAppVersion|null|undefined} appVersion + * @memberof proto.UserAgent + * @instance + */ + UserAgent.prototype.appVersion = null; + + /** + * UserAgent mcc. + * @member {string} mcc + * @memberof proto.UserAgent + * @instance + */ + UserAgent.prototype.mcc = ""; + + /** + * UserAgent mnc. + * @member {string} mnc + * @memberof proto.UserAgent + * @instance + */ + UserAgent.prototype.mnc = ""; + + /** + * UserAgent osVersion. + * @member {string} osVersion + * @memberof proto.UserAgent + * @instance + */ + UserAgent.prototype.osVersion = ""; + + /** + * UserAgent manufacturer. + * @member {string} manufacturer + * @memberof proto.UserAgent + * @instance + */ + UserAgent.prototype.manufacturer = ""; + + /** + * UserAgent device. + * @member {string} device + * @memberof proto.UserAgent + * @instance + */ + UserAgent.prototype.device = ""; + + /** + * UserAgent osBuildNumber. + * @member {string} osBuildNumber + * @memberof proto.UserAgent + * @instance + */ + UserAgent.prototype.osBuildNumber = ""; + + /** + * UserAgent phoneId. + * @member {string} phoneId + * @memberof proto.UserAgent + * @instance + */ + UserAgent.prototype.phoneId = ""; + + /** + * UserAgent releaseChannel. + * @member {proto.UserAgent.UserAgentReleaseChannel} releaseChannel + * @memberof proto.UserAgent + * @instance + */ + UserAgent.prototype.releaseChannel = 0; + + /** + * UserAgent localeLanguageIso6391. + * @member {string} localeLanguageIso6391 + * @memberof proto.UserAgent + * @instance + */ + UserAgent.prototype.localeLanguageIso6391 = ""; + + /** + * UserAgent localeCountryIso31661Alpha2. + * @member {string} localeCountryIso31661Alpha2 + * @memberof proto.UserAgent + * @instance + */ + UserAgent.prototype.localeCountryIso31661Alpha2 = ""; + + /** + * UserAgent deviceBoard. + * @member {string} deviceBoard + * @memberof proto.UserAgent + * @instance + */ + UserAgent.prototype.deviceBoard = ""; + + /** + * Creates a new UserAgent instance using the specified properties. + * @function create + * @memberof proto.UserAgent + * @static + * @param {proto.IUserAgent=} [properties] Properties to set + * @returns {proto.UserAgent} UserAgent instance + */ + UserAgent.create = function create(properties) { + return new UserAgent(properties); + }; + + /** + * Encodes the specified UserAgent message. Does not implicitly {@link proto.UserAgent.verify|verify} messages. + * @function encode + * @memberof proto.UserAgent + * @static + * @param {proto.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.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); + return writer; + }; + + /** + * Encodes the specified UserAgent message, length delimited. Does not implicitly {@link proto.UserAgent.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.UserAgent + * @static + * @param {proto.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.UserAgent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.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.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.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.queryStatusV3Thumbnail = reader.int32(); + message.manufacturer = reader.string(); break; case 7: - message.liveLocations = reader.int32(); + message.device = reader.string(); break; case 8: - message.queryVname = reader.int32(); + message.osBuildNumber = reader.string(); break; case 9: - message.voipIndividualIncoming = reader.int32(); + message.phoneId = reader.string(); break; case 10: - message.quickRepliesQuery = reader.int32(); + message.releaseChannel = reader.int32(); break; case 11: - message.payments = reader.int32(); + message.localeLanguageIso6391 = reader.string(); break; case 12: - message.stickerPackQuery = reader.int32(); + message.localeCountryIso31661Alpha2 = reader.string(); break; case 13: - message.liveLocationsFinal = reader.int32(); - break; - case 14: - message.labelsEdit = reader.int32(); - break; - case 15: - message.mediaUpload = reader.int32(); - break; - case 18: - message.mediaUploadRichQuickReplies = reader.int32(); - break; - case 19: - message.vnameV2 = reader.int32(); - break; - case 20: - message.videoPlaybackUrl = reader.int32(); - break; - case 21: - message.statusRanking = reader.int32(); - break; - case 22: - message.voipIndividualVideo = reader.int32(); - break; - case 23: - message.thirdPartyStickers = reader.int32(); - break; - case 24: - message.frequentlyForwardedSetting = reader.int32(); - break; - case 25: - message.groupsV4JoinPermission = reader.int32(); - break; - case 26: - message.recentStickers = reader.int32(); - break; - case 27: - message.catalog = reader.int32(); - break; - case 28: - message.starredStickers = reader.int32(); - break; - case 29: - message.voipGroupCall = reader.int32(); - break; - case 30: - message.templateMessage = reader.int32(); - break; - case 31: - message.templateMessageInteractivity = reader.int32(); - break; - case 32: - message.ephemeralMessages = reader.int32(); - break; - case 33: - message.e2ENotificationSync = reader.int32(); - break; - case 34: - message.recentStickersV2 = reader.int32(); - break; - case 35: - message.syncdRelease1 = reader.int32(); - break; - case 36: - message.recentStickersV3 = reader.int32(); - break; - case 37: - message.userNotice = reader.int32(); - break; - case 38: - message.syncdRelease11 = reader.int32(); - break; - case 39: - message.support = reader.int32(); + message.deviceBoard = reader.string(); break; default: reader.skipType(tag & 7); @@ -626,2124 +566,36 @@ $root.proto = (function() { }; /** - * Decodes a WebFeatures message from the specified reader or buffer, length delimited. + * Decodes a UserAgent message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof proto.WebFeatures + * @memberof proto.UserAgent * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.WebFeatures} WebFeatures + * @returns {proto.UserAgent} UserAgent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - WebFeatures.decodeDelimited = function decodeDelimited(reader) { + UserAgent.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a WebFeatures message. + * Verifies a UserAgent message. * @function verify - * @memberof proto.WebFeatures + * @memberof proto.UserAgent * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - WebFeatures.verify = function verify(message) { + UserAgent.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.labelsDisplay != null && message.hasOwnProperty("labelsDisplay")) - switch (message.labelsDisplay) { + if (message.platform != null && message.hasOwnProperty("platform")) + switch (message.platform) { default: - return "labelsDisplay: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.voipIndividualOutgoing != null && message.hasOwnProperty("voipIndividualOutgoing")) - switch (message.voipIndividualOutgoing) { - default: - return "voipIndividualOutgoing: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.groupsV3 != null && message.hasOwnProperty("groupsV3")) - switch (message.groupsV3) { - default: - return "groupsV3: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.groupsV3Create != null && message.hasOwnProperty("groupsV3Create")) - switch (message.groupsV3Create) { - default: - return "groupsV3Create: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.changeNumberV2 != null && message.hasOwnProperty("changeNumberV2")) - switch (message.changeNumberV2) { - default: - return "changeNumberV2: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.queryStatusV3Thumbnail != null && message.hasOwnProperty("queryStatusV3Thumbnail")) - switch (message.queryStatusV3Thumbnail) { - default: - return "queryStatusV3Thumbnail: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.liveLocations != null && message.hasOwnProperty("liveLocations")) - switch (message.liveLocations) { - default: - return "liveLocations: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.queryVname != null && message.hasOwnProperty("queryVname")) - switch (message.queryVname) { - default: - return "queryVname: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.voipIndividualIncoming != null && message.hasOwnProperty("voipIndividualIncoming")) - switch (message.voipIndividualIncoming) { - default: - return "voipIndividualIncoming: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.quickRepliesQuery != null && message.hasOwnProperty("quickRepliesQuery")) - switch (message.quickRepliesQuery) { - default: - return "quickRepliesQuery: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.payments != null && message.hasOwnProperty("payments")) - switch (message.payments) { - default: - return "payments: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.stickerPackQuery != null && message.hasOwnProperty("stickerPackQuery")) - switch (message.stickerPackQuery) { - default: - return "stickerPackQuery: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.liveLocationsFinal != null && message.hasOwnProperty("liveLocationsFinal")) - switch (message.liveLocationsFinal) { - default: - return "liveLocationsFinal: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.labelsEdit != null && message.hasOwnProperty("labelsEdit")) - switch (message.labelsEdit) { - default: - return "labelsEdit: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.mediaUpload != null && message.hasOwnProperty("mediaUpload")) - switch (message.mediaUpload) { - default: - return "mediaUpload: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.mediaUploadRichQuickReplies != null && message.hasOwnProperty("mediaUploadRichQuickReplies")) - switch (message.mediaUploadRichQuickReplies) { - default: - return "mediaUploadRichQuickReplies: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.vnameV2 != null && message.hasOwnProperty("vnameV2")) - switch (message.vnameV2) { - default: - return "vnameV2: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.videoPlaybackUrl != null && message.hasOwnProperty("videoPlaybackUrl")) - switch (message.videoPlaybackUrl) { - default: - return "videoPlaybackUrl: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.statusRanking != null && message.hasOwnProperty("statusRanking")) - switch (message.statusRanking) { - default: - return "statusRanking: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.voipIndividualVideo != null && message.hasOwnProperty("voipIndividualVideo")) - switch (message.voipIndividualVideo) { - default: - return "voipIndividualVideo: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.thirdPartyStickers != null && message.hasOwnProperty("thirdPartyStickers")) - switch (message.thirdPartyStickers) { - default: - return "thirdPartyStickers: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.frequentlyForwardedSetting != null && message.hasOwnProperty("frequentlyForwardedSetting")) - switch (message.frequentlyForwardedSetting) { - default: - return "frequentlyForwardedSetting: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.groupsV4JoinPermission != null && message.hasOwnProperty("groupsV4JoinPermission")) - switch (message.groupsV4JoinPermission) { - default: - return "groupsV4JoinPermission: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.recentStickers != null && message.hasOwnProperty("recentStickers")) - switch (message.recentStickers) { - default: - return "recentStickers: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.catalog != null && message.hasOwnProperty("catalog")) - switch (message.catalog) { - default: - return "catalog: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.starredStickers != null && message.hasOwnProperty("starredStickers")) - switch (message.starredStickers) { - default: - return "starredStickers: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.voipGroupCall != null && message.hasOwnProperty("voipGroupCall")) - switch (message.voipGroupCall) { - default: - return "voipGroupCall: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.templateMessage != null && message.hasOwnProperty("templateMessage")) - switch (message.templateMessage) { - default: - return "templateMessage: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.templateMessageInteractivity != null && message.hasOwnProperty("templateMessageInteractivity")) - switch (message.templateMessageInteractivity) { - default: - return "templateMessageInteractivity: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.ephemeralMessages != null && message.hasOwnProperty("ephemeralMessages")) - switch (message.ephemeralMessages) { - default: - return "ephemeralMessages: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.e2ENotificationSync != null && message.hasOwnProperty("e2ENotificationSync")) - switch (message.e2ENotificationSync) { - default: - return "e2ENotificationSync: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.recentStickersV2 != null && message.hasOwnProperty("recentStickersV2")) - switch (message.recentStickersV2) { - default: - return "recentStickersV2: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.syncdRelease1 != null && message.hasOwnProperty("syncdRelease1")) - switch (message.syncdRelease1) { - default: - return "syncdRelease1: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.recentStickersV3 != null && message.hasOwnProperty("recentStickersV3")) - switch (message.recentStickersV3) { - default: - return "recentStickersV3: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.userNotice != null && message.hasOwnProperty("userNotice")) - switch (message.userNotice) { - default: - return "userNotice: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.syncdRelease11 != null && message.hasOwnProperty("syncdRelease11")) - switch (message.syncdRelease11) { - default: - return "syncdRelease11: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.support != null && message.hasOwnProperty("support")) - switch (message.support) { - default: - return "support: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - return null; - }; - - /** - * Creates a WebFeatures message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.WebFeatures - * @static - * @param {Object.} object Plain object - * @returns {proto.WebFeatures} WebFeatures - */ - WebFeatures.fromObject = function fromObject(object) { - if (object instanceof $root.proto.WebFeatures) - return object; - var message = new $root.proto.WebFeatures(); - switch (object.labelsDisplay) { - case "NOT_STARTED": - case 0: - message.labelsDisplay = 0; - break; - case "FORCE_UPGRADE": - case 1: - message.labelsDisplay = 1; - break; - case "DEVELOPMENT": - case 2: - message.labelsDisplay = 2; - break; - case "PRODUCTION": - case 3: - message.labelsDisplay = 3; - break; - } - switch (object.voipIndividualOutgoing) { - case "NOT_STARTED": - case 0: - message.voipIndividualOutgoing = 0; - break; - case "FORCE_UPGRADE": - case 1: - message.voipIndividualOutgoing = 1; - break; - case "DEVELOPMENT": - case 2: - message.voipIndividualOutgoing = 2; - break; - case "PRODUCTION": - case 3: - message.voipIndividualOutgoing = 3; - break; - } - switch (object.groupsV3) { - case "NOT_STARTED": - case 0: - message.groupsV3 = 0; - break; - case "FORCE_UPGRADE": - case 1: - message.groupsV3 = 1; - break; - case "DEVELOPMENT": - case 2: - message.groupsV3 = 2; - break; - case "PRODUCTION": - case 3: - message.groupsV3 = 3; - break; - } - switch (object.groupsV3Create) { - case "NOT_STARTED": - case 0: - message.groupsV3Create = 0; - break; - case "FORCE_UPGRADE": - case 1: - message.groupsV3Create = 1; - break; - case "DEVELOPMENT": - case 2: - message.groupsV3Create = 2; - break; - case "PRODUCTION": - case 3: - message.groupsV3Create = 3; - break; - } - switch (object.changeNumberV2) { - case "NOT_STARTED": - case 0: - message.changeNumberV2 = 0; - break; - case "FORCE_UPGRADE": - case 1: - message.changeNumberV2 = 1; - break; - case "DEVELOPMENT": - case 2: - message.changeNumberV2 = 2; - break; - case "PRODUCTION": - case 3: - message.changeNumberV2 = 3; - break; - } - switch (object.queryStatusV3Thumbnail) { - case "NOT_STARTED": - case 0: - message.queryStatusV3Thumbnail = 0; - break; - case "FORCE_UPGRADE": - case 1: - message.queryStatusV3Thumbnail = 1; - break; - case "DEVELOPMENT": - case 2: - message.queryStatusV3Thumbnail = 2; - break; - case "PRODUCTION": - case 3: - message.queryStatusV3Thumbnail = 3; - break; - } - switch (object.liveLocations) { - case "NOT_STARTED": - case 0: - message.liveLocations = 0; - break; - case "FORCE_UPGRADE": - case 1: - message.liveLocations = 1; - break; - case "DEVELOPMENT": - case 2: - message.liveLocations = 2; - break; - case "PRODUCTION": - case 3: - message.liveLocations = 3; - break; - } - switch (object.queryVname) { - case "NOT_STARTED": - case 0: - message.queryVname = 0; - break; - case "FORCE_UPGRADE": - case 1: - message.queryVname = 1; - break; - case "DEVELOPMENT": - case 2: - message.queryVname = 2; - break; - case "PRODUCTION": - case 3: - message.queryVname = 3; - break; - } - switch (object.voipIndividualIncoming) { - case "NOT_STARTED": - case 0: - message.voipIndividualIncoming = 0; - break; - case "FORCE_UPGRADE": - case 1: - message.voipIndividualIncoming = 1; - break; - case "DEVELOPMENT": - case 2: - message.voipIndividualIncoming = 2; - break; - case "PRODUCTION": - case 3: - message.voipIndividualIncoming = 3; - break; - } - switch (object.quickRepliesQuery) { - case "NOT_STARTED": - case 0: - message.quickRepliesQuery = 0; - break; - case "FORCE_UPGRADE": - case 1: - message.quickRepliesQuery = 1; - break; - case "DEVELOPMENT": - case 2: - message.quickRepliesQuery = 2; - break; - case "PRODUCTION": - case 3: - message.quickRepliesQuery = 3; - break; - } - switch (object.payments) { - case "NOT_STARTED": - case 0: - message.payments = 0; - break; - case "FORCE_UPGRADE": - case 1: - message.payments = 1; - break; - case "DEVELOPMENT": - case 2: - message.payments = 2; - break; - case "PRODUCTION": - case 3: - message.payments = 3; - break; - } - switch (object.stickerPackQuery) { - case "NOT_STARTED": - case 0: - message.stickerPackQuery = 0; - break; - case "FORCE_UPGRADE": - case 1: - message.stickerPackQuery = 1; - break; - case "DEVELOPMENT": - case 2: - message.stickerPackQuery = 2; - break; - case "PRODUCTION": - case 3: - message.stickerPackQuery = 3; - break; - } - switch (object.liveLocationsFinal) { - case "NOT_STARTED": - case 0: - message.liveLocationsFinal = 0; - break; - case "FORCE_UPGRADE": - case 1: - message.liveLocationsFinal = 1; - break; - case "DEVELOPMENT": - case 2: - message.liveLocationsFinal = 2; - break; - case "PRODUCTION": - case 3: - message.liveLocationsFinal = 3; - break; - } - switch (object.labelsEdit) { - case "NOT_STARTED": - case 0: - message.labelsEdit = 0; - break; - case "FORCE_UPGRADE": - case 1: - message.labelsEdit = 1; - break; - case "DEVELOPMENT": - case 2: - message.labelsEdit = 2; - break; - case "PRODUCTION": - case 3: - message.labelsEdit = 3; - break; - } - switch (object.mediaUpload) { - case "NOT_STARTED": - case 0: - message.mediaUpload = 0; - break; - case "FORCE_UPGRADE": - case 1: - message.mediaUpload = 1; - break; - case "DEVELOPMENT": - case 2: - message.mediaUpload = 2; - break; - case "PRODUCTION": - case 3: - message.mediaUpload = 3; - break; - } - switch (object.mediaUploadRichQuickReplies) { - case "NOT_STARTED": - case 0: - message.mediaUploadRichQuickReplies = 0; - break; - case "FORCE_UPGRADE": - case 1: - message.mediaUploadRichQuickReplies = 1; - break; - case "DEVELOPMENT": - case 2: - message.mediaUploadRichQuickReplies = 2; - break; - case "PRODUCTION": - case 3: - message.mediaUploadRichQuickReplies = 3; - break; - } - switch (object.vnameV2) { - case "NOT_STARTED": - case 0: - message.vnameV2 = 0; - break; - case "FORCE_UPGRADE": - case 1: - message.vnameV2 = 1; - break; - case "DEVELOPMENT": - case 2: - message.vnameV2 = 2; - break; - case "PRODUCTION": - case 3: - message.vnameV2 = 3; - break; - } - switch (object.videoPlaybackUrl) { - case "NOT_STARTED": - case 0: - message.videoPlaybackUrl = 0; - break; - case "FORCE_UPGRADE": - case 1: - message.videoPlaybackUrl = 1; - break; - case "DEVELOPMENT": - case 2: - message.videoPlaybackUrl = 2; - break; - case "PRODUCTION": - case 3: - message.videoPlaybackUrl = 3; - break; - } - switch (object.statusRanking) { - case "NOT_STARTED": - case 0: - message.statusRanking = 0; - break; - case "FORCE_UPGRADE": - case 1: - message.statusRanking = 1; - break; - case "DEVELOPMENT": - case 2: - message.statusRanking = 2; - break; - case "PRODUCTION": - case 3: - message.statusRanking = 3; - break; - } - switch (object.voipIndividualVideo) { - case "NOT_STARTED": - case 0: - message.voipIndividualVideo = 0; - break; - case "FORCE_UPGRADE": - case 1: - message.voipIndividualVideo = 1; - break; - case "DEVELOPMENT": - case 2: - message.voipIndividualVideo = 2; - break; - case "PRODUCTION": - case 3: - message.voipIndividualVideo = 3; - break; - } - switch (object.thirdPartyStickers) { - case "NOT_STARTED": - case 0: - message.thirdPartyStickers = 0; - break; - case "FORCE_UPGRADE": - case 1: - message.thirdPartyStickers = 1; - break; - case "DEVELOPMENT": - case 2: - message.thirdPartyStickers = 2; - break; - case "PRODUCTION": - case 3: - message.thirdPartyStickers = 3; - break; - } - switch (object.frequentlyForwardedSetting) { - case "NOT_STARTED": - case 0: - message.frequentlyForwardedSetting = 0; - break; - case "FORCE_UPGRADE": - case 1: - message.frequentlyForwardedSetting = 1; - break; - case "DEVELOPMENT": - case 2: - message.frequentlyForwardedSetting = 2; - break; - case "PRODUCTION": - case 3: - message.frequentlyForwardedSetting = 3; - break; - } - switch (object.groupsV4JoinPermission) { - case "NOT_STARTED": - case 0: - message.groupsV4JoinPermission = 0; - break; - case "FORCE_UPGRADE": - case 1: - message.groupsV4JoinPermission = 1; - break; - case "DEVELOPMENT": - case 2: - message.groupsV4JoinPermission = 2; - break; - case "PRODUCTION": - case 3: - message.groupsV4JoinPermission = 3; - break; - } - switch (object.recentStickers) { - case "NOT_STARTED": - case 0: - message.recentStickers = 0; - break; - case "FORCE_UPGRADE": - case 1: - message.recentStickers = 1; - break; - case "DEVELOPMENT": - case 2: - message.recentStickers = 2; - break; - case "PRODUCTION": - case 3: - message.recentStickers = 3; - break; - } - switch (object.catalog) { - case "NOT_STARTED": - case 0: - message.catalog = 0; - break; - case "FORCE_UPGRADE": - case 1: - message.catalog = 1; - break; - case "DEVELOPMENT": - case 2: - message.catalog = 2; - break; - case "PRODUCTION": - case 3: - message.catalog = 3; - break; - } - switch (object.starredStickers) { - case "NOT_STARTED": - case 0: - message.starredStickers = 0; - break; - case "FORCE_UPGRADE": - case 1: - message.starredStickers = 1; - break; - case "DEVELOPMENT": - case 2: - message.starredStickers = 2; - break; - case "PRODUCTION": - case 3: - message.starredStickers = 3; - break; - } - switch (object.voipGroupCall) { - case "NOT_STARTED": - case 0: - message.voipGroupCall = 0; - break; - case "FORCE_UPGRADE": - case 1: - message.voipGroupCall = 1; - break; - case "DEVELOPMENT": - case 2: - message.voipGroupCall = 2; - break; - case "PRODUCTION": - case 3: - message.voipGroupCall = 3; - break; - } - switch (object.templateMessage) { - case "NOT_STARTED": - case 0: - message.templateMessage = 0; - break; - case "FORCE_UPGRADE": - case 1: - message.templateMessage = 1; - break; - case "DEVELOPMENT": - case 2: - message.templateMessage = 2; - break; - case "PRODUCTION": - case 3: - message.templateMessage = 3; - break; - } - switch (object.templateMessageInteractivity) { - case "NOT_STARTED": - case 0: - message.templateMessageInteractivity = 0; - break; - case "FORCE_UPGRADE": - case 1: - message.templateMessageInteractivity = 1; - break; - case "DEVELOPMENT": - case 2: - message.templateMessageInteractivity = 2; - break; - case "PRODUCTION": - case 3: - message.templateMessageInteractivity = 3; - break; - } - switch (object.ephemeralMessages) { - case "NOT_STARTED": - case 0: - message.ephemeralMessages = 0; - break; - case "FORCE_UPGRADE": - case 1: - message.ephemeralMessages = 1; - break; - case "DEVELOPMENT": - case 2: - message.ephemeralMessages = 2; - break; - case "PRODUCTION": - case 3: - message.ephemeralMessages = 3; - break; - } - switch (object.e2ENotificationSync) { - case "NOT_STARTED": - case 0: - message.e2ENotificationSync = 0; - break; - case "FORCE_UPGRADE": - case 1: - message.e2ENotificationSync = 1; - break; - case "DEVELOPMENT": - case 2: - message.e2ENotificationSync = 2; - break; - case "PRODUCTION": - case 3: - message.e2ENotificationSync = 3; - break; - } - switch (object.recentStickersV2) { - case "NOT_STARTED": - case 0: - message.recentStickersV2 = 0; - break; - case "FORCE_UPGRADE": - case 1: - message.recentStickersV2 = 1; - break; - case "DEVELOPMENT": - case 2: - message.recentStickersV2 = 2; - break; - case "PRODUCTION": - case 3: - message.recentStickersV2 = 3; - break; - } - switch (object.syncdRelease1) { - case "NOT_STARTED": - case 0: - message.syncdRelease1 = 0; - break; - case "FORCE_UPGRADE": - case 1: - message.syncdRelease1 = 1; - break; - case "DEVELOPMENT": - case 2: - message.syncdRelease1 = 2; - break; - case "PRODUCTION": - case 3: - message.syncdRelease1 = 3; - break; - } - switch (object.recentStickersV3) { - case "NOT_STARTED": - case 0: - message.recentStickersV3 = 0; - break; - case "FORCE_UPGRADE": - case 1: - message.recentStickersV3 = 1; - break; - case "DEVELOPMENT": - case 2: - message.recentStickersV3 = 2; - break; - case "PRODUCTION": - case 3: - message.recentStickersV3 = 3; - break; - } - switch (object.userNotice) { - case "NOT_STARTED": - case 0: - message.userNotice = 0; - break; - case "FORCE_UPGRADE": - case 1: - message.userNotice = 1; - break; - case "DEVELOPMENT": - case 2: - message.userNotice = 2; - break; - case "PRODUCTION": - case 3: - message.userNotice = 3; - break; - } - switch (object.syncdRelease11) { - case "NOT_STARTED": - case 0: - message.syncdRelease11 = 0; - break; - case "FORCE_UPGRADE": - case 1: - message.syncdRelease11 = 1; - break; - case "DEVELOPMENT": - case 2: - message.syncdRelease11 = 2; - break; - case "PRODUCTION": - case 3: - message.syncdRelease11 = 3; - break; - } - switch (object.support) { - case "NOT_STARTED": - case 0: - message.support = 0; - break; - case "FORCE_UPGRADE": - case 1: - message.support = 1; - break; - case "DEVELOPMENT": - case 2: - message.support = 2; - break; - case "PRODUCTION": - case 3: - message.support = 3; - break; - } - return message; - }; - - /** - * Creates a plain object from a WebFeatures message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.WebFeatures - * @static - * @param {proto.WebFeatures} message WebFeatures - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WebFeatures.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.labelsDisplay = options.enums === String ? "NOT_STARTED" : 0; - object.voipIndividualOutgoing = options.enums === String ? "NOT_STARTED" : 0; - object.groupsV3 = options.enums === String ? "NOT_STARTED" : 0; - object.groupsV3Create = options.enums === String ? "NOT_STARTED" : 0; - object.changeNumberV2 = options.enums === String ? "NOT_STARTED" : 0; - object.queryStatusV3Thumbnail = options.enums === String ? "NOT_STARTED" : 0; - object.liveLocations = options.enums === String ? "NOT_STARTED" : 0; - object.queryVname = options.enums === String ? "NOT_STARTED" : 0; - object.voipIndividualIncoming = options.enums === String ? "NOT_STARTED" : 0; - object.quickRepliesQuery = options.enums === String ? "NOT_STARTED" : 0; - object.payments = options.enums === String ? "NOT_STARTED" : 0; - object.stickerPackQuery = options.enums === String ? "NOT_STARTED" : 0; - object.liveLocationsFinal = options.enums === String ? "NOT_STARTED" : 0; - object.labelsEdit = options.enums === String ? "NOT_STARTED" : 0; - object.mediaUpload = options.enums === String ? "NOT_STARTED" : 0; - object.mediaUploadRichQuickReplies = options.enums === String ? "NOT_STARTED" : 0; - object.vnameV2 = options.enums === String ? "NOT_STARTED" : 0; - object.videoPlaybackUrl = options.enums === String ? "NOT_STARTED" : 0; - object.statusRanking = options.enums === String ? "NOT_STARTED" : 0; - object.voipIndividualVideo = options.enums === String ? "NOT_STARTED" : 0; - object.thirdPartyStickers = options.enums === String ? "NOT_STARTED" : 0; - object.frequentlyForwardedSetting = options.enums === String ? "NOT_STARTED" : 0; - object.groupsV4JoinPermission = options.enums === String ? "NOT_STARTED" : 0; - object.recentStickers = options.enums === String ? "NOT_STARTED" : 0; - object.catalog = options.enums === String ? "NOT_STARTED" : 0; - object.starredStickers = options.enums === String ? "NOT_STARTED" : 0; - object.voipGroupCall = options.enums === String ? "NOT_STARTED" : 0; - object.templateMessage = options.enums === String ? "NOT_STARTED" : 0; - object.templateMessageInteractivity = options.enums === String ? "NOT_STARTED" : 0; - object.ephemeralMessages = options.enums === String ? "NOT_STARTED" : 0; - object.e2ENotificationSync = options.enums === String ? "NOT_STARTED" : 0; - object.recentStickersV2 = options.enums === String ? "NOT_STARTED" : 0; - object.syncdRelease1 = options.enums === String ? "NOT_STARTED" : 0; - object.recentStickersV3 = options.enums === String ? "NOT_STARTED" : 0; - object.userNotice = options.enums === String ? "NOT_STARTED" : 0; - object.syncdRelease11 = options.enums === String ? "NOT_STARTED" : 0; - object.support = options.enums === String ? "NOT_STARTED" : 0; - } - if (message.labelsDisplay != null && message.hasOwnProperty("labelsDisplay")) - object.labelsDisplay = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.labelsDisplay] : message.labelsDisplay; - if (message.voipIndividualOutgoing != null && message.hasOwnProperty("voipIndividualOutgoing")) - object.voipIndividualOutgoing = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.voipIndividualOutgoing] : message.voipIndividualOutgoing; - if (message.groupsV3 != null && message.hasOwnProperty("groupsV3")) - object.groupsV3 = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.groupsV3] : message.groupsV3; - if (message.groupsV3Create != null && message.hasOwnProperty("groupsV3Create")) - object.groupsV3Create = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.groupsV3Create] : message.groupsV3Create; - if (message.changeNumberV2 != null && message.hasOwnProperty("changeNumberV2")) - object.changeNumberV2 = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.changeNumberV2] : message.changeNumberV2; - if (message.queryStatusV3Thumbnail != null && message.hasOwnProperty("queryStatusV3Thumbnail")) - object.queryStatusV3Thumbnail = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.queryStatusV3Thumbnail] : message.queryStatusV3Thumbnail; - if (message.liveLocations != null && message.hasOwnProperty("liveLocations")) - object.liveLocations = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.liveLocations] : message.liveLocations; - if (message.queryVname != null && message.hasOwnProperty("queryVname")) - object.queryVname = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.queryVname] : message.queryVname; - if (message.voipIndividualIncoming != null && message.hasOwnProperty("voipIndividualIncoming")) - object.voipIndividualIncoming = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.voipIndividualIncoming] : message.voipIndividualIncoming; - if (message.quickRepliesQuery != null && message.hasOwnProperty("quickRepliesQuery")) - object.quickRepliesQuery = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.quickRepliesQuery] : message.quickRepliesQuery; - if (message.payments != null && message.hasOwnProperty("payments")) - object.payments = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.payments] : message.payments; - if (message.stickerPackQuery != null && message.hasOwnProperty("stickerPackQuery")) - object.stickerPackQuery = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.stickerPackQuery] : message.stickerPackQuery; - if (message.liveLocationsFinal != null && message.hasOwnProperty("liveLocationsFinal")) - object.liveLocationsFinal = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.liveLocationsFinal] : message.liveLocationsFinal; - if (message.labelsEdit != null && message.hasOwnProperty("labelsEdit")) - object.labelsEdit = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.labelsEdit] : message.labelsEdit; - if (message.mediaUpload != null && message.hasOwnProperty("mediaUpload")) - object.mediaUpload = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.mediaUpload] : message.mediaUpload; - if (message.mediaUploadRichQuickReplies != null && message.hasOwnProperty("mediaUploadRichQuickReplies")) - object.mediaUploadRichQuickReplies = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.mediaUploadRichQuickReplies] : message.mediaUploadRichQuickReplies; - if (message.vnameV2 != null && message.hasOwnProperty("vnameV2")) - object.vnameV2 = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.vnameV2] : message.vnameV2; - if (message.videoPlaybackUrl != null && message.hasOwnProperty("videoPlaybackUrl")) - object.videoPlaybackUrl = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.videoPlaybackUrl] : message.videoPlaybackUrl; - if (message.statusRanking != null && message.hasOwnProperty("statusRanking")) - object.statusRanking = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.statusRanking] : message.statusRanking; - if (message.voipIndividualVideo != null && message.hasOwnProperty("voipIndividualVideo")) - object.voipIndividualVideo = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.voipIndividualVideo] : message.voipIndividualVideo; - if (message.thirdPartyStickers != null && message.hasOwnProperty("thirdPartyStickers")) - object.thirdPartyStickers = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.thirdPartyStickers] : message.thirdPartyStickers; - if (message.frequentlyForwardedSetting != null && message.hasOwnProperty("frequentlyForwardedSetting")) - object.frequentlyForwardedSetting = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.frequentlyForwardedSetting] : message.frequentlyForwardedSetting; - if (message.groupsV4JoinPermission != null && message.hasOwnProperty("groupsV4JoinPermission")) - object.groupsV4JoinPermission = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.groupsV4JoinPermission] : message.groupsV4JoinPermission; - if (message.recentStickers != null && message.hasOwnProperty("recentStickers")) - object.recentStickers = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.recentStickers] : message.recentStickers; - if (message.catalog != null && message.hasOwnProperty("catalog")) - object.catalog = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.catalog] : message.catalog; - if (message.starredStickers != null && message.hasOwnProperty("starredStickers")) - object.starredStickers = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.starredStickers] : message.starredStickers; - if (message.voipGroupCall != null && message.hasOwnProperty("voipGroupCall")) - object.voipGroupCall = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.voipGroupCall] : message.voipGroupCall; - if (message.templateMessage != null && message.hasOwnProperty("templateMessage")) - object.templateMessage = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.templateMessage] : message.templateMessage; - if (message.templateMessageInteractivity != null && message.hasOwnProperty("templateMessageInteractivity")) - object.templateMessageInteractivity = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.templateMessageInteractivity] : message.templateMessageInteractivity; - if (message.ephemeralMessages != null && message.hasOwnProperty("ephemeralMessages")) - object.ephemeralMessages = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.ephemeralMessages] : message.ephemeralMessages; - if (message.e2ENotificationSync != null && message.hasOwnProperty("e2ENotificationSync")) - object.e2ENotificationSync = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.e2ENotificationSync] : message.e2ENotificationSync; - if (message.recentStickersV2 != null && message.hasOwnProperty("recentStickersV2")) - object.recentStickersV2 = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.recentStickersV2] : message.recentStickersV2; - if (message.syncdRelease1 != null && message.hasOwnProperty("syncdRelease1")) - object.syncdRelease1 = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.syncdRelease1] : message.syncdRelease1; - if (message.recentStickersV3 != null && message.hasOwnProperty("recentStickersV3")) - object.recentStickersV3 = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.recentStickersV3] : message.recentStickersV3; - if (message.userNotice != null && message.hasOwnProperty("userNotice")) - object.userNotice = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.userNotice] : message.userNotice; - if (message.syncdRelease11 != null && message.hasOwnProperty("syncdRelease11")) - object.syncdRelease11 = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.syncdRelease11] : message.syncdRelease11; - if (message.support != null && message.hasOwnProperty("support")) - object.support = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.support] : message.support; - return object; - }; - - /** - * Converts this WebFeatures to JSON. - * @function toJSON - * @memberof proto.WebFeatures - * @instance - * @returns {Object.} JSON object - */ - WebFeatures.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * WebFeaturesFlag enum. - * @name proto.WebFeatures.WebFeaturesFlag - * @enum {number} - * @property {number} NOT_STARTED=0 NOT_STARTED value - * @property {number} FORCE_UPGRADE=1 FORCE_UPGRADE value - * @property {number} DEVELOPMENT=2 DEVELOPMENT value - * @property {number} PRODUCTION=3 PRODUCTION value - */ - WebFeatures.WebFeaturesFlag = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NOT_STARTED"] = 0; - values[valuesById[1] = "FORCE_UPGRADE"] = 1; - values[valuesById[2] = "DEVELOPMENT"] = 2; - values[valuesById[3] = "PRODUCTION"] = 3; - return values; - })(); - - return WebFeatures; - })(); - - proto.NotificationMessageInfo = (function() { - - /** - * Properties of a NotificationMessageInfo. - * @memberof proto - * @interface INotificationMessageInfo - * @property {proto.IMessageKey|null} [key] NotificationMessageInfo key - * @property {proto.IMessage|null} [message] NotificationMessageInfo message - * @property {number|Long|null} [messageTimestamp] NotificationMessageInfo messageTimestamp - * @property {string|null} [participant] NotificationMessageInfo participant - */ - - /** - * Constructs a new NotificationMessageInfo. - * @memberof proto - * @classdesc Represents a NotificationMessageInfo. - * @implements INotificationMessageInfo - * @constructor - * @param {proto.INotificationMessageInfo=} [properties] Properties to set - */ - function NotificationMessageInfo(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]]; - } - - /** - * NotificationMessageInfo key. - * @member {proto.IMessageKey|null|undefined} key - * @memberof proto.NotificationMessageInfo - * @instance - */ - NotificationMessageInfo.prototype.key = null; - - /** - * NotificationMessageInfo message. - * @member {proto.IMessage|null|undefined} message - * @memberof proto.NotificationMessageInfo - * @instance - */ - NotificationMessageInfo.prototype.message = null; - - /** - * NotificationMessageInfo messageTimestamp. - * @member {number|Long} messageTimestamp - * @memberof proto.NotificationMessageInfo - * @instance - */ - NotificationMessageInfo.prototype.messageTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * NotificationMessageInfo participant. - * @member {string} participant - * @memberof proto.NotificationMessageInfo - * @instance - */ - NotificationMessageInfo.prototype.participant = ""; - - /** - * Creates a new NotificationMessageInfo instance using the specified properties. - * @function create - * @memberof proto.NotificationMessageInfo - * @static - * @param {proto.INotificationMessageInfo=} [properties] Properties to set - * @returns {proto.NotificationMessageInfo} NotificationMessageInfo instance - */ - NotificationMessageInfo.create = function create(properties) { - return new NotificationMessageInfo(properties); - }; - - /** - * Encodes the specified NotificationMessageInfo message. Does not implicitly {@link proto.NotificationMessageInfo.verify|verify} messages. - * @function encode - * @memberof proto.NotificationMessageInfo - * @static - * @param {proto.INotificationMessageInfo} message NotificationMessageInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NotificationMessageInfo.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.message != null && Object.hasOwnProperty.call(message, "message")) - $root.proto.Message.encode(message.message, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.messageTimestamp != null && Object.hasOwnProperty.call(message, "messageTimestamp")) - writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.messageTimestamp); - if (message.participant != null && Object.hasOwnProperty.call(message, "participant")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.participant); - return writer; - }; - - /** - * Encodes the specified NotificationMessageInfo message, length delimited. Does not implicitly {@link proto.NotificationMessageInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.NotificationMessageInfo - * @static - * @param {proto.INotificationMessageInfo} message NotificationMessageInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NotificationMessageInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NotificationMessageInfo message from the specified reader or buffer. - * @function decode - * @memberof proto.NotificationMessageInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.NotificationMessageInfo} NotificationMessageInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NotificationMessageInfo.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.NotificationMessageInfo(); - 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.message = $root.proto.Message.decode(reader, reader.uint32()); - break; - case 3: - message.messageTimestamp = reader.uint64(); - break; - case 4: - message.participant = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NotificationMessageInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.NotificationMessageInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.NotificationMessageInfo} NotificationMessageInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NotificationMessageInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NotificationMessageInfo message. - * @function verify - * @memberof proto.NotificationMessageInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NotificationMessageInfo.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.message != null && message.hasOwnProperty("message")) { - var error = $root.proto.Message.verify(message.message); - if (error) - return "message." + error; - } - if (message.messageTimestamp != null && message.hasOwnProperty("messageTimestamp")) - if (!$util.isInteger(message.messageTimestamp) && !(message.messageTimestamp && $util.isInteger(message.messageTimestamp.low) && $util.isInteger(message.messageTimestamp.high))) - return "messageTimestamp: integer|Long expected"; - if (message.participant != null && message.hasOwnProperty("participant")) - if (!$util.isString(message.participant)) - return "participant: string expected"; - return null; - }; - - /** - * Creates a NotificationMessageInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.NotificationMessageInfo - * @static - * @param {Object.} object Plain object - * @returns {proto.NotificationMessageInfo} NotificationMessageInfo - */ - NotificationMessageInfo.fromObject = function fromObject(object) { - if (object instanceof $root.proto.NotificationMessageInfo) - return object; - var message = new $root.proto.NotificationMessageInfo(); - if (object.key != null) { - if (typeof object.key !== "object") - throw TypeError(".proto.NotificationMessageInfo.key: object expected"); - message.key = $root.proto.MessageKey.fromObject(object.key); - } - if (object.message != null) { - if (typeof object.message !== "object") - throw TypeError(".proto.NotificationMessageInfo.message: object expected"); - message.message = $root.proto.Message.fromObject(object.message); - } - if (object.messageTimestamp != null) - if ($util.Long) - (message.messageTimestamp = $util.Long.fromValue(object.messageTimestamp)).unsigned = true; - else if (typeof object.messageTimestamp === "string") - message.messageTimestamp = parseInt(object.messageTimestamp, 10); - else if (typeof object.messageTimestamp === "number") - message.messageTimestamp = object.messageTimestamp; - else if (typeof object.messageTimestamp === "object") - message.messageTimestamp = new $util.LongBits(object.messageTimestamp.low >>> 0, object.messageTimestamp.high >>> 0).toNumber(true); - if (object.participant != null) - message.participant = String(object.participant); - return message; - }; - - /** - * Creates a plain object from a NotificationMessageInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.NotificationMessageInfo - * @static - * @param {proto.NotificationMessageInfo} message NotificationMessageInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NotificationMessageInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.key = null; - object.message = null; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.messageTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.messageTimestamp = options.longs === String ? "0" : 0; - object.participant = ""; - } - if (message.key != null && message.hasOwnProperty("key")) - object.key = $root.proto.MessageKey.toObject(message.key, options); - if (message.message != null && message.hasOwnProperty("message")) - object.message = $root.proto.Message.toObject(message.message, options); - if (message.messageTimestamp != null && message.hasOwnProperty("messageTimestamp")) - if (typeof message.messageTimestamp === "number") - object.messageTimestamp = options.longs === String ? String(message.messageTimestamp) : message.messageTimestamp; - else - object.messageTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.messageTimestamp) : options.longs === Number ? new $util.LongBits(message.messageTimestamp.low >>> 0, message.messageTimestamp.high >>> 0).toNumber(true) : message.messageTimestamp; - if (message.participant != null && message.hasOwnProperty("participant")) - object.participant = message.participant; - return object; - }; - - /** - * Converts this NotificationMessageInfo to JSON. - * @function toJSON - * @memberof proto.NotificationMessageInfo - * @instance - * @returns {Object.} JSON object - */ - NotificationMessageInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return NotificationMessageInfo; - })(); - - proto.WebNotificationsInfo = (function() { - - /** - * Properties of a WebNotificationsInfo. - * @memberof proto - * @interface IWebNotificationsInfo - * @property {number|Long|null} [timestamp] WebNotificationsInfo timestamp - * @property {number|null} [unreadChats] WebNotificationsInfo unreadChats - * @property {number|null} [notifyMessageCount] WebNotificationsInfo notifyMessageCount - * @property {Array.|null} [notifyMessages] WebNotificationsInfo notifyMessages - */ - - /** - * Constructs a new WebNotificationsInfo. - * @memberof proto - * @classdesc Represents a WebNotificationsInfo. - * @implements IWebNotificationsInfo - * @constructor - * @param {proto.IWebNotificationsInfo=} [properties] Properties to set - */ - function WebNotificationsInfo(properties) { - this.notifyMessages = []; - 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]]; - } - - /** - * WebNotificationsInfo timestamp. - * @member {number|Long} timestamp - * @memberof proto.WebNotificationsInfo - * @instance - */ - WebNotificationsInfo.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * WebNotificationsInfo unreadChats. - * @member {number} unreadChats - * @memberof proto.WebNotificationsInfo - * @instance - */ - WebNotificationsInfo.prototype.unreadChats = 0; - - /** - * WebNotificationsInfo notifyMessageCount. - * @member {number} notifyMessageCount - * @memberof proto.WebNotificationsInfo - * @instance - */ - WebNotificationsInfo.prototype.notifyMessageCount = 0; - - /** - * WebNotificationsInfo notifyMessages. - * @member {Array.} notifyMessages - * @memberof proto.WebNotificationsInfo - * @instance - */ - WebNotificationsInfo.prototype.notifyMessages = $util.emptyArray; - - /** - * Creates a new WebNotificationsInfo instance using the specified properties. - * @function create - * @memberof proto.WebNotificationsInfo - * @static - * @param {proto.IWebNotificationsInfo=} [properties] Properties to set - * @returns {proto.WebNotificationsInfo} WebNotificationsInfo instance - */ - WebNotificationsInfo.create = function create(properties) { - return new WebNotificationsInfo(properties); - }; - - /** - * Encodes the specified WebNotificationsInfo message. Does not implicitly {@link proto.WebNotificationsInfo.verify|verify} messages. - * @function encode - * @memberof proto.WebNotificationsInfo - * @static - * @param {proto.IWebNotificationsInfo} message WebNotificationsInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WebNotificationsInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.timestamp); - if (message.unreadChats != null && Object.hasOwnProperty.call(message, "unreadChats")) - writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.unreadChats); - if (message.notifyMessageCount != null && Object.hasOwnProperty.call(message, "notifyMessageCount")) - writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.notifyMessageCount); - if (message.notifyMessages != null && message.notifyMessages.length) - for (var i = 0; i < message.notifyMessages.length; ++i) - $root.proto.WebMessageInfo.encode(message.notifyMessages[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified WebNotificationsInfo message, length delimited. Does not implicitly {@link proto.WebNotificationsInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.WebNotificationsInfo - * @static - * @param {proto.IWebNotificationsInfo} message WebNotificationsInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WebNotificationsInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a WebNotificationsInfo message from the specified reader or buffer. - * @function decode - * @memberof proto.WebNotificationsInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.WebNotificationsInfo} WebNotificationsInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WebNotificationsInfo.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.WebNotificationsInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.timestamp = reader.uint64(); - break; - case 3: - message.unreadChats = reader.uint32(); - break; - case 4: - message.notifyMessageCount = reader.uint32(); - break; - case 5: - if (!(message.notifyMessages && message.notifyMessages.length)) - message.notifyMessages = []; - message.notifyMessages.push($root.proto.WebMessageInfo.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a WebNotificationsInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.WebNotificationsInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.WebNotificationsInfo} WebNotificationsInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WebNotificationsInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a WebNotificationsInfo message. - * @function verify - * @memberof proto.WebNotificationsInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WebNotificationsInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object 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 (message.unreadChats != null && message.hasOwnProperty("unreadChats")) - if (!$util.isInteger(message.unreadChats)) - return "unreadChats: integer expected"; - if (message.notifyMessageCount != null && message.hasOwnProperty("notifyMessageCount")) - if (!$util.isInteger(message.notifyMessageCount)) - return "notifyMessageCount: integer expected"; - if (message.notifyMessages != null && message.hasOwnProperty("notifyMessages")) { - if (!Array.isArray(message.notifyMessages)) - return "notifyMessages: array expected"; - for (var i = 0; i < message.notifyMessages.length; ++i) { - var error = $root.proto.WebMessageInfo.verify(message.notifyMessages[i]); - if (error) - return "notifyMessages." + error; - } - } - return null; - }; - - /** - * Creates a WebNotificationsInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.WebNotificationsInfo - * @static - * @param {Object.} object Plain object - * @returns {proto.WebNotificationsInfo} WebNotificationsInfo - */ - WebNotificationsInfo.fromObject = function fromObject(object) { - if (object instanceof $root.proto.WebNotificationsInfo) - return object; - var message = new $root.proto.WebNotificationsInfo(); - if (object.timestamp != null) - if ($util.Long) - (message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = true; - 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(true); - if (object.unreadChats != null) - message.unreadChats = object.unreadChats >>> 0; - if (object.notifyMessageCount != null) - message.notifyMessageCount = object.notifyMessageCount >>> 0; - if (object.notifyMessages) { - if (!Array.isArray(object.notifyMessages)) - throw TypeError(".proto.WebNotificationsInfo.notifyMessages: array expected"); - message.notifyMessages = []; - for (var i = 0; i < object.notifyMessages.length; ++i) { - if (typeof object.notifyMessages[i] !== "object") - throw TypeError(".proto.WebNotificationsInfo.notifyMessages: object expected"); - message.notifyMessages[i] = $root.proto.WebMessageInfo.fromObject(object.notifyMessages[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a WebNotificationsInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.WebNotificationsInfo - * @static - * @param {proto.WebNotificationsInfo} message WebNotificationsInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WebNotificationsInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.notifyMessages = []; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.timestamp = options.longs === String ? "0" : 0; - object.unreadChats = 0; - object.notifyMessageCount = 0; - } - 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(true) : message.timestamp; - if (message.unreadChats != null && message.hasOwnProperty("unreadChats")) - object.unreadChats = message.unreadChats; - if (message.notifyMessageCount != null && message.hasOwnProperty("notifyMessageCount")) - object.notifyMessageCount = message.notifyMessageCount; - if (message.notifyMessages && message.notifyMessages.length) { - object.notifyMessages = []; - for (var j = 0; j < message.notifyMessages.length; ++j) - object.notifyMessages[j] = $root.proto.WebMessageInfo.toObject(message.notifyMessages[j], options); - } - return object; - }; - - /** - * Converts this WebNotificationsInfo to JSON. - * @function toJSON - * @memberof proto.WebNotificationsInfo - * @instance - * @returns {Object.} JSON object - */ - WebNotificationsInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return WebNotificationsInfo; - })(); - - proto.PaymentInfo = (function() { - - /** - * Properties of a PaymentInfo. - * @memberof proto - * @interface IPaymentInfo - * @property {proto.PaymentInfo.PaymentInfoCurrency|null} [currencyDeprecated] PaymentInfo currencyDeprecated - * @property {number|Long|null} [amount1000] PaymentInfo amount1000 - * @property {string|null} [receiverJid] PaymentInfo receiverJid - * @property {proto.PaymentInfo.PaymentInfoStatus|null} [status] PaymentInfo status - * @property {number|Long|null} [transactionTimestamp] PaymentInfo transactionTimestamp - * @property {proto.IMessageKey|null} [requestMessageKey] PaymentInfo requestMessageKey - * @property {number|Long|null} [expiryTimestamp] PaymentInfo expiryTimestamp - * @property {boolean|null} [futureproofed] PaymentInfo futureproofed - * @property {string|null} [currency] PaymentInfo currency - * @property {proto.PaymentInfo.PaymentInfoTxnStatus|null} [txnStatus] PaymentInfo txnStatus - */ - - /** - * Constructs a new PaymentInfo. - * @memberof proto - * @classdesc Represents a PaymentInfo. - * @implements IPaymentInfo - * @constructor - * @param {proto.IPaymentInfo=} [properties] Properties to set - */ - function PaymentInfo(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]]; - } - - /** - * PaymentInfo currencyDeprecated. - * @member {proto.PaymentInfo.PaymentInfoCurrency} currencyDeprecated - * @memberof proto.PaymentInfo - * @instance - */ - PaymentInfo.prototype.currencyDeprecated = 0; - - /** - * PaymentInfo amount1000. - * @member {number|Long} amount1000 - * @memberof proto.PaymentInfo - * @instance - */ - PaymentInfo.prototype.amount1000 = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * PaymentInfo receiverJid. - * @member {string} receiverJid - * @memberof proto.PaymentInfo - * @instance - */ - PaymentInfo.prototype.receiverJid = ""; - - /** - * PaymentInfo status. - * @member {proto.PaymentInfo.PaymentInfoStatus} status - * @memberof proto.PaymentInfo - * @instance - */ - PaymentInfo.prototype.status = 0; - - /** - * PaymentInfo transactionTimestamp. - * @member {number|Long} transactionTimestamp - * @memberof proto.PaymentInfo - * @instance - */ - PaymentInfo.prototype.transactionTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * PaymentInfo requestMessageKey. - * @member {proto.IMessageKey|null|undefined} requestMessageKey - * @memberof proto.PaymentInfo - * @instance - */ - PaymentInfo.prototype.requestMessageKey = null; - - /** - * PaymentInfo expiryTimestamp. - * @member {number|Long} expiryTimestamp - * @memberof proto.PaymentInfo - * @instance - */ - PaymentInfo.prototype.expiryTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * PaymentInfo futureproofed. - * @member {boolean} futureproofed - * @memberof proto.PaymentInfo - * @instance - */ - PaymentInfo.prototype.futureproofed = false; - - /** - * PaymentInfo currency. - * @member {string} currency - * @memberof proto.PaymentInfo - * @instance - */ - PaymentInfo.prototype.currency = ""; - - /** - * PaymentInfo txnStatus. - * @member {proto.PaymentInfo.PaymentInfoTxnStatus} txnStatus - * @memberof proto.PaymentInfo - * @instance - */ - PaymentInfo.prototype.txnStatus = 0; - - /** - * Creates a new PaymentInfo instance using the specified properties. - * @function create - * @memberof proto.PaymentInfo - * @static - * @param {proto.IPaymentInfo=} [properties] Properties to set - * @returns {proto.PaymentInfo} PaymentInfo instance - */ - PaymentInfo.create = function create(properties) { - return new PaymentInfo(properties); - }; - - /** - * Encodes the specified PaymentInfo message. Does not implicitly {@link proto.PaymentInfo.verify|verify} messages. - * @function encode - * @memberof proto.PaymentInfo - * @static - * @param {proto.IPaymentInfo} message PaymentInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PaymentInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.currencyDeprecated != null && Object.hasOwnProperty.call(message, "currencyDeprecated")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.currencyDeprecated); - if (message.amount1000 != null && Object.hasOwnProperty.call(message, "amount1000")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.amount1000); - if (message.receiverJid != null && Object.hasOwnProperty.call(message, "receiverJid")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.receiverJid); - if (message.status != null && Object.hasOwnProperty.call(message, "status")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.status); - if (message.transactionTimestamp != null && Object.hasOwnProperty.call(message, "transactionTimestamp")) - writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.transactionTimestamp); - if (message.requestMessageKey != null && Object.hasOwnProperty.call(message, "requestMessageKey")) - $root.proto.MessageKey.encode(message.requestMessageKey, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.expiryTimestamp != null && Object.hasOwnProperty.call(message, "expiryTimestamp")) - writer.uint32(/* id 7, wireType 0 =*/56).uint64(message.expiryTimestamp); - if (message.futureproofed != null && Object.hasOwnProperty.call(message, "futureproofed")) - writer.uint32(/* id 8, wireType 0 =*/64).bool(message.futureproofed); - if (message.currency != null && Object.hasOwnProperty.call(message, "currency")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.currency); - if (message.txnStatus != null && Object.hasOwnProperty.call(message, "txnStatus")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.txnStatus); - return writer; - }; - - /** - * Encodes the specified PaymentInfo message, length delimited. Does not implicitly {@link proto.PaymentInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.PaymentInfo - * @static - * @param {proto.IPaymentInfo} message PaymentInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PaymentInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PaymentInfo message from the specified reader or buffer. - * @function decode - * @memberof proto.PaymentInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.PaymentInfo} PaymentInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PaymentInfo.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.PaymentInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.currencyDeprecated = reader.int32(); - break; - case 2: - message.amount1000 = reader.uint64(); - break; - case 3: - message.receiverJid = reader.string(); - break; - case 4: - message.status = reader.int32(); - break; - case 5: - message.transactionTimestamp = reader.uint64(); - break; - case 6: - message.requestMessageKey = $root.proto.MessageKey.decode(reader, reader.uint32()); - break; - case 7: - message.expiryTimestamp = reader.uint64(); - break; - case 8: - message.futureproofed = reader.bool(); - break; - case 9: - message.currency = reader.string(); - break; - case 10: - message.txnStatus = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PaymentInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.PaymentInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.PaymentInfo} PaymentInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PaymentInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PaymentInfo message. - * @function verify - * @memberof proto.PaymentInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PaymentInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.currencyDeprecated != null && message.hasOwnProperty("currencyDeprecated")) - switch (message.currencyDeprecated) { - default: - return "currencyDeprecated: enum value expected"; - case 0: - case 1: - break; - } - if (message.amount1000 != null && message.hasOwnProperty("amount1000")) - if (!$util.isInteger(message.amount1000) && !(message.amount1000 && $util.isInteger(message.amount1000.low) && $util.isInteger(message.amount1000.high))) - return "amount1000: integer|Long expected"; - if (message.receiverJid != null && message.hasOwnProperty("receiverJid")) - if (!$util.isString(message.receiverJid)) - return "receiverJid: string expected"; - if (message.status != null && message.hasOwnProperty("status")) - switch (message.status) { - default: - return "status: 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: - break; - } - if (message.transactionTimestamp != null && message.hasOwnProperty("transactionTimestamp")) - if (!$util.isInteger(message.transactionTimestamp) && !(message.transactionTimestamp && $util.isInteger(message.transactionTimestamp.low) && $util.isInteger(message.transactionTimestamp.high))) - return "transactionTimestamp: integer|Long expected"; - if (message.requestMessageKey != null && message.hasOwnProperty("requestMessageKey")) { - var error = $root.proto.MessageKey.verify(message.requestMessageKey); - if (error) - return "requestMessageKey." + error; - } - if (message.expiryTimestamp != null && message.hasOwnProperty("expiryTimestamp")) - if (!$util.isInteger(message.expiryTimestamp) && !(message.expiryTimestamp && $util.isInteger(message.expiryTimestamp.low) && $util.isInteger(message.expiryTimestamp.high))) - return "expiryTimestamp: integer|Long expected"; - if (message.futureproofed != null && message.hasOwnProperty("futureproofed")) - if (typeof message.futureproofed !== "boolean") - return "futureproofed: boolean expected"; - if (message.currency != null && message.hasOwnProperty("currency")) - if (!$util.isString(message.currency)) - return "currency: string expected"; - if (message.txnStatus != null && message.hasOwnProperty("txnStatus")) - switch (message.txnStatus) { - default: - return "txnStatus: enum value expected"; + return "platform: enum value expected"; case 0: case 1: case 2: @@ -2770,483 +622,399 @@ $root.proto = (function() { case 23: case 24: case 25: - case 26: - case 27: break; } + if (message.appVersion != null && message.hasOwnProperty("appVersion")) { + var error = $root.proto.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"; return null; }; /** - * Creates a PaymentInfo message from a plain object. Also converts values to their respective internal types. + * Creates a UserAgent message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof proto.PaymentInfo + * @memberof proto.UserAgent * @static * @param {Object.} object Plain object - * @returns {proto.PaymentInfo} PaymentInfo + * @returns {proto.UserAgent} UserAgent */ - PaymentInfo.fromObject = function fromObject(object) { - if (object instanceof $root.proto.PaymentInfo) + UserAgent.fromObject = function fromObject(object) { + if (object instanceof $root.proto.UserAgent) return object; - var message = new $root.proto.PaymentInfo(); - switch (object.currencyDeprecated) { - case "UNKNOWN_CURRENCY": + var message = new $root.proto.UserAgent(); + switch (object.platform) { + case "ANDROID": case 0: - message.currencyDeprecated = 0; + message.platform = 0; break; - case "INR": + case "IOS": case 1: - message.currencyDeprecated = 1; + message.platform = 1; break; - } - if (object.amount1000 != null) - if ($util.Long) - (message.amount1000 = $util.Long.fromValue(object.amount1000)).unsigned = true; - else if (typeof object.amount1000 === "string") - message.amount1000 = parseInt(object.amount1000, 10); - else if (typeof object.amount1000 === "number") - message.amount1000 = object.amount1000; - else if (typeof object.amount1000 === "object") - message.amount1000 = new $util.LongBits(object.amount1000.low >>> 0, object.amount1000.high >>> 0).toNumber(true); - if (object.receiverJid != null) - message.receiverJid = String(object.receiverJid); - switch (object.status) { - case "UNKNOWN_STATUS": - case 0: - message.status = 0; - break; - case "PROCESSING": - case 1: - message.status = 1; - break; - case "SENT": + case "WINDOWS_PHONE": case 2: - message.status = 2; + message.platform = 2; break; - case "NEED_TO_ACCEPT": + case "BLACKBERRY": case 3: - message.status = 3; + message.platform = 3; break; - case "COMPLETE": + case "BLACKBERRYX": case 4: - message.status = 4; + message.platform = 4; break; - case "COULD_NOT_COMPLETE": + case "S40": case 5: - message.status = 5; + message.platform = 5; break; - case "REFUNDED": + case "S60": case 6: - message.status = 6; + message.platform = 6; break; - case "EXPIRED": + case "PYTHON_CLIENT": case 7: - message.status = 7; + message.platform = 7; break; - case "REJECTED": + case "TIZEN": case 8: - message.status = 8; + message.platform = 8; break; - case "CANCELLED": + case "ENTERPRISE": case 9: - message.status = 9; + message.platform = 9; break; - case "WAITING_FOR_PAYER": + case "SMB_ANDROID": case 10: - message.status = 10; + message.platform = 10; break; - case "WAITING": + case "KAIOS": case 11: - message.status = 11; + message.platform = 11; break; - } - if (object.transactionTimestamp != null) - if ($util.Long) - (message.transactionTimestamp = $util.Long.fromValue(object.transactionTimestamp)).unsigned = true; - else if (typeof object.transactionTimestamp === "string") - message.transactionTimestamp = parseInt(object.transactionTimestamp, 10); - else if (typeof object.transactionTimestamp === "number") - message.transactionTimestamp = object.transactionTimestamp; - else if (typeof object.transactionTimestamp === "object") - message.transactionTimestamp = new $util.LongBits(object.transactionTimestamp.low >>> 0, object.transactionTimestamp.high >>> 0).toNumber(true); - if (object.requestMessageKey != null) { - if (typeof object.requestMessageKey !== "object") - throw TypeError(".proto.PaymentInfo.requestMessageKey: object expected"); - message.requestMessageKey = $root.proto.MessageKey.fromObject(object.requestMessageKey); - } - if (object.expiryTimestamp != null) - if ($util.Long) - (message.expiryTimestamp = $util.Long.fromValue(object.expiryTimestamp)).unsigned = true; - else if (typeof object.expiryTimestamp === "string") - message.expiryTimestamp = parseInt(object.expiryTimestamp, 10); - else if (typeof object.expiryTimestamp === "number") - message.expiryTimestamp = object.expiryTimestamp; - else if (typeof object.expiryTimestamp === "object") - message.expiryTimestamp = new $util.LongBits(object.expiryTimestamp.low >>> 0, object.expiryTimestamp.high >>> 0).toNumber(true); - if (object.futureproofed != null) - message.futureproofed = Boolean(object.futureproofed); - if (object.currency != null) - message.currency = String(object.currency); - switch (object.txnStatus) { - case "UNKNOWN": - case 0: - message.txnStatus = 0; - break; - case "PENDING_SETUP": - case 1: - message.txnStatus = 1; - break; - case "PENDING_RECEIVER_SETUP": - case 2: - message.txnStatus = 2; - break; - case "INIT": - case 3: - message.txnStatus = 3; - break; - case "SUCCESS": - case 4: - message.txnStatus = 4; - break; - case "COMPLETED": - case 5: - message.txnStatus = 5; - break; - case "FAILED": - case 6: - message.txnStatus = 6; - break; - case "FAILED_RISK": - case 7: - message.txnStatus = 7; - break; - case "FAILED_PROCESSING": - case 8: - message.txnStatus = 8; - break; - case "FAILED_RECEIVER_PROCESSING": - case 9: - message.txnStatus = 9; - break; - case "FAILED_DA": - case 10: - message.txnStatus = 10; - break; - case "FAILED_DA_FINAL": - case 11: - message.txnStatus = 11; - break; - case "REFUNDED_TXN": + case "SMB_IOS": case 12: - message.txnStatus = 12; + message.platform = 12; break; - case "REFUND_FAILED": + case "WINDOWS": case 13: - message.txnStatus = 13; + message.platform = 13; break; - case "REFUND_FAILED_PROCESSING": + case "WEB": case 14: - message.txnStatus = 14; + message.platform = 14; break; - case "REFUND_FAILED_DA": + case "PORTAL": case 15: - message.txnStatus = 15; + message.platform = 15; break; - case "EXPIRED_TXN": + case "GREEN_ANDROID": case 16: - message.txnStatus = 16; + message.platform = 16; break; - case "AUTH_CANCELED": + case "GREEN_IPHONE": case 17: - message.txnStatus = 17; + message.platform = 17; break; - case "AUTH_CANCEL_FAILED_PROCESSING": + case "BLUE_ANDROID": case 18: - message.txnStatus = 18; + message.platform = 18; break; - case "AUTH_CANCEL_FAILED": + case "BLUE_IPHONE": case 19: - message.txnStatus = 19; + message.platform = 19; break; - case "COLLECT_INIT": + case "FBLITE_ANDROID": case 20: - message.txnStatus = 20; + message.platform = 20; break; - case "COLLECT_SUCCESS": + case "MLITE_ANDROID": case 21: - message.txnStatus = 21; + message.platform = 21; break; - case "COLLECT_FAILED": + case "IGLITE_ANDROID": case 22: - message.txnStatus = 22; + message.platform = 22; break; - case "COLLECT_FAILED_RISK": + case "PAGE": case 23: - message.txnStatus = 23; + message.platform = 23; break; - case "COLLECT_REJECTED": + case "MACOS": case 24: - message.txnStatus = 24; + message.platform = 24; break; - case "COLLECT_EXPIRED": + case "VR": case 25: - message.txnStatus = 25; - break; - case "COLLECT_CANCELED": - case 26: - message.txnStatus = 26; - break; - case "COLLECT_CANCELLING": - case 27: - message.txnStatus = 27; + message.platform = 25; break; } + if (object.appVersion != null) { + if (typeof object.appVersion !== "object") + throw TypeError(".proto.UserAgent.appVersion: object expected"); + message.appVersion = $root.proto.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); return message; }; /** - * Creates a plain object from a PaymentInfo message. Also converts values to other types if specified. + * Creates a plain object from a UserAgent message. Also converts values to other types if specified. * @function toObject - * @memberof proto.PaymentInfo + * @memberof proto.UserAgent * @static - * @param {proto.PaymentInfo} message PaymentInfo + * @param {proto.UserAgent} message UserAgent * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PaymentInfo.toObject = function toObject(message, options) { + UserAgent.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.currencyDeprecated = options.enums === String ? "UNKNOWN_CURRENCY" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.amount1000 = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.amount1000 = options.longs === String ? "0" : 0; - object.receiverJid = ""; - object.status = options.enums === String ? "UNKNOWN_STATUS" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.transactionTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.transactionTimestamp = options.longs === String ? "0" : 0; - object.requestMessageKey = null; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.expiryTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.expiryTimestamp = options.longs === String ? "0" : 0; - object.futureproofed = false; - object.currency = ""; - object.txnStatus = options.enums === String ? "UNKNOWN" : 0; + 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 = ""; } - if (message.currencyDeprecated != null && message.hasOwnProperty("currencyDeprecated")) - object.currencyDeprecated = options.enums === String ? $root.proto.PaymentInfo.PaymentInfoCurrency[message.currencyDeprecated] : message.currencyDeprecated; - if (message.amount1000 != null && message.hasOwnProperty("amount1000")) - if (typeof message.amount1000 === "number") - object.amount1000 = options.longs === String ? String(message.amount1000) : message.amount1000; - else - object.amount1000 = options.longs === String ? $util.Long.prototype.toString.call(message.amount1000) : options.longs === Number ? new $util.LongBits(message.amount1000.low >>> 0, message.amount1000.high >>> 0).toNumber(true) : message.amount1000; - if (message.receiverJid != null && message.hasOwnProperty("receiverJid")) - object.receiverJid = message.receiverJid; - if (message.status != null && message.hasOwnProperty("status")) - object.status = options.enums === String ? $root.proto.PaymentInfo.PaymentInfoStatus[message.status] : message.status; - if (message.transactionTimestamp != null && message.hasOwnProperty("transactionTimestamp")) - if (typeof message.transactionTimestamp === "number") - object.transactionTimestamp = options.longs === String ? String(message.transactionTimestamp) : message.transactionTimestamp; - else - object.transactionTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.transactionTimestamp) : options.longs === Number ? new $util.LongBits(message.transactionTimestamp.low >>> 0, message.transactionTimestamp.high >>> 0).toNumber(true) : message.transactionTimestamp; - if (message.requestMessageKey != null && message.hasOwnProperty("requestMessageKey")) - object.requestMessageKey = $root.proto.MessageKey.toObject(message.requestMessageKey, options); - if (message.expiryTimestamp != null && message.hasOwnProperty("expiryTimestamp")) - if (typeof message.expiryTimestamp === "number") - object.expiryTimestamp = options.longs === String ? String(message.expiryTimestamp) : message.expiryTimestamp; - else - object.expiryTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.expiryTimestamp) : options.longs === Number ? new $util.LongBits(message.expiryTimestamp.low >>> 0, message.expiryTimestamp.high >>> 0).toNumber(true) : message.expiryTimestamp; - if (message.futureproofed != null && message.hasOwnProperty("futureproofed")) - object.futureproofed = message.futureproofed; - if (message.currency != null && message.hasOwnProperty("currency")) - object.currency = message.currency; - if (message.txnStatus != null && message.hasOwnProperty("txnStatus")) - object.txnStatus = options.enums === String ? $root.proto.PaymentInfo.PaymentInfoTxnStatus[message.txnStatus] : message.txnStatus; + if (message.platform != null && message.hasOwnProperty("platform")) + object.platform = options.enums === String ? $root.proto.UserAgent.UserAgentPlatform[message.platform] : message.platform; + if (message.appVersion != null && message.hasOwnProperty("appVersion")) + object.appVersion = $root.proto.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.UserAgent.UserAgentReleaseChannel[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; return object; }; /** - * Converts this PaymentInfo to JSON. + * Converts this UserAgent to JSON. * @function toJSON - * @memberof proto.PaymentInfo + * @memberof proto.UserAgent * @instance * @returns {Object.} JSON object */ - PaymentInfo.prototype.toJSON = function toJSON() { + UserAgent.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * PaymentInfoCurrency enum. - * @name proto.PaymentInfo.PaymentInfoCurrency + * UserAgentPlatform enum. + * @name proto.UserAgent.UserAgentPlatform * @enum {number} - * @property {number} UNKNOWN_CURRENCY=0 UNKNOWN_CURRENCY value - * @property {number} INR=1 INR value + * @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} VR=25 VR value */ - PaymentInfo.PaymentInfoCurrency = (function() { + UserAgent.UserAgentPlatform = (function() { var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UNKNOWN_CURRENCY"] = 0; - values[valuesById[1] = "INR"] = 1; + 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] = "VR"] = 25; return values; })(); /** - * PaymentInfoStatus enum. - * @name proto.PaymentInfo.PaymentInfoStatus + * UserAgentReleaseChannel enum. + * @name proto.UserAgent.UserAgentReleaseChannel * @enum {number} - * @property {number} UNKNOWN_STATUS=0 UNKNOWN_STATUS value - * @property {number} PROCESSING=1 PROCESSING value - * @property {number} SENT=2 SENT value - * @property {number} NEED_TO_ACCEPT=3 NEED_TO_ACCEPT value - * @property {number} COMPLETE=4 COMPLETE value - * @property {number} COULD_NOT_COMPLETE=5 COULD_NOT_COMPLETE value - * @property {number} REFUNDED=6 REFUNDED value - * @property {number} EXPIRED=7 EXPIRED value - * @property {number} REJECTED=8 REJECTED value - * @property {number} CANCELLED=9 CANCELLED value - * @property {number} WAITING_FOR_PAYER=10 WAITING_FOR_PAYER value - * @property {number} WAITING=11 WAITING value + * @property {number} RELEASE=0 RELEASE value + * @property {number} BETA=1 BETA value + * @property {number} ALPHA=2 ALPHA value + * @property {number} DEBUG=3 DEBUG value */ - PaymentInfo.PaymentInfoStatus = (function() { + UserAgent.UserAgentReleaseChannel = (function() { var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UNKNOWN_STATUS"] = 0; - values[valuesById[1] = "PROCESSING"] = 1; - values[valuesById[2] = "SENT"] = 2; - values[valuesById[3] = "NEED_TO_ACCEPT"] = 3; - values[valuesById[4] = "COMPLETE"] = 4; - values[valuesById[5] = "COULD_NOT_COMPLETE"] = 5; - values[valuesById[6] = "REFUNDED"] = 6; - values[valuesById[7] = "EXPIRED"] = 7; - values[valuesById[8] = "REJECTED"] = 8; - values[valuesById[9] = "CANCELLED"] = 9; - values[valuesById[10] = "WAITING_FOR_PAYER"] = 10; - values[valuesById[11] = "WAITING"] = 11; + values[valuesById[0] = "RELEASE"] = 0; + values[valuesById[1] = "BETA"] = 1; + values[valuesById[2] = "ALPHA"] = 2; + values[valuesById[3] = "DEBUG"] = 3; return values; })(); - /** - * PaymentInfoTxnStatus enum. - * @name proto.PaymentInfo.PaymentInfoTxnStatus - * @enum {number} - * @property {number} UNKNOWN=0 UNKNOWN value - * @property {number} PENDING_SETUP=1 PENDING_SETUP value - * @property {number} PENDING_RECEIVER_SETUP=2 PENDING_RECEIVER_SETUP value - * @property {number} INIT=3 INIT value - * @property {number} SUCCESS=4 SUCCESS value - * @property {number} COMPLETED=5 COMPLETED value - * @property {number} FAILED=6 FAILED value - * @property {number} FAILED_RISK=7 FAILED_RISK value - * @property {number} FAILED_PROCESSING=8 FAILED_PROCESSING value - * @property {number} FAILED_RECEIVER_PROCESSING=9 FAILED_RECEIVER_PROCESSING value - * @property {number} FAILED_DA=10 FAILED_DA value - * @property {number} FAILED_DA_FINAL=11 FAILED_DA_FINAL value - * @property {number} REFUNDED_TXN=12 REFUNDED_TXN value - * @property {number} REFUND_FAILED=13 REFUND_FAILED value - * @property {number} REFUND_FAILED_PROCESSING=14 REFUND_FAILED_PROCESSING value - * @property {number} REFUND_FAILED_DA=15 REFUND_FAILED_DA value - * @property {number} EXPIRED_TXN=16 EXPIRED_TXN value - * @property {number} AUTH_CANCELED=17 AUTH_CANCELED value - * @property {number} AUTH_CANCEL_FAILED_PROCESSING=18 AUTH_CANCEL_FAILED_PROCESSING value - * @property {number} AUTH_CANCEL_FAILED=19 AUTH_CANCEL_FAILED value - * @property {number} COLLECT_INIT=20 COLLECT_INIT value - * @property {number} COLLECT_SUCCESS=21 COLLECT_SUCCESS value - * @property {number} COLLECT_FAILED=22 COLLECT_FAILED value - * @property {number} COLLECT_FAILED_RISK=23 COLLECT_FAILED_RISK value - * @property {number} COLLECT_REJECTED=24 COLLECT_REJECTED value - * @property {number} COLLECT_EXPIRED=25 COLLECT_EXPIRED value - * @property {number} COLLECT_CANCELED=26 COLLECT_CANCELED value - * @property {number} COLLECT_CANCELLING=27 COLLECT_CANCELLING value - */ - PaymentInfo.PaymentInfoTxnStatus = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UNKNOWN"] = 0; - values[valuesById[1] = "PENDING_SETUP"] = 1; - values[valuesById[2] = "PENDING_RECEIVER_SETUP"] = 2; - values[valuesById[3] = "INIT"] = 3; - values[valuesById[4] = "SUCCESS"] = 4; - values[valuesById[5] = "COMPLETED"] = 5; - values[valuesById[6] = "FAILED"] = 6; - values[valuesById[7] = "FAILED_RISK"] = 7; - values[valuesById[8] = "FAILED_PROCESSING"] = 8; - values[valuesById[9] = "FAILED_RECEIVER_PROCESSING"] = 9; - values[valuesById[10] = "FAILED_DA"] = 10; - values[valuesById[11] = "FAILED_DA_FINAL"] = 11; - values[valuesById[12] = "REFUNDED_TXN"] = 12; - values[valuesById[13] = "REFUND_FAILED"] = 13; - values[valuesById[14] = "REFUND_FAILED_PROCESSING"] = 14; - values[valuesById[15] = "REFUND_FAILED_DA"] = 15; - values[valuesById[16] = "EXPIRED_TXN"] = 16; - values[valuesById[17] = "AUTH_CANCELED"] = 17; - values[valuesById[18] = "AUTH_CANCEL_FAILED_PROCESSING"] = 18; - values[valuesById[19] = "AUTH_CANCEL_FAILED"] = 19; - values[valuesById[20] = "COLLECT_INIT"] = 20; - values[valuesById[21] = "COLLECT_SUCCESS"] = 21; - values[valuesById[22] = "COLLECT_FAILED"] = 22; - values[valuesById[23] = "COLLECT_FAILED_RISK"] = 23; - values[valuesById[24] = "COLLECT_REJECTED"] = 24; - values[valuesById[25] = "COLLECT_EXPIRED"] = 25; - values[valuesById[26] = "COLLECT_CANCELED"] = 26; - values[valuesById[27] = "COLLECT_CANCELLING"] = 27; - return values; - })(); - - return PaymentInfo; + return UserAgent; })(); - proto.WebMessageInfo = (function() { + proto.WebdPayload = (function() { /** - * Properties of a WebMessageInfo. + * Properties of a WebdPayload. * @memberof proto - * @interface IWebMessageInfo - * @property {proto.IMessageKey} key WebMessageInfo key - * @property {proto.IMessage|null} [message] WebMessageInfo message - * @property {number|Long|null} [messageTimestamp] WebMessageInfo messageTimestamp - * @property {proto.WebMessageInfo.WebMessageInfoStatus|null} [status] WebMessageInfo status - * @property {string|null} [participant] WebMessageInfo participant - * @property {boolean|null} [ignore] WebMessageInfo ignore - * @property {boolean|null} [starred] WebMessageInfo starred - * @property {boolean|null} [broadcast] WebMessageInfo broadcast - * @property {string|null} [pushName] WebMessageInfo pushName - * @property {Uint8Array|null} [mediaCiphertextSha256] WebMessageInfo mediaCiphertextSha256 - * @property {boolean|null} [multicast] WebMessageInfo multicast - * @property {boolean|null} [urlText] WebMessageInfo urlText - * @property {boolean|null} [urlNumber] WebMessageInfo urlNumber - * @property {proto.WebMessageInfo.WebMessageInfoStubType|null} [messageStubType] WebMessageInfo messageStubType - * @property {boolean|null} [clearMedia] WebMessageInfo clearMedia - * @property {Array.|null} [messageStubParameters] WebMessageInfo messageStubParameters - * @property {number|null} [duration] WebMessageInfo duration - * @property {Array.|null} [labels] WebMessageInfo labels - * @property {proto.IPaymentInfo|null} [paymentInfo] WebMessageInfo paymentInfo - * @property {proto.ILiveLocationMessage|null} [finalLiveLocation] WebMessageInfo finalLiveLocation - * @property {proto.IPaymentInfo|null} [quotedPaymentInfo] WebMessageInfo quotedPaymentInfo - * @property {number|Long|null} [ephemeralStartTimestamp] WebMessageInfo ephemeralStartTimestamp - * @property {number|null} [ephemeralDuration] WebMessageInfo ephemeralDuration - * @property {boolean|null} [ephemeralOffToOn] WebMessageInfo ephemeralOffToOn - * @property {boolean|null} [ephemeralOutOfSync] WebMessageInfo ephemeralOutOfSync - * @property {proto.WebMessageInfo.WebMessageInfoBizPrivacyStatus|null} [bizPrivacyStatus] WebMessageInfo bizPrivacyStatus - * @property {string|null} [verifiedBizName] WebMessageInfo verifiedBizName + * @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 WebMessageInfo. + * Constructs a new WebdPayload. * @memberof proto - * @classdesc Represents a WebMessageInfo. - * @implements IWebMessageInfo + * @classdesc Represents a WebdPayload. + * @implements IWebdPayload * @constructor - * @param {proto.IWebMessageInfo=} [properties] Properties to set + * @param {proto.IWebdPayload=} [properties] Properties to set */ - function WebMessageInfo(properties) { - this.messageStubParameters = []; - this.labels = []; + function WebdPayload(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3254,612 +1022,1846 @@ $root.proto = (function() { } /** - * WebMessageInfo key. - * @member {proto.IMessageKey} key - * @memberof proto.WebMessageInfo + * WebdPayload usesParticipantInKey. + * @member {boolean} usesParticipantInKey + * @memberof proto.WebdPayload * @instance */ - WebMessageInfo.prototype.key = null; + WebdPayload.prototype.usesParticipantInKey = false; /** - * WebMessageInfo message. - * @member {proto.IMessage|null|undefined} message - * @memberof proto.WebMessageInfo + * WebdPayload supportsStarredMessages. + * @member {boolean} supportsStarredMessages + * @memberof proto.WebdPayload * @instance */ - WebMessageInfo.prototype.message = null; + WebdPayload.prototype.supportsStarredMessages = false; /** - * WebMessageInfo messageTimestamp. - * @member {number|Long} messageTimestamp - * @memberof proto.WebMessageInfo + * WebdPayload supportsDocumentMessages. + * @member {boolean} supportsDocumentMessages + * @memberof proto.WebdPayload * @instance */ - WebMessageInfo.prototype.messageTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + WebdPayload.prototype.supportsDocumentMessages = false; /** - * WebMessageInfo status. - * @member {proto.WebMessageInfo.WebMessageInfoStatus} status - * @memberof proto.WebMessageInfo + * WebdPayload supportsUrlMessages. + * @member {boolean} supportsUrlMessages + * @memberof proto.WebdPayload * @instance */ - WebMessageInfo.prototype.status = 0; + WebdPayload.prototype.supportsUrlMessages = false; /** - * WebMessageInfo participant. - * @member {string} participant - * @memberof proto.WebMessageInfo + * WebdPayload supportsMediaRetry. + * @member {boolean} supportsMediaRetry + * @memberof proto.WebdPayload * @instance */ - WebMessageInfo.prototype.participant = ""; + WebdPayload.prototype.supportsMediaRetry = false; /** - * WebMessageInfo ignore. - * @member {boolean} ignore - * @memberof proto.WebMessageInfo + * WebdPayload supportsE2EImage. + * @member {boolean} supportsE2EImage + * @memberof proto.WebdPayload * @instance */ - WebMessageInfo.prototype.ignore = false; + WebdPayload.prototype.supportsE2EImage = false; /** - * WebMessageInfo starred. - * @member {boolean} starred - * @memberof proto.WebMessageInfo + * WebdPayload supportsE2EVideo. + * @member {boolean} supportsE2EVideo + * @memberof proto.WebdPayload * @instance */ - WebMessageInfo.prototype.starred = false; + WebdPayload.prototype.supportsE2EVideo = false; /** - * WebMessageInfo broadcast. - * @member {boolean} broadcast - * @memberof proto.WebMessageInfo + * WebdPayload supportsE2EAudio. + * @member {boolean} supportsE2EAudio + * @memberof proto.WebdPayload * @instance */ - WebMessageInfo.prototype.broadcast = false; + WebdPayload.prototype.supportsE2EAudio = false; /** - * WebMessageInfo pushName. - * @member {string} pushName - * @memberof proto.WebMessageInfo + * WebdPayload supportsE2EDocument. + * @member {boolean} supportsE2EDocument + * @memberof proto.WebdPayload * @instance */ - WebMessageInfo.prototype.pushName = ""; + WebdPayload.prototype.supportsE2EDocument = false; /** - * WebMessageInfo mediaCiphertextSha256. - * @member {Uint8Array} mediaCiphertextSha256 - * @memberof proto.WebMessageInfo + * WebdPayload documentTypes. + * @member {string} documentTypes + * @memberof proto.WebdPayload * @instance */ - WebMessageInfo.prototype.mediaCiphertextSha256 = $util.newBuffer([]); + WebdPayload.prototype.documentTypes = ""; /** - * WebMessageInfo multicast. - * @member {boolean} multicast - * @memberof proto.WebMessageInfo + * WebdPayload features. + * @member {Uint8Array} features + * @memberof proto.WebdPayload * @instance */ - WebMessageInfo.prototype.multicast = false; + WebdPayload.prototype.features = $util.newBuffer([]); /** - * WebMessageInfo urlText. - * @member {boolean} urlText - * @memberof proto.WebMessageInfo - * @instance - */ - WebMessageInfo.prototype.urlText = false; - - /** - * WebMessageInfo urlNumber. - * @member {boolean} urlNumber - * @memberof proto.WebMessageInfo - * @instance - */ - WebMessageInfo.prototype.urlNumber = false; - - /** - * WebMessageInfo messageStubType. - * @member {proto.WebMessageInfo.WebMessageInfoStubType} messageStubType - * @memberof proto.WebMessageInfo - * @instance - */ - WebMessageInfo.prototype.messageStubType = 0; - - /** - * WebMessageInfo clearMedia. - * @member {boolean} clearMedia - * @memberof proto.WebMessageInfo - * @instance - */ - WebMessageInfo.prototype.clearMedia = false; - - /** - * WebMessageInfo messageStubParameters. - * @member {Array.} messageStubParameters - * @memberof proto.WebMessageInfo - * @instance - */ - WebMessageInfo.prototype.messageStubParameters = $util.emptyArray; - - /** - * WebMessageInfo duration. - * @member {number} duration - * @memberof proto.WebMessageInfo - * @instance - */ - WebMessageInfo.prototype.duration = 0; - - /** - * WebMessageInfo labels. - * @member {Array.} labels - * @memberof proto.WebMessageInfo - * @instance - */ - WebMessageInfo.prototype.labels = $util.emptyArray; - - /** - * WebMessageInfo paymentInfo. - * @member {proto.IPaymentInfo|null|undefined} paymentInfo - * @memberof proto.WebMessageInfo - * @instance - */ - WebMessageInfo.prototype.paymentInfo = null; - - /** - * WebMessageInfo finalLiveLocation. - * @member {proto.ILiveLocationMessage|null|undefined} finalLiveLocation - * @memberof proto.WebMessageInfo - * @instance - */ - WebMessageInfo.prototype.finalLiveLocation = null; - - /** - * WebMessageInfo quotedPaymentInfo. - * @member {proto.IPaymentInfo|null|undefined} quotedPaymentInfo - * @memberof proto.WebMessageInfo - * @instance - */ - WebMessageInfo.prototype.quotedPaymentInfo = null; - - /** - * WebMessageInfo ephemeralStartTimestamp. - * @member {number|Long} ephemeralStartTimestamp - * @memberof proto.WebMessageInfo - * @instance - */ - WebMessageInfo.prototype.ephemeralStartTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * WebMessageInfo ephemeralDuration. - * @member {number} ephemeralDuration - * @memberof proto.WebMessageInfo - * @instance - */ - WebMessageInfo.prototype.ephemeralDuration = 0; - - /** - * WebMessageInfo ephemeralOffToOn. - * @member {boolean} ephemeralOffToOn - * @memberof proto.WebMessageInfo - * @instance - */ - WebMessageInfo.prototype.ephemeralOffToOn = false; - - /** - * WebMessageInfo ephemeralOutOfSync. - * @member {boolean} ephemeralOutOfSync - * @memberof proto.WebMessageInfo - * @instance - */ - WebMessageInfo.prototype.ephemeralOutOfSync = false; - - /** - * WebMessageInfo bizPrivacyStatus. - * @member {proto.WebMessageInfo.WebMessageInfoBizPrivacyStatus} bizPrivacyStatus - * @memberof proto.WebMessageInfo - * @instance - */ - WebMessageInfo.prototype.bizPrivacyStatus = 0; - - /** - * WebMessageInfo verifiedBizName. - * @member {string} verifiedBizName - * @memberof proto.WebMessageInfo - * @instance - */ - WebMessageInfo.prototype.verifiedBizName = ""; - - /** - * Creates a new WebMessageInfo instance using the specified properties. + * Creates a new WebdPayload instance using the specified properties. * @function create - * @memberof proto.WebMessageInfo + * @memberof proto.WebdPayload * @static - * @param {proto.IWebMessageInfo=} [properties] Properties to set - * @returns {proto.WebMessageInfo} WebMessageInfo instance + * @param {proto.IWebdPayload=} [properties] Properties to set + * @returns {proto.WebdPayload} WebdPayload instance */ - WebMessageInfo.create = function create(properties) { - return new WebMessageInfo(properties); + WebdPayload.create = function create(properties) { + return new WebdPayload(properties); }; /** - * Encodes the specified WebMessageInfo message. Does not implicitly {@link proto.WebMessageInfo.verify|verify} messages. + * Encodes the specified WebdPayload message. Does not implicitly {@link proto.WebdPayload.verify|verify} messages. * @function encode - * @memberof proto.WebMessageInfo + * @memberof proto.WebdPayload * @static - * @param {proto.IWebMessageInfo} message WebMessageInfo message or plain object to encode + * @param {proto.IWebdPayload} message WebdPayload message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WebMessageInfo.encode = function encode(message, writer) { + WebdPayload.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - $root.proto.MessageKey.encode(message.key, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - 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.messageTimestamp != null && Object.hasOwnProperty.call(message, "messageTimestamp")) - writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.messageTimestamp); - if (message.status != null && Object.hasOwnProperty.call(message, "status")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.status); - if (message.participant != null && Object.hasOwnProperty.call(message, "participant")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.participant); - if (message.ignore != null && Object.hasOwnProperty.call(message, "ignore")) - writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ignore); - if (message.starred != null && Object.hasOwnProperty.call(message, "starred")) - writer.uint32(/* id 17, wireType 0 =*/136).bool(message.starred); - if (message.broadcast != null && Object.hasOwnProperty.call(message, "broadcast")) - writer.uint32(/* id 18, wireType 0 =*/144).bool(message.broadcast); - if (message.pushName != null && Object.hasOwnProperty.call(message, "pushName")) - writer.uint32(/* id 19, wireType 2 =*/154).string(message.pushName); - if (message.mediaCiphertextSha256 != null && Object.hasOwnProperty.call(message, "mediaCiphertextSha256")) - writer.uint32(/* id 20, wireType 2 =*/162).bytes(message.mediaCiphertextSha256); - if (message.multicast != null && Object.hasOwnProperty.call(message, "multicast")) - writer.uint32(/* id 21, wireType 0 =*/168).bool(message.multicast); - if (message.urlText != null && Object.hasOwnProperty.call(message, "urlText")) - writer.uint32(/* id 22, wireType 0 =*/176).bool(message.urlText); - if (message.urlNumber != null && Object.hasOwnProperty.call(message, "urlNumber")) - writer.uint32(/* id 23, wireType 0 =*/184).bool(message.urlNumber); - if (message.messageStubType != null && Object.hasOwnProperty.call(message, "messageStubType")) - writer.uint32(/* id 24, wireType 0 =*/192).int32(message.messageStubType); - if (message.clearMedia != null && Object.hasOwnProperty.call(message, "clearMedia")) - writer.uint32(/* id 25, wireType 0 =*/200).bool(message.clearMedia); - if (message.messageStubParameters != null && message.messageStubParameters.length) - for (var i = 0; i < message.messageStubParameters.length; ++i) - writer.uint32(/* id 26, wireType 2 =*/210).string(message.messageStubParameters[i]); - if (message.duration != null && Object.hasOwnProperty.call(message, "duration")) - writer.uint32(/* id 27, wireType 0 =*/216).uint32(message.duration); - if (message.labels != null && message.labels.length) - for (var i = 0; i < message.labels.length; ++i) - writer.uint32(/* id 28, wireType 2 =*/226).string(message.labels[i]); - if (message.paymentInfo != null && Object.hasOwnProperty.call(message, "paymentInfo")) - $root.proto.PaymentInfo.encode(message.paymentInfo, writer.uint32(/* id 29, wireType 2 =*/234).fork()).ldelim(); - if (message.finalLiveLocation != null && Object.hasOwnProperty.call(message, "finalLiveLocation")) - $root.proto.LiveLocationMessage.encode(message.finalLiveLocation, writer.uint32(/* id 30, wireType 2 =*/242).fork()).ldelim(); - if (message.quotedPaymentInfo != null && Object.hasOwnProperty.call(message, "quotedPaymentInfo")) - $root.proto.PaymentInfo.encode(message.quotedPaymentInfo, writer.uint32(/* id 31, wireType 2 =*/250).fork()).ldelim(); - if (message.ephemeralStartTimestamp != null && Object.hasOwnProperty.call(message, "ephemeralStartTimestamp")) - writer.uint32(/* id 32, wireType 0 =*/256).uint64(message.ephemeralStartTimestamp); - if (message.ephemeralDuration != null && Object.hasOwnProperty.call(message, "ephemeralDuration")) - writer.uint32(/* id 33, wireType 0 =*/264).uint32(message.ephemeralDuration); - if (message.ephemeralOffToOn != null && Object.hasOwnProperty.call(message, "ephemeralOffToOn")) - writer.uint32(/* id 34, wireType 0 =*/272).bool(message.ephemeralOffToOn); - if (message.ephemeralOutOfSync != null && Object.hasOwnProperty.call(message, "ephemeralOutOfSync")) - writer.uint32(/* id 35, wireType 0 =*/280).bool(message.ephemeralOutOfSync); - if (message.bizPrivacyStatus != null && Object.hasOwnProperty.call(message, "bizPrivacyStatus")) - writer.uint32(/* id 36, wireType 0 =*/288).int32(message.bizPrivacyStatus); - if (message.verifiedBizName != null && Object.hasOwnProperty.call(message, "verifiedBizName")) - writer.uint32(/* id 37, wireType 2 =*/298).string(message.verifiedBizName); + 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 WebMessageInfo message, length delimited. Does not implicitly {@link proto.WebMessageInfo.verify|verify} messages. + * Encodes the specified WebdPayload message, length delimited. Does not implicitly {@link proto.WebdPayload.verify|verify} messages. * @function encodeDelimited - * @memberof proto.WebMessageInfo + * @memberof proto.WebdPayload * @static - * @param {proto.IWebMessageInfo} message WebMessageInfo message or plain object to encode + * @param {proto.IWebdPayload} message WebdPayload message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WebMessageInfo.encodeDelimited = function encodeDelimited(message, writer) { + WebdPayload.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a WebMessageInfo message from the specified reader or buffer. + * Decodes a WebdPayload message from the specified reader or buffer. * @function decode - * @memberof proto.WebMessageInfo + * @memberof proto.WebdPayload * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {proto.WebMessageInfo} WebMessageInfo + * @returns {proto.WebdPayload} WebdPayload * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - WebMessageInfo.decode = function decode(reader, length) { + 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.WebMessageInfo(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.WebdPayload(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.key = $root.proto.MessageKey.decode(reader, reader.uint32()); + message.usesParticipantInKey = reader.bool(); break; case 2: - message.message = $root.proto.Message.decode(reader, reader.uint32()); + message.supportsStarredMessages = reader.bool(); break; case 3: - message.messageTimestamp = reader.uint64(); + message.supportsDocumentMessages = reader.bool(); break; case 4: - message.status = reader.int32(); + message.supportsUrlMessages = reader.bool(); break; case 5: - message.participant = reader.string(); + 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.WebdPayload + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.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.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.WebdPayload + * @static + * @param {Object.} object Plain object + * @returns {proto.WebdPayload} WebdPayload + */ + WebdPayload.fromObject = function fromObject(object) { + if (object instanceof $root.proto.WebdPayload) + return object; + var message = new $root.proto.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.WebdPayload + * @static + * @param {proto.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.WebdPayload + * @instance + * @returns {Object.} JSON object + */ + WebdPayload.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return WebdPayload; + })(); + + proto.WebInfo = (function() { + + /** + * Properties of a WebInfo. + * @memberof proto + * @interface IWebInfo + * @property {string|null} [refToken] WebInfo refToken + * @property {string|null} [version] WebInfo version + * @property {proto.IWebdPayload|null} [webdPayload] WebInfo webdPayload + * @property {proto.WebInfo.WebInfoWebSubPlatform|null} [webSubPlatform] WebInfo webSubPlatform + */ + + /** + * Constructs a new WebInfo. + * @memberof proto + * @classdesc Represents a WebInfo. + * @implements IWebInfo + * @constructor + * @param {proto.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.WebInfo + * @instance + */ + WebInfo.prototype.refToken = ""; + + /** + * WebInfo version. + * @member {string} version + * @memberof proto.WebInfo + * @instance + */ + WebInfo.prototype.version = ""; + + /** + * WebInfo webdPayload. + * @member {proto.IWebdPayload|null|undefined} webdPayload + * @memberof proto.WebInfo + * @instance + */ + WebInfo.prototype.webdPayload = null; + + /** + * WebInfo webSubPlatform. + * @member {proto.WebInfo.WebInfoWebSubPlatform} webSubPlatform + * @memberof proto.WebInfo + * @instance + */ + WebInfo.prototype.webSubPlatform = 0; + + /** + * Creates a new WebInfo instance using the specified properties. + * @function create + * @memberof proto.WebInfo + * @static + * @param {proto.IWebInfo=} [properties] Properties to set + * @returns {proto.WebInfo} WebInfo instance + */ + WebInfo.create = function create(properties) { + return new WebInfo(properties); + }; + + /** + * Encodes the specified WebInfo message. Does not implicitly {@link proto.WebInfo.verify|verify} messages. + * @function encode + * @memberof proto.WebInfo + * @static + * @param {proto.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.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.WebInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.WebInfo + * @static + * @param {proto.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.WebInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.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.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.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.WebInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.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.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.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.WebInfo + * @static + * @param {Object.} object Plain object + * @returns {proto.WebInfo} WebInfo + */ + WebInfo.fromObject = function fromObject(object) { + if (object instanceof $root.proto.WebInfo) + return object; + var message = new $root.proto.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.WebInfo.webdPayload: object expected"); + message.webdPayload = $root.proto.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.WebInfo + * @static + * @param {proto.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.WebdPayload.toObject(message.webdPayload, options); + if (message.webSubPlatform != null && message.hasOwnProperty("webSubPlatform")) + object.webSubPlatform = options.enums === String ? $root.proto.WebInfo.WebInfoWebSubPlatform[message.webSubPlatform] : message.webSubPlatform; + return object; + }; + + /** + * Converts this WebInfo to JSON. + * @function toJSON + * @memberof proto.WebInfo + * @instance + * @returns {Object.} JSON object + */ + WebInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * WebInfoWebSubPlatform enum. + * @name proto.WebInfo.WebInfoWebSubPlatform + * @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.WebInfoWebSubPlatform = (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; + })(); + + return WebInfo; + })(); + + proto.DNSSource = (function() { + + /** + * Properties of a DNSSource. + * @memberof proto + * @interface IDNSSource + * @property {proto.DNSSource.DNSSourceDNSResolutionMethod|null} [dnsMethod] DNSSource dnsMethod + * @property {boolean|null} [appCached] DNSSource appCached + */ + + /** + * Constructs a new DNSSource. + * @memberof proto + * @classdesc Represents a DNSSource. + * @implements IDNSSource + * @constructor + * @param {proto.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.DNSSource.DNSSourceDNSResolutionMethod} dnsMethod + * @memberof proto.DNSSource + * @instance + */ + DNSSource.prototype.dnsMethod = 0; + + /** + * DNSSource appCached. + * @member {boolean} appCached + * @memberof proto.DNSSource + * @instance + */ + DNSSource.prototype.appCached = false; + + /** + * Creates a new DNSSource instance using the specified properties. + * @function create + * @memberof proto.DNSSource + * @static + * @param {proto.IDNSSource=} [properties] Properties to set + * @returns {proto.DNSSource} DNSSource instance + */ + DNSSource.create = function create(properties) { + return new DNSSource(properties); + }; + + /** + * Encodes the specified DNSSource message. Does not implicitly {@link proto.DNSSource.verify|verify} messages. + * @function encode + * @memberof proto.DNSSource + * @static + * @param {proto.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.DNSSource.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.DNSSource + * @static + * @param {proto.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.DNSSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.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.DNSSource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 15: + message.dnsMethod = reader.int32(); break; case 16: - message.ignore = reader.bool(); + message.appCached = reader.bool(); break; - case 17: - message.starred = reader.bool(); + default: + reader.skipType(tag & 7); break; - case 18: - message.broadcast = reader.bool(); + } + } + return message; + }; + + /** + * Decodes a DNSSource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.DNSSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.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.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; - case 19: + } + 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.DNSSource + * @static + * @param {Object.} object Plain object + * @returns {proto.DNSSource} DNSSource + */ + DNSSource.fromObject = function fromObject(object) { + if (object instanceof $root.proto.DNSSource) + return object; + var message = new $root.proto.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.DNSSource + * @static + * @param {proto.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.DNSSource.DNSSourceDNSResolutionMethod[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.DNSSource + * @instance + * @returns {Object.} JSON object + */ + DNSSource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * DNSSourceDNSResolutionMethod enum. + * @name proto.DNSSource.DNSSourceDNSResolutionMethod + * @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.DNSSourceDNSResolutionMethod = (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; + })(); + + proto.CompanionRegData = (function() { + + /** + * Properties of a CompanionRegData. + * @memberof proto + * @interface ICompanionRegData + * @property {Uint8Array|null} [eRegid] CompanionRegData eRegid + * @property {Uint8Array|null} [eKeytype] CompanionRegData eKeytype + * @property {Uint8Array|null} [eIdent] CompanionRegData eIdent + * @property {Uint8Array|null} [eSkeyId] CompanionRegData eSkeyId + * @property {Uint8Array|null} [eSkeyVal] CompanionRegData eSkeyVal + * @property {Uint8Array|null} [eSkeySig] CompanionRegData eSkeySig + * @property {Uint8Array|null} [buildHash] CompanionRegData buildHash + * @property {Uint8Array|null} [companionProps] CompanionRegData companionProps + */ + + /** + * Constructs a new CompanionRegData. + * @memberof proto + * @classdesc Represents a CompanionRegData. + * @implements ICompanionRegData + * @constructor + * @param {proto.ICompanionRegData=} [properties] Properties to set + */ + function CompanionRegData(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]]; + } + + /** + * CompanionRegData eRegid. + * @member {Uint8Array} eRegid + * @memberof proto.CompanionRegData + * @instance + */ + CompanionRegData.prototype.eRegid = $util.newBuffer([]); + + /** + * CompanionRegData eKeytype. + * @member {Uint8Array} eKeytype + * @memberof proto.CompanionRegData + * @instance + */ + CompanionRegData.prototype.eKeytype = $util.newBuffer([]); + + /** + * CompanionRegData eIdent. + * @member {Uint8Array} eIdent + * @memberof proto.CompanionRegData + * @instance + */ + CompanionRegData.prototype.eIdent = $util.newBuffer([]); + + /** + * CompanionRegData eSkeyId. + * @member {Uint8Array} eSkeyId + * @memberof proto.CompanionRegData + * @instance + */ + CompanionRegData.prototype.eSkeyId = $util.newBuffer([]); + + /** + * CompanionRegData eSkeyVal. + * @member {Uint8Array} eSkeyVal + * @memberof proto.CompanionRegData + * @instance + */ + CompanionRegData.prototype.eSkeyVal = $util.newBuffer([]); + + /** + * CompanionRegData eSkeySig. + * @member {Uint8Array} eSkeySig + * @memberof proto.CompanionRegData + * @instance + */ + CompanionRegData.prototype.eSkeySig = $util.newBuffer([]); + + /** + * CompanionRegData buildHash. + * @member {Uint8Array} buildHash + * @memberof proto.CompanionRegData + * @instance + */ + CompanionRegData.prototype.buildHash = $util.newBuffer([]); + + /** + * CompanionRegData companionProps. + * @member {Uint8Array} companionProps + * @memberof proto.CompanionRegData + * @instance + */ + CompanionRegData.prototype.companionProps = $util.newBuffer([]); + + /** + * Creates a new CompanionRegData instance using the specified properties. + * @function create + * @memberof proto.CompanionRegData + * @static + * @param {proto.ICompanionRegData=} [properties] Properties to set + * @returns {proto.CompanionRegData} CompanionRegData instance + */ + CompanionRegData.create = function create(properties) { + return new CompanionRegData(properties); + }; + + /** + * Encodes the specified CompanionRegData message. Does not implicitly {@link proto.CompanionRegData.verify|verify} messages. + * @function encode + * @memberof proto.CompanionRegData + * @static + * @param {proto.ICompanionRegData} message CompanionRegData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompanionRegData.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.companionProps != null && Object.hasOwnProperty.call(message, "companionProps")) + writer.uint32(/* id 8, wireType 2 =*/66).bytes(message.companionProps); + return writer; + }; + + /** + * Encodes the specified CompanionRegData message, length delimited. Does not implicitly {@link proto.CompanionRegData.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.CompanionRegData + * @static + * @param {proto.ICompanionRegData} message CompanionRegData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompanionRegData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CompanionRegData message from the specified reader or buffer. + * @function decode + * @memberof proto.CompanionRegData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.CompanionRegData} CompanionRegData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompanionRegData.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.CompanionRegData(); + 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.companionProps = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CompanionRegData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.CompanionRegData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.CompanionRegData} CompanionRegData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompanionRegData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CompanionRegData message. + * @function verify + * @memberof proto.CompanionRegData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CompanionRegData.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.companionProps != null && message.hasOwnProperty("companionProps")) + if (!(message.companionProps && typeof message.companionProps.length === "number" || $util.isString(message.companionProps))) + return "companionProps: buffer expected"; + return null; + }; + + /** + * Creates a CompanionRegData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.CompanionRegData + * @static + * @param {Object.} object Plain object + * @returns {proto.CompanionRegData} CompanionRegData + */ + CompanionRegData.fromObject = function fromObject(object) { + if (object instanceof $root.proto.CompanionRegData) + return object; + var message = new $root.proto.CompanionRegData(); + 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.companionProps != null) + if (typeof object.companionProps === "string") + $util.base64.decode(object.companionProps, message.companionProps = $util.newBuffer($util.base64.length(object.companionProps)), 0); + else if (object.companionProps.length) + message.companionProps = object.companionProps; + return message; + }; + + /** + * Creates a plain object from a CompanionRegData message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.CompanionRegData + * @static + * @param {proto.CompanionRegData} message CompanionRegData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CompanionRegData.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.companionProps = ""; + else { + object.companionProps = []; + if (options.bytes !== Array) + object.companionProps = $util.newBuffer(object.companionProps); + } + } + 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.companionProps != null && message.hasOwnProperty("companionProps")) + object.companionProps = options.bytes === String ? $util.base64.encode(message.companionProps, 0, message.companionProps.length) : options.bytes === Array ? Array.prototype.slice.call(message.companionProps) : message.companionProps; + return object; + }; + + /** + * Converts this CompanionRegData to JSON. + * @function toJSON + * @memberof proto.CompanionRegData + * @instance + * @returns {Object.} JSON object + */ + CompanionRegData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CompanionRegData; + })(); + + 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 {Array.|null} [clientFeatures] ClientPayload clientFeatures + * @property {proto.IUserAgent|null} [userAgent] ClientPayload userAgent + * @property {proto.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.ClientPayloadIOSAppExtension|null} [iosAppExtension] ClientPayload iosAppExtension + * @property {proto.ClientPayload.ClientPayloadConnectType|null} [connectType] ClientPayload connectType + * @property {proto.ClientPayload.ClientPayloadConnectReason|null} [connectReason] ClientPayload connectReason + * @property {Array.|null} [shards] ClientPayload shards + * @property {proto.IDNSSource|null} [dnsSource] ClientPayload dnsSource + * @property {number|null} [connectAttemptCount] ClientPayload connectAttemptCount + * @property {number|null} [agent] ClientPayload agent + * @property {number|null} [device] ClientPayload device + * @property {proto.ICompanionRegData|null} [regData] ClientPayload regData + * @property {proto.ClientPayload.ClientPayloadProduct|null} [product] ClientPayload product + * @property {Uint8Array|null} [fbCat] ClientPayload fbCat + * @property {Uint8Array|null} [fbUserAgent] ClientPayload fbUserAgent + * @property {boolean|null} [oc] ClientPayload oc + */ + + /** + * Constructs a new ClientPayload. + * @memberof proto + * @classdesc Represents a ClientPayload. + * @implements IClientPayload + * @constructor + * @param {proto.IClientPayload=} [properties] Properties to set + */ + function ClientPayload(properties) { + this.clientFeatures = []; + 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 clientFeatures. + * @member {Array.} clientFeatures + * @memberof proto.ClientPayload + * @instance + */ + ClientPayload.prototype.clientFeatures = $util.emptyArray; + + /** + * ClientPayload userAgent. + * @member {proto.IUserAgent|null|undefined} userAgent + * @memberof proto.ClientPayload + * @instance + */ + ClientPayload.prototype.userAgent = null; + + /** + * ClientPayload webInfo. + * @member {proto.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 iosAppExtension. + * @member {proto.ClientPayload.ClientPayloadIOSAppExtension} iosAppExtension + * @memberof proto.ClientPayload + * @instance + */ + ClientPayload.prototype.iosAppExtension = 0; + + /** + * ClientPayload connectType. + * @member {proto.ClientPayload.ClientPayloadConnectType} connectType + * @memberof proto.ClientPayload + * @instance + */ + ClientPayload.prototype.connectType = 0; + + /** + * ClientPayload connectReason. + * @member {proto.ClientPayload.ClientPayloadConnectReason} 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.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 agent. + * @member {number} agent + * @memberof proto.ClientPayload + * @instance + */ + ClientPayload.prototype.agent = 0; + + /** + * ClientPayload device. + * @member {number} device + * @memberof proto.ClientPayload + * @instance + */ + ClientPayload.prototype.device = 0; + + /** + * ClientPayload regData. + * @member {proto.ICompanionRegData|null|undefined} regData + * @memberof proto.ClientPayload + * @instance + */ + ClientPayload.prototype.regData = null; + + /** + * ClientPayload product. + * @member {proto.ClientPayload.ClientPayloadProduct} 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; + + /** + * 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.clientFeatures != null && message.clientFeatures.length) + for (var i = 0; i < message.clientFeatures.length; ++i) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.clientFeatures[i]); + if (message.userAgent != null && Object.hasOwnProperty.call(message, "userAgent")) + $root.proto.UserAgent.encode(message.userAgent, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.webInfo != null && Object.hasOwnProperty.call(message, "webInfo")) + $root.proto.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.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.agent != null && Object.hasOwnProperty.call(message, "agent")) + writer.uint32(/* id 17, wireType 0 =*/136).uint32(message.agent); + if (message.device != null && Object.hasOwnProperty.call(message, "device")) + writer.uint32(/* id 18, wireType 0 =*/144).uint32(message.device); + if (message.regData != null && Object.hasOwnProperty.call(message, "regData")) + $root.proto.CompanionRegData.encode(message.regData, 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.iosAppExtension != null && Object.hasOwnProperty.call(message, "iosAppExtension")) + writer.uint32(/* id 30, wireType 0 =*/240).int32(message.iosAppExtension); + 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 4: + if (!(message.clientFeatures && message.clientFeatures.length)) + message.clientFeatures = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.clientFeatures.push(reader.int32()); + } else + message.clientFeatures.push(reader.int32()); + break; + case 5: + message.userAgent = $root.proto.UserAgent.decode(reader, reader.uint32()); + break; + case 6: + message.webInfo = $root.proto.WebInfo.decode(reader, reader.uint32()); + break; + case 7: message.pushName = reader.string(); break; - case 20: - message.mediaCiphertextSha256 = reader.bytes(); + case 9: + message.sessionId = reader.sfixed32(); break; - case 21: - message.multicast = reader.bool(); - break; - case 22: - message.urlText = reader.bool(); - break; - case 23: - message.urlNumber = reader.bool(); - break; - case 24: - message.messageStubType = reader.int32(); - break; - case 25: - message.clearMedia = reader.bool(); - break; - case 26: - if (!(message.messageStubParameters && message.messageStubParameters.length)) - message.messageStubParameters = []; - message.messageStubParameters.push(reader.string()); - break; - case 27: - message.duration = reader.uint32(); - break; - case 28: - if (!(message.labels && message.labels.length)) - message.labels = []; - message.labels.push(reader.string()); - break; - case 29: - message.paymentInfo = $root.proto.PaymentInfo.decode(reader, reader.uint32()); + case 10: + message.shortConnect = reader.bool(); break; case 30: - message.finalLiveLocation = $root.proto.LiveLocationMessage.decode(reader, reader.uint32()); + message.iosAppExtension = reader.int32(); break; - case 31: - message.quotedPaymentInfo = $root.proto.PaymentInfo.decode(reader, reader.uint32()); + case 12: + message.connectType = reader.int32(); break; - case 32: - message.ephemeralStartTimestamp = reader.uint64(); + case 13: + message.connectReason = reader.int32(); break; - case 33: - message.ephemeralDuration = reader.uint32(); + 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 34: - message.ephemeralOffToOn = reader.bool(); + case 15: + message.dnsSource = $root.proto.DNSSource.decode(reader, reader.uint32()); break; - case 35: - message.ephemeralOutOfSync = reader.bool(); + case 16: + message.connectAttemptCount = reader.uint32(); break; - case 36: - message.bizPrivacyStatus = reader.int32(); + case 17: + message.agent = reader.uint32(); break; - case 37: - message.verifiedBizName = reader.string(); + case 18: + message.device = reader.uint32(); + break; + case 19: + message.regData = $root.proto.CompanionRegData.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; default: reader.skipType(tag & 7); break; } } - if (!message.hasOwnProperty("key")) - throw $util.ProtocolError("missing required 'key'", { instance: message }); return message; }; /** - * Decodes a WebMessageInfo message from the specified reader or buffer, length delimited. + * Decodes a ClientPayload message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof proto.WebMessageInfo + * @memberof proto.ClientPayload * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.WebMessageInfo} WebMessageInfo + * @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 */ - WebMessageInfo.decodeDelimited = function decodeDelimited(reader) { + ClientPayload.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a WebMessageInfo message. + * Verifies a ClientPayload message. * @function verify - * @memberof proto.WebMessageInfo + * @memberof proto.ClientPayload * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - WebMessageInfo.verify = function verify(message) { + ClientPayload.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - { - var error = $root.proto.MessageKey.verify(message.key); - if (error) - return "key." + error; + 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.clientFeatures != null && message.hasOwnProperty("clientFeatures")) { + if (!Array.isArray(message.clientFeatures)) + return "clientFeatures: array expected"; + for (var i = 0; i < message.clientFeatures.length; ++i) + switch (message.clientFeatures[i]) { + default: + return "clientFeatures: enum value[] expected"; + case 0: + break; + } } - if (message.message != null && message.hasOwnProperty("message")) { - var error = $root.proto.Message.verify(message.message); + if (message.userAgent != null && message.hasOwnProperty("userAgent")) { + var error = $root.proto.UserAgent.verify(message.userAgent); if (error) - return "message." + error; + return "userAgent." + error; + } + if (message.webInfo != null && message.hasOwnProperty("webInfo")) { + var error = $root.proto.WebInfo.verify(message.webInfo); + if (error) + return "webInfo." + error; } - if (message.messageTimestamp != null && message.hasOwnProperty("messageTimestamp")) - if (!$util.isInteger(message.messageTimestamp) && !(message.messageTimestamp && $util.isInteger(message.messageTimestamp.low) && $util.isInteger(message.messageTimestamp.high))) - return "messageTimestamp: integer|Long expected"; - if (message.status != null && message.hasOwnProperty("status")) - switch (message.status) { - default: - return "status: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.participant != null && message.hasOwnProperty("participant")) - if (!$util.isString(message.participant)) - return "participant: string expected"; - if (message.ignore != null && message.hasOwnProperty("ignore")) - if (typeof message.ignore !== "boolean") - return "ignore: boolean expected"; - if (message.starred != null && message.hasOwnProperty("starred")) - if (typeof message.starred !== "boolean") - return "starred: boolean expected"; - if (message.broadcast != null && message.hasOwnProperty("broadcast")) - if (typeof message.broadcast !== "boolean") - return "broadcast: boolean expected"; if (message.pushName != null && message.hasOwnProperty("pushName")) if (!$util.isString(message.pushName)) return "pushName: string expected"; - if (message.mediaCiphertextSha256 != null && message.hasOwnProperty("mediaCiphertextSha256")) - if (!(message.mediaCiphertextSha256 && typeof message.mediaCiphertextSha256.length === "number" || $util.isString(message.mediaCiphertextSha256))) - return "mediaCiphertextSha256: buffer expected"; - if (message.multicast != null && message.hasOwnProperty("multicast")) - if (typeof message.multicast !== "boolean") - return "multicast: boolean expected"; - if (message.urlText != null && message.hasOwnProperty("urlText")) - if (typeof message.urlText !== "boolean") - return "urlText: boolean expected"; - if (message.urlNumber != null && message.hasOwnProperty("urlNumber")) - if (typeof message.urlNumber !== "boolean") - return "urlNumber: boolean expected"; - if (message.messageStubType != null && message.hasOwnProperty("messageStubType")) - switch (message.messageStubType) { + 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.iosAppExtension != null && message.hasOwnProperty("iosAppExtension")) + switch (message.iosAppExtension) { default: - return "messageStubType: enum value expected"; + return "iosAppExtension: 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: - case 36: - case 37: - case 38: - case 39: - case 40: - case 41: - case 42: - case 43: - case 44: - case 45: - case 46: - case 47: - case 48: - case 49: - case 50: - case 51: - case 52: - case 53: - case 54: - case 55: - case 56: - case 57: - case 58: - case 59: - case 60: - case 61: - case 62: - case 63: - case 64: - case 65: - case 66: - case 67: - case 68: - case 69: - case 70: - case 71: - case 72: - case 73: - case 74: - case 75: - case 76: - case 77: - case 78: - case 79: - case 80: - case 81: - case 82: - case 83: - case 84: - case 85: - case 86: - case 87: - case 88: - case 89: - case 90: - case 91: - case 92: - case 93: - case 94: - case 95: - case 96: - case 97: - case 98: - case 99: + break; + } + 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: @@ -3873,1131 +2875,15497 @@ $root.proto = (function() { case 110: case 111: case 112: - case 113: - case 114: - case 115: - case 116: - case 117: - case 118: break; } - if (message.clearMedia != null && message.hasOwnProperty("clearMedia")) - if (typeof message.clearMedia !== "boolean") - return "clearMedia: boolean expected"; - if (message.messageStubParameters != null && message.hasOwnProperty("messageStubParameters")) { - if (!Array.isArray(message.messageStubParameters)) - return "messageStubParameters: array expected"; - for (var i = 0; i < message.messageStubParameters.length; ++i) - if (!$util.isString(message.messageStubParameters[i])) - return "messageStubParameters: string[] expected"; - } - if (message.duration != null && message.hasOwnProperty("duration")) - if (!$util.isInteger(message.duration)) - return "duration: integer expected"; - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!Array.isArray(message.labels)) - return "labels: array expected"; - for (var i = 0; i < message.labels.length; ++i) - if (!$util.isString(message.labels[i])) - return "labels: string[] expected"; - } - if (message.paymentInfo != null && message.hasOwnProperty("paymentInfo")) { - var error = $root.proto.PaymentInfo.verify(message.paymentInfo); - if (error) - return "paymentInfo." + error; - } - if (message.finalLiveLocation != null && message.hasOwnProperty("finalLiveLocation")) { - var error = $root.proto.LiveLocationMessage.verify(message.finalLiveLocation); - if (error) - return "finalLiveLocation." + error; - } - if (message.quotedPaymentInfo != null && message.hasOwnProperty("quotedPaymentInfo")) { - var error = $root.proto.PaymentInfo.verify(message.quotedPaymentInfo); - if (error) - return "quotedPaymentInfo." + error; - } - if (message.ephemeralStartTimestamp != null && message.hasOwnProperty("ephemeralStartTimestamp")) - if (!$util.isInteger(message.ephemeralStartTimestamp) && !(message.ephemeralStartTimestamp && $util.isInteger(message.ephemeralStartTimestamp.low) && $util.isInteger(message.ephemeralStartTimestamp.high))) - return "ephemeralStartTimestamp: integer|Long expected"; - if (message.ephemeralDuration != null && message.hasOwnProperty("ephemeralDuration")) - if (!$util.isInteger(message.ephemeralDuration)) - return "ephemeralDuration: integer expected"; - if (message.ephemeralOffToOn != null && message.hasOwnProperty("ephemeralOffToOn")) - if (typeof message.ephemeralOffToOn !== "boolean") - return "ephemeralOffToOn: boolean expected"; - if (message.ephemeralOutOfSync != null && message.hasOwnProperty("ephemeralOutOfSync")) - if (typeof message.ephemeralOutOfSync !== "boolean") - return "ephemeralOutOfSync: boolean expected"; - if (message.bizPrivacyStatus != null && message.hasOwnProperty("bizPrivacyStatus")) - switch (message.bizPrivacyStatus) { + if (message.connectReason != null && message.hasOwnProperty("connectReason")) + switch (message.connectReason) { default: - return "bizPrivacyStatus: enum value expected"; + return "connectReason: enum value expected"; case 0: - case 2: case 1: + case 2: case 3: + case 4: + case 5: break; } - if (message.verifiedBizName != null && message.hasOwnProperty("verifiedBizName")) - if (!$util.isString(message.verifiedBizName)) - return "verifiedBizName: string expected"; + 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.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.agent != null && message.hasOwnProperty("agent")) + if (!$util.isInteger(message.agent)) + return "agent: integer expected"; + if (message.device != null && message.hasOwnProperty("device")) + if (!$util.isInteger(message.device)) + return "device: integer expected"; + if (message.regData != null && message.hasOwnProperty("regData")) { + var error = $root.proto.CompanionRegData.verify(message.regData); + if (error) + return "regData." + error; + } + if (message.product != null && message.hasOwnProperty("product")) + switch (message.product) { + default: + return "product: enum value expected"; + case 0: + case 1: + 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"; return null; }; /** - * Creates a WebMessageInfo message from a plain object. Also converts values to their respective internal types. + * Creates a ClientPayload message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof proto.WebMessageInfo + * @memberof proto.ClientPayload * @static * @param {Object.} object Plain object - * @returns {proto.WebMessageInfo} WebMessageInfo + * @returns {proto.ClientPayload} ClientPayload */ - WebMessageInfo.fromObject = function fromObject(object) { - if (object instanceof $root.proto.WebMessageInfo) + ClientPayload.fromObject = function fromObject(object) { + if (object instanceof $root.proto.ClientPayload) return object; - var message = new $root.proto.WebMessageInfo(); - if (object.key != null) { - if (typeof object.key !== "object") - throw TypeError(".proto.WebMessageInfo.key: object expected"); - message.key = $root.proto.MessageKey.fromObject(object.key); + 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.clientFeatures) { + if (!Array.isArray(object.clientFeatures)) + throw TypeError(".proto.ClientPayload.clientFeatures: array expected"); + message.clientFeatures = []; + for (var i = 0; i < object.clientFeatures.length; ++i) + switch (object.clientFeatures[i]) { + default: + case "NONE": + case 0: + message.clientFeatures[i] = 0; + break; + } } - if (object.message != null) { - if (typeof object.message !== "object") - throw TypeError(".proto.WebMessageInfo.message: object expected"); - message.message = $root.proto.Message.fromObject(object.message); + if (object.userAgent != null) { + if (typeof object.userAgent !== "object") + throw TypeError(".proto.ClientPayload.userAgent: object expected"); + message.userAgent = $root.proto.UserAgent.fromObject(object.userAgent); } + if (object.webInfo != null) { + if (typeof object.webInfo !== "object") + throw TypeError(".proto.ClientPayload.webInfo: object expected"); + message.webInfo = $root.proto.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.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; + } + 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; + } + 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.DNSSource.fromObject(object.dnsSource); + } + if (object.connectAttemptCount != null) + message.connectAttemptCount = object.connectAttemptCount >>> 0; + if (object.agent != null) + message.agent = object.agent >>> 0; + if (object.device != null) + message.device = object.device >>> 0; + if (object.regData != null) { + if (typeof object.regData !== "object") + throw TypeError(".proto.ClientPayload.regData: object expected"); + message.regData = $root.proto.CompanionRegData.fromObject(object.regData); + } + switch (object.product) { + case "WHATSAPP": + case 0: + message.product = 0; + break; + case "MESSENGER": + case 1: + message.product = 1; + 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); + 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.clientFeatures = []; + 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.agent = 0; + object.device = 0; + object.regData = 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.iosAppExtension = options.enums === String ? "SHARE_EXTENSION" : 0; + } + 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.clientFeatures && message.clientFeatures.length) { + object.clientFeatures = []; + for (var j = 0; j < message.clientFeatures.length; ++j) + object.clientFeatures[j] = options.enums === String ? $root.proto.ClientPayload.ClientPayloadClientFeature[message.clientFeatures[j]] : message.clientFeatures[j]; + } + if (message.userAgent != null && message.hasOwnProperty("userAgent")) + object.userAgent = $root.proto.UserAgent.toObject(message.userAgent, options); + if (message.webInfo != null && message.hasOwnProperty("webInfo")) + object.webInfo = $root.proto.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.ClientPayloadConnectType[message.connectType] : message.connectType; + if (message.connectReason != null && message.hasOwnProperty("connectReason")) + object.connectReason = options.enums === String ? $root.proto.ClientPayload.ClientPayloadConnectReason[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.DNSSource.toObject(message.dnsSource, options); + if (message.connectAttemptCount != null && message.hasOwnProperty("connectAttemptCount")) + object.connectAttemptCount = message.connectAttemptCount; + if (message.agent != null && message.hasOwnProperty("agent")) + object.agent = message.agent; + if (message.device != null && message.hasOwnProperty("device")) + object.device = message.device; + if (message.regData != null && message.hasOwnProperty("regData")) + object.regData = $root.proto.CompanionRegData.toObject(message.regData, options); + if (message.product != null && message.hasOwnProperty("product")) + object.product = options.enums === String ? $root.proto.ClientPayload.ClientPayloadProduct[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.iosAppExtension != null && message.hasOwnProperty("iosAppExtension")) + object.iosAppExtension = options.enums === String ? $root.proto.ClientPayload.ClientPayloadIOSAppExtension[message.iosAppExtension] : message.iosAppExtension; + 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); + }; + + /** + * ClientPayloadClientFeature enum. + * @name proto.ClientPayload.ClientPayloadClientFeature + * @enum {number} + * @property {number} NONE=0 NONE value + */ + ClientPayload.ClientPayloadClientFeature = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NONE"] = 0; + return values; + })(); + + /** + * ClientPayloadIOSAppExtension enum. + * @name proto.ClientPayload.ClientPayloadIOSAppExtension + * @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.ClientPayloadIOSAppExtension = (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; + })(); + + /** + * ClientPayloadConnectType enum. + * @name proto.ClientPayload.ClientPayloadConnectType + * @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.ClientPayloadConnectType = (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; + })(); + + /** + * ClientPayloadConnectReason enum. + * @name proto.ClientPayload.ClientPayloadConnectReason + * @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 + */ + ClientPayload.ClientPayloadConnectReason = (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; + return values; + })(); + + /** + * ClientPayloadProduct enum. + * @name proto.ClientPayload.ClientPayloadProduct + * @enum {number} + * @property {number} WHATSAPP=0 WHATSAPP value + * @property {number} MESSENGER=1 MESSENGER value + */ + ClientPayload.ClientPayloadProduct = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "WHATSAPP"] = 0; + values[valuesById[1] = "MESSENGER"] = 1; + return values; + })(); + + return ClientPayload; + })(); + + proto.NoiseCertificate = (function() { + + /** + * Properties of a NoiseCertificate. + * @memberof proto + * @interface INoiseCertificate + * @property {Uint8Array|null} [details] NoiseCertificate details + * @property {Uint8Array|null} [signature] NoiseCertificate signature + */ + + /** + * Constructs a new NoiseCertificate. + * @memberof proto + * @classdesc Represents a NoiseCertificate. + * @implements INoiseCertificate + * @constructor + * @param {proto.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.NoiseCertificate + * @instance + */ + NoiseCertificate.prototype.details = $util.newBuffer([]); + + /** + * NoiseCertificate signature. + * @member {Uint8Array} signature + * @memberof proto.NoiseCertificate + * @instance + */ + NoiseCertificate.prototype.signature = $util.newBuffer([]); + + /** + * Creates a new NoiseCertificate instance using the specified properties. + * @function create + * @memberof proto.NoiseCertificate + * @static + * @param {proto.INoiseCertificate=} [properties] Properties to set + * @returns {proto.NoiseCertificate} NoiseCertificate instance + */ + NoiseCertificate.create = function create(properties) { + return new NoiseCertificate(properties); + }; + + /** + * Encodes the specified NoiseCertificate message. Does not implicitly {@link proto.NoiseCertificate.verify|verify} messages. + * @function encode + * @memberof proto.NoiseCertificate + * @static + * @param {proto.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.NoiseCertificate.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.NoiseCertificate + * @static + * @param {proto.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.NoiseCertificate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.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.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.NoiseCertificate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.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.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.NoiseCertificate + * @static + * @param {Object.} object Plain object + * @returns {proto.NoiseCertificate} NoiseCertificate + */ + NoiseCertificate.fromObject = function fromObject(object) { + if (object instanceof $root.proto.NoiseCertificate) + return object; + var message = new $root.proto.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.NoiseCertificate + * @static + * @param {proto.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.NoiseCertificate + * @instance + * @returns {Object.} JSON object + */ + NoiseCertificate.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return NoiseCertificate; + })(); + + proto.ClientHello = (function() { + + /** + * Properties of a ClientHello. + * @memberof proto + * @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 + * @classdesc Represents a ClientHello. + * @implements IClientHello + * @constructor + * @param {proto.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.ClientHello + * @instance + */ + ClientHello.prototype.ephemeral = $util.newBuffer([]); + + /** + * ClientHello static. + * @member {Uint8Array} static + * @memberof proto.ClientHello + * @instance + */ + ClientHello.prototype["static"] = $util.newBuffer([]); + + /** + * ClientHello payload. + * @member {Uint8Array} payload + * @memberof proto.ClientHello + * @instance + */ + ClientHello.prototype.payload = $util.newBuffer([]); + + /** + * Creates a new ClientHello instance using the specified properties. + * @function create + * @memberof proto.ClientHello + * @static + * @param {proto.IClientHello=} [properties] Properties to set + * @returns {proto.ClientHello} ClientHello instance + */ + ClientHello.create = function create(properties) { + return new ClientHello(properties); + }; + + /** + * Encodes the specified ClientHello message. Does not implicitly {@link proto.ClientHello.verify|verify} messages. + * @function encode + * @memberof proto.ClientHello + * @static + * @param {proto.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.ClientHello.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.ClientHello + * @static + * @param {proto.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(); + }; + + /** + * Decodes a ClientHello message from the specified reader or buffer. + * @function decode + * @memberof proto.ClientHello + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.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.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; + }; + + /** + * Decodes a ClientHello message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.ClientHello + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.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()); + }; + + /** + * Verifies a ClientHello message. + * @function verify + * @memberof proto.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; + }; + + /** + * Creates a ClientHello message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.ClientHello + * @static + * @param {Object.} object Plain object + * @returns {proto.ClientHello} ClientHello + */ + ClientHello.fromObject = function fromObject(object) { + if (object instanceof $root.proto.ClientHello) + return object; + var message = new $root.proto.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; + }; + + /** + * Creates a plain object from a ClientHello message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.ClientHello + * @static + * @param {proto.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; + }; + + /** + * Converts this ClientHello to JSON. + * @function toJSON + * @memberof proto.ClientHello + * @instance + * @returns {Object.} JSON object + */ + ClientHello.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ClientHello; + })(); + + proto.ServerHello = (function() { + + /** + * Properties of a ServerHello. + * @memberof proto + * @interface IServerHello + * @property {Uint8Array|null} [ephemeral] ServerHello ephemeral + * @property {Uint8Array|null} ["static"] ServerHello static + * @property {Uint8Array|null} [payload] ServerHello payload + */ + + /** + * Constructs a new ServerHello. + * @memberof proto + * @classdesc Represents a ServerHello. + * @implements IServerHello + * @constructor + * @param {proto.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]]; + } + + /** + * ServerHello ephemeral. + * @member {Uint8Array} ephemeral + * @memberof proto.ServerHello + * @instance + */ + ServerHello.prototype.ephemeral = $util.newBuffer([]); + + /** + * ServerHello static. + * @member {Uint8Array} static + * @memberof proto.ServerHello + * @instance + */ + ServerHello.prototype["static"] = $util.newBuffer([]); + + /** + * ServerHello payload. + * @member {Uint8Array} payload + * @memberof proto.ServerHello + * @instance + */ + ServerHello.prototype.payload = $util.newBuffer([]); + + /** + * Creates a new ServerHello instance using the specified properties. + * @function create + * @memberof proto.ServerHello + * @static + * @param {proto.IServerHello=} [properties] Properties to set + * @returns {proto.ServerHello} ServerHello instance + */ + ServerHello.create = function create(properties) { + return new ServerHello(properties); + }; + + /** + * Encodes the specified ServerHello message. Does not implicitly {@link proto.ServerHello.verify|verify} messages. + * @function encode + * @memberof proto.ServerHello + * @static + * @param {proto.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.ServerHello.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.ServerHello + * @static + * @param {proto.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.ServerHello + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.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.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; + }; + + /** + * Decodes a ServerHello message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.ServerHello + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.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()); + }; + + /** + * Verifies a ServerHello message. + * @function verify + * @memberof proto.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; + }; + + /** + * Creates a ServerHello message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.ServerHello + * @static + * @param {Object.} object Plain object + * @returns {proto.ServerHello} ServerHello + */ + ServerHello.fromObject = function fromObject(object) { + if (object instanceof $root.proto.ServerHello) + return object; + var message = new $root.proto.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 plain object from a ServerHello message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.ServerHello + * @static + * @param {proto.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; + }; + + /** + * Converts this ServerHello to JSON. + * @function toJSON + * @memberof proto.ServerHello + * @instance + * @returns {Object.} JSON object + */ + ServerHello.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ServerHello; + })(); + + proto.ClientFinish = (function() { + + /** + * Properties of a ClientFinish. + * @memberof proto + * @interface IClientFinish + * @property {Uint8Array|null} ["static"] ClientFinish static + * @property {Uint8Array|null} [payload] ClientFinish payload + */ + + /** + * Constructs a new ClientFinish. + * @memberof proto + * @classdesc Represents a ClientFinish. + * @implements IClientFinish + * @constructor + * @param {proto.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.ClientFinish + * @instance + */ + ClientFinish.prototype["static"] = $util.newBuffer([]); + + /** + * ClientFinish payload. + * @member {Uint8Array} payload + * @memberof proto.ClientFinish + * @instance + */ + ClientFinish.prototype.payload = $util.newBuffer([]); + + /** + * Creates a new ClientFinish instance using the specified properties. + * @function create + * @memberof proto.ClientFinish + * @static + * @param {proto.IClientFinish=} [properties] Properties to set + * @returns {proto.ClientFinish} ClientFinish instance + */ + ClientFinish.create = function create(properties) { + return new ClientFinish(properties); + }; + + /** + * Encodes the specified ClientFinish message. Does not implicitly {@link proto.ClientFinish.verify|verify} messages. + * @function encode + * @memberof proto.ClientFinish + * @static + * @param {proto.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.ClientFinish.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.ClientFinish + * @static + * @param {proto.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.ClientFinish + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.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.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.ClientFinish + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.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.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.ClientFinish + * @static + * @param {Object.} object Plain object + * @returns {proto.ClientFinish} ClientFinish + */ + ClientFinish.fromObject = function fromObject(object) { + if (object instanceof $root.proto.ClientFinish) + return object; + var message = new $root.proto.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.ClientFinish + * @static + * @param {proto.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.ClientFinish + * @instance + * @returns {Object.} JSON object + */ + ClientFinish.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ClientFinish; + })(); + + proto.HandshakeMessage = (function() { + + /** + * Properties of a HandshakeMessage. + * @memberof proto + * @interface IHandshakeMessage + * @property {proto.IClientHello|null} [clientHello] HandshakeMessage clientHello + * @property {proto.IServerHello|null} [serverHello] HandshakeMessage serverHello + * @property {proto.IClientFinish|null} [clientFinish] HandshakeMessage clientFinish + */ + + /** + * Constructs a new HandshakeMessage. + * @memberof proto + * @classdesc Represents a HandshakeMessage. + * @implements IHandshakeMessage + * @constructor + * @param {proto.IHandshakeMessage=} [properties] Properties to set + */ + function HandshakeMessage(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]]; + } + + /** + * HandshakeMessage clientHello. + * @member {proto.IClientHello|null|undefined} clientHello + * @memberof proto.HandshakeMessage + * @instance + */ + HandshakeMessage.prototype.clientHello = null; + + /** + * HandshakeMessage serverHello. + * @member {proto.IServerHello|null|undefined} serverHello + * @memberof proto.HandshakeMessage + * @instance + */ + HandshakeMessage.prototype.serverHello = null; + + /** + * HandshakeMessage clientFinish. + * @member {proto.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.HandshakeMessage + * @static + * @param {proto.IHandshakeMessage=} [properties] Properties to set + * @returns {proto.HandshakeMessage} HandshakeMessage instance + */ + HandshakeMessage.create = function create(properties) { + return new HandshakeMessage(properties); + }; + + /** + * Encodes the specified HandshakeMessage message. Does not implicitly {@link proto.HandshakeMessage.verify|verify} messages. + * @function encode + * @memberof proto.HandshakeMessage + * @static + * @param {proto.IHandshakeMessage} message HandshakeMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HandshakeMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clientHello != null && Object.hasOwnProperty.call(message, "clientHello")) + $root.proto.ClientHello.encode(message.clientHello, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.serverHello != null && Object.hasOwnProperty.call(message, "serverHello")) + $root.proto.ServerHello.encode(message.serverHello, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.clientFinish != null && Object.hasOwnProperty.call(message, "clientFinish")) + $root.proto.ClientFinish.encode(message.clientFinish, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified HandshakeMessage message, length delimited. Does not implicitly {@link proto.HandshakeMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.HandshakeMessage + * @static + * @param {proto.IHandshakeMessage} message HandshakeMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HandshakeMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HandshakeMessage message from the specified reader or buffer. + * @function decode + * @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.HandshakeMessage} HandshakeMessage + * @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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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 2: + message.clientHello = $root.proto.ClientHello.decode(reader, reader.uint32()); + break; + case 3: + message.serverHello = $root.proto.ServerHello.decode(reader, reader.uint32()); + break; + case 4: + message.clientFinish = $root.proto.ClientFinish.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HandshakeMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.HandshakeMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + HandshakeMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HandshakeMessage message. + * @function verify + * @memberof proto.HandshakeMessage + * @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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clientHello != null && message.hasOwnProperty("clientHello")) { + var error = $root.proto.ClientHello.verify(message.clientHello); + if (error) + return "clientHello." + error; + } + if (message.serverHello != null && message.hasOwnProperty("serverHello")) { + var error = $root.proto.ServerHello.verify(message.serverHello); + if (error) + return "serverHello." + error; + } + if (message.clientFinish != null && message.hasOwnProperty("clientFinish")) { + var error = $root.proto.ClientFinish.verify(message.clientFinish); + if (error) + return "clientFinish." + error; + } + return null; + }; + + /** + * Creates a HandshakeMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.HandshakeMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.HandshakeMessage} HandshakeMessage + */ + HandshakeMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.HandshakeMessage) + 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.ClientHello.fromObject(object.clientHello); + } + if (object.serverHello != null) { + if (typeof object.serverHello !== "object") + throw TypeError(".proto.HandshakeMessage.serverHello: object expected"); + message.serverHello = $root.proto.ServerHello.fromObject(object.serverHello); + } + if (object.clientFinish != null) { + if (typeof object.clientFinish !== "object") + throw TypeError(".proto.HandshakeMessage.clientFinish: object expected"); + message.clientFinish = $root.proto.ClientFinish.fromObject(object.clientFinish); + } + return message; + }; + + /** + * 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.ClientHello.toObject(message.clientHello, options); + if (message.serverHello != null && message.hasOwnProperty("serverHello")) + object.serverHello = $root.proto.ServerHello.toObject(message.serverHello, options); + if (message.clientFinish != null && message.hasOwnProperty("clientFinish")) + object.clientFinish = $root.proto.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); + }; + + return HandshakeMessage; + })(); + + proto.BizIdentityInfo = (function() { + + /** + * Properties of a BizIdentityInfo. + * @memberof proto + * @interface IBizIdentityInfo + * @property {proto.BizIdentityInfo.BizIdentityInfoVerifiedLevelValue|null} [vlevel] BizIdentityInfo vlevel + * @property {proto.IVerifiedNameCertificate|null} [vnameCert] BizIdentityInfo vnameCert + * @property {boolean|null} [signed] BizIdentityInfo signed + * @property {boolean|null} [revoked] BizIdentityInfo revoked + * @property {proto.BizIdentityInfo.BizIdentityInfoHostStorageType|null} [hostStorage] BizIdentityInfo hostStorage + * @property {proto.BizIdentityInfo.BizIdentityInfoActualActorsType|null} [actualActors] BizIdentityInfo actualActors + * @property {number|Long|null} [privacyModeTs] BizIdentityInfo privacyModeTs + */ + + /** + * Constructs a new BizIdentityInfo. + * @memberof proto + * @classdesc Represents a BizIdentityInfo. + * @implements IBizIdentityInfo + * @constructor + * @param {proto.IBizIdentityInfo=} [properties] Properties to set + */ + function BizIdentityInfo(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]]; + } + + /** + * BizIdentityInfo vlevel. + * @member {proto.BizIdentityInfo.BizIdentityInfoVerifiedLevelValue} vlevel + * @memberof proto.BizIdentityInfo + * @instance + */ + BizIdentityInfo.prototype.vlevel = 0; + + /** + * BizIdentityInfo vnameCert. + * @member {proto.IVerifiedNameCertificate|null|undefined} vnameCert + * @memberof proto.BizIdentityInfo + * @instance + */ + BizIdentityInfo.prototype.vnameCert = null; + + /** + * BizIdentityInfo signed. + * @member {boolean} signed + * @memberof proto.BizIdentityInfo + * @instance + */ + BizIdentityInfo.prototype.signed = false; + + /** + * BizIdentityInfo revoked. + * @member {boolean} revoked + * @memberof proto.BizIdentityInfo + * @instance + */ + BizIdentityInfo.prototype.revoked = false; + + /** + * BizIdentityInfo hostStorage. + * @member {proto.BizIdentityInfo.BizIdentityInfoHostStorageType} hostStorage + * @memberof proto.BizIdentityInfo + * @instance + */ + BizIdentityInfo.prototype.hostStorage = 0; + + /** + * BizIdentityInfo actualActors. + * @member {proto.BizIdentityInfo.BizIdentityInfoActualActorsType} actualActors + * @memberof proto.BizIdentityInfo + * @instance + */ + BizIdentityInfo.prototype.actualActors = 0; + + /** + * BizIdentityInfo privacyModeTs. + * @member {number|Long} privacyModeTs + * @memberof proto.BizIdentityInfo + * @instance + */ + BizIdentityInfo.prototype.privacyModeTs = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new BizIdentityInfo instance using the specified properties. + * @function create + * @memberof proto.BizIdentityInfo + * @static + * @param {proto.IBizIdentityInfo=} [properties] Properties to set + * @returns {proto.BizIdentityInfo} BizIdentityInfo instance + */ + BizIdentityInfo.create = function create(properties) { + return new BizIdentityInfo(properties); + }; + + /** + * Encodes the specified BizIdentityInfo message. Does not implicitly {@link proto.BizIdentityInfo.verify|verify} messages. + * @function encode + * @memberof proto.BizIdentityInfo + * @static + * @param {proto.IBizIdentityInfo} message BizIdentityInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BizIdentityInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.vlevel != null && Object.hasOwnProperty.call(message, "vlevel")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.vlevel); + if (message.vnameCert != null && Object.hasOwnProperty.call(message, "vnameCert")) + $root.proto.VerifiedNameCertificate.encode(message.vnameCert, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.signed != null && Object.hasOwnProperty.call(message, "signed")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.signed); + if (message.revoked != null && Object.hasOwnProperty.call(message, "revoked")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.revoked); + if (message.hostStorage != null && Object.hasOwnProperty.call(message, "hostStorage")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.hostStorage); + if (message.actualActors != null && Object.hasOwnProperty.call(message, "actualActors")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.actualActors); + if (message.privacyModeTs != null && Object.hasOwnProperty.call(message, "privacyModeTs")) + writer.uint32(/* id 7, wireType 0 =*/56).uint64(message.privacyModeTs); + return writer; + }; + + /** + * Encodes the specified BizIdentityInfo message, length delimited. Does not implicitly {@link proto.BizIdentityInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.BizIdentityInfo + * @static + * @param {proto.IBizIdentityInfo} message BizIdentityInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BizIdentityInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BizIdentityInfo message from the specified reader or buffer. + * @function decode + * @memberof proto.BizIdentityInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.BizIdentityInfo} BizIdentityInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BizIdentityInfo.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.BizIdentityInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.vlevel = reader.int32(); + break; + case 2: + message.vnameCert = $root.proto.VerifiedNameCertificate.decode(reader, reader.uint32()); + break; + case 3: + message.signed = reader.bool(); + break; + case 4: + message.revoked = reader.bool(); + break; + case 5: + message.hostStorage = reader.int32(); + break; + case 6: + message.actualActors = reader.int32(); + break; + case 7: + message.privacyModeTs = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BizIdentityInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.BizIdentityInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.BizIdentityInfo} BizIdentityInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BizIdentityInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BizIdentityInfo message. + * @function verify + * @memberof proto.BizIdentityInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BizIdentityInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.vlevel != null && message.hasOwnProperty("vlevel")) + switch (message.vlevel) { + default: + return "vlevel: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.vnameCert != null && message.hasOwnProperty("vnameCert")) { + var error = $root.proto.VerifiedNameCertificate.verify(message.vnameCert); + if (error) + return "vnameCert." + error; + } + if (message.signed != null && message.hasOwnProperty("signed")) + if (typeof message.signed !== "boolean") + return "signed: boolean expected"; + if (message.revoked != null && message.hasOwnProperty("revoked")) + if (typeof message.revoked !== "boolean") + return "revoked: boolean expected"; + if (message.hostStorage != null && message.hasOwnProperty("hostStorage")) + switch (message.hostStorage) { + default: + return "hostStorage: enum value expected"; + case 0: + case 1: + break; + } + if (message.actualActors != null && message.hasOwnProperty("actualActors")) + switch (message.actualActors) { + default: + return "actualActors: enum value expected"; + case 0: + case 1: + break; + } + if (message.privacyModeTs != null && message.hasOwnProperty("privacyModeTs")) + if (!$util.isInteger(message.privacyModeTs) && !(message.privacyModeTs && $util.isInteger(message.privacyModeTs.low) && $util.isInteger(message.privacyModeTs.high))) + return "privacyModeTs: integer|Long expected"; + return null; + }; + + /** + * Creates a BizIdentityInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.BizIdentityInfo + * @static + * @param {Object.} object Plain object + * @returns {proto.BizIdentityInfo} BizIdentityInfo + */ + BizIdentityInfo.fromObject = function fromObject(object) { + if (object instanceof $root.proto.BizIdentityInfo) + return object; + var message = new $root.proto.BizIdentityInfo(); + switch (object.vlevel) { + case "UNKNOWN": + case 0: + message.vlevel = 0; + break; + case "LOW": + case 1: + message.vlevel = 1; + break; + case "HIGH": + case 2: + message.vlevel = 2; + break; + } + if (object.vnameCert != null) { + if (typeof object.vnameCert !== "object") + throw TypeError(".proto.BizIdentityInfo.vnameCert: object expected"); + message.vnameCert = $root.proto.VerifiedNameCertificate.fromObject(object.vnameCert); + } + if (object.signed != null) + message.signed = Boolean(object.signed); + if (object.revoked != null) + message.revoked = Boolean(object.revoked); + switch (object.hostStorage) { + case "ON_PREMISE": + case 0: + message.hostStorage = 0; + break; + case "FACEBOOK": + case 1: + message.hostStorage = 1; + break; + } + switch (object.actualActors) { + case "SELF": + case 0: + message.actualActors = 0; + break; + case "BSP": + case 1: + message.actualActors = 1; + break; + } + if (object.privacyModeTs != null) + if ($util.Long) + (message.privacyModeTs = $util.Long.fromValue(object.privacyModeTs)).unsigned = true; + else if (typeof object.privacyModeTs === "string") + message.privacyModeTs = parseInt(object.privacyModeTs, 10); + else if (typeof object.privacyModeTs === "number") + message.privacyModeTs = object.privacyModeTs; + else if (typeof object.privacyModeTs === "object") + message.privacyModeTs = new $util.LongBits(object.privacyModeTs.low >>> 0, object.privacyModeTs.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a BizIdentityInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.BizIdentityInfo + * @static + * @param {proto.BizIdentityInfo} message BizIdentityInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BizIdentityInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.vlevel = options.enums === String ? "UNKNOWN" : 0; + object.vnameCert = null; + object.signed = false; + object.revoked = false; + object.hostStorage = options.enums === String ? "ON_PREMISE" : 0; + object.actualActors = options.enums === String ? "SELF" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.privacyModeTs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.privacyModeTs = options.longs === String ? "0" : 0; + } + if (message.vlevel != null && message.hasOwnProperty("vlevel")) + object.vlevel = options.enums === String ? $root.proto.BizIdentityInfo.BizIdentityInfoVerifiedLevelValue[message.vlevel] : message.vlevel; + if (message.vnameCert != null && message.hasOwnProperty("vnameCert")) + object.vnameCert = $root.proto.VerifiedNameCertificate.toObject(message.vnameCert, options); + if (message.signed != null && message.hasOwnProperty("signed")) + object.signed = message.signed; + if (message.revoked != null && message.hasOwnProperty("revoked")) + object.revoked = message.revoked; + if (message.hostStorage != null && message.hasOwnProperty("hostStorage")) + object.hostStorage = options.enums === String ? $root.proto.BizIdentityInfo.BizIdentityInfoHostStorageType[message.hostStorage] : message.hostStorage; + if (message.actualActors != null && message.hasOwnProperty("actualActors")) + object.actualActors = options.enums === String ? $root.proto.BizIdentityInfo.BizIdentityInfoActualActorsType[message.actualActors] : message.actualActors; + if (message.privacyModeTs != null && message.hasOwnProperty("privacyModeTs")) + if (typeof message.privacyModeTs === "number") + object.privacyModeTs = options.longs === String ? String(message.privacyModeTs) : message.privacyModeTs; + else + object.privacyModeTs = options.longs === String ? $util.Long.prototype.toString.call(message.privacyModeTs) : options.longs === Number ? new $util.LongBits(message.privacyModeTs.low >>> 0, message.privacyModeTs.high >>> 0).toNumber(true) : message.privacyModeTs; + return object; + }; + + /** + * Converts this BizIdentityInfo to JSON. + * @function toJSON + * @memberof proto.BizIdentityInfo + * @instance + * @returns {Object.} JSON object + */ + BizIdentityInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * BizIdentityInfoVerifiedLevelValue enum. + * @name proto.BizIdentityInfo.BizIdentityInfoVerifiedLevelValue + * @enum {number} + * @property {number} UNKNOWN=0 UNKNOWN value + * @property {number} LOW=1 LOW value + * @property {number} HIGH=2 HIGH value + */ + BizIdentityInfo.BizIdentityInfoVerifiedLevelValue = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN"] = 0; + values[valuesById[1] = "LOW"] = 1; + values[valuesById[2] = "HIGH"] = 2; + return values; + })(); + + /** + * BizIdentityInfoHostStorageType enum. + * @name proto.BizIdentityInfo.BizIdentityInfoHostStorageType + * @enum {number} + * @property {number} ON_PREMISE=0 ON_PREMISE value + * @property {number} FACEBOOK=1 FACEBOOK value + */ + BizIdentityInfo.BizIdentityInfoHostStorageType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ON_PREMISE"] = 0; + values[valuesById[1] = "FACEBOOK"] = 1; + return values; + })(); + + /** + * BizIdentityInfoActualActorsType enum. + * @name proto.BizIdentityInfo.BizIdentityInfoActualActorsType + * @enum {number} + * @property {number} SELF=0 SELF value + * @property {number} BSP=1 BSP value + */ + BizIdentityInfo.BizIdentityInfoActualActorsType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SELF"] = 0; + values[valuesById[1] = "BSP"] = 1; + return values; + })(); + + return BizIdentityInfo; + })(); + + proto.BizAccountLinkInfo = (function() { + + /** + * Properties of a BizAccountLinkInfo. + * @memberof proto + * @interface IBizAccountLinkInfo + * @property {number|Long|null} [whatsappBizAcctFbid] BizAccountLinkInfo whatsappBizAcctFbid + * @property {string|null} [whatsappAcctNumber] BizAccountLinkInfo whatsappAcctNumber + * @property {number|Long|null} [issueTime] BizAccountLinkInfo issueTime + * @property {proto.BizAccountLinkInfo.BizAccountLinkInfoHostStorageType|null} [hostStorage] BizAccountLinkInfo hostStorage + * @property {proto.BizAccountLinkInfo.BizAccountLinkInfoAccountType|null} [accountType] BizAccountLinkInfo accountType + */ + + /** + * Constructs a new BizAccountLinkInfo. + * @memberof proto + * @classdesc Represents a BizAccountLinkInfo. + * @implements IBizAccountLinkInfo + * @constructor + * @param {proto.IBizAccountLinkInfo=} [properties] Properties to set + */ + function BizAccountLinkInfo(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]]; + } + + /** + * BizAccountLinkInfo whatsappBizAcctFbid. + * @member {number|Long} whatsappBizAcctFbid + * @memberof proto.BizAccountLinkInfo + * @instance + */ + BizAccountLinkInfo.prototype.whatsappBizAcctFbid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * BizAccountLinkInfo whatsappAcctNumber. + * @member {string} whatsappAcctNumber + * @memberof proto.BizAccountLinkInfo + * @instance + */ + BizAccountLinkInfo.prototype.whatsappAcctNumber = ""; + + /** + * BizAccountLinkInfo issueTime. + * @member {number|Long} issueTime + * @memberof proto.BizAccountLinkInfo + * @instance + */ + BizAccountLinkInfo.prototype.issueTime = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * BizAccountLinkInfo hostStorage. + * @member {proto.BizAccountLinkInfo.BizAccountLinkInfoHostStorageType} hostStorage + * @memberof proto.BizAccountLinkInfo + * @instance + */ + BizAccountLinkInfo.prototype.hostStorage = 0; + + /** + * BizAccountLinkInfo accountType. + * @member {proto.BizAccountLinkInfo.BizAccountLinkInfoAccountType} accountType + * @memberof proto.BizAccountLinkInfo + * @instance + */ + BizAccountLinkInfo.prototype.accountType = 0; + + /** + * Creates a new BizAccountLinkInfo instance using the specified properties. + * @function create + * @memberof proto.BizAccountLinkInfo + * @static + * @param {proto.IBizAccountLinkInfo=} [properties] Properties to set + * @returns {proto.BizAccountLinkInfo} BizAccountLinkInfo instance + */ + BizAccountLinkInfo.create = function create(properties) { + return new BizAccountLinkInfo(properties); + }; + + /** + * Encodes the specified BizAccountLinkInfo message. Does not implicitly {@link proto.BizAccountLinkInfo.verify|verify} messages. + * @function encode + * @memberof proto.BizAccountLinkInfo + * @static + * @param {proto.IBizAccountLinkInfo} message BizAccountLinkInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BizAccountLinkInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.whatsappBizAcctFbid != null && Object.hasOwnProperty.call(message, "whatsappBizAcctFbid")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.whatsappBizAcctFbid); + if (message.whatsappAcctNumber != null && Object.hasOwnProperty.call(message, "whatsappAcctNumber")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.whatsappAcctNumber); + if (message.issueTime != null && Object.hasOwnProperty.call(message, "issueTime")) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.issueTime); + if (message.hostStorage != null && Object.hasOwnProperty.call(message, "hostStorage")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.hostStorage); + if (message.accountType != null && Object.hasOwnProperty.call(message, "accountType")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.accountType); + return writer; + }; + + /** + * Encodes the specified BizAccountLinkInfo message, length delimited. Does not implicitly {@link proto.BizAccountLinkInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.BizAccountLinkInfo + * @static + * @param {proto.IBizAccountLinkInfo} message BizAccountLinkInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BizAccountLinkInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BizAccountLinkInfo message from the specified reader or buffer. + * @function decode + * @memberof proto.BizAccountLinkInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.BizAccountLinkInfo} BizAccountLinkInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BizAccountLinkInfo.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.BizAccountLinkInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.whatsappBizAcctFbid = reader.uint64(); + break; + case 2: + message.whatsappAcctNumber = reader.string(); + break; + case 3: + message.issueTime = reader.uint64(); + break; + case 4: + message.hostStorage = reader.int32(); + break; + case 5: + message.accountType = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BizAccountLinkInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.BizAccountLinkInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.BizAccountLinkInfo} BizAccountLinkInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BizAccountLinkInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BizAccountLinkInfo message. + * @function verify + * @memberof proto.BizAccountLinkInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BizAccountLinkInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.whatsappBizAcctFbid != null && message.hasOwnProperty("whatsappBizAcctFbid")) + if (!$util.isInteger(message.whatsappBizAcctFbid) && !(message.whatsappBizAcctFbid && $util.isInteger(message.whatsappBizAcctFbid.low) && $util.isInteger(message.whatsappBizAcctFbid.high))) + return "whatsappBizAcctFbid: integer|Long expected"; + if (message.whatsappAcctNumber != null && message.hasOwnProperty("whatsappAcctNumber")) + if (!$util.isString(message.whatsappAcctNumber)) + return "whatsappAcctNumber: string expected"; + if (message.issueTime != null && message.hasOwnProperty("issueTime")) + if (!$util.isInteger(message.issueTime) && !(message.issueTime && $util.isInteger(message.issueTime.low) && $util.isInteger(message.issueTime.high))) + return "issueTime: integer|Long expected"; + if (message.hostStorage != null && message.hasOwnProperty("hostStorage")) + switch (message.hostStorage) { + default: + return "hostStorage: enum value expected"; + case 0: + case 1: + break; + } + if (message.accountType != null && message.hasOwnProperty("accountType")) + switch (message.accountType) { + default: + return "accountType: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; + + /** + * Creates a BizAccountLinkInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.BizAccountLinkInfo + * @static + * @param {Object.} object Plain object + * @returns {proto.BizAccountLinkInfo} BizAccountLinkInfo + */ + BizAccountLinkInfo.fromObject = function fromObject(object) { + if (object instanceof $root.proto.BizAccountLinkInfo) + return object; + var message = new $root.proto.BizAccountLinkInfo(); + if (object.whatsappBizAcctFbid != null) + if ($util.Long) + (message.whatsappBizAcctFbid = $util.Long.fromValue(object.whatsappBizAcctFbid)).unsigned = true; + else if (typeof object.whatsappBizAcctFbid === "string") + message.whatsappBizAcctFbid = parseInt(object.whatsappBizAcctFbid, 10); + else if (typeof object.whatsappBizAcctFbid === "number") + message.whatsappBizAcctFbid = object.whatsappBizAcctFbid; + else if (typeof object.whatsappBizAcctFbid === "object") + message.whatsappBizAcctFbid = new $util.LongBits(object.whatsappBizAcctFbid.low >>> 0, object.whatsappBizAcctFbid.high >>> 0).toNumber(true); + if (object.whatsappAcctNumber != null) + message.whatsappAcctNumber = String(object.whatsappAcctNumber); + if (object.issueTime != null) + if ($util.Long) + (message.issueTime = $util.Long.fromValue(object.issueTime)).unsigned = true; + else if (typeof object.issueTime === "string") + message.issueTime = parseInt(object.issueTime, 10); + else if (typeof object.issueTime === "number") + message.issueTime = object.issueTime; + else if (typeof object.issueTime === "object") + message.issueTime = new $util.LongBits(object.issueTime.low >>> 0, object.issueTime.high >>> 0).toNumber(true); + switch (object.hostStorage) { + case "ON_PREMISE": + case 0: + message.hostStorage = 0; + break; + case "FACEBOOK": + case 1: + message.hostStorage = 1; + break; + } + switch (object.accountType) { + case "ENTERPRISE": + case 0: + message.accountType = 0; + break; + case "PAGE": + case 1: + message.accountType = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from a BizAccountLinkInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.BizAccountLinkInfo + * @static + * @param {proto.BizAccountLinkInfo} message BizAccountLinkInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BizAccountLinkInfo.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.whatsappBizAcctFbid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.whatsappBizAcctFbid = options.longs === String ? "0" : 0; + object.whatsappAcctNumber = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.issueTime = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.issueTime = options.longs === String ? "0" : 0; + object.hostStorage = options.enums === String ? "ON_PREMISE" : 0; + object.accountType = options.enums === String ? "ENTERPRISE" : 0; + } + if (message.whatsappBizAcctFbid != null && message.hasOwnProperty("whatsappBizAcctFbid")) + if (typeof message.whatsappBizAcctFbid === "number") + object.whatsappBizAcctFbid = options.longs === String ? String(message.whatsappBizAcctFbid) : message.whatsappBizAcctFbid; + else + object.whatsappBizAcctFbid = options.longs === String ? $util.Long.prototype.toString.call(message.whatsappBizAcctFbid) : options.longs === Number ? new $util.LongBits(message.whatsappBizAcctFbid.low >>> 0, message.whatsappBizAcctFbid.high >>> 0).toNumber(true) : message.whatsappBizAcctFbid; + if (message.whatsappAcctNumber != null && message.hasOwnProperty("whatsappAcctNumber")) + object.whatsappAcctNumber = message.whatsappAcctNumber; + if (message.issueTime != null && message.hasOwnProperty("issueTime")) + if (typeof message.issueTime === "number") + object.issueTime = options.longs === String ? String(message.issueTime) : message.issueTime; + else + object.issueTime = options.longs === String ? $util.Long.prototype.toString.call(message.issueTime) : options.longs === Number ? new $util.LongBits(message.issueTime.low >>> 0, message.issueTime.high >>> 0).toNumber(true) : message.issueTime; + if (message.hostStorage != null && message.hasOwnProperty("hostStorage")) + object.hostStorage = options.enums === String ? $root.proto.BizAccountLinkInfo.BizAccountLinkInfoHostStorageType[message.hostStorage] : message.hostStorage; + if (message.accountType != null && message.hasOwnProperty("accountType")) + object.accountType = options.enums === String ? $root.proto.BizAccountLinkInfo.BizAccountLinkInfoAccountType[message.accountType] : message.accountType; + return object; + }; + + /** + * Converts this BizAccountLinkInfo to JSON. + * @function toJSON + * @memberof proto.BizAccountLinkInfo + * @instance + * @returns {Object.} JSON object + */ + BizAccountLinkInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * BizAccountLinkInfoHostStorageType enum. + * @name proto.BizAccountLinkInfo.BizAccountLinkInfoHostStorageType + * @enum {number} + * @property {number} ON_PREMISE=0 ON_PREMISE value + * @property {number} FACEBOOK=1 FACEBOOK value + */ + BizAccountLinkInfo.BizAccountLinkInfoHostStorageType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ON_PREMISE"] = 0; + values[valuesById[1] = "FACEBOOK"] = 1; + return values; + })(); + + /** + * BizAccountLinkInfoAccountType enum. + * @name proto.BizAccountLinkInfo.BizAccountLinkInfoAccountType + * @enum {number} + * @property {number} ENTERPRISE=0 ENTERPRISE value + * @property {number} PAGE=1 PAGE value + */ + BizAccountLinkInfo.BizAccountLinkInfoAccountType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENTERPRISE"] = 0; + values[valuesById[1] = "PAGE"] = 1; + return values; + })(); + + return BizAccountLinkInfo; + })(); + + proto.BizAccountPayload = (function() { + + /** + * Properties of a BizAccountPayload. + * @memberof proto + * @interface IBizAccountPayload + * @property {proto.IVerifiedNameCertificate|null} [vnameCert] BizAccountPayload vnameCert + * @property {Uint8Array|null} [bizAcctLinkInfo] BizAccountPayload bizAcctLinkInfo + */ + + /** + * Constructs a new BizAccountPayload. + * @memberof proto + * @classdesc Represents a BizAccountPayload. + * @implements IBizAccountPayload + * @constructor + * @param {proto.IBizAccountPayload=} [properties] Properties to set + */ + function BizAccountPayload(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]]; + } + + /** + * BizAccountPayload vnameCert. + * @member {proto.IVerifiedNameCertificate|null|undefined} vnameCert + * @memberof proto.BizAccountPayload + * @instance + */ + BizAccountPayload.prototype.vnameCert = null; + + /** + * BizAccountPayload bizAcctLinkInfo. + * @member {Uint8Array} bizAcctLinkInfo + * @memberof proto.BizAccountPayload + * @instance + */ + BizAccountPayload.prototype.bizAcctLinkInfo = $util.newBuffer([]); + + /** + * Creates a new BizAccountPayload instance using the specified properties. + * @function create + * @memberof proto.BizAccountPayload + * @static + * @param {proto.IBizAccountPayload=} [properties] Properties to set + * @returns {proto.BizAccountPayload} BizAccountPayload instance + */ + BizAccountPayload.create = function create(properties) { + return new BizAccountPayload(properties); + }; + + /** + * Encodes the specified BizAccountPayload message. Does not implicitly {@link proto.BizAccountPayload.verify|verify} messages. + * @function encode + * @memberof proto.BizAccountPayload + * @static + * @param {proto.IBizAccountPayload} message BizAccountPayload message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BizAccountPayload.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.vnameCert != null && Object.hasOwnProperty.call(message, "vnameCert")) + $root.proto.VerifiedNameCertificate.encode(message.vnameCert, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.bizAcctLinkInfo != null && Object.hasOwnProperty.call(message, "bizAcctLinkInfo")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.bizAcctLinkInfo); + return writer; + }; + + /** + * Encodes the specified BizAccountPayload message, length delimited. Does not implicitly {@link proto.BizAccountPayload.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.BizAccountPayload + * @static + * @param {proto.IBizAccountPayload} message BizAccountPayload message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BizAccountPayload.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BizAccountPayload message from the specified reader or buffer. + * @function decode + * @memberof proto.BizAccountPayload + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.BizAccountPayload} BizAccountPayload + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BizAccountPayload.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.BizAccountPayload(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.vnameCert = $root.proto.VerifiedNameCertificate.decode(reader, reader.uint32()); + break; + case 2: + message.bizAcctLinkInfo = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BizAccountPayload message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.BizAccountPayload + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.BizAccountPayload} BizAccountPayload + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BizAccountPayload.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BizAccountPayload message. + * @function verify + * @memberof proto.BizAccountPayload + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BizAccountPayload.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.vnameCert != null && message.hasOwnProperty("vnameCert")) { + var error = $root.proto.VerifiedNameCertificate.verify(message.vnameCert); + if (error) + return "vnameCert." + error; + } + if (message.bizAcctLinkInfo != null && message.hasOwnProperty("bizAcctLinkInfo")) + if (!(message.bizAcctLinkInfo && typeof message.bizAcctLinkInfo.length === "number" || $util.isString(message.bizAcctLinkInfo))) + return "bizAcctLinkInfo: buffer expected"; + return null; + }; + + /** + * Creates a BizAccountPayload message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.BizAccountPayload + * @static + * @param {Object.} object Plain object + * @returns {proto.BizAccountPayload} BizAccountPayload + */ + BizAccountPayload.fromObject = function fromObject(object) { + if (object instanceof $root.proto.BizAccountPayload) + return object; + var message = new $root.proto.BizAccountPayload(); + if (object.vnameCert != null) { + if (typeof object.vnameCert !== "object") + throw TypeError(".proto.BizAccountPayload.vnameCert: object expected"); + message.vnameCert = $root.proto.VerifiedNameCertificate.fromObject(object.vnameCert); + } + if (object.bizAcctLinkInfo != null) + if (typeof object.bizAcctLinkInfo === "string") + $util.base64.decode(object.bizAcctLinkInfo, message.bizAcctLinkInfo = $util.newBuffer($util.base64.length(object.bizAcctLinkInfo)), 0); + else if (object.bizAcctLinkInfo.length) + message.bizAcctLinkInfo = object.bizAcctLinkInfo; + return message; + }; + + /** + * Creates a plain object from a BizAccountPayload message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.BizAccountPayload + * @static + * @param {proto.BizAccountPayload} message BizAccountPayload + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BizAccountPayload.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.vnameCert = null; + if (options.bytes === String) + object.bizAcctLinkInfo = ""; + else { + object.bizAcctLinkInfo = []; + if (options.bytes !== Array) + object.bizAcctLinkInfo = $util.newBuffer(object.bizAcctLinkInfo); + } + } + if (message.vnameCert != null && message.hasOwnProperty("vnameCert")) + object.vnameCert = $root.proto.VerifiedNameCertificate.toObject(message.vnameCert, options); + if (message.bizAcctLinkInfo != null && message.hasOwnProperty("bizAcctLinkInfo")) + object.bizAcctLinkInfo = options.bytes === String ? $util.base64.encode(message.bizAcctLinkInfo, 0, message.bizAcctLinkInfo.length) : options.bytes === Array ? Array.prototype.slice.call(message.bizAcctLinkInfo) : message.bizAcctLinkInfo; + return object; + }; + + /** + * Converts this BizAccountPayload to JSON. + * @function toJSON + * @memberof proto.BizAccountPayload + * @instance + * @returns {Object.} JSON object + */ + BizAccountPayload.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return BizAccountPayload; + })(); + + proto.VerifiedNameCertificate = (function() { + + /** + * Properties of a VerifiedNameCertificate. + * @memberof proto + * @interface IVerifiedNameCertificate + * @property {Uint8Array|null} [details] VerifiedNameCertificate details + * @property {Uint8Array|null} [signature] VerifiedNameCertificate signature + * @property {Uint8Array|null} [serverSignature] VerifiedNameCertificate serverSignature + */ + + /** + * Constructs a new VerifiedNameCertificate. + * @memberof proto + * @classdesc Represents a VerifiedNameCertificate. + * @implements IVerifiedNameCertificate + * @constructor + * @param {proto.IVerifiedNameCertificate=} [properties] Properties to set + */ + function VerifiedNameCertificate(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]]; + } + + /** + * VerifiedNameCertificate details. + * @member {Uint8Array} details + * @memberof proto.VerifiedNameCertificate + * @instance + */ + VerifiedNameCertificate.prototype.details = $util.newBuffer([]); + + /** + * VerifiedNameCertificate signature. + * @member {Uint8Array} signature + * @memberof proto.VerifiedNameCertificate + * @instance + */ + VerifiedNameCertificate.prototype.signature = $util.newBuffer([]); + + /** + * VerifiedNameCertificate serverSignature. + * @member {Uint8Array} serverSignature + * @memberof proto.VerifiedNameCertificate + * @instance + */ + VerifiedNameCertificate.prototype.serverSignature = $util.newBuffer([]); + + /** + * Creates a new VerifiedNameCertificate instance using the specified properties. + * @function create + * @memberof proto.VerifiedNameCertificate + * @static + * @param {proto.IVerifiedNameCertificate=} [properties] Properties to set + * @returns {proto.VerifiedNameCertificate} VerifiedNameCertificate instance + */ + VerifiedNameCertificate.create = function create(properties) { + return new VerifiedNameCertificate(properties); + }; + + /** + * Encodes the specified VerifiedNameCertificate message. Does not implicitly {@link proto.VerifiedNameCertificate.verify|verify} messages. + * @function encode + * @memberof proto.VerifiedNameCertificate + * @static + * @param {proto.IVerifiedNameCertificate} message VerifiedNameCertificate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VerifiedNameCertificate.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); + if (message.serverSignature != null && Object.hasOwnProperty.call(message, "serverSignature")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.serverSignature); + return writer; + }; + + /** + * Encodes the specified VerifiedNameCertificate message, length delimited. Does not implicitly {@link proto.VerifiedNameCertificate.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.VerifiedNameCertificate + * @static + * @param {proto.IVerifiedNameCertificate} message VerifiedNameCertificate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VerifiedNameCertificate.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VerifiedNameCertificate message from the specified reader or buffer. + * @function decode + * @memberof proto.VerifiedNameCertificate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.VerifiedNameCertificate} VerifiedNameCertificate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VerifiedNameCertificate.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.VerifiedNameCertificate(); + 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; + case 3: + message.serverSignature = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VerifiedNameCertificate message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.VerifiedNameCertificate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.VerifiedNameCertificate} VerifiedNameCertificate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VerifiedNameCertificate.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VerifiedNameCertificate message. + * @function verify + * @memberof proto.VerifiedNameCertificate + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VerifiedNameCertificate.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"; + if (message.serverSignature != null && message.hasOwnProperty("serverSignature")) + if (!(message.serverSignature && typeof message.serverSignature.length === "number" || $util.isString(message.serverSignature))) + return "serverSignature: buffer expected"; + return null; + }; + + /** + * Creates a VerifiedNameCertificate message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.VerifiedNameCertificate + * @static + * @param {Object.} object Plain object + * @returns {proto.VerifiedNameCertificate} VerifiedNameCertificate + */ + VerifiedNameCertificate.fromObject = function fromObject(object) { + if (object instanceof $root.proto.VerifiedNameCertificate) + return object; + var message = new $root.proto.VerifiedNameCertificate(); + 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; + if (object.serverSignature != null) + if (typeof object.serverSignature === "string") + $util.base64.decode(object.serverSignature, message.serverSignature = $util.newBuffer($util.base64.length(object.serverSignature)), 0); + else if (object.serverSignature.length) + message.serverSignature = object.serverSignature; + return message; + }; + + /** + * Creates a plain object from a VerifiedNameCertificate message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.VerifiedNameCertificate + * @static + * @param {proto.VerifiedNameCertificate} message VerifiedNameCertificate + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VerifiedNameCertificate.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 (options.bytes === String) + object.serverSignature = ""; + else { + object.serverSignature = []; + if (options.bytes !== Array) + object.serverSignature = $util.newBuffer(object.serverSignature); + } + } + 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; + if (message.serverSignature != null && message.hasOwnProperty("serverSignature")) + object.serverSignature = options.bytes === String ? $util.base64.encode(message.serverSignature, 0, message.serverSignature.length) : options.bytes === Array ? Array.prototype.slice.call(message.serverSignature) : message.serverSignature; + return object; + }; + + /** + * Converts this VerifiedNameCertificate to JSON. + * @function toJSON + * @memberof proto.VerifiedNameCertificate + * @instance + * @returns {Object.} JSON object + */ + VerifiedNameCertificate.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return VerifiedNameCertificate; + })(); + + proto.LocalizedName = (function() { + + /** + * 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 + */ + + /** + * Constructs a new LocalizedName. + * @memberof proto + * @classdesc Represents a LocalizedName. + * @implements ILocalizedName + * @constructor + * @param {proto.ILocalizedName=} [properties] Properties to set + */ + 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]]; + } + + /** + * LocalizedName lg. + * @member {string} lg + * @memberof proto.LocalizedName + * @instance + */ + LocalizedName.prototype.lg = ""; + + /** + * LocalizedName lc. + * @member {string} lc + * @memberof proto.LocalizedName + * @instance + */ + LocalizedName.prototype.lc = ""; + + /** + * LocalizedName verifiedName. + * @member {string} verifiedName + * @memberof proto.LocalizedName + * @instance + */ + LocalizedName.prototype.verifiedName = ""; + + /** + * 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 + */ + LocalizedName.create = function create(properties) { + return new LocalizedName(properties); + }; + + /** + * 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 + */ + 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; + }; + + /** + * 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 + */ + LocalizedName.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * 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 + */ + 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; + }; + + /** + * 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 + */ + LocalizedName.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * 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 + */ + 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; + }; + + /** + * 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 + */ + 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; + }; + + /** + * 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 + */ + 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; + }; + + /** + * Converts this LocalizedName to JSON. + * @function toJSON + * @memberof proto.LocalizedName + * @instance + * @returns {Object.} JSON object + */ + LocalizedName.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return LocalizedName; + })(); + + proto.SyncActionData = (function() { + + /** + * Properties of a SyncActionData. + * @memberof proto + * @interface ISyncActionData + * @property {Uint8Array|null} [index] SyncActionData index + * @property {proto.ISyncActionValue|null} [value] SyncActionData value + * @property {Uint8Array|null} [padding] SyncActionData padding + * @property {number|null} [version] SyncActionData version + */ + + /** + * Constructs a new SyncActionData. + * @memberof proto + * @classdesc Represents a SyncActionData. + * @implements ISyncActionData + * @constructor + * @param {proto.ISyncActionData=} [properties] Properties to set + */ + function SyncActionData(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]]; + } + + /** + * SyncActionData index. + * @member {Uint8Array} index + * @memberof proto.SyncActionData + * @instance + */ + SyncActionData.prototype.index = $util.newBuffer([]); + + /** + * SyncActionData value. + * @member {proto.ISyncActionValue|null|undefined} value + * @memberof proto.SyncActionData + * @instance + */ + SyncActionData.prototype.value = null; + + /** + * SyncActionData padding. + * @member {Uint8Array} padding + * @memberof proto.SyncActionData + * @instance + */ + SyncActionData.prototype.padding = $util.newBuffer([]); + + /** + * SyncActionData version. + * @member {number} version + * @memberof proto.SyncActionData + * @instance + */ + SyncActionData.prototype.version = 0; + + /** + * Creates a new SyncActionData instance using the specified properties. + * @function create + * @memberof proto.SyncActionData + * @static + * @param {proto.ISyncActionData=} [properties] Properties to set + * @returns {proto.SyncActionData} SyncActionData instance + */ + SyncActionData.create = function create(properties) { + return new SyncActionData(properties); + }; + + /** + * Encodes the specified SyncActionData message. Does not implicitly {@link proto.SyncActionData.verify|verify} messages. + * @function encode + * @memberof proto.SyncActionData + * @static + * @param {proto.ISyncActionData} message SyncActionData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SyncActionData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.index != null && Object.hasOwnProperty.call(message, "index")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.index); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + $root.proto.SyncActionValue.encode(message.value, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.padding != null && Object.hasOwnProperty.call(message, "padding")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.padding); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.version); + return writer; + }; + + /** + * Encodes the specified SyncActionData message, length delimited. Does not implicitly {@link proto.SyncActionData.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.SyncActionData + * @static + * @param {proto.ISyncActionData} message SyncActionData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SyncActionData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SyncActionData message from the specified reader or buffer. + * @function decode + * @memberof proto.SyncActionData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.SyncActionData} SyncActionData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SyncActionData.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.SyncActionData(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.index = reader.bytes(); + break; + case 2: + message.value = $root.proto.SyncActionValue.decode(reader, reader.uint32()); + break; + case 3: + message.padding = reader.bytes(); + break; + case 4: + message.version = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SyncActionData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.SyncActionData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.SyncActionData} SyncActionData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SyncActionData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SyncActionData message. + * @function verify + * @memberof proto.SyncActionData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SyncActionData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.index != null && message.hasOwnProperty("index")) + if (!(message.index && typeof message.index.length === "number" || $util.isString(message.index))) + return "index: buffer expected"; + if (message.value != null && message.hasOwnProperty("value")) { + var error = $root.proto.SyncActionValue.verify(message.value); + if (error) + return "value." + error; + } + if (message.padding != null && message.hasOwnProperty("padding")) + if (!(message.padding && typeof message.padding.length === "number" || $util.isString(message.padding))) + return "padding: buffer expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isInteger(message.version)) + return "version: integer expected"; + return null; + }; + + /** + * Creates a SyncActionData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.SyncActionData + * @static + * @param {Object.} object Plain object + * @returns {proto.SyncActionData} SyncActionData + */ + SyncActionData.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SyncActionData) + return object; + var message = new $root.proto.SyncActionData(); + if (object.index != null) + if (typeof object.index === "string") + $util.base64.decode(object.index, message.index = $util.newBuffer($util.base64.length(object.index)), 0); + else if (object.index.length) + message.index = object.index; + if (object.value != null) { + if (typeof object.value !== "object") + throw TypeError(".proto.SyncActionData.value: object expected"); + message.value = $root.proto.SyncActionValue.fromObject(object.value); + } + if (object.padding != null) + if (typeof object.padding === "string") + $util.base64.decode(object.padding, message.padding = $util.newBuffer($util.base64.length(object.padding)), 0); + else if (object.padding.length) + message.padding = object.padding; + if (object.version != null) + message.version = object.version | 0; + return message; + }; + + /** + * Creates a plain object from a SyncActionData message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.SyncActionData + * @static + * @param {proto.SyncActionData} message SyncActionData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SyncActionData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.index = ""; + else { + object.index = []; + if (options.bytes !== Array) + object.index = $util.newBuffer(object.index); + } + object.value = null; + if (options.bytes === String) + object.padding = ""; + else { + object.padding = []; + if (options.bytes !== Array) + object.padding = $util.newBuffer(object.padding); + } + object.version = 0; + } + if (message.index != null && message.hasOwnProperty("index")) + object.index = options.bytes === String ? $util.base64.encode(message.index, 0, message.index.length) : options.bytes === Array ? Array.prototype.slice.call(message.index) : message.index; + if (message.value != null && message.hasOwnProperty("value")) + object.value = $root.proto.SyncActionValue.toObject(message.value, options); + if (message.padding != null && message.hasOwnProperty("padding")) + object.padding = options.bytes === String ? $util.base64.encode(message.padding, 0, message.padding.length) : options.bytes === Array ? Array.prototype.slice.call(message.padding) : message.padding; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + return object; + }; + + /** + * Converts this SyncActionData to JSON. + * @function toJSON + * @memberof proto.SyncActionData + * @instance + * @returns {Object.} JSON object + */ + SyncActionData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SyncActionData; + })(); + + proto.StarAction = (function() { + + /** + * Properties of a StarAction. + * @memberof proto + * @interface IStarAction + * @property {boolean|null} [starred] StarAction starred + */ + + /** + * Constructs a new StarAction. + * @memberof proto + * @classdesc Represents a StarAction. + * @implements IStarAction + * @constructor + * @param {proto.IStarAction=} [properties] Properties to set + */ + function StarAction(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]]; + } + + /** + * StarAction starred. + * @member {boolean} starred + * @memberof proto.StarAction + * @instance + */ + StarAction.prototype.starred = false; + + /** + * Creates a new StarAction instance using the specified properties. + * @function create + * @memberof proto.StarAction + * @static + * @param {proto.IStarAction=} [properties] Properties to set + * @returns {proto.StarAction} StarAction instance + */ + StarAction.create = function create(properties) { + return new StarAction(properties); + }; + + /** + * Encodes the specified StarAction message. Does not implicitly {@link proto.StarAction.verify|verify} messages. + * @function encode + * @memberof proto.StarAction + * @static + * @param {proto.IStarAction} message StarAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StarAction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.starred != null && Object.hasOwnProperty.call(message, "starred")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.starred); + return writer; + }; + + /** + * Encodes the specified StarAction message, length delimited. Does not implicitly {@link proto.StarAction.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.StarAction + * @static + * @param {proto.IStarAction} message StarAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StarAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StarAction message from the specified reader or buffer. + * @function decode + * @memberof proto.StarAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.StarAction} StarAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StarAction.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.StarAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.starred = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StarAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.StarAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.StarAction} StarAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StarAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StarAction message. + * @function verify + * @memberof proto.StarAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StarAction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.starred != null && message.hasOwnProperty("starred")) + if (typeof message.starred !== "boolean") + return "starred: boolean expected"; + return null; + }; + + /** + * Creates a StarAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.StarAction + * @static + * @param {Object.} object Plain object + * @returns {proto.StarAction} StarAction + */ + StarAction.fromObject = function fromObject(object) { + if (object instanceof $root.proto.StarAction) + return object; + var message = new $root.proto.StarAction(); + if (object.starred != null) + message.starred = Boolean(object.starred); + return message; + }; + + /** + * Creates a plain object from a StarAction message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.StarAction + * @static + * @param {proto.StarAction} message StarAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StarAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.starred = false; + if (message.starred != null && message.hasOwnProperty("starred")) + object.starred = message.starred; + return object; + }; + + /** + * Converts this StarAction to JSON. + * @function toJSON + * @memberof proto.StarAction + * @instance + * @returns {Object.} JSON object + */ + StarAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return StarAction; + })(); + + proto.ContactAction = (function() { + + /** + * Properties of a ContactAction. + * @memberof proto + * @interface IContactAction + * @property {string|null} [fullName] ContactAction fullName + * @property {string|null} [firstName] ContactAction firstName + */ + + /** + * Constructs a new ContactAction. + * @memberof proto + * @classdesc Represents a ContactAction. + * @implements IContactAction + * @constructor + * @param {proto.IContactAction=} [properties] Properties to set + */ + function ContactAction(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]]; + } + + /** + * ContactAction fullName. + * @member {string} fullName + * @memberof proto.ContactAction + * @instance + */ + ContactAction.prototype.fullName = ""; + + /** + * ContactAction firstName. + * @member {string} firstName + * @memberof proto.ContactAction + * @instance + */ + ContactAction.prototype.firstName = ""; + + /** + * Creates a new ContactAction instance using the specified properties. + * @function create + * @memberof proto.ContactAction + * @static + * @param {proto.IContactAction=} [properties] Properties to set + * @returns {proto.ContactAction} ContactAction instance + */ + ContactAction.create = function create(properties) { + return new ContactAction(properties); + }; + + /** + * Encodes the specified ContactAction message. Does not implicitly {@link proto.ContactAction.verify|verify} messages. + * @function encode + * @memberof proto.ContactAction + * @static + * @param {proto.IContactAction} message ContactAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ContactAction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.fullName); + if (message.firstName != null && Object.hasOwnProperty.call(message, "firstName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.firstName); + return writer; + }; + + /** + * Encodes the specified ContactAction message, length delimited. Does not implicitly {@link proto.ContactAction.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.ContactAction + * @static + * @param {proto.IContactAction} message ContactAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ContactAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ContactAction message from the specified reader or buffer. + * @function decode + * @memberof proto.ContactAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.ContactAction} ContactAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ContactAction.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.ContactAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.fullName = reader.string(); + break; + case 2: + message.firstName = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ContactAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.ContactAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.ContactAction} ContactAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ContactAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ContactAction message. + * @function verify + * @memberof proto.ContactAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ContactAction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fullName != null && message.hasOwnProperty("fullName")) + if (!$util.isString(message.fullName)) + return "fullName: string expected"; + if (message.firstName != null && message.hasOwnProperty("firstName")) + if (!$util.isString(message.firstName)) + return "firstName: string expected"; + return null; + }; + + /** + * Creates a ContactAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.ContactAction + * @static + * @param {Object.} object Plain object + * @returns {proto.ContactAction} ContactAction + */ + ContactAction.fromObject = function fromObject(object) { + if (object instanceof $root.proto.ContactAction) + return object; + var message = new $root.proto.ContactAction(); + if (object.fullName != null) + message.fullName = String(object.fullName); + if (object.firstName != null) + message.firstName = String(object.firstName); + return message; + }; + + /** + * Creates a plain object from a ContactAction message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.ContactAction + * @static + * @param {proto.ContactAction} message ContactAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ContactAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.fullName = ""; + object.firstName = ""; + } + if (message.fullName != null && message.hasOwnProperty("fullName")) + object.fullName = message.fullName; + if (message.firstName != null && message.hasOwnProperty("firstName")) + object.firstName = message.firstName; + return object; + }; + + /** + * Converts this ContactAction to JSON. + * @function toJSON + * @memberof proto.ContactAction + * @instance + * @returns {Object.} JSON object + */ + ContactAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ContactAction; + })(); + + proto.MuteAction = (function() { + + /** + * Properties of a MuteAction. + * @memberof proto + * @interface IMuteAction + * @property {boolean|null} [muted] MuteAction muted + * @property {number|Long|null} [muteEndTimestamp] MuteAction muteEndTimestamp + */ + + /** + * Constructs a new MuteAction. + * @memberof proto + * @classdesc Represents a MuteAction. + * @implements IMuteAction + * @constructor + * @param {proto.IMuteAction=} [properties] Properties to set + */ + function MuteAction(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]]; + } + + /** + * MuteAction muted. + * @member {boolean} muted + * @memberof proto.MuteAction + * @instance + */ + MuteAction.prototype.muted = false; + + /** + * MuteAction muteEndTimestamp. + * @member {number|Long} muteEndTimestamp + * @memberof proto.MuteAction + * @instance + */ + MuteAction.prototype.muteEndTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new MuteAction instance using the specified properties. + * @function create + * @memberof proto.MuteAction + * @static + * @param {proto.IMuteAction=} [properties] Properties to set + * @returns {proto.MuteAction} MuteAction instance + */ + MuteAction.create = function create(properties) { + return new MuteAction(properties); + }; + + /** + * Encodes the specified MuteAction message. Does not implicitly {@link proto.MuteAction.verify|verify} messages. + * @function encode + * @memberof proto.MuteAction + * @static + * @param {proto.IMuteAction} message MuteAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MuteAction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.muted != null && Object.hasOwnProperty.call(message, "muted")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.muted); + if (message.muteEndTimestamp != null && Object.hasOwnProperty.call(message, "muteEndTimestamp")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.muteEndTimestamp); + return writer; + }; + + /** + * Encodes the specified MuteAction message, length delimited. Does not implicitly {@link proto.MuteAction.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.MuteAction + * @static + * @param {proto.IMuteAction} message MuteAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MuteAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MuteAction message from the specified reader or buffer. + * @function decode + * @memberof proto.MuteAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.MuteAction} MuteAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MuteAction.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.MuteAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.muted = reader.bool(); + break; + case 2: + message.muteEndTimestamp = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MuteAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.MuteAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.MuteAction} MuteAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MuteAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MuteAction message. + * @function verify + * @memberof proto.MuteAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MuteAction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.muted != null && message.hasOwnProperty("muted")) + if (typeof message.muted !== "boolean") + return "muted: boolean expected"; + if (message.muteEndTimestamp != null && message.hasOwnProperty("muteEndTimestamp")) + if (!$util.isInteger(message.muteEndTimestamp) && !(message.muteEndTimestamp && $util.isInteger(message.muteEndTimestamp.low) && $util.isInteger(message.muteEndTimestamp.high))) + return "muteEndTimestamp: integer|Long expected"; + return null; + }; + + /** + * Creates a MuteAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.MuteAction + * @static + * @param {Object.} object Plain object + * @returns {proto.MuteAction} MuteAction + */ + MuteAction.fromObject = function fromObject(object) { + if (object instanceof $root.proto.MuteAction) + return object; + var message = new $root.proto.MuteAction(); + if (object.muted != null) + message.muted = Boolean(object.muted); + if (object.muteEndTimestamp != null) + if ($util.Long) + (message.muteEndTimestamp = $util.Long.fromValue(object.muteEndTimestamp)).unsigned = false; + else if (typeof object.muteEndTimestamp === "string") + message.muteEndTimestamp = parseInt(object.muteEndTimestamp, 10); + else if (typeof object.muteEndTimestamp === "number") + message.muteEndTimestamp = object.muteEndTimestamp; + else if (typeof object.muteEndTimestamp === "object") + message.muteEndTimestamp = new $util.LongBits(object.muteEndTimestamp.low >>> 0, object.muteEndTimestamp.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a MuteAction message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.MuteAction + * @static + * @param {proto.MuteAction} message MuteAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MuteAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.muted = false; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.muteEndTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.muteEndTimestamp = options.longs === String ? "0" : 0; + } + if (message.muted != null && message.hasOwnProperty("muted")) + object.muted = message.muted; + if (message.muteEndTimestamp != null && message.hasOwnProperty("muteEndTimestamp")) + if (typeof message.muteEndTimestamp === "number") + object.muteEndTimestamp = options.longs === String ? String(message.muteEndTimestamp) : message.muteEndTimestamp; + else + object.muteEndTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.muteEndTimestamp) : options.longs === Number ? new $util.LongBits(message.muteEndTimestamp.low >>> 0, message.muteEndTimestamp.high >>> 0).toNumber() : message.muteEndTimestamp; + return object; + }; + + /** + * Converts this MuteAction to JSON. + * @function toJSON + * @memberof proto.MuteAction + * @instance + * @returns {Object.} JSON object + */ + MuteAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MuteAction; + })(); + + proto.PinAction = (function() { + + /** + * Properties of a PinAction. + * @memberof proto + * @interface IPinAction + * @property {boolean|null} [pinned] PinAction pinned + */ + + /** + * Constructs a new PinAction. + * @memberof proto + * @classdesc Represents a PinAction. + * @implements IPinAction + * @constructor + * @param {proto.IPinAction=} [properties] Properties to set + */ + function PinAction(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]]; + } + + /** + * PinAction pinned. + * @member {boolean} pinned + * @memberof proto.PinAction + * @instance + */ + PinAction.prototype.pinned = false; + + /** + * Creates a new PinAction instance using the specified properties. + * @function create + * @memberof proto.PinAction + * @static + * @param {proto.IPinAction=} [properties] Properties to set + * @returns {proto.PinAction} PinAction instance + */ + PinAction.create = function create(properties) { + return new PinAction(properties); + }; + + /** + * Encodes the specified PinAction message. Does not implicitly {@link proto.PinAction.verify|verify} messages. + * @function encode + * @memberof proto.PinAction + * @static + * @param {proto.IPinAction} message PinAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PinAction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pinned != null && Object.hasOwnProperty.call(message, "pinned")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.pinned); + return writer; + }; + + /** + * Encodes the specified PinAction message, length delimited. Does not implicitly {@link proto.PinAction.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.PinAction + * @static + * @param {proto.IPinAction} message PinAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PinAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PinAction message from the specified reader or buffer. + * @function decode + * @memberof proto.PinAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.PinAction} PinAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PinAction.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.PinAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.pinned = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PinAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.PinAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.PinAction} PinAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PinAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PinAction message. + * @function verify + * @memberof proto.PinAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PinAction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pinned != null && message.hasOwnProperty("pinned")) + if (typeof message.pinned !== "boolean") + return "pinned: boolean expected"; + return null; + }; + + /** + * Creates a PinAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.PinAction + * @static + * @param {Object.} object Plain object + * @returns {proto.PinAction} PinAction + */ + PinAction.fromObject = function fromObject(object) { + if (object instanceof $root.proto.PinAction) + return object; + var message = new $root.proto.PinAction(); + if (object.pinned != null) + message.pinned = Boolean(object.pinned); + return message; + }; + + /** + * Creates a plain object from a PinAction message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.PinAction + * @static + * @param {proto.PinAction} message PinAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PinAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.pinned = false; + if (message.pinned != null && message.hasOwnProperty("pinned")) + object.pinned = message.pinned; + return object; + }; + + /** + * Converts this PinAction to JSON. + * @function toJSON + * @memberof proto.PinAction + * @instance + * @returns {Object.} JSON object + */ + PinAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PinAction; + })(); + + proto.SecurityNotificationSetting = (function() { + + /** + * Properties of a SecurityNotificationSetting. + * @memberof proto + * @interface ISecurityNotificationSetting + * @property {boolean|null} [showNotification] SecurityNotificationSetting showNotification + */ + + /** + * Constructs a new SecurityNotificationSetting. + * @memberof proto + * @classdesc Represents a SecurityNotificationSetting. + * @implements ISecurityNotificationSetting + * @constructor + * @param {proto.ISecurityNotificationSetting=} [properties] Properties to set + */ + function SecurityNotificationSetting(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]]; + } + + /** + * SecurityNotificationSetting showNotification. + * @member {boolean} showNotification + * @memberof proto.SecurityNotificationSetting + * @instance + */ + SecurityNotificationSetting.prototype.showNotification = false; + + /** + * Creates a new SecurityNotificationSetting instance using the specified properties. + * @function create + * @memberof proto.SecurityNotificationSetting + * @static + * @param {proto.ISecurityNotificationSetting=} [properties] Properties to set + * @returns {proto.SecurityNotificationSetting} SecurityNotificationSetting instance + */ + SecurityNotificationSetting.create = function create(properties) { + return new SecurityNotificationSetting(properties); + }; + + /** + * Encodes the specified SecurityNotificationSetting message. Does not implicitly {@link proto.SecurityNotificationSetting.verify|verify} messages. + * @function encode + * @memberof proto.SecurityNotificationSetting + * @static + * @param {proto.ISecurityNotificationSetting} message SecurityNotificationSetting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SecurityNotificationSetting.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.showNotification != null && Object.hasOwnProperty.call(message, "showNotification")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.showNotification); + return writer; + }; + + /** + * Encodes the specified SecurityNotificationSetting message, length delimited. Does not implicitly {@link proto.SecurityNotificationSetting.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.SecurityNotificationSetting + * @static + * @param {proto.ISecurityNotificationSetting} message SecurityNotificationSetting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SecurityNotificationSetting.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SecurityNotificationSetting message from the specified reader or buffer. + * @function decode + * @memberof proto.SecurityNotificationSetting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.SecurityNotificationSetting} SecurityNotificationSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SecurityNotificationSetting.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.SecurityNotificationSetting(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.showNotification = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SecurityNotificationSetting message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.SecurityNotificationSetting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.SecurityNotificationSetting} SecurityNotificationSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SecurityNotificationSetting.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SecurityNotificationSetting message. + * @function verify + * @memberof proto.SecurityNotificationSetting + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SecurityNotificationSetting.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.showNotification != null && message.hasOwnProperty("showNotification")) + if (typeof message.showNotification !== "boolean") + return "showNotification: boolean expected"; + return null; + }; + + /** + * Creates a SecurityNotificationSetting message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.SecurityNotificationSetting + * @static + * @param {Object.} object Plain object + * @returns {proto.SecurityNotificationSetting} SecurityNotificationSetting + */ + SecurityNotificationSetting.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SecurityNotificationSetting) + return object; + var message = new $root.proto.SecurityNotificationSetting(); + if (object.showNotification != null) + message.showNotification = Boolean(object.showNotification); + return message; + }; + + /** + * Creates a plain object from a SecurityNotificationSetting message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.SecurityNotificationSetting + * @static + * @param {proto.SecurityNotificationSetting} message SecurityNotificationSetting + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SecurityNotificationSetting.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.showNotification = false; + if (message.showNotification != null && message.hasOwnProperty("showNotification")) + object.showNotification = message.showNotification; + return object; + }; + + /** + * Converts this SecurityNotificationSetting to JSON. + * @function toJSON + * @memberof proto.SecurityNotificationSetting + * @instance + * @returns {Object.} JSON object + */ + SecurityNotificationSetting.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SecurityNotificationSetting; + })(); + + proto.PushNameSetting = (function() { + + /** + * Properties of a PushNameSetting. + * @memberof proto + * @interface IPushNameSetting + * @property {string|null} [name] PushNameSetting name + */ + + /** + * Constructs a new PushNameSetting. + * @memberof proto + * @classdesc Represents a PushNameSetting. + * @implements IPushNameSetting + * @constructor + * @param {proto.IPushNameSetting=} [properties] Properties to set + */ + function PushNameSetting(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]]; + } + + /** + * PushNameSetting name. + * @member {string} name + * @memberof proto.PushNameSetting + * @instance + */ + PushNameSetting.prototype.name = ""; + + /** + * Creates a new PushNameSetting instance using the specified properties. + * @function create + * @memberof proto.PushNameSetting + * @static + * @param {proto.IPushNameSetting=} [properties] Properties to set + * @returns {proto.PushNameSetting} PushNameSetting instance + */ + PushNameSetting.create = function create(properties) { + return new PushNameSetting(properties); + }; + + /** + * Encodes the specified PushNameSetting message. Does not implicitly {@link proto.PushNameSetting.verify|verify} messages. + * @function encode + * @memberof proto.PushNameSetting + * @static + * @param {proto.IPushNameSetting} message PushNameSetting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PushNameSetting.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); + return writer; + }; + + /** + * Encodes the specified PushNameSetting message, length delimited. Does not implicitly {@link proto.PushNameSetting.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.PushNameSetting + * @static + * @param {proto.IPushNameSetting} message PushNameSetting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PushNameSetting.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PushNameSetting message from the specified reader or buffer. + * @function decode + * @memberof proto.PushNameSetting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.PushNameSetting} PushNameSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PushNameSetting.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.PushNameSetting(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PushNameSetting message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.PushNameSetting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.PushNameSetting} PushNameSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PushNameSetting.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PushNameSetting message. + * @function verify + * @memberof proto.PushNameSetting + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PushNameSetting.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"; + return null; + }; + + /** + * Creates a PushNameSetting message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.PushNameSetting + * @static + * @param {Object.} object Plain object + * @returns {proto.PushNameSetting} PushNameSetting + */ + PushNameSetting.fromObject = function fromObject(object) { + if (object instanceof $root.proto.PushNameSetting) + return object; + var message = new $root.proto.PushNameSetting(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a PushNameSetting message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.PushNameSetting + * @static + * @param {proto.PushNameSetting} message PushNameSetting + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PushNameSetting.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this PushNameSetting to JSON. + * @function toJSON + * @memberof proto.PushNameSetting + * @instance + * @returns {Object.} JSON object + */ + PushNameSetting.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PushNameSetting; + })(); + + proto.LocaleSetting = (function() { + + /** + * Properties of a LocaleSetting. + * @memberof proto + * @interface ILocaleSetting + * @property {string|null} [locale] LocaleSetting locale + */ + + /** + * Constructs a new LocaleSetting. + * @memberof proto + * @classdesc Represents a LocaleSetting. + * @implements ILocaleSetting + * @constructor + * @param {proto.ILocaleSetting=} [properties] Properties to set + */ + function LocaleSetting(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]]; + } + + /** + * LocaleSetting locale. + * @member {string} locale + * @memberof proto.LocaleSetting + * @instance + */ + LocaleSetting.prototype.locale = ""; + + /** + * Creates a new LocaleSetting instance using the specified properties. + * @function create + * @memberof proto.LocaleSetting + * @static + * @param {proto.ILocaleSetting=} [properties] Properties to set + * @returns {proto.LocaleSetting} LocaleSetting instance + */ + LocaleSetting.create = function create(properties) { + return new LocaleSetting(properties); + }; + + /** + * Encodes the specified LocaleSetting message. Does not implicitly {@link proto.LocaleSetting.verify|verify} messages. + * @function encode + * @memberof proto.LocaleSetting + * @static + * @param {proto.ILocaleSetting} message LocaleSetting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LocaleSetting.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.locale != null && Object.hasOwnProperty.call(message, "locale")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.locale); + return writer; + }; + + /** + * Encodes the specified LocaleSetting message, length delimited. Does not implicitly {@link proto.LocaleSetting.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.LocaleSetting + * @static + * @param {proto.ILocaleSetting} message LocaleSetting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LocaleSetting.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LocaleSetting message from the specified reader or buffer. + * @function decode + * @memberof proto.LocaleSetting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.LocaleSetting} LocaleSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LocaleSetting.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.LocaleSetting(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.locale = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LocaleSetting message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.LocaleSetting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.LocaleSetting} LocaleSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LocaleSetting.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LocaleSetting message. + * @function verify + * @memberof proto.LocaleSetting + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LocaleSetting.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.locale != null && message.hasOwnProperty("locale")) + if (!$util.isString(message.locale)) + return "locale: string expected"; + return null; + }; + + /** + * Creates a LocaleSetting message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.LocaleSetting + * @static + * @param {Object.} object Plain object + * @returns {proto.LocaleSetting} LocaleSetting + */ + LocaleSetting.fromObject = function fromObject(object) { + if (object instanceof $root.proto.LocaleSetting) + return object; + var message = new $root.proto.LocaleSetting(); + if (object.locale != null) + message.locale = String(object.locale); + return message; + }; + + /** + * Creates a plain object from a LocaleSetting message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.LocaleSetting + * @static + * @param {proto.LocaleSetting} message LocaleSetting + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LocaleSetting.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.locale = ""; + if (message.locale != null && message.hasOwnProperty("locale")) + object.locale = message.locale; + return object; + }; + + /** + * Converts this LocaleSetting to JSON. + * @function toJSON + * @memberof proto.LocaleSetting + * @instance + * @returns {Object.} JSON object + */ + LocaleSetting.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return LocaleSetting; + })(); + + proto.QuickReplyAction = (function() { + + /** + * Properties of a QuickReplyAction. + * @memberof proto + * @interface IQuickReplyAction + * @property {string|null} [shortcut] QuickReplyAction shortcut + * @property {string|null} [message] QuickReplyAction message + * @property {Array.|null} [keywords] QuickReplyAction keywords + * @property {number|null} [count] QuickReplyAction count + * @property {boolean|null} [deleted] QuickReplyAction deleted + */ + + /** + * Constructs a new QuickReplyAction. + * @memberof proto + * @classdesc Represents a QuickReplyAction. + * @implements IQuickReplyAction + * @constructor + * @param {proto.IQuickReplyAction=} [properties] Properties to set + */ + function QuickReplyAction(properties) { + this.keywords = []; + 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]]; + } + + /** + * QuickReplyAction shortcut. + * @member {string} shortcut + * @memberof proto.QuickReplyAction + * @instance + */ + QuickReplyAction.prototype.shortcut = ""; + + /** + * QuickReplyAction message. + * @member {string} message + * @memberof proto.QuickReplyAction + * @instance + */ + QuickReplyAction.prototype.message = ""; + + /** + * QuickReplyAction keywords. + * @member {Array.} keywords + * @memberof proto.QuickReplyAction + * @instance + */ + QuickReplyAction.prototype.keywords = $util.emptyArray; + + /** + * QuickReplyAction count. + * @member {number} count + * @memberof proto.QuickReplyAction + * @instance + */ + QuickReplyAction.prototype.count = 0; + + /** + * QuickReplyAction deleted. + * @member {boolean} deleted + * @memberof proto.QuickReplyAction + * @instance + */ + QuickReplyAction.prototype.deleted = false; + + /** + * Creates a new QuickReplyAction instance using the specified properties. + * @function create + * @memberof proto.QuickReplyAction + * @static + * @param {proto.IQuickReplyAction=} [properties] Properties to set + * @returns {proto.QuickReplyAction} QuickReplyAction instance + */ + QuickReplyAction.create = function create(properties) { + return new QuickReplyAction(properties); + }; + + /** + * Encodes the specified QuickReplyAction message. Does not implicitly {@link proto.QuickReplyAction.verify|verify} messages. + * @function encode + * @memberof proto.QuickReplyAction + * @static + * @param {proto.IQuickReplyAction} message QuickReplyAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuickReplyAction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.shortcut != null && Object.hasOwnProperty.call(message, "shortcut")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.shortcut); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + if (message.keywords != null && message.keywords.length) + for (var i = 0; i < message.keywords.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.keywords[i]); + if (message.count != null && Object.hasOwnProperty.call(message, "count")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.count); + if (message.deleted != null && Object.hasOwnProperty.call(message, "deleted")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.deleted); + return writer; + }; + + /** + * Encodes the specified QuickReplyAction message, length delimited. Does not implicitly {@link proto.QuickReplyAction.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.QuickReplyAction + * @static + * @param {proto.IQuickReplyAction} message QuickReplyAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuickReplyAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QuickReplyAction message from the specified reader or buffer. + * @function decode + * @memberof proto.QuickReplyAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.QuickReplyAction} QuickReplyAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuickReplyAction.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.QuickReplyAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.shortcut = reader.string(); + break; + case 2: + message.message = reader.string(); + break; + case 3: + if (!(message.keywords && message.keywords.length)) + message.keywords = []; + message.keywords.push(reader.string()); + break; + case 4: + message.count = reader.int32(); + break; + case 5: + message.deleted = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QuickReplyAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.QuickReplyAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.QuickReplyAction} QuickReplyAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuickReplyAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QuickReplyAction message. + * @function verify + * @memberof proto.QuickReplyAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QuickReplyAction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.shortcut != null && message.hasOwnProperty("shortcut")) + if (!$util.isString(message.shortcut)) + return "shortcut: string expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.keywords != null && message.hasOwnProperty("keywords")) { + if (!Array.isArray(message.keywords)) + return "keywords: array expected"; + for (var i = 0; i < message.keywords.length; ++i) + if (!$util.isString(message.keywords[i])) + return "keywords: string[] expected"; + } + if (message.count != null && message.hasOwnProperty("count")) + if (!$util.isInteger(message.count)) + return "count: integer expected"; + if (message.deleted != null && message.hasOwnProperty("deleted")) + if (typeof message.deleted !== "boolean") + return "deleted: boolean expected"; + return null; + }; + + /** + * Creates a QuickReplyAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.QuickReplyAction + * @static + * @param {Object.} object Plain object + * @returns {proto.QuickReplyAction} QuickReplyAction + */ + QuickReplyAction.fromObject = function fromObject(object) { + if (object instanceof $root.proto.QuickReplyAction) + return object; + var message = new $root.proto.QuickReplyAction(); + if (object.shortcut != null) + message.shortcut = String(object.shortcut); + if (object.message != null) + message.message = String(object.message); + if (object.keywords) { + if (!Array.isArray(object.keywords)) + throw TypeError(".proto.QuickReplyAction.keywords: array expected"); + message.keywords = []; + for (var i = 0; i < object.keywords.length; ++i) + message.keywords[i] = String(object.keywords[i]); + } + if (object.count != null) + message.count = object.count | 0; + if (object.deleted != null) + message.deleted = Boolean(object.deleted); + return message; + }; + + /** + * Creates a plain object from a QuickReplyAction message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.QuickReplyAction + * @static + * @param {proto.QuickReplyAction} message QuickReplyAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QuickReplyAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.keywords = []; + if (options.defaults) { + object.shortcut = ""; + object.message = ""; + object.count = 0; + object.deleted = false; + } + if (message.shortcut != null && message.hasOwnProperty("shortcut")) + object.shortcut = message.shortcut; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.keywords && message.keywords.length) { + object.keywords = []; + for (var j = 0; j < message.keywords.length; ++j) + object.keywords[j] = message.keywords[j]; + } + if (message.count != null && message.hasOwnProperty("count")) + object.count = message.count; + if (message.deleted != null && message.hasOwnProperty("deleted")) + object.deleted = message.deleted; + return object; + }; + + /** + * Converts this QuickReplyAction to JSON. + * @function toJSON + * @memberof proto.QuickReplyAction + * @instance + * @returns {Object.} JSON object + */ + QuickReplyAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QuickReplyAction; + })(); + + proto.LabelAssociationAction = (function() { + + /** + * Properties of a LabelAssociationAction. + * @memberof proto + * @interface ILabelAssociationAction + * @property {boolean|null} [labeled] LabelAssociationAction labeled + */ + + /** + * Constructs a new LabelAssociationAction. + * @memberof proto + * @classdesc Represents a LabelAssociationAction. + * @implements ILabelAssociationAction + * @constructor + * @param {proto.ILabelAssociationAction=} [properties] Properties to set + */ + function LabelAssociationAction(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]]; + } + + /** + * LabelAssociationAction labeled. + * @member {boolean} labeled + * @memberof proto.LabelAssociationAction + * @instance + */ + LabelAssociationAction.prototype.labeled = false; + + /** + * Creates a new LabelAssociationAction instance using the specified properties. + * @function create + * @memberof proto.LabelAssociationAction + * @static + * @param {proto.ILabelAssociationAction=} [properties] Properties to set + * @returns {proto.LabelAssociationAction} LabelAssociationAction instance + */ + LabelAssociationAction.create = function create(properties) { + return new LabelAssociationAction(properties); + }; + + /** + * Encodes the specified LabelAssociationAction message. Does not implicitly {@link proto.LabelAssociationAction.verify|verify} messages. + * @function encode + * @memberof proto.LabelAssociationAction + * @static + * @param {proto.ILabelAssociationAction} message LabelAssociationAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LabelAssociationAction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.labeled != null && Object.hasOwnProperty.call(message, "labeled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.labeled); + return writer; + }; + + /** + * Encodes the specified LabelAssociationAction message, length delimited. Does not implicitly {@link proto.LabelAssociationAction.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.LabelAssociationAction + * @static + * @param {proto.ILabelAssociationAction} message LabelAssociationAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LabelAssociationAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LabelAssociationAction message from the specified reader or buffer. + * @function decode + * @memberof proto.LabelAssociationAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.LabelAssociationAction} LabelAssociationAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LabelAssociationAction.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.LabelAssociationAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.labeled = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LabelAssociationAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.LabelAssociationAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.LabelAssociationAction} LabelAssociationAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LabelAssociationAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LabelAssociationAction message. + * @function verify + * @memberof proto.LabelAssociationAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LabelAssociationAction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.labeled != null && message.hasOwnProperty("labeled")) + if (typeof message.labeled !== "boolean") + return "labeled: boolean expected"; + return null; + }; + + /** + * Creates a LabelAssociationAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.LabelAssociationAction + * @static + * @param {Object.} object Plain object + * @returns {proto.LabelAssociationAction} LabelAssociationAction + */ + LabelAssociationAction.fromObject = function fromObject(object) { + if (object instanceof $root.proto.LabelAssociationAction) + return object; + var message = new $root.proto.LabelAssociationAction(); + if (object.labeled != null) + message.labeled = Boolean(object.labeled); + return message; + }; + + /** + * Creates a plain object from a LabelAssociationAction message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.LabelAssociationAction + * @static + * @param {proto.LabelAssociationAction} message LabelAssociationAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LabelAssociationAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.labeled = false; + if (message.labeled != null && message.hasOwnProperty("labeled")) + object.labeled = message.labeled; + return object; + }; + + /** + * Converts this LabelAssociationAction to JSON. + * @function toJSON + * @memberof proto.LabelAssociationAction + * @instance + * @returns {Object.} JSON object + */ + LabelAssociationAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return LabelAssociationAction; + })(); + + proto.LabelEditAction = (function() { + + /** + * Properties of a LabelEditAction. + * @memberof proto + * @interface ILabelEditAction + * @property {string|null} [name] LabelEditAction name + * @property {number|null} [color] LabelEditAction color + * @property {number|null} [predefinedId] LabelEditAction predefinedId + * @property {boolean|null} [deleted] LabelEditAction deleted + */ + + /** + * Constructs a new LabelEditAction. + * @memberof proto + * @classdesc Represents a LabelEditAction. + * @implements ILabelEditAction + * @constructor + * @param {proto.ILabelEditAction=} [properties] Properties to set + */ + function LabelEditAction(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]]; + } + + /** + * LabelEditAction name. + * @member {string} name + * @memberof proto.LabelEditAction + * @instance + */ + LabelEditAction.prototype.name = ""; + + /** + * LabelEditAction color. + * @member {number} color + * @memberof proto.LabelEditAction + * @instance + */ + LabelEditAction.prototype.color = 0; + + /** + * LabelEditAction predefinedId. + * @member {number} predefinedId + * @memberof proto.LabelEditAction + * @instance + */ + LabelEditAction.prototype.predefinedId = 0; + + /** + * LabelEditAction deleted. + * @member {boolean} deleted + * @memberof proto.LabelEditAction + * @instance + */ + LabelEditAction.prototype.deleted = false; + + /** + * Creates a new LabelEditAction instance using the specified properties. + * @function create + * @memberof proto.LabelEditAction + * @static + * @param {proto.ILabelEditAction=} [properties] Properties to set + * @returns {proto.LabelEditAction} LabelEditAction instance + */ + LabelEditAction.create = function create(properties) { + return new LabelEditAction(properties); + }; + + /** + * Encodes the specified LabelEditAction message. Does not implicitly {@link proto.LabelEditAction.verify|verify} messages. + * @function encode + * @memberof proto.LabelEditAction + * @static + * @param {proto.ILabelEditAction} message LabelEditAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LabelEditAction.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.color != null && Object.hasOwnProperty.call(message, "color")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.color); + if (message.predefinedId != null && Object.hasOwnProperty.call(message, "predefinedId")) + 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); + return writer; + }; + + /** + * Encodes the specified LabelEditAction message, length delimited. Does not implicitly {@link proto.LabelEditAction.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.LabelEditAction + * @static + * @param {proto.ILabelEditAction} message LabelEditAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LabelEditAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LabelEditAction message from the specified reader or buffer. + * @function decode + * @memberof proto.LabelEditAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.LabelEditAction} LabelEditAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LabelEditAction.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.LabelEditAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.color = reader.int32(); + break; + case 3: + message.predefinedId = reader.int32(); + break; + case 4: + message.deleted = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LabelEditAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.LabelEditAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.LabelEditAction} LabelEditAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LabelEditAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LabelEditAction message. + * @function verify + * @memberof proto.LabelEditAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LabelEditAction.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.color != null && message.hasOwnProperty("color")) + if (!$util.isInteger(message.color)) + return "color: integer expected"; + if (message.predefinedId != null && message.hasOwnProperty("predefinedId")) + if (!$util.isInteger(message.predefinedId)) + return "predefinedId: integer expected"; + if (message.deleted != null && message.hasOwnProperty("deleted")) + if (typeof message.deleted !== "boolean") + return "deleted: boolean expected"; + return null; + }; + + /** + * Creates a LabelEditAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.LabelEditAction + * @static + * @param {Object.} object Plain object + * @returns {proto.LabelEditAction} LabelEditAction + */ + LabelEditAction.fromObject = function fromObject(object) { + if (object instanceof $root.proto.LabelEditAction) + return object; + var message = new $root.proto.LabelEditAction(); + if (object.name != null) + message.name = String(object.name); + if (object.color != null) + message.color = object.color | 0; + if (object.predefinedId != null) + message.predefinedId = object.predefinedId | 0; + if (object.deleted != null) + message.deleted = Boolean(object.deleted); + return message; + }; + + /** + * Creates a plain object from a LabelEditAction message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.LabelEditAction + * @static + * @param {proto.LabelEditAction} message LabelEditAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LabelEditAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.color = 0; + object.predefinedId = 0; + object.deleted = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.color != null && message.hasOwnProperty("color")) + object.color = message.color; + if (message.predefinedId != null && message.hasOwnProperty("predefinedId")) + object.predefinedId = message.predefinedId; + if (message.deleted != null && message.hasOwnProperty("deleted")) + object.deleted = message.deleted; + return object; + }; + + /** + * Converts this LabelEditAction to JSON. + * @function toJSON + * @memberof proto.LabelEditAction + * @instance + * @returns {Object.} JSON object + */ + LabelEditAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return LabelEditAction; + })(); + + proto.RecentStickerWeightsAction = (function() { + + /** + * Properties of a RecentStickerWeightsAction. + * @memberof proto + * @interface IRecentStickerWeightsAction + * @property {Array.|null} [weights] RecentStickerWeightsAction weights + */ + + /** + * Constructs a new RecentStickerWeightsAction. + * @memberof proto + * @classdesc Represents a RecentStickerWeightsAction. + * @implements IRecentStickerWeightsAction + * @constructor + * @param {proto.IRecentStickerWeightsAction=} [properties] Properties to set + */ + function RecentStickerWeightsAction(properties) { + this.weights = []; + 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]]; + } + + /** + * RecentStickerWeightsAction weights. + * @member {Array.} weights + * @memberof proto.RecentStickerWeightsAction + * @instance + */ + RecentStickerWeightsAction.prototype.weights = $util.emptyArray; + + /** + * Creates a new RecentStickerWeightsAction instance using the specified properties. + * @function create + * @memberof proto.RecentStickerWeightsAction + * @static + * @param {proto.IRecentStickerWeightsAction=} [properties] Properties to set + * @returns {proto.RecentStickerWeightsAction} RecentStickerWeightsAction instance + */ + RecentStickerWeightsAction.create = function create(properties) { + return new RecentStickerWeightsAction(properties); + }; + + /** + * Encodes the specified RecentStickerWeightsAction message. Does not implicitly {@link proto.RecentStickerWeightsAction.verify|verify} messages. + * @function encode + * @memberof proto.RecentStickerWeightsAction + * @static + * @param {proto.IRecentStickerWeightsAction} message RecentStickerWeightsAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RecentStickerWeightsAction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.weights != null && message.weights.length) + for (var i = 0; i < message.weights.length; ++i) + $root.proto.RecentStickerWeight.encode(message.weights[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RecentStickerWeightsAction message, length delimited. Does not implicitly {@link proto.RecentStickerWeightsAction.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.RecentStickerWeightsAction + * @static + * @param {proto.IRecentStickerWeightsAction} message RecentStickerWeightsAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RecentStickerWeightsAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RecentStickerWeightsAction message from the specified reader or buffer. + * @function decode + * @memberof proto.RecentStickerWeightsAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.RecentStickerWeightsAction} RecentStickerWeightsAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RecentStickerWeightsAction.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.RecentStickerWeightsAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.weights && message.weights.length)) + message.weights = []; + message.weights.push($root.proto.RecentStickerWeight.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RecentStickerWeightsAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.RecentStickerWeightsAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.RecentStickerWeightsAction} RecentStickerWeightsAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RecentStickerWeightsAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RecentStickerWeightsAction message. + * @function verify + * @memberof proto.RecentStickerWeightsAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RecentStickerWeightsAction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.weights != null && message.hasOwnProperty("weights")) { + if (!Array.isArray(message.weights)) + return "weights: array expected"; + for (var i = 0; i < message.weights.length; ++i) { + var error = $root.proto.RecentStickerWeight.verify(message.weights[i]); + if (error) + return "weights." + error; + } + } + return null; + }; + + /** + * Creates a RecentStickerWeightsAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.RecentStickerWeightsAction + * @static + * @param {Object.} object Plain object + * @returns {proto.RecentStickerWeightsAction} RecentStickerWeightsAction + */ + RecentStickerWeightsAction.fromObject = function fromObject(object) { + if (object instanceof $root.proto.RecentStickerWeightsAction) + return object; + var message = new $root.proto.RecentStickerWeightsAction(); + if (object.weights) { + if (!Array.isArray(object.weights)) + throw TypeError(".proto.RecentStickerWeightsAction.weights: array expected"); + message.weights = []; + for (var i = 0; i < object.weights.length; ++i) { + if (typeof object.weights[i] !== "object") + throw TypeError(".proto.RecentStickerWeightsAction.weights: object expected"); + message.weights[i] = $root.proto.RecentStickerWeight.fromObject(object.weights[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a RecentStickerWeightsAction message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.RecentStickerWeightsAction + * @static + * @param {proto.RecentStickerWeightsAction} message RecentStickerWeightsAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RecentStickerWeightsAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.weights = []; + if (message.weights && message.weights.length) { + object.weights = []; + for (var j = 0; j < message.weights.length; ++j) + object.weights[j] = $root.proto.RecentStickerWeight.toObject(message.weights[j], options); + } + return object; + }; + + /** + * Converts this RecentStickerWeightsAction to JSON. + * @function toJSON + * @memberof proto.RecentStickerWeightsAction + * @instance + * @returns {Object.} JSON object + */ + RecentStickerWeightsAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RecentStickerWeightsAction; + })(); + + proto.RecentStickerMetadata = (function() { + + /** + * Properties of a RecentStickerMetadata. + * @memberof proto + * @interface IRecentStickerMetadata + * @property {string|null} [directPath] RecentStickerMetadata directPath + * @property {string|null} [encFilehash] RecentStickerMetadata encFilehash + * @property {string|null} [mediaKey] RecentStickerMetadata mediaKey + * @property {string|null} [stanzaId] RecentStickerMetadata stanzaId + * @property {string|null} [chatJid] RecentStickerMetadata chatJid + * @property {string|null} [participant] RecentStickerMetadata participant + * @property {boolean|null} [isSentByMe] RecentStickerMetadata isSentByMe + */ + + /** + * Constructs a new RecentStickerMetadata. + * @memberof proto + * @classdesc Represents a RecentStickerMetadata. + * @implements IRecentStickerMetadata + * @constructor + * @param {proto.IRecentStickerMetadata=} [properties] Properties to set + */ + function RecentStickerMetadata(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]]; + } + + /** + * RecentStickerMetadata directPath. + * @member {string} directPath + * @memberof proto.RecentStickerMetadata + * @instance + */ + RecentStickerMetadata.prototype.directPath = ""; + + /** + * RecentStickerMetadata encFilehash. + * @member {string} encFilehash + * @memberof proto.RecentStickerMetadata + * @instance + */ + RecentStickerMetadata.prototype.encFilehash = ""; + + /** + * RecentStickerMetadata mediaKey. + * @member {string} mediaKey + * @memberof proto.RecentStickerMetadata + * @instance + */ + RecentStickerMetadata.prototype.mediaKey = ""; + + /** + * RecentStickerMetadata stanzaId. + * @member {string} stanzaId + * @memberof proto.RecentStickerMetadata + * @instance + */ + RecentStickerMetadata.prototype.stanzaId = ""; + + /** + * RecentStickerMetadata chatJid. + * @member {string} chatJid + * @memberof proto.RecentStickerMetadata + * @instance + */ + RecentStickerMetadata.prototype.chatJid = ""; + + /** + * RecentStickerMetadata participant. + * @member {string} participant + * @memberof proto.RecentStickerMetadata + * @instance + */ + RecentStickerMetadata.prototype.participant = ""; + + /** + * RecentStickerMetadata isSentByMe. + * @member {boolean} isSentByMe + * @memberof proto.RecentStickerMetadata + * @instance + */ + RecentStickerMetadata.prototype.isSentByMe = false; + + /** + * Creates a new RecentStickerMetadata instance using the specified properties. + * @function create + * @memberof proto.RecentStickerMetadata + * @static + * @param {proto.IRecentStickerMetadata=} [properties] Properties to set + * @returns {proto.RecentStickerMetadata} RecentStickerMetadata instance + */ + RecentStickerMetadata.create = function create(properties) { + return new RecentStickerMetadata(properties); + }; + + /** + * Encodes the specified RecentStickerMetadata message. Does not implicitly {@link proto.RecentStickerMetadata.verify|verify} messages. + * @function encode + * @memberof proto.RecentStickerMetadata + * @static + * @param {proto.IRecentStickerMetadata} message RecentStickerMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RecentStickerMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.directPath != null && Object.hasOwnProperty.call(message, "directPath")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.directPath); + if (message.encFilehash != null && Object.hasOwnProperty.call(message, "encFilehash")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.encFilehash); + if (message.mediaKey != null && Object.hasOwnProperty.call(message, "mediaKey")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.mediaKey); + if (message.stanzaId != null && Object.hasOwnProperty.call(message, "stanzaId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.stanzaId); + if (message.chatJid != null && Object.hasOwnProperty.call(message, "chatJid")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.chatJid); + if (message.participant != null && Object.hasOwnProperty.call(message, "participant")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.participant); + if (message.isSentByMe != null && Object.hasOwnProperty.call(message, "isSentByMe")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.isSentByMe); + return writer; + }; + + /** + * Encodes the specified RecentStickerMetadata message, length delimited. Does not implicitly {@link proto.RecentStickerMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.RecentStickerMetadata + * @static + * @param {proto.IRecentStickerMetadata} message RecentStickerMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RecentStickerMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RecentStickerMetadata message from the specified reader or buffer. + * @function decode + * @memberof proto.RecentStickerMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.RecentStickerMetadata} RecentStickerMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RecentStickerMetadata.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.RecentStickerMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.directPath = reader.string(); + break; + case 2: + message.encFilehash = reader.string(); + break; + case 3: + message.mediaKey = reader.string(); + break; + case 4: + message.stanzaId = reader.string(); + break; + case 5: + message.chatJid = reader.string(); + break; + case 6: + message.participant = reader.string(); + break; + case 7: + message.isSentByMe = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RecentStickerMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.RecentStickerMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.RecentStickerMetadata} RecentStickerMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RecentStickerMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RecentStickerMetadata message. + * @function verify + * @memberof proto.RecentStickerMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RecentStickerMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.directPath != null && message.hasOwnProperty("directPath")) + if (!$util.isString(message.directPath)) + return "directPath: string expected"; + if (message.encFilehash != null && message.hasOwnProperty("encFilehash")) + if (!$util.isString(message.encFilehash)) + return "encFilehash: string expected"; + if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) + if (!$util.isString(message.mediaKey)) + return "mediaKey: string expected"; + if (message.stanzaId != null && message.hasOwnProperty("stanzaId")) + if (!$util.isString(message.stanzaId)) + return "stanzaId: string expected"; + if (message.chatJid != null && message.hasOwnProperty("chatJid")) + if (!$util.isString(message.chatJid)) + return "chatJid: string expected"; + if (message.participant != null && message.hasOwnProperty("participant")) + if (!$util.isString(message.participant)) + return "participant: string expected"; + if (message.isSentByMe != null && message.hasOwnProperty("isSentByMe")) + if (typeof message.isSentByMe !== "boolean") + return "isSentByMe: boolean expected"; + return null; + }; + + /** + * Creates a RecentStickerMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.RecentStickerMetadata + * @static + * @param {Object.} object Plain object + * @returns {proto.RecentStickerMetadata} RecentStickerMetadata + */ + RecentStickerMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.proto.RecentStickerMetadata) + return object; + var message = new $root.proto.RecentStickerMetadata(); + if (object.directPath != null) + message.directPath = String(object.directPath); + if (object.encFilehash != null) + message.encFilehash = String(object.encFilehash); + if (object.mediaKey != null) + message.mediaKey = String(object.mediaKey); + if (object.stanzaId != null) + message.stanzaId = String(object.stanzaId); + if (object.chatJid != null) + message.chatJid = String(object.chatJid); + if (object.participant != null) + message.participant = String(object.participant); + if (object.isSentByMe != null) + message.isSentByMe = Boolean(object.isSentByMe); + return message; + }; + + /** + * Creates a plain object from a RecentStickerMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.RecentStickerMetadata + * @static + * @param {proto.RecentStickerMetadata} message RecentStickerMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RecentStickerMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.directPath = ""; + object.encFilehash = ""; + object.mediaKey = ""; + object.stanzaId = ""; + object.chatJid = ""; + object.participant = ""; + object.isSentByMe = false; + } + if (message.directPath != null && message.hasOwnProperty("directPath")) + object.directPath = message.directPath; + if (message.encFilehash != null && message.hasOwnProperty("encFilehash")) + object.encFilehash = message.encFilehash; + if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) + object.mediaKey = message.mediaKey; + if (message.stanzaId != null && message.hasOwnProperty("stanzaId")) + object.stanzaId = message.stanzaId; + if (message.chatJid != null && message.hasOwnProperty("chatJid")) + object.chatJid = message.chatJid; + if (message.participant != null && message.hasOwnProperty("participant")) + object.participant = message.participant; + if (message.isSentByMe != null && message.hasOwnProperty("isSentByMe")) + object.isSentByMe = message.isSentByMe; + return object; + }; + + /** + * Converts this RecentStickerMetadata to JSON. + * @function toJSON + * @memberof proto.RecentStickerMetadata + * @instance + * @returns {Object.} JSON object + */ + RecentStickerMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RecentStickerMetadata; + })(); + + proto.RecentEmojiWeightsAction = (function() { + + /** + * Properties of a RecentEmojiWeightsAction. + * @memberof proto + * @interface IRecentEmojiWeightsAction + * @property {Array.|null} [weights] RecentEmojiWeightsAction weights + */ + + /** + * Constructs a new RecentEmojiWeightsAction. + * @memberof proto + * @classdesc Represents a RecentEmojiWeightsAction. + * @implements IRecentEmojiWeightsAction + * @constructor + * @param {proto.IRecentEmojiWeightsAction=} [properties] Properties to set + */ + function RecentEmojiWeightsAction(properties) { + this.weights = []; + 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]]; + } + + /** + * RecentEmojiWeightsAction weights. + * @member {Array.} weights + * @memberof proto.RecentEmojiWeightsAction + * @instance + */ + RecentEmojiWeightsAction.prototype.weights = $util.emptyArray; + + /** + * Creates a new RecentEmojiWeightsAction instance using the specified properties. + * @function create + * @memberof proto.RecentEmojiWeightsAction + * @static + * @param {proto.IRecentEmojiWeightsAction=} [properties] Properties to set + * @returns {proto.RecentEmojiWeightsAction} RecentEmojiWeightsAction instance + */ + RecentEmojiWeightsAction.create = function create(properties) { + return new RecentEmojiWeightsAction(properties); + }; + + /** + * Encodes the specified RecentEmojiWeightsAction message. Does not implicitly {@link proto.RecentEmojiWeightsAction.verify|verify} messages. + * @function encode + * @memberof proto.RecentEmojiWeightsAction + * @static + * @param {proto.IRecentEmojiWeightsAction} message RecentEmojiWeightsAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RecentEmojiWeightsAction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.weights != null && message.weights.length) + for (var i = 0; i < message.weights.length; ++i) + $root.proto.RecentEmojiWeight.encode(message.weights[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RecentEmojiWeightsAction message, length delimited. Does not implicitly {@link proto.RecentEmojiWeightsAction.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.RecentEmojiWeightsAction + * @static + * @param {proto.IRecentEmojiWeightsAction} message RecentEmojiWeightsAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RecentEmojiWeightsAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RecentEmojiWeightsAction message from the specified reader or buffer. + * @function decode + * @memberof proto.RecentEmojiWeightsAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.RecentEmojiWeightsAction} RecentEmojiWeightsAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RecentEmojiWeightsAction.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.RecentEmojiWeightsAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.weights && message.weights.length)) + message.weights = []; + message.weights.push($root.proto.RecentEmojiWeight.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RecentEmojiWeightsAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.RecentEmojiWeightsAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.RecentEmojiWeightsAction} RecentEmojiWeightsAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RecentEmojiWeightsAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RecentEmojiWeightsAction message. + * @function verify + * @memberof proto.RecentEmojiWeightsAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RecentEmojiWeightsAction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.weights != null && message.hasOwnProperty("weights")) { + if (!Array.isArray(message.weights)) + return "weights: array expected"; + for (var i = 0; i < message.weights.length; ++i) { + var error = $root.proto.RecentEmojiWeight.verify(message.weights[i]); + if (error) + return "weights." + error; + } + } + return null; + }; + + /** + * Creates a RecentEmojiWeightsAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.RecentEmojiWeightsAction + * @static + * @param {Object.} object Plain object + * @returns {proto.RecentEmojiWeightsAction} RecentEmojiWeightsAction + */ + RecentEmojiWeightsAction.fromObject = function fromObject(object) { + if (object instanceof $root.proto.RecentEmojiWeightsAction) + return object; + var message = new $root.proto.RecentEmojiWeightsAction(); + if (object.weights) { + if (!Array.isArray(object.weights)) + throw TypeError(".proto.RecentEmojiWeightsAction.weights: array expected"); + message.weights = []; + for (var i = 0; i < object.weights.length; ++i) { + if (typeof object.weights[i] !== "object") + throw TypeError(".proto.RecentEmojiWeightsAction.weights: object expected"); + message.weights[i] = $root.proto.RecentEmojiWeight.fromObject(object.weights[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a RecentEmojiWeightsAction message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.RecentEmojiWeightsAction + * @static + * @param {proto.RecentEmojiWeightsAction} message RecentEmojiWeightsAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RecentEmojiWeightsAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.weights = []; + if (message.weights && message.weights.length) { + object.weights = []; + for (var j = 0; j < message.weights.length; ++j) + object.weights[j] = $root.proto.RecentEmojiWeight.toObject(message.weights[j], options); + } + return object; + }; + + /** + * Converts this RecentEmojiWeightsAction to JSON. + * @function toJSON + * @memberof proto.RecentEmojiWeightsAction + * @instance + * @returns {Object.} JSON object + */ + RecentEmojiWeightsAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RecentEmojiWeightsAction; + })(); + + proto.ArchiveChatAction = (function() { + + /** + * Properties of an ArchiveChatAction. + * @memberof proto + * @interface IArchiveChatAction + * @property {boolean|null} [archived] ArchiveChatAction archived + * @property {proto.ISyncActionMessageRange|null} [messageRange] ArchiveChatAction messageRange + */ + + /** + * Constructs a new ArchiveChatAction. + * @memberof proto + * @classdesc Represents an ArchiveChatAction. + * @implements IArchiveChatAction + * @constructor + * @param {proto.IArchiveChatAction=} [properties] Properties to set + */ + 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.ArchiveChatAction + * @instance + */ + ArchiveChatAction.prototype.archived = false; + + /** + * ArchiveChatAction messageRange. + * @member {proto.ISyncActionMessageRange|null|undefined} messageRange + * @memberof proto.ArchiveChatAction + * @instance + */ + ArchiveChatAction.prototype.messageRange = null; + + /** + * Creates a new ArchiveChatAction instance using the specified properties. + * @function create + * @memberof proto.ArchiveChatAction + * @static + * @param {proto.IArchiveChatAction=} [properties] Properties to set + * @returns {proto.ArchiveChatAction} ArchiveChatAction instance + */ + ArchiveChatAction.create = function create(properties) { + return new ArchiveChatAction(properties); + }; + + /** + * Encodes the specified ArchiveChatAction message. Does not implicitly {@link proto.ArchiveChatAction.verify|verify} messages. + * @function encode + * @memberof proto.ArchiveChatAction + * @static + * @param {proto.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.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.ArchiveChatAction.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.ArchiveChatAction + * @static + * @param {proto.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.ArchiveChatAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.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.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.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.ArchiveChatAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.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.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.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.ArchiveChatAction + * @static + * @param {Object.} object Plain object + * @returns {proto.ArchiveChatAction} ArchiveChatAction + */ + ArchiveChatAction.fromObject = function fromObject(object) { + if (object instanceof $root.proto.ArchiveChatAction) + return object; + var message = new $root.proto.ArchiveChatAction(); + if (object.archived != null) + message.archived = Boolean(object.archived); + if (object.messageRange != null) { + if (typeof object.messageRange !== "object") + throw TypeError(".proto.ArchiveChatAction.messageRange: object expected"); + message.messageRange = $root.proto.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.ArchiveChatAction + * @static + * @param {proto.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.SyncActionMessageRange.toObject(message.messageRange, options); + return object; + }; + + /** + * Converts this ArchiveChatAction to JSON. + * @function toJSON + * @memberof proto.ArchiveChatAction + * @instance + * @returns {Object.} JSON object + */ + ArchiveChatAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ArchiveChatAction; + })(); + + proto.DeleteMessageForMeAction = (function() { + + /** + * Properties of a DeleteMessageForMeAction. + * @memberof proto + * @interface IDeleteMessageForMeAction + * @property {boolean|null} [deleteMedia] DeleteMessageForMeAction deleteMedia + * @property {number|Long|null} [messageTimestamp] DeleteMessageForMeAction messageTimestamp + */ + + /** + * Constructs a new DeleteMessageForMeAction. + * @memberof proto + * @classdesc Represents a DeleteMessageForMeAction. + * @implements IDeleteMessageForMeAction + * @constructor + * @param {proto.IDeleteMessageForMeAction=} [properties] Properties to set + */ + function DeleteMessageForMeAction(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]]; + } + + /** + * DeleteMessageForMeAction deleteMedia. + * @member {boolean} deleteMedia + * @memberof proto.DeleteMessageForMeAction + * @instance + */ + DeleteMessageForMeAction.prototype.deleteMedia = false; + + /** + * DeleteMessageForMeAction messageTimestamp. + * @member {number|Long} messageTimestamp + * @memberof proto.DeleteMessageForMeAction + * @instance + */ + DeleteMessageForMeAction.prototype.messageTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new DeleteMessageForMeAction instance using the specified properties. + * @function create + * @memberof proto.DeleteMessageForMeAction + * @static + * @param {proto.IDeleteMessageForMeAction=} [properties] Properties to set + * @returns {proto.DeleteMessageForMeAction} DeleteMessageForMeAction instance + */ + DeleteMessageForMeAction.create = function create(properties) { + return new DeleteMessageForMeAction(properties); + }; + + /** + * Encodes the specified DeleteMessageForMeAction message. Does not implicitly {@link proto.DeleteMessageForMeAction.verify|verify} messages. + * @function encode + * @memberof proto.DeleteMessageForMeAction + * @static + * @param {proto.IDeleteMessageForMeAction} message DeleteMessageForMeAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteMessageForMeAction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deleteMedia != null && Object.hasOwnProperty.call(message, "deleteMedia")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deleteMedia); + if (message.messageTimestamp != null && Object.hasOwnProperty.call(message, "messageTimestamp")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.messageTimestamp); + return writer; + }; + + /** + * Encodes the specified DeleteMessageForMeAction message, length delimited. Does not implicitly {@link proto.DeleteMessageForMeAction.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.DeleteMessageForMeAction + * @static + * @param {proto.IDeleteMessageForMeAction} message DeleteMessageForMeAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteMessageForMeAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteMessageForMeAction message from the specified reader or buffer. + * @function decode + * @memberof proto.DeleteMessageForMeAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.DeleteMessageForMeAction} DeleteMessageForMeAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteMessageForMeAction.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.DeleteMessageForMeAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.deleteMedia = reader.bool(); + break; + case 2: + message.messageTimestamp = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteMessageForMeAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.DeleteMessageForMeAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.DeleteMessageForMeAction} DeleteMessageForMeAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteMessageForMeAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteMessageForMeAction message. + * @function verify + * @memberof proto.DeleteMessageForMeAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteMessageForMeAction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deleteMedia != null && message.hasOwnProperty("deleteMedia")) + if (typeof message.deleteMedia !== "boolean") + return "deleteMedia: boolean expected"; + if (message.messageTimestamp != null && message.hasOwnProperty("messageTimestamp")) + if (!$util.isInteger(message.messageTimestamp) && !(message.messageTimestamp && $util.isInteger(message.messageTimestamp.low) && $util.isInteger(message.messageTimestamp.high))) + return "messageTimestamp: integer|Long expected"; + return null; + }; + + /** + * Creates a DeleteMessageForMeAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.DeleteMessageForMeAction + * @static + * @param {Object.} object Plain object + * @returns {proto.DeleteMessageForMeAction} DeleteMessageForMeAction + */ + DeleteMessageForMeAction.fromObject = function fromObject(object) { + if (object instanceof $root.proto.DeleteMessageForMeAction) + return object; + var message = new $root.proto.DeleteMessageForMeAction(); + if (object.deleteMedia != null) + message.deleteMedia = Boolean(object.deleteMedia); if (object.messageTimestamp != null) if ($util.Long) - (message.messageTimestamp = $util.Long.fromValue(object.messageTimestamp)).unsigned = true; + (message.messageTimestamp = $util.Long.fromValue(object.messageTimestamp)).unsigned = false; else if (typeof object.messageTimestamp === "string") message.messageTimestamp = parseInt(object.messageTimestamp, 10); else if (typeof object.messageTimestamp === "number") message.messageTimestamp = object.messageTimestamp; else if (typeof object.messageTimestamp === "object") - message.messageTimestamp = new $util.LongBits(object.messageTimestamp.low >>> 0, object.messageTimestamp.high >>> 0).toNumber(true); - switch (object.status) { - case "ERROR": - case 0: - message.status = 0; - break; - case "PENDING": - case 1: - message.status = 1; - break; - case "SERVER_ACK": - case 2: - message.status = 2; - break; - case "DELIVERY_ACK": - case 3: - message.status = 3; - break; - case "READ": - case 4: - message.status = 4; - break; - case "PLAYED": - case 5: - message.status = 5; - break; - } - if (object.participant != null) - message.participant = String(object.participant); - if (object.ignore != null) - message.ignore = Boolean(object.ignore); - if (object.starred != null) - message.starred = Boolean(object.starred); - if (object.broadcast != null) - message.broadcast = Boolean(object.broadcast); - if (object.pushName != null) - message.pushName = String(object.pushName); - if (object.mediaCiphertextSha256 != null) - if (typeof object.mediaCiphertextSha256 === "string") - $util.base64.decode(object.mediaCiphertextSha256, message.mediaCiphertextSha256 = $util.newBuffer($util.base64.length(object.mediaCiphertextSha256)), 0); - else if (object.mediaCiphertextSha256.length) - message.mediaCiphertextSha256 = object.mediaCiphertextSha256; - if (object.multicast != null) - message.multicast = Boolean(object.multicast); - if (object.urlText != null) - message.urlText = Boolean(object.urlText); - if (object.urlNumber != null) - message.urlNumber = Boolean(object.urlNumber); - switch (object.messageStubType) { - case "UNKNOWN": - case 0: - message.messageStubType = 0; - break; - case "REVOKE": - case 1: - message.messageStubType = 1; - break; - case "CIPHERTEXT": - case 2: - message.messageStubType = 2; - break; - case "FUTUREPROOF": - case 3: - message.messageStubType = 3; - break; - case "NON_VERIFIED_TRANSITION": - case 4: - message.messageStubType = 4; - break; - case "UNVERIFIED_TRANSITION": - case 5: - message.messageStubType = 5; - break; - case "VERIFIED_TRANSITION": - case 6: - message.messageStubType = 6; - break; - case "VERIFIED_LOW_UNKNOWN": - case 7: - message.messageStubType = 7; - break; - case "VERIFIED_HIGH": - case 8: - message.messageStubType = 8; - break; - case "VERIFIED_INITIAL_UNKNOWN": - case 9: - message.messageStubType = 9; - break; - case "VERIFIED_INITIAL_LOW": - case 10: - message.messageStubType = 10; - break; - case "VERIFIED_INITIAL_HIGH": - case 11: - message.messageStubType = 11; - break; - case "VERIFIED_TRANSITION_ANY_TO_NONE": - case 12: - message.messageStubType = 12; - break; - case "VERIFIED_TRANSITION_ANY_TO_HIGH": - case 13: - message.messageStubType = 13; - break; - case "VERIFIED_TRANSITION_HIGH_TO_LOW": - case 14: - message.messageStubType = 14; - break; - case "VERIFIED_TRANSITION_HIGH_TO_UNKNOWN": - case 15: - message.messageStubType = 15; - break; - case "VERIFIED_TRANSITION_UNKNOWN_TO_LOW": - case 16: - message.messageStubType = 16; - break; - case "VERIFIED_TRANSITION_LOW_TO_UNKNOWN": - case 17: - message.messageStubType = 17; - break; - case "VERIFIED_TRANSITION_NONE_TO_LOW": - case 18: - message.messageStubType = 18; - break; - case "VERIFIED_TRANSITION_NONE_TO_UNKNOWN": - case 19: - message.messageStubType = 19; - break; - case "GROUP_CREATE": - case 20: - message.messageStubType = 20; - break; - case "GROUP_CHANGE_SUBJECT": - case 21: - message.messageStubType = 21; - break; - case "GROUP_CHANGE_ICON": - case 22: - message.messageStubType = 22; - break; - case "GROUP_CHANGE_INVITE_LINK": - case 23: - message.messageStubType = 23; - break; - case "GROUP_CHANGE_DESCRIPTION": - case 24: - message.messageStubType = 24; - break; - case "GROUP_CHANGE_RESTRICT": - case 25: - message.messageStubType = 25; - break; - case "GROUP_CHANGE_ANNOUNCE": - case 26: - message.messageStubType = 26; - break; - case "GROUP_PARTICIPANT_ADD": - case 27: - message.messageStubType = 27; - break; - case "GROUP_PARTICIPANT_REMOVE": - case 28: - message.messageStubType = 28; - break; - case "GROUP_PARTICIPANT_PROMOTE": - case 29: - message.messageStubType = 29; - break; - case "GROUP_PARTICIPANT_DEMOTE": - case 30: - message.messageStubType = 30; - break; - case "GROUP_PARTICIPANT_INVITE": - case 31: - message.messageStubType = 31; - break; - case "GROUP_PARTICIPANT_LEAVE": - case 32: - message.messageStubType = 32; - break; - case "GROUP_PARTICIPANT_CHANGE_NUMBER": - case 33: - message.messageStubType = 33; - break; - case "BROADCAST_CREATE": - case 34: - message.messageStubType = 34; - break; - case "BROADCAST_ADD": - case 35: - message.messageStubType = 35; - break; - case "BROADCAST_REMOVE": - case 36: - message.messageStubType = 36; - break; - case "GENERIC_NOTIFICATION": - case 37: - message.messageStubType = 37; - break; - case "E2E_IDENTITY_CHANGED": - case 38: - message.messageStubType = 38; - break; - case "E2E_ENCRYPTED": - case 39: - message.messageStubType = 39; - break; - case "CALL_MISSED_VOICE": - case 40: - message.messageStubType = 40; - break; - case "CALL_MISSED_VIDEO": - case 41: - message.messageStubType = 41; - break; - case "INDIVIDUAL_CHANGE_NUMBER": - case 42: - message.messageStubType = 42; - break; - case "GROUP_DELETE": - case 43: - message.messageStubType = 43; - break; - case "GROUP_ANNOUNCE_MODE_MESSAGE_BOUNCE": - case 44: - message.messageStubType = 44; - break; - case "CALL_MISSED_GROUP_VOICE": - case 45: - message.messageStubType = 45; - break; - case "CALL_MISSED_GROUP_VIDEO": - case 46: - message.messageStubType = 46; - break; - case "PAYMENT_CIPHERTEXT": - case 47: - message.messageStubType = 47; - break; - case "PAYMENT_FUTUREPROOF": - case 48: - message.messageStubType = 48; - break; - case "PAYMENT_TRANSACTION_STATUS_UPDATE_FAILED": - case 49: - message.messageStubType = 49; - break; - case "PAYMENT_TRANSACTION_STATUS_UPDATE_REFUNDED": - case 50: - message.messageStubType = 50; - break; - case "PAYMENT_TRANSACTION_STATUS_UPDATE_REFUND_FAILED": - case 51: - message.messageStubType = 51; - break; - case "PAYMENT_TRANSACTION_STATUS_RECEIVER_PENDING_SETUP": - case 52: - message.messageStubType = 52; - break; - case "PAYMENT_TRANSACTION_STATUS_RECEIVER_SUCCESS_AFTER_HICCUP": - case 53: - message.messageStubType = 53; - break; - case "PAYMENT_ACTION_ACCOUNT_SETUP_REMINDER": - case 54: - message.messageStubType = 54; - break; - case "PAYMENT_ACTION_SEND_PAYMENT_REMINDER": - case 55: - message.messageStubType = 55; - break; - case "PAYMENT_ACTION_SEND_PAYMENT_INVITATION": - case 56: - message.messageStubType = 56; - break; - case "PAYMENT_ACTION_REQUEST_DECLINED": - case 57: - message.messageStubType = 57; - break; - case "PAYMENT_ACTION_REQUEST_EXPIRED": - case 58: - message.messageStubType = 58; - break; - case "PAYMENT_ACTION_REQUEST_CANCELLED": - case 59: - message.messageStubType = 59; - break; - case "BIZ_VERIFIED_TRANSITION_TOP_TO_BOTTOM": - case 60: - message.messageStubType = 60; - break; - case "BIZ_VERIFIED_TRANSITION_BOTTOM_TO_TOP": - case 61: - message.messageStubType = 61; - break; - case "BIZ_INTRO_TOP": - case 62: - message.messageStubType = 62; - break; - case "BIZ_INTRO_BOTTOM": - case 63: - message.messageStubType = 63; - break; - case "BIZ_NAME_CHANGE": - case 64: - message.messageStubType = 64; - break; - case "BIZ_MOVE_TO_CONSUMER_APP": - case 65: - message.messageStubType = 65; - break; - case "BIZ_TWO_TIER_MIGRATION_TOP": - case 66: - message.messageStubType = 66; - break; - case "BIZ_TWO_TIER_MIGRATION_BOTTOM": - case 67: - message.messageStubType = 67; - break; - case "OVERSIZED": - case 68: - message.messageStubType = 68; - break; - case "GROUP_CHANGE_NO_FREQUENTLY_FORWARDED": - case 69: - message.messageStubType = 69; - break; - case "GROUP_V4_ADD_INVITE_SENT": - case 70: - message.messageStubType = 70; - break; - case "GROUP_PARTICIPANT_ADD_REQUEST_JOIN": - case 71: - message.messageStubType = 71; - break; - case "CHANGE_EPHEMERAL_SETTING": - case 72: - message.messageStubType = 72; - break; - case "E2E_DEVICE_CHANGED": - case 73: - message.messageStubType = 73; - break; - case "VIEWED_ONCE": - case 74: - message.messageStubType = 74; - break; - case "E2E_ENCRYPTED_NOW": - case 75: - message.messageStubType = 75; - break; - case "BLUE_MSG_BSP_FB_TO_BSP_PREMISE": - case 76: - message.messageStubType = 76; - break; - case "BLUE_MSG_BSP_FB_TO_SELF_FB": - case 77: - message.messageStubType = 77; - break; - case "BLUE_MSG_BSP_FB_TO_SELF_PREMISE": - case 78: - message.messageStubType = 78; - break; - case "BLUE_MSG_BSP_FB_UNVERIFIED": - case 79: - message.messageStubType = 79; - break; - case "BLUE_MSG_BSP_FB_UNVERIFIED_TO_SELF_PREMISE_VERIFIED": - case 80: - message.messageStubType = 80; - break; - case "BLUE_MSG_BSP_FB_VERIFIED": - case 81: - message.messageStubType = 81; - break; - case "BLUE_MSG_BSP_FB_VERIFIED_TO_SELF_PREMISE_UNVERIFIED": - case 82: - message.messageStubType = 82; - break; - case "BLUE_MSG_BSP_PREMISE_TO_SELF_PREMISE": - case 83: - message.messageStubType = 83; - break; - case "BLUE_MSG_BSP_PREMISE_UNVERIFIED": - case 84: - message.messageStubType = 84; - break; - case "BLUE_MSG_BSP_PREMISE_UNVERIFIED_TO_SELF_PREMISE_VERIFIED": - case 85: - message.messageStubType = 85; - break; - case "BLUE_MSG_BSP_PREMISE_VERIFIED": - case 86: - message.messageStubType = 86; - break; - case "BLUE_MSG_BSP_PREMISE_VERIFIED_TO_SELF_PREMISE_UNVERIFIED": - case 87: - message.messageStubType = 87; - break; - case "BLUE_MSG_CONSUMER_TO_BSP_FB_UNVERIFIED": - case 88: - message.messageStubType = 88; - break; - case "BLUE_MSG_CONSUMER_TO_BSP_PREMISE_UNVERIFIED": - case 89: - message.messageStubType = 89; - break; - case "BLUE_MSG_CONSUMER_TO_SELF_FB_UNVERIFIED": - case 90: - message.messageStubType = 90; - break; - case "BLUE_MSG_CONSUMER_TO_SELF_PREMISE_UNVERIFIED": - case 91: - message.messageStubType = 91; - break; - case "BLUE_MSG_SELF_FB_TO_BSP_PREMISE": - case 92: - message.messageStubType = 92; - break; - case "BLUE_MSG_SELF_FB_TO_SELF_PREMISE": - case 93: - message.messageStubType = 93; - break; - case "BLUE_MSG_SELF_FB_UNVERIFIED": - case 94: - message.messageStubType = 94; - break; - case "BLUE_MSG_SELF_FB_UNVERIFIED_TO_SELF_PREMISE_VERIFIED": - case 95: - message.messageStubType = 95; - break; - case "BLUE_MSG_SELF_FB_VERIFIED": - case 96: - message.messageStubType = 96; - break; - case "BLUE_MSG_SELF_FB_VERIFIED_TO_SELF_PREMISE_UNVERIFIED": - case 97: - message.messageStubType = 97; - break; - case "BLUE_MSG_SELF_PREMISE_TO_BSP_PREMISE": - case 98: - message.messageStubType = 98; - break; - case "BLUE_MSG_SELF_PREMISE_UNVERIFIED": - case 99: - message.messageStubType = 99; - break; - case "BLUE_MSG_SELF_PREMISE_VERIFIED": - case 100: - message.messageStubType = 100; - break; - case "BLUE_MSG_TO_BSP_FB": - case 101: - message.messageStubType = 101; - break; - case "BLUE_MSG_TO_CONSUMER": - case 102: - message.messageStubType = 102; - break; - case "BLUE_MSG_TO_SELF_FB": - case 103: - message.messageStubType = 103; - break; - case "BLUE_MSG_UNVERIFIED_TO_BSP_FB_VERIFIED": - case 104: - message.messageStubType = 104; - break; - case "BLUE_MSG_UNVERIFIED_TO_BSP_PREMISE_VERIFIED": - case 105: - message.messageStubType = 105; - break; - case "BLUE_MSG_UNVERIFIED_TO_SELF_FB_VERIFIED": - case 106: - message.messageStubType = 106; - break; - case "BLUE_MSG_UNVERIFIED_TO_VERIFIED": - case 107: - message.messageStubType = 107; - break; - case "BLUE_MSG_VERIFIED_TO_BSP_FB_UNVERIFIED": - case 108: - message.messageStubType = 108; - break; - case "BLUE_MSG_VERIFIED_TO_BSP_PREMISE_UNVERIFIED": - case 109: - message.messageStubType = 109; - break; - case "BLUE_MSG_VERIFIED_TO_SELF_FB_UNVERIFIED": - case 110: - message.messageStubType = 110; - break; - case "BLUE_MSG_VERIFIED_TO_UNVERIFIED": - case 111: - message.messageStubType = 111; - break; - case "BLUE_MSG_BSP_FB_UNVERIFIED_TO_BSP_PREMISE_VERIFIED": - case 112: - message.messageStubType = 112; - break; - case "BLUE_MSG_BSP_FB_UNVERIFIED_TO_SELF_FB_VERIFIED": - case 113: - message.messageStubType = 113; - break; - case "BLUE_MSG_BSP_FB_VERIFIED_TO_BSP_PREMISE_UNVERIFIED": - case 114: - message.messageStubType = 114; - break; - case "BLUE_MSG_BSP_FB_VERIFIED_TO_SELF_FB_UNVERIFIED": - case 115: - message.messageStubType = 115; - break; - case "BLUE_MSG_SELF_FB_UNVERIFIED_TO_BSP_PREMISE_VERIFIED": - case 116: - message.messageStubType = 116; - break; - case "BLUE_MSG_SELF_FB_VERIFIED_TO_BSP_PREMISE_UNVERIFIED": - case 117: - message.messageStubType = 117; - break; - case "E2E_IDENTITY_UNAVAILABLE": - case 118: - message.messageStubType = 118; - break; - } - if (object.clearMedia != null) - message.clearMedia = Boolean(object.clearMedia); - if (object.messageStubParameters) { - if (!Array.isArray(object.messageStubParameters)) - throw TypeError(".proto.WebMessageInfo.messageStubParameters: array expected"); - message.messageStubParameters = []; - for (var i = 0; i < object.messageStubParameters.length; ++i) - message.messageStubParameters[i] = String(object.messageStubParameters[i]); - } - if (object.duration != null) - message.duration = object.duration >>> 0; - if (object.labels) { - if (!Array.isArray(object.labels)) - throw TypeError(".proto.WebMessageInfo.labels: array expected"); - message.labels = []; - for (var i = 0; i < object.labels.length; ++i) - message.labels[i] = String(object.labels[i]); - } - if (object.paymentInfo != null) { - if (typeof object.paymentInfo !== "object") - throw TypeError(".proto.WebMessageInfo.paymentInfo: object expected"); - message.paymentInfo = $root.proto.PaymentInfo.fromObject(object.paymentInfo); - } - if (object.finalLiveLocation != null) { - if (typeof object.finalLiveLocation !== "object") - throw TypeError(".proto.WebMessageInfo.finalLiveLocation: object expected"); - message.finalLiveLocation = $root.proto.LiveLocationMessage.fromObject(object.finalLiveLocation); - } - if (object.quotedPaymentInfo != null) { - if (typeof object.quotedPaymentInfo !== "object") - throw TypeError(".proto.WebMessageInfo.quotedPaymentInfo: object expected"); - message.quotedPaymentInfo = $root.proto.PaymentInfo.fromObject(object.quotedPaymentInfo); - } - if (object.ephemeralStartTimestamp != null) - if ($util.Long) - (message.ephemeralStartTimestamp = $util.Long.fromValue(object.ephemeralStartTimestamp)).unsigned = true; - else if (typeof object.ephemeralStartTimestamp === "string") - message.ephemeralStartTimestamp = parseInt(object.ephemeralStartTimestamp, 10); - else if (typeof object.ephemeralStartTimestamp === "number") - message.ephemeralStartTimestamp = object.ephemeralStartTimestamp; - else if (typeof object.ephemeralStartTimestamp === "object") - message.ephemeralStartTimestamp = new $util.LongBits(object.ephemeralStartTimestamp.low >>> 0, object.ephemeralStartTimestamp.high >>> 0).toNumber(true); - if (object.ephemeralDuration != null) - message.ephemeralDuration = object.ephemeralDuration >>> 0; - if (object.ephemeralOffToOn != null) - message.ephemeralOffToOn = Boolean(object.ephemeralOffToOn); - if (object.ephemeralOutOfSync != null) - message.ephemeralOutOfSync = Boolean(object.ephemeralOutOfSync); - switch (object.bizPrivacyStatus) { - case "E2EE": - case 0: - message.bizPrivacyStatus = 0; - break; - case "FB": - case 2: - message.bizPrivacyStatus = 2; - break; - case "BSP": - case 1: - message.bizPrivacyStatus = 1; - break; - case "BSP_AND_FB": - case 3: - message.bizPrivacyStatus = 3; - break; - } - if (object.verifiedBizName != null) - message.verifiedBizName = String(object.verifiedBizName); + message.messageTimestamp = new $util.LongBits(object.messageTimestamp.low >>> 0, object.messageTimestamp.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from a WebMessageInfo message. Also converts values to other types if specified. + * Creates a plain object from a DeleteMessageForMeAction message. Also converts values to other types if specified. * @function toObject - * @memberof proto.WebMessageInfo + * @memberof proto.DeleteMessageForMeAction * @static - * @param {proto.WebMessageInfo} message WebMessageInfo + * @param {proto.DeleteMessageForMeAction} message DeleteMessageForMeAction * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - WebMessageInfo.toObject = function toObject(message, options) { + DeleteMessageForMeAction.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.messageStubParameters = []; - object.labels = []; - } if (options.defaults) { - object.key = null; - object.message = null; + object.deleteMedia = false; if ($util.Long) { - var long = new $util.Long(0, 0, true); + var long = new $util.Long(0, 0, false); object.messageTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.messageTimestamp = options.longs === String ? "0" : 0; - object.status = options.enums === String ? "ERROR" : 0; - object.participant = ""; - object.ignore = false; - object.starred = false; - object.broadcast = false; - object.pushName = ""; - if (options.bytes === String) - object.mediaCiphertextSha256 = ""; - else { - object.mediaCiphertextSha256 = []; - if (options.bytes !== Array) - object.mediaCiphertextSha256 = $util.newBuffer(object.mediaCiphertextSha256); - } - object.multicast = false; - object.urlText = false; - object.urlNumber = false; - object.messageStubType = options.enums === String ? "UNKNOWN" : 0; - object.clearMedia = false; - object.duration = 0; - object.paymentInfo = null; - object.finalLiveLocation = null; - object.quotedPaymentInfo = null; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.ephemeralStartTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.ephemeralStartTimestamp = options.longs === String ? "0" : 0; - object.ephemeralDuration = 0; - object.ephemeralOffToOn = false; - object.ephemeralOutOfSync = false; - object.bizPrivacyStatus = options.enums === String ? "E2EE" : 0; - object.verifiedBizName = ""; } - if (message.key != null && message.hasOwnProperty("key")) - object.key = $root.proto.MessageKey.toObject(message.key, options); - if (message.message != null && message.hasOwnProperty("message")) - object.message = $root.proto.Message.toObject(message.message, options); + if (message.deleteMedia != null && message.hasOwnProperty("deleteMedia")) + object.deleteMedia = message.deleteMedia; if (message.messageTimestamp != null && message.hasOwnProperty("messageTimestamp")) if (typeof message.messageTimestamp === "number") object.messageTimestamp = options.longs === String ? String(message.messageTimestamp) : message.messageTimestamp; else - object.messageTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.messageTimestamp) : options.longs === Number ? new $util.LongBits(message.messageTimestamp.low >>> 0, message.messageTimestamp.high >>> 0).toNumber(true) : message.messageTimestamp; - if (message.status != null && message.hasOwnProperty("status")) - object.status = options.enums === String ? $root.proto.WebMessageInfo.WebMessageInfoStatus[message.status] : message.status; - if (message.participant != null && message.hasOwnProperty("participant")) - object.participant = message.participant; - if (message.ignore != null && message.hasOwnProperty("ignore")) - object.ignore = message.ignore; - if (message.starred != null && message.hasOwnProperty("starred")) - object.starred = message.starred; - if (message.broadcast != null && message.hasOwnProperty("broadcast")) - object.broadcast = message.broadcast; - if (message.pushName != null && message.hasOwnProperty("pushName")) - object.pushName = message.pushName; - if (message.mediaCiphertextSha256 != null && message.hasOwnProperty("mediaCiphertextSha256")) - object.mediaCiphertextSha256 = options.bytes === String ? $util.base64.encode(message.mediaCiphertextSha256, 0, message.mediaCiphertextSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.mediaCiphertextSha256) : message.mediaCiphertextSha256; - if (message.multicast != null && message.hasOwnProperty("multicast")) - object.multicast = message.multicast; - if (message.urlText != null && message.hasOwnProperty("urlText")) - object.urlText = message.urlText; - if (message.urlNumber != null && message.hasOwnProperty("urlNumber")) - object.urlNumber = message.urlNumber; - if (message.messageStubType != null && message.hasOwnProperty("messageStubType")) - object.messageStubType = options.enums === String ? $root.proto.WebMessageInfo.WebMessageInfoStubType[message.messageStubType] : message.messageStubType; - if (message.clearMedia != null && message.hasOwnProperty("clearMedia")) - object.clearMedia = message.clearMedia; - if (message.messageStubParameters && message.messageStubParameters.length) { - object.messageStubParameters = []; - for (var j = 0; j < message.messageStubParameters.length; ++j) - object.messageStubParameters[j] = message.messageStubParameters[j]; - } - if (message.duration != null && message.hasOwnProperty("duration")) - object.duration = message.duration; - if (message.labels && message.labels.length) { - object.labels = []; - for (var j = 0; j < message.labels.length; ++j) - object.labels[j] = message.labels[j]; - } - if (message.paymentInfo != null && message.hasOwnProperty("paymentInfo")) - object.paymentInfo = $root.proto.PaymentInfo.toObject(message.paymentInfo, options); - if (message.finalLiveLocation != null && message.hasOwnProperty("finalLiveLocation")) - object.finalLiveLocation = $root.proto.LiveLocationMessage.toObject(message.finalLiveLocation, options); - if (message.quotedPaymentInfo != null && message.hasOwnProperty("quotedPaymentInfo")) - object.quotedPaymentInfo = $root.proto.PaymentInfo.toObject(message.quotedPaymentInfo, options); - if (message.ephemeralStartTimestamp != null && message.hasOwnProperty("ephemeralStartTimestamp")) - if (typeof message.ephemeralStartTimestamp === "number") - object.ephemeralStartTimestamp = options.longs === String ? String(message.ephemeralStartTimestamp) : message.ephemeralStartTimestamp; - else - object.ephemeralStartTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.ephemeralStartTimestamp) : options.longs === Number ? new $util.LongBits(message.ephemeralStartTimestamp.low >>> 0, message.ephemeralStartTimestamp.high >>> 0).toNumber(true) : message.ephemeralStartTimestamp; - if (message.ephemeralDuration != null && message.hasOwnProperty("ephemeralDuration")) - object.ephemeralDuration = message.ephemeralDuration; - if (message.ephemeralOffToOn != null && message.hasOwnProperty("ephemeralOffToOn")) - object.ephemeralOffToOn = message.ephemeralOffToOn; - if (message.ephemeralOutOfSync != null && message.hasOwnProperty("ephemeralOutOfSync")) - object.ephemeralOutOfSync = message.ephemeralOutOfSync; - if (message.bizPrivacyStatus != null && message.hasOwnProperty("bizPrivacyStatus")) - object.bizPrivacyStatus = options.enums === String ? $root.proto.WebMessageInfo.WebMessageInfoBizPrivacyStatus[message.bizPrivacyStatus] : message.bizPrivacyStatus; - if (message.verifiedBizName != null && message.hasOwnProperty("verifiedBizName")) - object.verifiedBizName = message.verifiedBizName; + object.messageTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.messageTimestamp) : options.longs === Number ? new $util.LongBits(message.messageTimestamp.low >>> 0, message.messageTimestamp.high >>> 0).toNumber() : message.messageTimestamp; return object; }; /** - * Converts this WebMessageInfo to JSON. + * Converts this DeleteMessageForMeAction to JSON. * @function toJSON - * @memberof proto.WebMessageInfo + * @memberof proto.DeleteMessageForMeAction * @instance * @returns {Object.} JSON object */ - WebMessageInfo.prototype.toJSON = function toJSON() { + DeleteMessageForMeAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteMessageForMeAction; + })(); + + proto.MarkChatAsReadAction = (function() { + + /** + * Properties of a MarkChatAsReadAction. + * @memberof proto + * @interface IMarkChatAsReadAction + * @property {boolean|null} [read] MarkChatAsReadAction read + * @property {proto.ISyncActionMessageRange|null} [messageRange] MarkChatAsReadAction messageRange + */ + + /** + * Constructs a new MarkChatAsReadAction. + * @memberof proto + * @classdesc Represents a MarkChatAsReadAction. + * @implements IMarkChatAsReadAction + * @constructor + * @param {proto.IMarkChatAsReadAction=} [properties] Properties to set + */ + function MarkChatAsReadAction(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]]; + } + + /** + * MarkChatAsReadAction read. + * @member {boolean} read + * @memberof proto.MarkChatAsReadAction + * @instance + */ + MarkChatAsReadAction.prototype.read = false; + + /** + * MarkChatAsReadAction messageRange. + * @member {proto.ISyncActionMessageRange|null|undefined} messageRange + * @memberof proto.MarkChatAsReadAction + * @instance + */ + MarkChatAsReadAction.prototype.messageRange = null; + + /** + * Creates a new MarkChatAsReadAction instance using the specified properties. + * @function create + * @memberof proto.MarkChatAsReadAction + * @static + * @param {proto.IMarkChatAsReadAction=} [properties] Properties to set + * @returns {proto.MarkChatAsReadAction} MarkChatAsReadAction instance + */ + MarkChatAsReadAction.create = function create(properties) { + return new MarkChatAsReadAction(properties); + }; + + /** + * Encodes the specified MarkChatAsReadAction message. Does not implicitly {@link proto.MarkChatAsReadAction.verify|verify} messages. + * @function encode + * @memberof proto.MarkChatAsReadAction + * @static + * @param {proto.IMarkChatAsReadAction} message MarkChatAsReadAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MarkChatAsReadAction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.read != null && Object.hasOwnProperty.call(message, "read")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.read); + if (message.messageRange != null && Object.hasOwnProperty.call(message, "messageRange")) + $root.proto.SyncActionMessageRange.encode(message.messageRange, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MarkChatAsReadAction message, length delimited. Does not implicitly {@link proto.MarkChatAsReadAction.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.MarkChatAsReadAction + * @static + * @param {proto.IMarkChatAsReadAction} message MarkChatAsReadAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MarkChatAsReadAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MarkChatAsReadAction message from the specified reader or buffer. + * @function decode + * @memberof proto.MarkChatAsReadAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.MarkChatAsReadAction} MarkChatAsReadAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MarkChatAsReadAction.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.MarkChatAsReadAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.read = reader.bool(); + break; + case 2: + message.messageRange = $root.proto.SyncActionMessageRange.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MarkChatAsReadAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.MarkChatAsReadAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.MarkChatAsReadAction} MarkChatAsReadAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MarkChatAsReadAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MarkChatAsReadAction message. + * @function verify + * @memberof proto.MarkChatAsReadAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MarkChatAsReadAction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.read != null && message.hasOwnProperty("read")) + if (typeof message.read !== "boolean") + return "read: boolean expected"; + if (message.messageRange != null && message.hasOwnProperty("messageRange")) { + var error = $root.proto.SyncActionMessageRange.verify(message.messageRange); + if (error) + return "messageRange." + error; + } + return null; + }; + + /** + * Creates a MarkChatAsReadAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.MarkChatAsReadAction + * @static + * @param {Object.} object Plain object + * @returns {proto.MarkChatAsReadAction} MarkChatAsReadAction + */ + MarkChatAsReadAction.fromObject = function fromObject(object) { + if (object instanceof $root.proto.MarkChatAsReadAction) + return object; + var message = new $root.proto.MarkChatAsReadAction(); + if (object.read != null) + message.read = Boolean(object.read); + if (object.messageRange != null) { + if (typeof object.messageRange !== "object") + throw TypeError(".proto.MarkChatAsReadAction.messageRange: object expected"); + message.messageRange = $root.proto.SyncActionMessageRange.fromObject(object.messageRange); + } + return message; + }; + + /** + * Creates a plain object from a MarkChatAsReadAction message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.MarkChatAsReadAction + * @static + * @param {proto.MarkChatAsReadAction} message MarkChatAsReadAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MarkChatAsReadAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.read = false; + object.messageRange = null; + } + if (message.read != null && message.hasOwnProperty("read")) + object.read = message.read; + if (message.messageRange != null && message.hasOwnProperty("messageRange")) + object.messageRange = $root.proto.SyncActionMessageRange.toObject(message.messageRange, options); + return object; + }; + + /** + * Converts this MarkChatAsReadAction to JSON. + * @function toJSON + * @memberof proto.MarkChatAsReadAction + * @instance + * @returns {Object.} JSON object + */ + MarkChatAsReadAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MarkChatAsReadAction; + })(); + + proto.ClearChatAction = (function() { + + /** + * Properties of a ClearChatAction. + * @memberof proto + * @interface IClearChatAction + * @property {proto.ISyncActionMessageRange|null} [messageRange] ClearChatAction messageRange + */ + + /** + * Constructs a new ClearChatAction. + * @memberof proto + * @classdesc Represents a ClearChatAction. + * @implements IClearChatAction + * @constructor + * @param {proto.IClearChatAction=} [properties] Properties to set + */ + function ClearChatAction(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]]; + } + + /** + * ClearChatAction messageRange. + * @member {proto.ISyncActionMessageRange|null|undefined} messageRange + * @memberof proto.ClearChatAction + * @instance + */ + ClearChatAction.prototype.messageRange = null; + + /** + * Creates a new ClearChatAction instance using the specified properties. + * @function create + * @memberof proto.ClearChatAction + * @static + * @param {proto.IClearChatAction=} [properties] Properties to set + * @returns {proto.ClearChatAction} ClearChatAction instance + */ + ClearChatAction.create = function create(properties) { + return new ClearChatAction(properties); + }; + + /** + * Encodes the specified ClearChatAction message. Does not implicitly {@link proto.ClearChatAction.verify|verify} messages. + * @function encode + * @memberof proto.ClearChatAction + * @static + * @param {proto.IClearChatAction} message ClearChatAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClearChatAction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messageRange != null && Object.hasOwnProperty.call(message, "messageRange")) + $root.proto.SyncActionMessageRange.encode(message.messageRange, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ClearChatAction message, length delimited. Does not implicitly {@link proto.ClearChatAction.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.ClearChatAction + * @static + * @param {proto.IClearChatAction} message ClearChatAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClearChatAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ClearChatAction message from the specified reader or buffer. + * @function decode + * @memberof proto.ClearChatAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.ClearChatAction} ClearChatAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClearChatAction.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.ClearChatAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.messageRange = $root.proto.SyncActionMessageRange.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ClearChatAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.ClearChatAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.ClearChatAction} ClearChatAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClearChatAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ClearChatAction message. + * @function verify + * @memberof proto.ClearChatAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ClearChatAction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.messageRange != null && message.hasOwnProperty("messageRange")) { + var error = $root.proto.SyncActionMessageRange.verify(message.messageRange); + if (error) + return "messageRange." + error; + } + return null; + }; + + /** + * Creates a ClearChatAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.ClearChatAction + * @static + * @param {Object.} object Plain object + * @returns {proto.ClearChatAction} ClearChatAction + */ + ClearChatAction.fromObject = function fromObject(object) { + if (object instanceof $root.proto.ClearChatAction) + return object; + var message = new $root.proto.ClearChatAction(); + if (object.messageRange != null) { + if (typeof object.messageRange !== "object") + throw TypeError(".proto.ClearChatAction.messageRange: object expected"); + message.messageRange = $root.proto.SyncActionMessageRange.fromObject(object.messageRange); + } + return message; + }; + + /** + * Creates a plain object from a ClearChatAction message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.ClearChatAction + * @static + * @param {proto.ClearChatAction} message ClearChatAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ClearChatAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.messageRange = null; + if (message.messageRange != null && message.hasOwnProperty("messageRange")) + object.messageRange = $root.proto.SyncActionMessageRange.toObject(message.messageRange, options); + return object; + }; + + /** + * Converts this ClearChatAction to JSON. + * @function toJSON + * @memberof proto.ClearChatAction + * @instance + * @returns {Object.} JSON object + */ + ClearChatAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ClearChatAction; + })(); + + proto.DeleteChatAction = (function() { + + /** + * Properties of a DeleteChatAction. + * @memberof proto + * @interface IDeleteChatAction + * @property {proto.ISyncActionMessageRange|null} [messageRange] DeleteChatAction messageRange + */ + + /** + * Constructs a new DeleteChatAction. + * @memberof proto + * @classdesc Represents a DeleteChatAction. + * @implements IDeleteChatAction + * @constructor + * @param {proto.IDeleteChatAction=} [properties] Properties to set + */ + function DeleteChatAction(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]]; + } + + /** + * DeleteChatAction messageRange. + * @member {proto.ISyncActionMessageRange|null|undefined} messageRange + * @memberof proto.DeleteChatAction + * @instance + */ + DeleteChatAction.prototype.messageRange = null; + + /** + * Creates a new DeleteChatAction instance using the specified properties. + * @function create + * @memberof proto.DeleteChatAction + * @static + * @param {proto.IDeleteChatAction=} [properties] Properties to set + * @returns {proto.DeleteChatAction} DeleteChatAction instance + */ + DeleteChatAction.create = function create(properties) { + return new DeleteChatAction(properties); + }; + + /** + * Encodes the specified DeleteChatAction message. Does not implicitly {@link proto.DeleteChatAction.verify|verify} messages. + * @function encode + * @memberof proto.DeleteChatAction + * @static + * @param {proto.IDeleteChatAction} message DeleteChatAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteChatAction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messageRange != null && Object.hasOwnProperty.call(message, "messageRange")) + $root.proto.SyncActionMessageRange.encode(message.messageRange, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DeleteChatAction message, length delimited. Does not implicitly {@link proto.DeleteChatAction.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.DeleteChatAction + * @static + * @param {proto.IDeleteChatAction} message DeleteChatAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteChatAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteChatAction message from the specified reader or buffer. + * @function decode + * @memberof proto.DeleteChatAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.DeleteChatAction} DeleteChatAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteChatAction.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.DeleteChatAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.messageRange = $root.proto.SyncActionMessageRange.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteChatAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.DeleteChatAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.DeleteChatAction} DeleteChatAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteChatAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteChatAction message. + * @function verify + * @memberof proto.DeleteChatAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteChatAction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.messageRange != null && message.hasOwnProperty("messageRange")) { + var error = $root.proto.SyncActionMessageRange.verify(message.messageRange); + if (error) + return "messageRange." + error; + } + return null; + }; + + /** + * Creates a DeleteChatAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.DeleteChatAction + * @static + * @param {Object.} object Plain object + * @returns {proto.DeleteChatAction} DeleteChatAction + */ + DeleteChatAction.fromObject = function fromObject(object) { + if (object instanceof $root.proto.DeleteChatAction) + return object; + var message = new $root.proto.DeleteChatAction(); + if (object.messageRange != null) { + if (typeof object.messageRange !== "object") + throw TypeError(".proto.DeleteChatAction.messageRange: object expected"); + message.messageRange = $root.proto.SyncActionMessageRange.fromObject(object.messageRange); + } + return message; + }; + + /** + * Creates a plain object from a DeleteChatAction message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.DeleteChatAction + * @static + * @param {proto.DeleteChatAction} message DeleteChatAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteChatAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.messageRange = null; + if (message.messageRange != null && message.hasOwnProperty("messageRange")) + object.messageRange = $root.proto.SyncActionMessageRange.toObject(message.messageRange, options); + return object; + }; + + /** + * Converts this DeleteChatAction to JSON. + * @function toJSON + * @memberof proto.DeleteChatAction + * @instance + * @returns {Object.} JSON object + */ + DeleteChatAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteChatAction; + })(); + + proto.UnarchiveChatsSetting = (function() { + + /** + * Properties of an UnarchiveChatsSetting. + * @memberof proto + * @interface IUnarchiveChatsSetting + * @property {boolean|null} [unarchiveChats] UnarchiveChatsSetting unarchiveChats + */ + + /** + * Constructs a new UnarchiveChatsSetting. + * @memberof proto + * @classdesc Represents an UnarchiveChatsSetting. + * @implements IUnarchiveChatsSetting + * @constructor + * @param {proto.IUnarchiveChatsSetting=} [properties] Properties to set + */ + function UnarchiveChatsSetting(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]]; + } + + /** + * UnarchiveChatsSetting unarchiveChats. + * @member {boolean} unarchiveChats + * @memberof proto.UnarchiveChatsSetting + * @instance + */ + UnarchiveChatsSetting.prototype.unarchiveChats = false; + + /** + * Creates a new UnarchiveChatsSetting instance using the specified properties. + * @function create + * @memberof proto.UnarchiveChatsSetting + * @static + * @param {proto.IUnarchiveChatsSetting=} [properties] Properties to set + * @returns {proto.UnarchiveChatsSetting} UnarchiveChatsSetting instance + */ + UnarchiveChatsSetting.create = function create(properties) { + return new UnarchiveChatsSetting(properties); + }; + + /** + * Encodes the specified UnarchiveChatsSetting message. Does not implicitly {@link proto.UnarchiveChatsSetting.verify|verify} messages. + * @function encode + * @memberof proto.UnarchiveChatsSetting + * @static + * @param {proto.IUnarchiveChatsSetting} message UnarchiveChatsSetting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UnarchiveChatsSetting.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.unarchiveChats != null && Object.hasOwnProperty.call(message, "unarchiveChats")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.unarchiveChats); + return writer; + }; + + /** + * Encodes the specified UnarchiveChatsSetting message, length delimited. Does not implicitly {@link proto.UnarchiveChatsSetting.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.UnarchiveChatsSetting + * @static + * @param {proto.IUnarchiveChatsSetting} message UnarchiveChatsSetting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UnarchiveChatsSetting.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UnarchiveChatsSetting message from the specified reader or buffer. + * @function decode + * @memberof proto.UnarchiveChatsSetting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.UnarchiveChatsSetting} UnarchiveChatsSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UnarchiveChatsSetting.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.UnarchiveChatsSetting(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.unarchiveChats = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UnarchiveChatsSetting message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.UnarchiveChatsSetting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.UnarchiveChatsSetting} UnarchiveChatsSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UnarchiveChatsSetting.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UnarchiveChatsSetting message. + * @function verify + * @memberof proto.UnarchiveChatsSetting + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UnarchiveChatsSetting.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.unarchiveChats != null && message.hasOwnProperty("unarchiveChats")) + if (typeof message.unarchiveChats !== "boolean") + return "unarchiveChats: boolean expected"; + return null; + }; + + /** + * Creates an UnarchiveChatsSetting message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.UnarchiveChatsSetting + * @static + * @param {Object.} object Plain object + * @returns {proto.UnarchiveChatsSetting} UnarchiveChatsSetting + */ + UnarchiveChatsSetting.fromObject = function fromObject(object) { + if (object instanceof $root.proto.UnarchiveChatsSetting) + return object; + var message = new $root.proto.UnarchiveChatsSetting(); + if (object.unarchiveChats != null) + message.unarchiveChats = Boolean(object.unarchiveChats); + return message; + }; + + /** + * Creates a plain object from an UnarchiveChatsSetting message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.UnarchiveChatsSetting + * @static + * @param {proto.UnarchiveChatsSetting} message UnarchiveChatsSetting + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UnarchiveChatsSetting.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.unarchiveChats = false; + if (message.unarchiveChats != null && message.hasOwnProperty("unarchiveChats")) + object.unarchiveChats = message.unarchiveChats; + return object; + }; + + /** + * Converts this UnarchiveChatsSetting to JSON. + * @function toJSON + * @memberof proto.UnarchiveChatsSetting + * @instance + * @returns {Object.} JSON object + */ + UnarchiveChatsSetting.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UnarchiveChatsSetting; + })(); + + proto.SyncActionMessageRange = (function() { + + /** + * Properties of a SyncActionMessageRange. + * @memberof proto + * @interface ISyncActionMessageRange + * @property {number|Long|null} [lastMessageTimestamp] SyncActionMessageRange lastMessageTimestamp + * @property {number|Long|null} [lastSystemMessageTimestamp] SyncActionMessageRange lastSystemMessageTimestamp + * @property {Array.|null} [messages] SyncActionMessageRange messages + */ + + /** + * Constructs a new SyncActionMessageRange. + * @memberof proto + * @classdesc Represents a SyncActionMessageRange. + * @implements ISyncActionMessageRange + * @constructor + * @param {proto.ISyncActionMessageRange=} [properties] Properties to set + */ + function SyncActionMessageRange(properties) { + this.messages = []; + 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]]; + } + + /** + * SyncActionMessageRange lastMessageTimestamp. + * @member {number|Long} lastMessageTimestamp + * @memberof proto.SyncActionMessageRange + * @instance + */ + SyncActionMessageRange.prototype.lastMessageTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * SyncActionMessageRange lastSystemMessageTimestamp. + * @member {number|Long} lastSystemMessageTimestamp + * @memberof proto.SyncActionMessageRange + * @instance + */ + SyncActionMessageRange.prototype.lastSystemMessageTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * SyncActionMessageRange messages. + * @member {Array.} messages + * @memberof proto.SyncActionMessageRange + * @instance + */ + SyncActionMessageRange.prototype.messages = $util.emptyArray; + + /** + * Creates a new SyncActionMessageRange instance using the specified properties. + * @function create + * @memberof proto.SyncActionMessageRange + * @static + * @param {proto.ISyncActionMessageRange=} [properties] Properties to set + * @returns {proto.SyncActionMessageRange} SyncActionMessageRange instance + */ + SyncActionMessageRange.create = function create(properties) { + return new SyncActionMessageRange(properties); + }; + + /** + * Encodes the specified SyncActionMessageRange message. Does not implicitly {@link proto.SyncActionMessageRange.verify|verify} messages. + * @function encode + * @memberof proto.SyncActionMessageRange + * @static + * @param {proto.ISyncActionMessageRange} message SyncActionMessageRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SyncActionMessageRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.lastMessageTimestamp != null && Object.hasOwnProperty.call(message, "lastMessageTimestamp")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.lastMessageTimestamp); + if (message.lastSystemMessageTimestamp != null && Object.hasOwnProperty.call(message, "lastSystemMessageTimestamp")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.lastSystemMessageTimestamp); + if (message.messages != null && message.messages.length) + for (var i = 0; i < message.messages.length; ++i) + $root.proto.SyncActionMessage.encode(message.messages[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SyncActionMessageRange message, length delimited. Does not implicitly {@link proto.SyncActionMessageRange.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.SyncActionMessageRange + * @static + * @param {proto.ISyncActionMessageRange} message SyncActionMessageRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SyncActionMessageRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SyncActionMessageRange message from the specified reader or buffer. + * @function decode + * @memberof proto.SyncActionMessageRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.SyncActionMessageRange} SyncActionMessageRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SyncActionMessageRange.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.SyncActionMessageRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.lastMessageTimestamp = reader.int64(); + break; + case 2: + message.lastSystemMessageTimestamp = reader.int64(); + break; + case 3: + if (!(message.messages && message.messages.length)) + message.messages = []; + message.messages.push($root.proto.SyncActionMessage.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SyncActionMessageRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.SyncActionMessageRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.SyncActionMessageRange} SyncActionMessageRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SyncActionMessageRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SyncActionMessageRange message. + * @function verify + * @memberof proto.SyncActionMessageRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SyncActionMessageRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.lastMessageTimestamp != null && message.hasOwnProperty("lastMessageTimestamp")) + if (!$util.isInteger(message.lastMessageTimestamp) && !(message.lastMessageTimestamp && $util.isInteger(message.lastMessageTimestamp.low) && $util.isInteger(message.lastMessageTimestamp.high))) + return "lastMessageTimestamp: integer|Long expected"; + if (message.lastSystemMessageTimestamp != null && message.hasOwnProperty("lastSystemMessageTimestamp")) + if (!$util.isInteger(message.lastSystemMessageTimestamp) && !(message.lastSystemMessageTimestamp && $util.isInteger(message.lastSystemMessageTimestamp.low) && $util.isInteger(message.lastSystemMessageTimestamp.high))) + return "lastSystemMessageTimestamp: integer|Long 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.SyncActionMessage.verify(message.messages[i]); + if (error) + return "messages." + error; + } + } + return null; + }; + + /** + * Creates a SyncActionMessageRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.SyncActionMessageRange + * @static + * @param {Object.} object Plain object + * @returns {proto.SyncActionMessageRange} SyncActionMessageRange + */ + SyncActionMessageRange.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SyncActionMessageRange) + return object; + var message = new $root.proto.SyncActionMessageRange(); + if (object.lastMessageTimestamp != null) + if ($util.Long) + (message.lastMessageTimestamp = $util.Long.fromValue(object.lastMessageTimestamp)).unsigned = false; + else if (typeof object.lastMessageTimestamp === "string") + message.lastMessageTimestamp = parseInt(object.lastMessageTimestamp, 10); + else if (typeof object.lastMessageTimestamp === "number") + message.lastMessageTimestamp = object.lastMessageTimestamp; + else if (typeof object.lastMessageTimestamp === "object") + message.lastMessageTimestamp = new $util.LongBits(object.lastMessageTimestamp.low >>> 0, object.lastMessageTimestamp.high >>> 0).toNumber(); + if (object.lastSystemMessageTimestamp != null) + if ($util.Long) + (message.lastSystemMessageTimestamp = $util.Long.fromValue(object.lastSystemMessageTimestamp)).unsigned = false; + else if (typeof object.lastSystemMessageTimestamp === "string") + message.lastSystemMessageTimestamp = parseInt(object.lastSystemMessageTimestamp, 10); + else if (typeof object.lastSystemMessageTimestamp === "number") + message.lastSystemMessageTimestamp = object.lastSystemMessageTimestamp; + else if (typeof object.lastSystemMessageTimestamp === "object") + message.lastSystemMessageTimestamp = new $util.LongBits(object.lastSystemMessageTimestamp.low >>> 0, object.lastSystemMessageTimestamp.high >>> 0).toNumber(); + if (object.messages) { + if (!Array.isArray(object.messages)) + throw TypeError(".proto.SyncActionMessageRange.messages: array expected"); + message.messages = []; + for (var i = 0; i < object.messages.length; ++i) { + if (typeof object.messages[i] !== "object") + throw TypeError(".proto.SyncActionMessageRange.messages: object expected"); + message.messages[i] = $root.proto.SyncActionMessage.fromObject(object.messages[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SyncActionMessageRange message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.SyncActionMessageRange + * @static + * @param {proto.SyncActionMessageRange} message SyncActionMessageRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SyncActionMessageRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.messages = []; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.lastMessageTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.lastMessageTimestamp = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.lastSystemMessageTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.lastSystemMessageTimestamp = options.longs === String ? "0" : 0; + } + if (message.lastMessageTimestamp != null && message.hasOwnProperty("lastMessageTimestamp")) + if (typeof message.lastMessageTimestamp === "number") + object.lastMessageTimestamp = options.longs === String ? String(message.lastMessageTimestamp) : message.lastMessageTimestamp; + else + object.lastMessageTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.lastMessageTimestamp) : options.longs === Number ? new $util.LongBits(message.lastMessageTimestamp.low >>> 0, message.lastMessageTimestamp.high >>> 0).toNumber() : message.lastMessageTimestamp; + if (message.lastSystemMessageTimestamp != null && message.hasOwnProperty("lastSystemMessageTimestamp")) + if (typeof message.lastSystemMessageTimestamp === "number") + object.lastSystemMessageTimestamp = options.longs === String ? String(message.lastSystemMessageTimestamp) : message.lastSystemMessageTimestamp; + else + object.lastSystemMessageTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.lastSystemMessageTimestamp) : options.longs === Number ? new $util.LongBits(message.lastSystemMessageTimestamp.low >>> 0, message.lastSystemMessageTimestamp.high >>> 0).toNumber() : message.lastSystemMessageTimestamp; + if (message.messages && message.messages.length) { + object.messages = []; + for (var j = 0; j < message.messages.length; ++j) + object.messages[j] = $root.proto.SyncActionMessage.toObject(message.messages[j], options); + } + return object; + }; + + /** + * Converts this SyncActionMessageRange to JSON. + * @function toJSON + * @memberof proto.SyncActionMessageRange + * @instance + * @returns {Object.} JSON object + */ + SyncActionMessageRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SyncActionMessageRange; + })(); + + proto.SyncActionMessage = (function() { + + /** + * Properties of a SyncActionMessage. + * @memberof proto + * @interface ISyncActionMessage + * @property {proto.IMessageKey|null} [key] SyncActionMessage key + * @property {number|Long|null} [timestamp] SyncActionMessage timestamp + */ + + /** + * Constructs a new SyncActionMessage. + * @memberof proto + * @classdesc Represents a SyncActionMessage. + * @implements ISyncActionMessage + * @constructor + * @param {proto.ISyncActionMessage=} [properties] Properties to set + */ + function SyncActionMessage(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]]; + } + + /** + * SyncActionMessage key. + * @member {proto.IMessageKey|null|undefined} key + * @memberof proto.SyncActionMessage + * @instance + */ + SyncActionMessage.prototype.key = null; + + /** + * SyncActionMessage timestamp. + * @member {number|Long} timestamp + * @memberof proto.SyncActionMessage + * @instance + */ + SyncActionMessage.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new SyncActionMessage instance using the specified properties. + * @function create + * @memberof proto.SyncActionMessage + * @static + * @param {proto.ISyncActionMessage=} [properties] Properties to set + * @returns {proto.SyncActionMessage} SyncActionMessage instance + */ + SyncActionMessage.create = function create(properties) { + return new SyncActionMessage(properties); + }; + + /** + * Encodes the specified SyncActionMessage message. Does not implicitly {@link proto.SyncActionMessage.verify|verify} messages. + * @function encode + * @memberof proto.SyncActionMessage + * @static + * @param {proto.ISyncActionMessage} message SyncActionMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SyncActionMessage.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.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.timestamp); + return writer; + }; + + /** + * Encodes the specified SyncActionMessage message, length delimited. Does not implicitly {@link proto.SyncActionMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.SyncActionMessage + * @static + * @param {proto.ISyncActionMessage} message SyncActionMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SyncActionMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SyncActionMessage message from the specified reader or buffer. + * @function decode + * @memberof proto.SyncActionMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.SyncActionMessage} SyncActionMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SyncActionMessage.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.SyncActionMessage(); + 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.timestamp = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SyncActionMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.SyncActionMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.SyncActionMessage} SyncActionMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SyncActionMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SyncActionMessage message. + * @function verify + * @memberof proto.SyncActionMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SyncActionMessage.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.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 SyncActionMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.SyncActionMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.SyncActionMessage} SyncActionMessage + */ + SyncActionMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SyncActionMessage) + return object; + var message = new $root.proto.SyncActionMessage(); + if (object.key != null) { + if (typeof object.key !== "object") + throw TypeError(".proto.SyncActionMessage.key: object expected"); + message.key = $root.proto.MessageKey.fromObject(object.key); + } + 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 SyncActionMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.SyncActionMessage + * @static + * @param {proto.SyncActionMessage} message SyncActionMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SyncActionMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.key = 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.key != null && message.hasOwnProperty("key")) + object.key = $root.proto.MessageKey.toObject(message.key, 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 SyncActionMessage to JSON. + * @function toJSON + * @memberof proto.SyncActionMessage + * @instance + * @returns {Object.} JSON object + */ + SyncActionMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SyncActionMessage; + })(); + + proto.KeyExpiration = (function() { + + /** + * Properties of a KeyExpiration. + * @memberof proto + * @interface IKeyExpiration + * @property {number|null} [expiredKeyEpoch] KeyExpiration expiredKeyEpoch + */ + + /** + * Constructs a new KeyExpiration. + * @memberof proto + * @classdesc Represents a KeyExpiration. + * @implements IKeyExpiration + * @constructor + * @param {proto.IKeyExpiration=} [properties] Properties to set + */ + function KeyExpiration(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]]; + } + + /** + * KeyExpiration expiredKeyEpoch. + * @member {number} expiredKeyEpoch + * @memberof proto.KeyExpiration + * @instance + */ + KeyExpiration.prototype.expiredKeyEpoch = 0; + + /** + * Creates a new KeyExpiration instance using the specified properties. + * @function create + * @memberof proto.KeyExpiration + * @static + * @param {proto.IKeyExpiration=} [properties] Properties to set + * @returns {proto.KeyExpiration} KeyExpiration instance + */ + KeyExpiration.create = function create(properties) { + return new KeyExpiration(properties); + }; + + /** + * Encodes the specified KeyExpiration message. Does not implicitly {@link proto.KeyExpiration.verify|verify} messages. + * @function encode + * @memberof proto.KeyExpiration + * @static + * @param {proto.IKeyExpiration} message KeyExpiration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KeyExpiration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.expiredKeyEpoch != null && Object.hasOwnProperty.call(message, "expiredKeyEpoch")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.expiredKeyEpoch); + return writer; + }; + + /** + * Encodes the specified KeyExpiration message, length delimited. Does not implicitly {@link proto.KeyExpiration.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.KeyExpiration + * @static + * @param {proto.IKeyExpiration} message KeyExpiration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KeyExpiration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a KeyExpiration message from the specified reader or buffer. + * @function decode + * @memberof proto.KeyExpiration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.KeyExpiration} KeyExpiration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KeyExpiration.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.KeyExpiration(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.expiredKeyEpoch = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a KeyExpiration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.KeyExpiration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.KeyExpiration} KeyExpiration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KeyExpiration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a KeyExpiration message. + * @function verify + * @memberof proto.KeyExpiration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + KeyExpiration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.expiredKeyEpoch != null && message.hasOwnProperty("expiredKeyEpoch")) + if (!$util.isInteger(message.expiredKeyEpoch)) + return "expiredKeyEpoch: integer expected"; + return null; + }; + + /** + * Creates a KeyExpiration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.KeyExpiration + * @static + * @param {Object.} object Plain object + * @returns {proto.KeyExpiration} KeyExpiration + */ + KeyExpiration.fromObject = function fromObject(object) { + if (object instanceof $root.proto.KeyExpiration) + return object; + var message = new $root.proto.KeyExpiration(); + if (object.expiredKeyEpoch != null) + message.expiredKeyEpoch = object.expiredKeyEpoch | 0; + return message; + }; + + /** + * Creates a plain object from a KeyExpiration message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.KeyExpiration + * @static + * @param {proto.KeyExpiration} message KeyExpiration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + KeyExpiration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.expiredKeyEpoch = 0; + if (message.expiredKeyEpoch != null && message.hasOwnProperty("expiredKeyEpoch")) + object.expiredKeyEpoch = message.expiredKeyEpoch; + return object; + }; + + /** + * Converts this KeyExpiration to JSON. + * @function toJSON + * @memberof proto.KeyExpiration + * @instance + * @returns {Object.} JSON object + */ + KeyExpiration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return KeyExpiration; + })(); + + proto.SyncActionValue = (function() { + + /** + * Properties of a SyncActionValue. + * @memberof proto + * @interface ISyncActionValue + * @property {number|Long|null} [timestamp] SyncActionValue timestamp + * @property {proto.IStarAction|null} [starAction] SyncActionValue starAction + * @property {proto.IContactAction|null} [contactAction] SyncActionValue contactAction + * @property {proto.IMuteAction|null} [muteAction] SyncActionValue muteAction + * @property {proto.IPinAction|null} [pinAction] SyncActionValue pinAction + * @property {proto.ISecurityNotificationSetting|null} [securityNotificationSetting] SyncActionValue securityNotificationSetting + * @property {proto.IPushNameSetting|null} [pushNameSetting] SyncActionValue pushNameSetting + * @property {proto.IQuickReplyAction|null} [quickReplyAction] SyncActionValue quickReplyAction + * @property {proto.IRecentStickerWeightsAction|null} [recentStickerWeightsAction] SyncActionValue recentStickerWeightsAction + * @property {proto.IRecentStickerMetadata|null} [recentStickerMetadata] SyncActionValue recentStickerMetadata + * @property {proto.IRecentEmojiWeightsAction|null} [recentEmojiWeightsAction] SyncActionValue recentEmojiWeightsAction + * @property {proto.ILabelEditAction|null} [labelEditAction] SyncActionValue labelEditAction + * @property {proto.ILabelAssociationAction|null} [labelAssociationAction] SyncActionValue labelAssociationAction + * @property {proto.ILocaleSetting|null} [localeSetting] SyncActionValue localeSetting + * @property {proto.IArchiveChatAction|null} [archiveChatAction] SyncActionValue archiveChatAction + * @property {proto.IDeleteMessageForMeAction|null} [deleteMessageForMeAction] SyncActionValue deleteMessageForMeAction + * @property {proto.IKeyExpiration|null} [keyExpiration] SyncActionValue keyExpiration + * @property {proto.IMarkChatAsReadAction|null} [markChatAsReadAction] SyncActionValue markChatAsReadAction + * @property {proto.IClearChatAction|null} [clearChatAction] SyncActionValue clearChatAction + * @property {proto.IDeleteChatAction|null} [deleteChatAction] SyncActionValue deleteChatAction + * @property {proto.IUnarchiveChatsSetting|null} [unarchiveChatsSetting] SyncActionValue unarchiveChatsSetting + */ + + /** + * Constructs a new SyncActionValue. + * @memberof proto + * @classdesc Represents a SyncActionValue. + * @implements ISyncActionValue + * @constructor + * @param {proto.ISyncActionValue=} [properties] Properties to set + */ + function SyncActionValue(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]]; + } + + /** + * SyncActionValue timestamp. + * @member {number|Long} timestamp + * @memberof proto.SyncActionValue + * @instance + */ + SyncActionValue.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * SyncActionValue starAction. + * @member {proto.IStarAction|null|undefined} starAction + * @memberof proto.SyncActionValue + * @instance + */ + SyncActionValue.prototype.starAction = null; + + /** + * SyncActionValue contactAction. + * @member {proto.IContactAction|null|undefined} contactAction + * @memberof proto.SyncActionValue + * @instance + */ + SyncActionValue.prototype.contactAction = null; + + /** + * SyncActionValue muteAction. + * @member {proto.IMuteAction|null|undefined} muteAction + * @memberof proto.SyncActionValue + * @instance + */ + SyncActionValue.prototype.muteAction = null; + + /** + * SyncActionValue pinAction. + * @member {proto.IPinAction|null|undefined} pinAction + * @memberof proto.SyncActionValue + * @instance + */ + SyncActionValue.prototype.pinAction = null; + + /** + * SyncActionValue securityNotificationSetting. + * @member {proto.ISecurityNotificationSetting|null|undefined} securityNotificationSetting + * @memberof proto.SyncActionValue + * @instance + */ + SyncActionValue.prototype.securityNotificationSetting = null; + + /** + * SyncActionValue pushNameSetting. + * @member {proto.IPushNameSetting|null|undefined} pushNameSetting + * @memberof proto.SyncActionValue + * @instance + */ + SyncActionValue.prototype.pushNameSetting = null; + + /** + * SyncActionValue quickReplyAction. + * @member {proto.IQuickReplyAction|null|undefined} quickReplyAction + * @memberof proto.SyncActionValue + * @instance + */ + SyncActionValue.prototype.quickReplyAction = null; + + /** + * SyncActionValue recentStickerWeightsAction. + * @member {proto.IRecentStickerWeightsAction|null|undefined} recentStickerWeightsAction + * @memberof proto.SyncActionValue + * @instance + */ + SyncActionValue.prototype.recentStickerWeightsAction = null; + + /** + * SyncActionValue recentStickerMetadata. + * @member {proto.IRecentStickerMetadata|null|undefined} recentStickerMetadata + * @memberof proto.SyncActionValue + * @instance + */ + SyncActionValue.prototype.recentStickerMetadata = null; + + /** + * SyncActionValue recentEmojiWeightsAction. + * @member {proto.IRecentEmojiWeightsAction|null|undefined} recentEmojiWeightsAction + * @memberof proto.SyncActionValue + * @instance + */ + SyncActionValue.prototype.recentEmojiWeightsAction = null; + + /** + * SyncActionValue labelEditAction. + * @member {proto.ILabelEditAction|null|undefined} labelEditAction + * @memberof proto.SyncActionValue + * @instance + */ + SyncActionValue.prototype.labelEditAction = null; + + /** + * SyncActionValue labelAssociationAction. + * @member {proto.ILabelAssociationAction|null|undefined} labelAssociationAction + * @memberof proto.SyncActionValue + * @instance + */ + SyncActionValue.prototype.labelAssociationAction = null; + + /** + * SyncActionValue localeSetting. + * @member {proto.ILocaleSetting|null|undefined} localeSetting + * @memberof proto.SyncActionValue + * @instance + */ + SyncActionValue.prototype.localeSetting = null; + + /** + * SyncActionValue archiveChatAction. + * @member {proto.IArchiveChatAction|null|undefined} archiveChatAction + * @memberof proto.SyncActionValue + * @instance + */ + SyncActionValue.prototype.archiveChatAction = null; + + /** + * SyncActionValue deleteMessageForMeAction. + * @member {proto.IDeleteMessageForMeAction|null|undefined} deleteMessageForMeAction + * @memberof proto.SyncActionValue + * @instance + */ + SyncActionValue.prototype.deleteMessageForMeAction = null; + + /** + * SyncActionValue keyExpiration. + * @member {proto.IKeyExpiration|null|undefined} keyExpiration + * @memberof proto.SyncActionValue + * @instance + */ + SyncActionValue.prototype.keyExpiration = null; + + /** + * SyncActionValue markChatAsReadAction. + * @member {proto.IMarkChatAsReadAction|null|undefined} markChatAsReadAction + * @memberof proto.SyncActionValue + * @instance + */ + SyncActionValue.prototype.markChatAsReadAction = null; + + /** + * SyncActionValue clearChatAction. + * @member {proto.IClearChatAction|null|undefined} clearChatAction + * @memberof proto.SyncActionValue + * @instance + */ + SyncActionValue.prototype.clearChatAction = null; + + /** + * SyncActionValue deleteChatAction. + * @member {proto.IDeleteChatAction|null|undefined} deleteChatAction + * @memberof proto.SyncActionValue + * @instance + */ + SyncActionValue.prototype.deleteChatAction = null; + + /** + * SyncActionValue unarchiveChatsSetting. + * @member {proto.IUnarchiveChatsSetting|null|undefined} unarchiveChatsSetting + * @memberof proto.SyncActionValue + * @instance + */ + SyncActionValue.prototype.unarchiveChatsSetting = null; + + /** + * Creates a new SyncActionValue instance using the specified properties. + * @function create + * @memberof proto.SyncActionValue + * @static + * @param {proto.ISyncActionValue=} [properties] Properties to set + * @returns {proto.SyncActionValue} SyncActionValue instance + */ + SyncActionValue.create = function create(properties) { + return new SyncActionValue(properties); + }; + + /** + * Encodes the specified SyncActionValue message. Does not implicitly {@link proto.SyncActionValue.verify|verify} messages. + * @function encode + * @memberof proto.SyncActionValue + * @static + * @param {proto.ISyncActionValue} message SyncActionValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SyncActionValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.timestamp); + if (message.starAction != null && Object.hasOwnProperty.call(message, "starAction")) + $root.proto.StarAction.encode(message.starAction, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.contactAction != null && Object.hasOwnProperty.call(message, "contactAction")) + $root.proto.ContactAction.encode(message.contactAction, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.muteAction != null && Object.hasOwnProperty.call(message, "muteAction")) + $root.proto.MuteAction.encode(message.muteAction, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.pinAction != null && Object.hasOwnProperty.call(message, "pinAction")) + $root.proto.PinAction.encode(message.pinAction, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.securityNotificationSetting != null && Object.hasOwnProperty.call(message, "securityNotificationSetting")) + $root.proto.SecurityNotificationSetting.encode(message.securityNotificationSetting, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.pushNameSetting != null && Object.hasOwnProperty.call(message, "pushNameSetting")) + $root.proto.PushNameSetting.encode(message.pushNameSetting, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.quickReplyAction != null && Object.hasOwnProperty.call(message, "quickReplyAction")) + $root.proto.QuickReplyAction.encode(message.quickReplyAction, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.recentStickerWeightsAction != null && Object.hasOwnProperty.call(message, "recentStickerWeightsAction")) + $root.proto.RecentStickerWeightsAction.encode(message.recentStickerWeightsAction, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.recentStickerMetadata != null && Object.hasOwnProperty.call(message, "recentStickerMetadata")) + $root.proto.RecentStickerMetadata.encode(message.recentStickerMetadata, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.recentEmojiWeightsAction != null && Object.hasOwnProperty.call(message, "recentEmojiWeightsAction")) + $root.proto.RecentEmojiWeightsAction.encode(message.recentEmojiWeightsAction, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.labelEditAction != null && Object.hasOwnProperty.call(message, "labelEditAction")) + $root.proto.LabelEditAction.encode(message.labelEditAction, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.labelAssociationAction != null && Object.hasOwnProperty.call(message, "labelAssociationAction")) + $root.proto.LabelAssociationAction.encode(message.labelAssociationAction, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.localeSetting != null && Object.hasOwnProperty.call(message, "localeSetting")) + $root.proto.LocaleSetting.encode(message.localeSetting, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + if (message.archiveChatAction != null && Object.hasOwnProperty.call(message, "archiveChatAction")) + $root.proto.ArchiveChatAction.encode(message.archiveChatAction, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.deleteMessageForMeAction != null && Object.hasOwnProperty.call(message, "deleteMessageForMeAction")) + $root.proto.DeleteMessageForMeAction.encode(message.deleteMessageForMeAction, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.keyExpiration != null && Object.hasOwnProperty.call(message, "keyExpiration")) + $root.proto.KeyExpiration.encode(message.keyExpiration, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); + if (message.markChatAsReadAction != null && Object.hasOwnProperty.call(message, "markChatAsReadAction")) + $root.proto.MarkChatAsReadAction.encode(message.markChatAsReadAction, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.clearChatAction != null && Object.hasOwnProperty.call(message, "clearChatAction")) + $root.proto.ClearChatAction.encode(message.clearChatAction, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.deleteChatAction != null && Object.hasOwnProperty.call(message, "deleteChatAction")) + $root.proto.DeleteChatAction.encode(message.deleteChatAction, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.unarchiveChatsSetting != null && Object.hasOwnProperty.call(message, "unarchiveChatsSetting")) + $root.proto.UnarchiveChatsSetting.encode(message.unarchiveChatsSetting, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SyncActionValue message, length delimited. Does not implicitly {@link proto.SyncActionValue.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.SyncActionValue + * @static + * @param {proto.ISyncActionValue} message SyncActionValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SyncActionValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SyncActionValue message from the specified reader or buffer. + * @function decode + * @memberof proto.SyncActionValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.SyncActionValue} SyncActionValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SyncActionValue.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(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.timestamp = reader.int64(); + break; + case 2: + message.starAction = $root.proto.StarAction.decode(reader, reader.uint32()); + break; + case 3: + message.contactAction = $root.proto.ContactAction.decode(reader, reader.uint32()); + break; + case 4: + message.muteAction = $root.proto.MuteAction.decode(reader, reader.uint32()); + break; + case 5: + message.pinAction = $root.proto.PinAction.decode(reader, reader.uint32()); + break; + case 6: + message.securityNotificationSetting = $root.proto.SecurityNotificationSetting.decode(reader, reader.uint32()); + break; + case 7: + message.pushNameSetting = $root.proto.PushNameSetting.decode(reader, reader.uint32()); + break; + case 8: + message.quickReplyAction = $root.proto.QuickReplyAction.decode(reader, reader.uint32()); + break; + case 9: + message.recentStickerWeightsAction = $root.proto.RecentStickerWeightsAction.decode(reader, reader.uint32()); + break; + case 10: + message.recentStickerMetadata = $root.proto.RecentStickerMetadata.decode(reader, reader.uint32()); + break; + case 11: + message.recentEmojiWeightsAction = $root.proto.RecentEmojiWeightsAction.decode(reader, reader.uint32()); + break; + case 14: + message.labelEditAction = $root.proto.LabelEditAction.decode(reader, reader.uint32()); + break; + case 15: + message.labelAssociationAction = $root.proto.LabelAssociationAction.decode(reader, reader.uint32()); + break; + case 16: + message.localeSetting = $root.proto.LocaleSetting.decode(reader, reader.uint32()); + break; + case 17: + message.archiveChatAction = $root.proto.ArchiveChatAction.decode(reader, reader.uint32()); + break; + case 18: + message.deleteMessageForMeAction = $root.proto.DeleteMessageForMeAction.decode(reader, reader.uint32()); + break; + case 19: + message.keyExpiration = $root.proto.KeyExpiration.decode(reader, reader.uint32()); + break; + case 20: + message.markChatAsReadAction = $root.proto.MarkChatAsReadAction.decode(reader, reader.uint32()); + break; + case 21: + message.clearChatAction = $root.proto.ClearChatAction.decode(reader, reader.uint32()); + break; + case 22: + message.deleteChatAction = $root.proto.DeleteChatAction.decode(reader, reader.uint32()); + break; + case 23: + message.unarchiveChatsSetting = $root.proto.UnarchiveChatsSetting.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SyncActionValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.SyncActionValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.SyncActionValue} SyncActionValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SyncActionValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SyncActionValue message. + * @function verify + * @memberof proto.SyncActionValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SyncActionValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object 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 (message.starAction != null && message.hasOwnProperty("starAction")) { + var error = $root.proto.StarAction.verify(message.starAction); + if (error) + return "starAction." + error; + } + if (message.contactAction != null && message.hasOwnProperty("contactAction")) { + var error = $root.proto.ContactAction.verify(message.contactAction); + if (error) + return "contactAction." + error; + } + if (message.muteAction != null && message.hasOwnProperty("muteAction")) { + var error = $root.proto.MuteAction.verify(message.muteAction); + if (error) + return "muteAction." + error; + } + if (message.pinAction != null && message.hasOwnProperty("pinAction")) { + var error = $root.proto.PinAction.verify(message.pinAction); + if (error) + return "pinAction." + error; + } + if (message.securityNotificationSetting != null && message.hasOwnProperty("securityNotificationSetting")) { + var error = $root.proto.SecurityNotificationSetting.verify(message.securityNotificationSetting); + if (error) + return "securityNotificationSetting." + error; + } + if (message.pushNameSetting != null && message.hasOwnProperty("pushNameSetting")) { + var error = $root.proto.PushNameSetting.verify(message.pushNameSetting); + if (error) + return "pushNameSetting." + error; + } + if (message.quickReplyAction != null && message.hasOwnProperty("quickReplyAction")) { + var error = $root.proto.QuickReplyAction.verify(message.quickReplyAction); + if (error) + return "quickReplyAction." + error; + } + if (message.recentStickerWeightsAction != null && message.hasOwnProperty("recentStickerWeightsAction")) { + var error = $root.proto.RecentStickerWeightsAction.verify(message.recentStickerWeightsAction); + if (error) + return "recentStickerWeightsAction." + error; + } + if (message.recentStickerMetadata != null && message.hasOwnProperty("recentStickerMetadata")) { + var error = $root.proto.RecentStickerMetadata.verify(message.recentStickerMetadata); + if (error) + return "recentStickerMetadata." + error; + } + if (message.recentEmojiWeightsAction != null && message.hasOwnProperty("recentEmojiWeightsAction")) { + var error = $root.proto.RecentEmojiWeightsAction.verify(message.recentEmojiWeightsAction); + if (error) + return "recentEmojiWeightsAction." + error; + } + if (message.labelEditAction != null && message.hasOwnProperty("labelEditAction")) { + var error = $root.proto.LabelEditAction.verify(message.labelEditAction); + if (error) + return "labelEditAction." + error; + } + if (message.labelAssociationAction != null && message.hasOwnProperty("labelAssociationAction")) { + var error = $root.proto.LabelAssociationAction.verify(message.labelAssociationAction); + if (error) + return "labelAssociationAction." + error; + } + if (message.localeSetting != null && message.hasOwnProperty("localeSetting")) { + var error = $root.proto.LocaleSetting.verify(message.localeSetting); + if (error) + return "localeSetting." + error; + } + if (message.archiveChatAction != null && message.hasOwnProperty("archiveChatAction")) { + var error = $root.proto.ArchiveChatAction.verify(message.archiveChatAction); + if (error) + return "archiveChatAction." + error; + } + if (message.deleteMessageForMeAction != null && message.hasOwnProperty("deleteMessageForMeAction")) { + var error = $root.proto.DeleteMessageForMeAction.verify(message.deleteMessageForMeAction); + if (error) + return "deleteMessageForMeAction." + error; + } + if (message.keyExpiration != null && message.hasOwnProperty("keyExpiration")) { + var error = $root.proto.KeyExpiration.verify(message.keyExpiration); + if (error) + return "keyExpiration." + error; + } + if (message.markChatAsReadAction != null && message.hasOwnProperty("markChatAsReadAction")) { + var error = $root.proto.MarkChatAsReadAction.verify(message.markChatAsReadAction); + if (error) + return "markChatAsReadAction." + error; + } + if (message.clearChatAction != null && message.hasOwnProperty("clearChatAction")) { + var error = $root.proto.ClearChatAction.verify(message.clearChatAction); + if (error) + return "clearChatAction." + error; + } + if (message.deleteChatAction != null && message.hasOwnProperty("deleteChatAction")) { + var error = $root.proto.DeleteChatAction.verify(message.deleteChatAction); + if (error) + return "deleteChatAction." + error; + } + if (message.unarchiveChatsSetting != null && message.hasOwnProperty("unarchiveChatsSetting")) { + var error = $root.proto.UnarchiveChatsSetting.verify(message.unarchiveChatsSetting); + if (error) + return "unarchiveChatsSetting." + error; + } + return null; + }; + + /** + * Creates a SyncActionValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.SyncActionValue + * @static + * @param {Object.} object Plain object + * @returns {proto.SyncActionValue} SyncActionValue + */ + SyncActionValue.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SyncActionValue) + return object; + var message = new $root.proto.SyncActionValue(); + 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.starAction != null) { + if (typeof object.starAction !== "object") + throw TypeError(".proto.SyncActionValue.starAction: object expected"); + message.starAction = $root.proto.StarAction.fromObject(object.starAction); + } + if (object.contactAction != null) { + if (typeof object.contactAction !== "object") + throw TypeError(".proto.SyncActionValue.contactAction: object expected"); + message.contactAction = $root.proto.ContactAction.fromObject(object.contactAction); + } + if (object.muteAction != null) { + if (typeof object.muteAction !== "object") + throw TypeError(".proto.SyncActionValue.muteAction: object expected"); + message.muteAction = $root.proto.MuteAction.fromObject(object.muteAction); + } + if (object.pinAction != null) { + if (typeof object.pinAction !== "object") + throw TypeError(".proto.SyncActionValue.pinAction: object expected"); + message.pinAction = $root.proto.PinAction.fromObject(object.pinAction); + } + if (object.securityNotificationSetting != null) { + if (typeof object.securityNotificationSetting !== "object") + throw TypeError(".proto.SyncActionValue.securityNotificationSetting: object expected"); + message.securityNotificationSetting = $root.proto.SecurityNotificationSetting.fromObject(object.securityNotificationSetting); + } + if (object.pushNameSetting != null) { + if (typeof object.pushNameSetting !== "object") + throw TypeError(".proto.SyncActionValue.pushNameSetting: object expected"); + message.pushNameSetting = $root.proto.PushNameSetting.fromObject(object.pushNameSetting); + } + if (object.quickReplyAction != null) { + if (typeof object.quickReplyAction !== "object") + throw TypeError(".proto.SyncActionValue.quickReplyAction: object expected"); + message.quickReplyAction = $root.proto.QuickReplyAction.fromObject(object.quickReplyAction); + } + if (object.recentStickerWeightsAction != null) { + if (typeof object.recentStickerWeightsAction !== "object") + throw TypeError(".proto.SyncActionValue.recentStickerWeightsAction: object expected"); + message.recentStickerWeightsAction = $root.proto.RecentStickerWeightsAction.fromObject(object.recentStickerWeightsAction); + } + if (object.recentStickerMetadata != null) { + if (typeof object.recentStickerMetadata !== "object") + throw TypeError(".proto.SyncActionValue.recentStickerMetadata: object expected"); + message.recentStickerMetadata = $root.proto.RecentStickerMetadata.fromObject(object.recentStickerMetadata); + } + if (object.recentEmojiWeightsAction != null) { + if (typeof object.recentEmojiWeightsAction !== "object") + throw TypeError(".proto.SyncActionValue.recentEmojiWeightsAction: object expected"); + message.recentEmojiWeightsAction = $root.proto.RecentEmojiWeightsAction.fromObject(object.recentEmojiWeightsAction); + } + if (object.labelEditAction != null) { + if (typeof object.labelEditAction !== "object") + throw TypeError(".proto.SyncActionValue.labelEditAction: object expected"); + message.labelEditAction = $root.proto.LabelEditAction.fromObject(object.labelEditAction); + } + if (object.labelAssociationAction != null) { + if (typeof object.labelAssociationAction !== "object") + throw TypeError(".proto.SyncActionValue.labelAssociationAction: object expected"); + message.labelAssociationAction = $root.proto.LabelAssociationAction.fromObject(object.labelAssociationAction); + } + if (object.localeSetting != null) { + if (typeof object.localeSetting !== "object") + throw TypeError(".proto.SyncActionValue.localeSetting: object expected"); + message.localeSetting = $root.proto.LocaleSetting.fromObject(object.localeSetting); + } + if (object.archiveChatAction != null) { + if (typeof object.archiveChatAction !== "object") + throw TypeError(".proto.SyncActionValue.archiveChatAction: object expected"); + message.archiveChatAction = $root.proto.ArchiveChatAction.fromObject(object.archiveChatAction); + } + if (object.deleteMessageForMeAction != null) { + if (typeof object.deleteMessageForMeAction !== "object") + throw TypeError(".proto.SyncActionValue.deleteMessageForMeAction: object expected"); + message.deleteMessageForMeAction = $root.proto.DeleteMessageForMeAction.fromObject(object.deleteMessageForMeAction); + } + if (object.keyExpiration != null) { + if (typeof object.keyExpiration !== "object") + throw TypeError(".proto.SyncActionValue.keyExpiration: object expected"); + message.keyExpiration = $root.proto.KeyExpiration.fromObject(object.keyExpiration); + } + if (object.markChatAsReadAction != null) { + if (typeof object.markChatAsReadAction !== "object") + throw TypeError(".proto.SyncActionValue.markChatAsReadAction: object expected"); + message.markChatAsReadAction = $root.proto.MarkChatAsReadAction.fromObject(object.markChatAsReadAction); + } + if (object.clearChatAction != null) { + if (typeof object.clearChatAction !== "object") + throw TypeError(".proto.SyncActionValue.clearChatAction: object expected"); + message.clearChatAction = $root.proto.ClearChatAction.fromObject(object.clearChatAction); + } + if (object.deleteChatAction != null) { + if (typeof object.deleteChatAction !== "object") + throw TypeError(".proto.SyncActionValue.deleteChatAction: object expected"); + message.deleteChatAction = $root.proto.DeleteChatAction.fromObject(object.deleteChatAction); + } + if (object.unarchiveChatsSetting != null) { + if (typeof object.unarchiveChatsSetting !== "object") + throw TypeError(".proto.SyncActionValue.unarchiveChatsSetting: object expected"); + message.unarchiveChatsSetting = $root.proto.UnarchiveChatsSetting.fromObject(object.unarchiveChatsSetting); + } + return message; + }; + + /** + * Creates a plain object from a SyncActionValue message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.SyncActionValue + * @static + * @param {proto.SyncActionValue} message SyncActionValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SyncActionValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + 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; + object.starAction = null; + object.contactAction = null; + object.muteAction = null; + object.pinAction = null; + object.securityNotificationSetting = null; + object.pushNameSetting = null; + object.quickReplyAction = null; + object.recentStickerWeightsAction = null; + object.recentStickerMetadata = null; + object.recentEmojiWeightsAction = null; + object.labelEditAction = null; + object.labelAssociationAction = null; + object.localeSetting = null; + object.archiveChatAction = null; + object.deleteMessageForMeAction = null; + object.keyExpiration = null; + object.markChatAsReadAction = null; + object.clearChatAction = null; + object.deleteChatAction = null; + object.unarchiveChatsSetting = null; + } + 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.starAction != null && message.hasOwnProperty("starAction")) + object.starAction = $root.proto.StarAction.toObject(message.starAction, options); + if (message.contactAction != null && message.hasOwnProperty("contactAction")) + object.contactAction = $root.proto.ContactAction.toObject(message.contactAction, options); + if (message.muteAction != null && message.hasOwnProperty("muteAction")) + object.muteAction = $root.proto.MuteAction.toObject(message.muteAction, options); + if (message.pinAction != null && message.hasOwnProperty("pinAction")) + object.pinAction = $root.proto.PinAction.toObject(message.pinAction, options); + if (message.securityNotificationSetting != null && message.hasOwnProperty("securityNotificationSetting")) + object.securityNotificationSetting = $root.proto.SecurityNotificationSetting.toObject(message.securityNotificationSetting, options); + if (message.pushNameSetting != null && message.hasOwnProperty("pushNameSetting")) + object.pushNameSetting = $root.proto.PushNameSetting.toObject(message.pushNameSetting, options); + if (message.quickReplyAction != null && message.hasOwnProperty("quickReplyAction")) + object.quickReplyAction = $root.proto.QuickReplyAction.toObject(message.quickReplyAction, options); + if (message.recentStickerWeightsAction != null && message.hasOwnProperty("recentStickerWeightsAction")) + object.recentStickerWeightsAction = $root.proto.RecentStickerWeightsAction.toObject(message.recentStickerWeightsAction, options); + if (message.recentStickerMetadata != null && message.hasOwnProperty("recentStickerMetadata")) + object.recentStickerMetadata = $root.proto.RecentStickerMetadata.toObject(message.recentStickerMetadata, options); + if (message.recentEmojiWeightsAction != null && message.hasOwnProperty("recentEmojiWeightsAction")) + object.recentEmojiWeightsAction = $root.proto.RecentEmojiWeightsAction.toObject(message.recentEmojiWeightsAction, options); + if (message.labelEditAction != null && message.hasOwnProperty("labelEditAction")) + object.labelEditAction = $root.proto.LabelEditAction.toObject(message.labelEditAction, options); + if (message.labelAssociationAction != null && message.hasOwnProperty("labelAssociationAction")) + object.labelAssociationAction = $root.proto.LabelAssociationAction.toObject(message.labelAssociationAction, options); + if (message.localeSetting != null && message.hasOwnProperty("localeSetting")) + object.localeSetting = $root.proto.LocaleSetting.toObject(message.localeSetting, options); + if (message.archiveChatAction != null && message.hasOwnProperty("archiveChatAction")) + object.archiveChatAction = $root.proto.ArchiveChatAction.toObject(message.archiveChatAction, options); + if (message.deleteMessageForMeAction != null && message.hasOwnProperty("deleteMessageForMeAction")) + object.deleteMessageForMeAction = $root.proto.DeleteMessageForMeAction.toObject(message.deleteMessageForMeAction, options); + if (message.keyExpiration != null && message.hasOwnProperty("keyExpiration")) + object.keyExpiration = $root.proto.KeyExpiration.toObject(message.keyExpiration, options); + if (message.markChatAsReadAction != null && message.hasOwnProperty("markChatAsReadAction")) + object.markChatAsReadAction = $root.proto.MarkChatAsReadAction.toObject(message.markChatAsReadAction, options); + if (message.clearChatAction != null && message.hasOwnProperty("clearChatAction")) + object.clearChatAction = $root.proto.ClearChatAction.toObject(message.clearChatAction, options); + if (message.deleteChatAction != null && message.hasOwnProperty("deleteChatAction")) + object.deleteChatAction = $root.proto.DeleteChatAction.toObject(message.deleteChatAction, options); + if (message.unarchiveChatsSetting != null && message.hasOwnProperty("unarchiveChatsSetting")) + object.unarchiveChatsSetting = $root.proto.UnarchiveChatsSetting.toObject(message.unarchiveChatsSetting, options); + return object; + }; + + /** + * Converts this SyncActionValue to JSON. + * @function toJSON + * @memberof proto.SyncActionValue + * @instance + * @returns {Object.} JSON object + */ + SyncActionValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SyncActionValue; + })(); + + proto.RecentEmojiWeight = (function() { + + /** + * Properties of a RecentEmojiWeight. + * @memberof proto + * @interface IRecentEmojiWeight + * @property {string|null} [emoji] RecentEmojiWeight emoji + * @property {number|null} [weight] RecentEmojiWeight weight + */ + + /** + * Constructs a new RecentEmojiWeight. + * @memberof proto + * @classdesc Represents a RecentEmojiWeight. + * @implements IRecentEmojiWeight + * @constructor + * @param {proto.IRecentEmojiWeight=} [properties] Properties to set + */ + function RecentEmojiWeight(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]]; + } + + /** + * RecentEmojiWeight emoji. + * @member {string} emoji + * @memberof proto.RecentEmojiWeight + * @instance + */ + RecentEmojiWeight.prototype.emoji = ""; + + /** + * RecentEmojiWeight weight. + * @member {number} weight + * @memberof proto.RecentEmojiWeight + * @instance + */ + RecentEmojiWeight.prototype.weight = 0; + + /** + * Creates a new RecentEmojiWeight instance using the specified properties. + * @function create + * @memberof proto.RecentEmojiWeight + * @static + * @param {proto.IRecentEmojiWeight=} [properties] Properties to set + * @returns {proto.RecentEmojiWeight} RecentEmojiWeight instance + */ + RecentEmojiWeight.create = function create(properties) { + return new RecentEmojiWeight(properties); + }; + + /** + * Encodes the specified RecentEmojiWeight message. Does not implicitly {@link proto.RecentEmojiWeight.verify|verify} messages. + * @function encode + * @memberof proto.RecentEmojiWeight + * @static + * @param {proto.IRecentEmojiWeight} message RecentEmojiWeight message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RecentEmojiWeight.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.emoji != null && Object.hasOwnProperty.call(message, "emoji")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.emoji); + if (message.weight != null && Object.hasOwnProperty.call(message, "weight")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.weight); + return writer; + }; + + /** + * Encodes the specified RecentEmojiWeight message, length delimited. Does not implicitly {@link proto.RecentEmojiWeight.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.RecentEmojiWeight + * @static + * @param {proto.IRecentEmojiWeight} message RecentEmojiWeight message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RecentEmojiWeight.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RecentEmojiWeight message from the specified reader or buffer. + * @function decode + * @memberof proto.RecentEmojiWeight + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.RecentEmojiWeight} RecentEmojiWeight + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RecentEmojiWeight.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.RecentEmojiWeight(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.emoji = reader.string(); + break; + case 2: + message.weight = reader.float(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RecentEmojiWeight message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.RecentEmojiWeight + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.RecentEmojiWeight} RecentEmojiWeight + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RecentEmojiWeight.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RecentEmojiWeight message. + * @function verify + * @memberof proto.RecentEmojiWeight + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RecentEmojiWeight.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.emoji != null && message.hasOwnProperty("emoji")) + if (!$util.isString(message.emoji)) + return "emoji: string expected"; + if (message.weight != null && message.hasOwnProperty("weight")) + if (typeof message.weight !== "number") + return "weight: number expected"; + return null; + }; + + /** + * Creates a RecentEmojiWeight message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.RecentEmojiWeight + * @static + * @param {Object.} object Plain object + * @returns {proto.RecentEmojiWeight} RecentEmojiWeight + */ + RecentEmojiWeight.fromObject = function fromObject(object) { + if (object instanceof $root.proto.RecentEmojiWeight) + return object; + var message = new $root.proto.RecentEmojiWeight(); + if (object.emoji != null) + message.emoji = String(object.emoji); + if (object.weight != null) + message.weight = Number(object.weight); + return message; + }; + + /** + * Creates a plain object from a RecentEmojiWeight message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.RecentEmojiWeight + * @static + * @param {proto.RecentEmojiWeight} message RecentEmojiWeight + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RecentEmojiWeight.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.emoji = ""; + object.weight = 0; + } + if (message.emoji != null && message.hasOwnProperty("emoji")) + object.emoji = message.emoji; + if (message.weight != null && message.hasOwnProperty("weight")) + object.weight = options.json && !isFinite(message.weight) ? String(message.weight) : message.weight; + return object; + }; + + /** + * Converts this RecentEmojiWeight to JSON. + * @function toJSON + * @memberof proto.RecentEmojiWeight + * @instance + * @returns {Object.} JSON object + */ + RecentEmojiWeight.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RecentEmojiWeight; + })(); + + proto.RecentStickerWeight = (function() { + + /** + * Properties of a RecentStickerWeight. + * @memberof proto + * @interface IRecentStickerWeight + * @property {string|null} [filehash] RecentStickerWeight filehash + * @property {number|null} [weight] RecentStickerWeight weight + */ + + /** + * Constructs a new RecentStickerWeight. + * @memberof proto + * @classdesc Represents a RecentStickerWeight. + * @implements IRecentStickerWeight + * @constructor + * @param {proto.IRecentStickerWeight=} [properties] Properties to set + */ + function RecentStickerWeight(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]]; + } + + /** + * RecentStickerWeight filehash. + * @member {string} filehash + * @memberof proto.RecentStickerWeight + * @instance + */ + RecentStickerWeight.prototype.filehash = ""; + + /** + * RecentStickerWeight weight. + * @member {number} weight + * @memberof proto.RecentStickerWeight + * @instance + */ + RecentStickerWeight.prototype.weight = 0; + + /** + * Creates a new RecentStickerWeight instance using the specified properties. + * @function create + * @memberof proto.RecentStickerWeight + * @static + * @param {proto.IRecentStickerWeight=} [properties] Properties to set + * @returns {proto.RecentStickerWeight} RecentStickerWeight instance + */ + RecentStickerWeight.create = function create(properties) { + return new RecentStickerWeight(properties); + }; + + /** + * Encodes the specified RecentStickerWeight message. Does not implicitly {@link proto.RecentStickerWeight.verify|verify} messages. + * @function encode + * @memberof proto.RecentStickerWeight + * @static + * @param {proto.IRecentStickerWeight} message RecentStickerWeight message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RecentStickerWeight.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.filehash != null && Object.hasOwnProperty.call(message, "filehash")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.filehash); + if (message.weight != null && Object.hasOwnProperty.call(message, "weight")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.weight); + return writer; + }; + + /** + * Encodes the specified RecentStickerWeight message, length delimited. Does not implicitly {@link proto.RecentStickerWeight.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.RecentStickerWeight + * @static + * @param {proto.IRecentStickerWeight} message RecentStickerWeight message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RecentStickerWeight.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RecentStickerWeight message from the specified reader or buffer. + * @function decode + * @memberof proto.RecentStickerWeight + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.RecentStickerWeight} RecentStickerWeight + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RecentStickerWeight.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.RecentStickerWeight(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.filehash = reader.string(); + break; + case 2: + message.weight = reader.float(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RecentStickerWeight message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.RecentStickerWeight + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.RecentStickerWeight} RecentStickerWeight + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RecentStickerWeight.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RecentStickerWeight message. + * @function verify + * @memberof proto.RecentStickerWeight + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RecentStickerWeight.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.filehash != null && message.hasOwnProperty("filehash")) + if (!$util.isString(message.filehash)) + return "filehash: string expected"; + if (message.weight != null && message.hasOwnProperty("weight")) + if (typeof message.weight !== "number") + return "weight: number expected"; + return null; + }; + + /** + * Creates a RecentStickerWeight message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.RecentStickerWeight + * @static + * @param {Object.} object Plain object + * @returns {proto.RecentStickerWeight} RecentStickerWeight + */ + RecentStickerWeight.fromObject = function fromObject(object) { + if (object instanceof $root.proto.RecentStickerWeight) + return object; + var message = new $root.proto.RecentStickerWeight(); + if (object.filehash != null) + message.filehash = String(object.filehash); + if (object.weight != null) + message.weight = Number(object.weight); + return message; + }; + + /** + * Creates a plain object from a RecentStickerWeight message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.RecentStickerWeight + * @static + * @param {proto.RecentStickerWeight} message RecentStickerWeight + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RecentStickerWeight.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.filehash = ""; + object.weight = 0; + } + if (message.filehash != null && message.hasOwnProperty("filehash")) + object.filehash = message.filehash; + if (message.weight != null && message.hasOwnProperty("weight")) + object.weight = options.json && !isFinite(message.weight) ? String(message.weight) : message.weight; + return object; + }; + + /** + * Converts this RecentStickerWeight to JSON. + * @function toJSON + * @memberof proto.RecentStickerWeight + * @instance + * @returns {Object.} JSON object + */ + RecentStickerWeight.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RecentStickerWeight; + })(); + + proto.SyncdPatch = (function() { + + /** + * Properties of a SyncdPatch. + * @memberof proto + * @interface ISyncdPatch + * @property {proto.ISyncdVersion|null} [version] SyncdPatch version + * @property {Array.|null} [mutations] SyncdPatch mutations + * @property {proto.IExternalBlobReference|null} [externalMutations] SyncdPatch externalMutations + * @property {Uint8Array|null} [snapshotMac] SyncdPatch snapshotMac + * @property {Uint8Array|null} [patchMac] SyncdPatch patchMac + * @property {proto.IKeyId|null} [keyId] SyncdPatch keyId + * @property {proto.IExitCode|null} [exitCode] SyncdPatch exitCode + * @property {number|null} [deviceIndex] SyncdPatch deviceIndex + */ + + /** + * Constructs a new SyncdPatch. + * @memberof proto + * @classdesc Represents a SyncdPatch. + * @implements ISyncdPatch + * @constructor + * @param {proto.ISyncdPatch=} [properties] Properties to set + */ + function SyncdPatch(properties) { + this.mutations = []; + 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]]; + } + + /** + * SyncdPatch version. + * @member {proto.ISyncdVersion|null|undefined} version + * @memberof proto.SyncdPatch + * @instance + */ + SyncdPatch.prototype.version = null; + + /** + * SyncdPatch mutations. + * @member {Array.} mutations + * @memberof proto.SyncdPatch + * @instance + */ + SyncdPatch.prototype.mutations = $util.emptyArray; + + /** + * SyncdPatch externalMutations. + * @member {proto.IExternalBlobReference|null|undefined} externalMutations + * @memberof proto.SyncdPatch + * @instance + */ + SyncdPatch.prototype.externalMutations = null; + + /** + * SyncdPatch snapshotMac. + * @member {Uint8Array} snapshotMac + * @memberof proto.SyncdPatch + * @instance + */ + SyncdPatch.prototype.snapshotMac = $util.newBuffer([]); + + /** + * SyncdPatch patchMac. + * @member {Uint8Array} patchMac + * @memberof proto.SyncdPatch + * @instance + */ + SyncdPatch.prototype.patchMac = $util.newBuffer([]); + + /** + * SyncdPatch keyId. + * @member {proto.IKeyId|null|undefined} keyId + * @memberof proto.SyncdPatch + * @instance + */ + SyncdPatch.prototype.keyId = null; + + /** + * SyncdPatch exitCode. + * @member {proto.IExitCode|null|undefined} exitCode + * @memberof proto.SyncdPatch + * @instance + */ + SyncdPatch.prototype.exitCode = null; + + /** + * SyncdPatch deviceIndex. + * @member {number} deviceIndex + * @memberof proto.SyncdPatch + * @instance + */ + SyncdPatch.prototype.deviceIndex = 0; + + /** + * Creates a new SyncdPatch instance using the specified properties. + * @function create + * @memberof proto.SyncdPatch + * @static + * @param {proto.ISyncdPatch=} [properties] Properties to set + * @returns {proto.SyncdPatch} SyncdPatch instance + */ + SyncdPatch.create = function create(properties) { + return new SyncdPatch(properties); + }; + + /** + * Encodes the specified SyncdPatch message. Does not implicitly {@link proto.SyncdPatch.verify|verify} messages. + * @function encode + * @memberof proto.SyncdPatch + * @static + * @param {proto.ISyncdPatch} message SyncdPatch message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SyncdPatch.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + $root.proto.SyncdVersion.encode(message.version, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.mutations != null && message.mutations.length) + for (var i = 0; i < message.mutations.length; ++i) + $root.proto.SyncdMutation.encode(message.mutations[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.externalMutations != null && Object.hasOwnProperty.call(message, "externalMutations")) + $root.proto.ExternalBlobReference.encode(message.externalMutations, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.snapshotMac != null && Object.hasOwnProperty.call(message, "snapshotMac")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.snapshotMac); + if (message.patchMac != null && Object.hasOwnProperty.call(message, "patchMac")) + writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.patchMac); + if (message.keyId != null && Object.hasOwnProperty.call(message, "keyId")) + $root.proto.KeyId.encode(message.keyId, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.exitCode != null && Object.hasOwnProperty.call(message, "exitCode")) + $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); + return writer; + }; + + /** + * Encodes the specified SyncdPatch message, length delimited. Does not implicitly {@link proto.SyncdPatch.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.SyncdPatch + * @static + * @param {proto.ISyncdPatch} message SyncdPatch message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SyncdPatch.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SyncdPatch message from the specified reader or buffer. + * @function decode + * @memberof proto.SyncdPatch + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.SyncdPatch} SyncdPatch + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SyncdPatch.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.SyncdPatch(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.version = $root.proto.SyncdVersion.decode(reader, reader.uint32()); + break; + case 2: + if (!(message.mutations && message.mutations.length)) + message.mutations = []; + message.mutations.push($root.proto.SyncdMutation.decode(reader, reader.uint32())); + break; + case 3: + message.externalMutations = $root.proto.ExternalBlobReference.decode(reader, reader.uint32()); + break; + case 4: + message.snapshotMac = reader.bytes(); + break; + case 5: + message.patchMac = reader.bytes(); + break; + case 6: + message.keyId = $root.proto.KeyId.decode(reader, reader.uint32()); + break; + case 7: + message.exitCode = $root.proto.ExitCode.decode(reader, reader.uint32()); + break; + case 8: + message.deviceIndex = reader.uint32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SyncdPatch message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.SyncdPatch + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.SyncdPatch} SyncdPatch + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SyncdPatch.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SyncdPatch message. + * @function verify + * @memberof proto.SyncdPatch + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SyncdPatch.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.version != null && message.hasOwnProperty("version")) { + var error = $root.proto.SyncdVersion.verify(message.version); + if (error) + return "version." + error; + } + if (message.mutations != null && message.hasOwnProperty("mutations")) { + if (!Array.isArray(message.mutations)) + return "mutations: array expected"; + for (var i = 0; i < message.mutations.length; ++i) { + var error = $root.proto.SyncdMutation.verify(message.mutations[i]); + if (error) + return "mutations." + error; + } + } + if (message.externalMutations != null && message.hasOwnProperty("externalMutations")) { + var error = $root.proto.ExternalBlobReference.verify(message.externalMutations); + if (error) + return "externalMutations." + error; + } + if (message.snapshotMac != null && message.hasOwnProperty("snapshotMac")) + if (!(message.snapshotMac && typeof message.snapshotMac.length === "number" || $util.isString(message.snapshotMac))) + return "snapshotMac: buffer expected"; + if (message.patchMac != null && message.hasOwnProperty("patchMac")) + if (!(message.patchMac && typeof message.patchMac.length === "number" || $util.isString(message.patchMac))) + return "patchMac: buffer expected"; + if (message.keyId != null && message.hasOwnProperty("keyId")) { + var error = $root.proto.KeyId.verify(message.keyId); + if (error) + return "keyId." + error; + } + if (message.exitCode != null && message.hasOwnProperty("exitCode")) { + var error = $root.proto.ExitCode.verify(message.exitCode); + if (error) + return "exitCode." + error; + } + if (message.deviceIndex != null && message.hasOwnProperty("deviceIndex")) + if (!$util.isInteger(message.deviceIndex)) + return "deviceIndex: integer expected"; + return null; + }; + + /** + * Creates a SyncdPatch message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.SyncdPatch + * @static + * @param {Object.} object Plain object + * @returns {proto.SyncdPatch} SyncdPatch + */ + SyncdPatch.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SyncdPatch) + return object; + var message = new $root.proto.SyncdPatch(); + if (object.version != null) { + if (typeof object.version !== "object") + throw TypeError(".proto.SyncdPatch.version: object expected"); + message.version = $root.proto.SyncdVersion.fromObject(object.version); + } + if (object.mutations) { + if (!Array.isArray(object.mutations)) + throw TypeError(".proto.SyncdPatch.mutations: array expected"); + message.mutations = []; + for (var i = 0; i < object.mutations.length; ++i) { + if (typeof object.mutations[i] !== "object") + throw TypeError(".proto.SyncdPatch.mutations: object expected"); + message.mutations[i] = $root.proto.SyncdMutation.fromObject(object.mutations[i]); + } + } + if (object.externalMutations != null) { + if (typeof object.externalMutations !== "object") + throw TypeError(".proto.SyncdPatch.externalMutations: object expected"); + message.externalMutations = $root.proto.ExternalBlobReference.fromObject(object.externalMutations); + } + if (object.snapshotMac != null) + if (typeof object.snapshotMac === "string") + $util.base64.decode(object.snapshotMac, message.snapshotMac = $util.newBuffer($util.base64.length(object.snapshotMac)), 0); + else if (object.snapshotMac.length) + message.snapshotMac = object.snapshotMac; + if (object.patchMac != null) + if (typeof object.patchMac === "string") + $util.base64.decode(object.patchMac, message.patchMac = $util.newBuffer($util.base64.length(object.patchMac)), 0); + else if (object.patchMac.length) + message.patchMac = object.patchMac; + if (object.keyId != null) { + if (typeof object.keyId !== "object") + throw TypeError(".proto.SyncdPatch.keyId: object expected"); + message.keyId = $root.proto.KeyId.fromObject(object.keyId); + } + if (object.exitCode != null) { + if (typeof object.exitCode !== "object") + throw TypeError(".proto.SyncdPatch.exitCode: object expected"); + message.exitCode = $root.proto.ExitCode.fromObject(object.exitCode); + } + if (object.deviceIndex != null) + message.deviceIndex = object.deviceIndex >>> 0; + return message; + }; + + /** + * Creates a plain object from a SyncdPatch message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.SyncdPatch + * @static + * @param {proto.SyncdPatch} message SyncdPatch + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SyncdPatch.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.mutations = []; + if (options.defaults) { + object.version = null; + object.externalMutations = null; + if (options.bytes === String) + object.snapshotMac = ""; + else { + object.snapshotMac = []; + if (options.bytes !== Array) + object.snapshotMac = $util.newBuffer(object.snapshotMac); + } + if (options.bytes === String) + object.patchMac = ""; + else { + object.patchMac = []; + if (options.bytes !== Array) + object.patchMac = $util.newBuffer(object.patchMac); + } + object.keyId = null; + object.exitCode = null; + object.deviceIndex = 0; + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = $root.proto.SyncdVersion.toObject(message.version, options); + if (message.mutations && message.mutations.length) { + object.mutations = []; + for (var j = 0; j < message.mutations.length; ++j) + object.mutations[j] = $root.proto.SyncdMutation.toObject(message.mutations[j], options); + } + if (message.externalMutations != null && message.hasOwnProperty("externalMutations")) + object.externalMutations = $root.proto.ExternalBlobReference.toObject(message.externalMutations, options); + if (message.snapshotMac != null && message.hasOwnProperty("snapshotMac")) + object.snapshotMac = options.bytes === String ? $util.base64.encode(message.snapshotMac, 0, message.snapshotMac.length) : options.bytes === Array ? Array.prototype.slice.call(message.snapshotMac) : message.snapshotMac; + if (message.patchMac != null && message.hasOwnProperty("patchMac")) + object.patchMac = options.bytes === String ? $util.base64.encode(message.patchMac, 0, message.patchMac.length) : options.bytes === Array ? Array.prototype.slice.call(message.patchMac) : message.patchMac; + if (message.keyId != null && message.hasOwnProperty("keyId")) + object.keyId = $root.proto.KeyId.toObject(message.keyId, options); + if (message.exitCode != null && message.hasOwnProperty("exitCode")) + object.exitCode = $root.proto.ExitCode.toObject(message.exitCode, options); + if (message.deviceIndex != null && message.hasOwnProperty("deviceIndex")) + object.deviceIndex = message.deviceIndex; + return object; + }; + + /** + * Converts this SyncdPatch to JSON. + * @function toJSON + * @memberof proto.SyncdPatch + * @instance + * @returns {Object.} JSON object + */ + SyncdPatch.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SyncdPatch; + })(); + + proto.SyncdMutation = (function() { + + /** + * Properties of a SyncdMutation. + * @memberof proto + * @interface ISyncdMutation + * @property {proto.SyncdMutation.SyncdMutationSyncdOperation|null} [operation] SyncdMutation operation + * @property {proto.ISyncdRecord|null} [record] SyncdMutation record + */ + + /** + * Constructs a new SyncdMutation. + * @memberof proto + * @classdesc Represents a SyncdMutation. + * @implements ISyncdMutation + * @constructor + * @param {proto.ISyncdMutation=} [properties] Properties to set + */ + function SyncdMutation(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]]; + } + + /** + * SyncdMutation operation. + * @member {proto.SyncdMutation.SyncdMutationSyncdOperation} operation + * @memberof proto.SyncdMutation + * @instance + */ + SyncdMutation.prototype.operation = 0; + + /** + * SyncdMutation record. + * @member {proto.ISyncdRecord|null|undefined} record + * @memberof proto.SyncdMutation + * @instance + */ + SyncdMutation.prototype.record = null; + + /** + * Creates a new SyncdMutation instance using the specified properties. + * @function create + * @memberof proto.SyncdMutation + * @static + * @param {proto.ISyncdMutation=} [properties] Properties to set + * @returns {proto.SyncdMutation} SyncdMutation instance + */ + SyncdMutation.create = function create(properties) { + return new SyncdMutation(properties); + }; + + /** + * Encodes the specified SyncdMutation message. Does not implicitly {@link proto.SyncdMutation.verify|verify} messages. + * @function encode + * @memberof proto.SyncdMutation + * @static + * @param {proto.ISyncdMutation} message SyncdMutation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SyncdMutation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.operation != null && Object.hasOwnProperty.call(message, "operation")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.operation); + if (message.record != null && Object.hasOwnProperty.call(message, "record")) + $root.proto.SyncdRecord.encode(message.record, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SyncdMutation message, length delimited. Does not implicitly {@link proto.SyncdMutation.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.SyncdMutation + * @static + * @param {proto.ISyncdMutation} message SyncdMutation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SyncdMutation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SyncdMutation message from the specified reader or buffer. + * @function decode + * @memberof proto.SyncdMutation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.SyncdMutation} SyncdMutation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SyncdMutation.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.SyncdMutation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.operation = reader.int32(); + break; + case 2: + message.record = $root.proto.SyncdRecord.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SyncdMutation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.SyncdMutation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.SyncdMutation} SyncdMutation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SyncdMutation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SyncdMutation message. + * @function verify + * @memberof proto.SyncdMutation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SyncdMutation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.operation != null && message.hasOwnProperty("operation")) + switch (message.operation) { + default: + return "operation: enum value expected"; + case 0: + case 1: + break; + } + if (message.record != null && message.hasOwnProperty("record")) { + var error = $root.proto.SyncdRecord.verify(message.record); + if (error) + return "record." + error; + } + return null; + }; + + /** + * Creates a SyncdMutation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.SyncdMutation + * @static + * @param {Object.} object Plain object + * @returns {proto.SyncdMutation} SyncdMutation + */ + SyncdMutation.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SyncdMutation) + return object; + var message = new $root.proto.SyncdMutation(); + switch (object.operation) { + case "SET": + case 0: + message.operation = 0; + break; + case "REMOVE": + case 1: + message.operation = 1; + break; + } + if (object.record != null) { + if (typeof object.record !== "object") + throw TypeError(".proto.SyncdMutation.record: object expected"); + message.record = $root.proto.SyncdRecord.fromObject(object.record); + } + return message; + }; + + /** + * Creates a plain object from a SyncdMutation message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.SyncdMutation + * @static + * @param {proto.SyncdMutation} message SyncdMutation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SyncdMutation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.operation = options.enums === String ? "SET" : 0; + object.record = null; + } + if (message.operation != null && message.hasOwnProperty("operation")) + object.operation = options.enums === String ? $root.proto.SyncdMutation.SyncdMutationSyncdOperation[message.operation] : message.operation; + if (message.record != null && message.hasOwnProperty("record")) + object.record = $root.proto.SyncdRecord.toObject(message.record, options); + return object; + }; + + /** + * Converts this SyncdMutation to JSON. + * @function toJSON + * @memberof proto.SyncdMutation + * @instance + * @returns {Object.} JSON object + */ + SyncdMutation.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * WebMessageInfoStatus enum. - * @name proto.WebMessageInfo.WebMessageInfoStatus + * SyncdMutationSyncdOperation enum. + * @name proto.SyncdMutation.SyncdMutationSyncdOperation * @enum {number} - * @property {number} ERROR=0 ERROR value - * @property {number} PENDING=1 PENDING value - * @property {number} SERVER_ACK=2 SERVER_ACK value - * @property {number} DELIVERY_ACK=3 DELIVERY_ACK value - * @property {number} READ=4 READ value - * @property {number} PLAYED=5 PLAYED value + * @property {number} SET=0 SET value + * @property {number} REMOVE=1 REMOVE value */ - WebMessageInfo.WebMessageInfoStatus = (function() { + SyncdMutation.SyncdMutationSyncdOperation = (function() { var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ERROR"] = 0; - values[valuesById[1] = "PENDING"] = 1; - values[valuesById[2] = "SERVER_ACK"] = 2; - values[valuesById[3] = "DELIVERY_ACK"] = 3; - values[valuesById[4] = "READ"] = 4; - values[valuesById[5] = "PLAYED"] = 5; + values[valuesById[0] = "SET"] = 0; + values[valuesById[1] = "REMOVE"] = 1; return values; })(); + return SyncdMutation; + })(); + + proto.SyncdMutations = (function() { + /** - * WebMessageInfoStubType enum. - * @name proto.WebMessageInfo.WebMessageInfoStubType - * @enum {number} - * @property {number} UNKNOWN=0 UNKNOWN value - * @property {number} REVOKE=1 REVOKE value - * @property {number} CIPHERTEXT=2 CIPHERTEXT value - * @property {number} FUTUREPROOF=3 FUTUREPROOF value - * @property {number} NON_VERIFIED_TRANSITION=4 NON_VERIFIED_TRANSITION value - * @property {number} UNVERIFIED_TRANSITION=5 UNVERIFIED_TRANSITION value - * @property {number} VERIFIED_TRANSITION=6 VERIFIED_TRANSITION value - * @property {number} VERIFIED_LOW_UNKNOWN=7 VERIFIED_LOW_UNKNOWN value - * @property {number} VERIFIED_HIGH=8 VERIFIED_HIGH value - * @property {number} VERIFIED_INITIAL_UNKNOWN=9 VERIFIED_INITIAL_UNKNOWN value - * @property {number} VERIFIED_INITIAL_LOW=10 VERIFIED_INITIAL_LOW value - * @property {number} VERIFIED_INITIAL_HIGH=11 VERIFIED_INITIAL_HIGH value - * @property {number} VERIFIED_TRANSITION_ANY_TO_NONE=12 VERIFIED_TRANSITION_ANY_TO_NONE value - * @property {number} VERIFIED_TRANSITION_ANY_TO_HIGH=13 VERIFIED_TRANSITION_ANY_TO_HIGH value - * @property {number} VERIFIED_TRANSITION_HIGH_TO_LOW=14 VERIFIED_TRANSITION_HIGH_TO_LOW value - * @property {number} VERIFIED_TRANSITION_HIGH_TO_UNKNOWN=15 VERIFIED_TRANSITION_HIGH_TO_UNKNOWN value - * @property {number} VERIFIED_TRANSITION_UNKNOWN_TO_LOW=16 VERIFIED_TRANSITION_UNKNOWN_TO_LOW value - * @property {number} VERIFIED_TRANSITION_LOW_TO_UNKNOWN=17 VERIFIED_TRANSITION_LOW_TO_UNKNOWN value - * @property {number} VERIFIED_TRANSITION_NONE_TO_LOW=18 VERIFIED_TRANSITION_NONE_TO_LOW value - * @property {number} VERIFIED_TRANSITION_NONE_TO_UNKNOWN=19 VERIFIED_TRANSITION_NONE_TO_UNKNOWN value - * @property {number} GROUP_CREATE=20 GROUP_CREATE value - * @property {number} GROUP_CHANGE_SUBJECT=21 GROUP_CHANGE_SUBJECT value - * @property {number} GROUP_CHANGE_ICON=22 GROUP_CHANGE_ICON value - * @property {number} GROUP_CHANGE_INVITE_LINK=23 GROUP_CHANGE_INVITE_LINK value - * @property {number} GROUP_CHANGE_DESCRIPTION=24 GROUP_CHANGE_DESCRIPTION value - * @property {number} GROUP_CHANGE_RESTRICT=25 GROUP_CHANGE_RESTRICT value - * @property {number} GROUP_CHANGE_ANNOUNCE=26 GROUP_CHANGE_ANNOUNCE value - * @property {number} GROUP_PARTICIPANT_ADD=27 GROUP_PARTICIPANT_ADD value - * @property {number} GROUP_PARTICIPANT_REMOVE=28 GROUP_PARTICIPANT_REMOVE value - * @property {number} GROUP_PARTICIPANT_PROMOTE=29 GROUP_PARTICIPANT_PROMOTE value - * @property {number} GROUP_PARTICIPANT_DEMOTE=30 GROUP_PARTICIPANT_DEMOTE value - * @property {number} GROUP_PARTICIPANT_INVITE=31 GROUP_PARTICIPANT_INVITE value - * @property {number} GROUP_PARTICIPANT_LEAVE=32 GROUP_PARTICIPANT_LEAVE value - * @property {number} GROUP_PARTICIPANT_CHANGE_NUMBER=33 GROUP_PARTICIPANT_CHANGE_NUMBER value - * @property {number} BROADCAST_CREATE=34 BROADCAST_CREATE value - * @property {number} BROADCAST_ADD=35 BROADCAST_ADD value - * @property {number} BROADCAST_REMOVE=36 BROADCAST_REMOVE value - * @property {number} GENERIC_NOTIFICATION=37 GENERIC_NOTIFICATION value - * @property {number} E2E_IDENTITY_CHANGED=38 E2E_IDENTITY_CHANGED value - * @property {number} E2E_ENCRYPTED=39 E2E_ENCRYPTED value - * @property {number} CALL_MISSED_VOICE=40 CALL_MISSED_VOICE value - * @property {number} CALL_MISSED_VIDEO=41 CALL_MISSED_VIDEO value - * @property {number} INDIVIDUAL_CHANGE_NUMBER=42 INDIVIDUAL_CHANGE_NUMBER value - * @property {number} GROUP_DELETE=43 GROUP_DELETE value - * @property {number} GROUP_ANNOUNCE_MODE_MESSAGE_BOUNCE=44 GROUP_ANNOUNCE_MODE_MESSAGE_BOUNCE value - * @property {number} CALL_MISSED_GROUP_VOICE=45 CALL_MISSED_GROUP_VOICE value - * @property {number} CALL_MISSED_GROUP_VIDEO=46 CALL_MISSED_GROUP_VIDEO value - * @property {number} PAYMENT_CIPHERTEXT=47 PAYMENT_CIPHERTEXT value - * @property {number} PAYMENT_FUTUREPROOF=48 PAYMENT_FUTUREPROOF value - * @property {number} PAYMENT_TRANSACTION_STATUS_UPDATE_FAILED=49 PAYMENT_TRANSACTION_STATUS_UPDATE_FAILED value - * @property {number} PAYMENT_TRANSACTION_STATUS_UPDATE_REFUNDED=50 PAYMENT_TRANSACTION_STATUS_UPDATE_REFUNDED value - * @property {number} PAYMENT_TRANSACTION_STATUS_UPDATE_REFUND_FAILED=51 PAYMENT_TRANSACTION_STATUS_UPDATE_REFUND_FAILED value - * @property {number} PAYMENT_TRANSACTION_STATUS_RECEIVER_PENDING_SETUP=52 PAYMENT_TRANSACTION_STATUS_RECEIVER_PENDING_SETUP value - * @property {number} PAYMENT_TRANSACTION_STATUS_RECEIVER_SUCCESS_AFTER_HICCUP=53 PAYMENT_TRANSACTION_STATUS_RECEIVER_SUCCESS_AFTER_HICCUP value - * @property {number} PAYMENT_ACTION_ACCOUNT_SETUP_REMINDER=54 PAYMENT_ACTION_ACCOUNT_SETUP_REMINDER value - * @property {number} PAYMENT_ACTION_SEND_PAYMENT_REMINDER=55 PAYMENT_ACTION_SEND_PAYMENT_REMINDER value - * @property {number} PAYMENT_ACTION_SEND_PAYMENT_INVITATION=56 PAYMENT_ACTION_SEND_PAYMENT_INVITATION value - * @property {number} PAYMENT_ACTION_REQUEST_DECLINED=57 PAYMENT_ACTION_REQUEST_DECLINED value - * @property {number} PAYMENT_ACTION_REQUEST_EXPIRED=58 PAYMENT_ACTION_REQUEST_EXPIRED value - * @property {number} PAYMENT_ACTION_REQUEST_CANCELLED=59 PAYMENT_ACTION_REQUEST_CANCELLED value - * @property {number} BIZ_VERIFIED_TRANSITION_TOP_TO_BOTTOM=60 BIZ_VERIFIED_TRANSITION_TOP_TO_BOTTOM value - * @property {number} BIZ_VERIFIED_TRANSITION_BOTTOM_TO_TOP=61 BIZ_VERIFIED_TRANSITION_BOTTOM_TO_TOP value - * @property {number} BIZ_INTRO_TOP=62 BIZ_INTRO_TOP value - * @property {number} BIZ_INTRO_BOTTOM=63 BIZ_INTRO_BOTTOM value - * @property {number} BIZ_NAME_CHANGE=64 BIZ_NAME_CHANGE value - * @property {number} BIZ_MOVE_TO_CONSUMER_APP=65 BIZ_MOVE_TO_CONSUMER_APP value - * @property {number} BIZ_TWO_TIER_MIGRATION_TOP=66 BIZ_TWO_TIER_MIGRATION_TOP value - * @property {number} BIZ_TWO_TIER_MIGRATION_BOTTOM=67 BIZ_TWO_TIER_MIGRATION_BOTTOM value - * @property {number} OVERSIZED=68 OVERSIZED value - * @property {number} GROUP_CHANGE_NO_FREQUENTLY_FORWARDED=69 GROUP_CHANGE_NO_FREQUENTLY_FORWARDED value - * @property {number} GROUP_V4_ADD_INVITE_SENT=70 GROUP_V4_ADD_INVITE_SENT value - * @property {number} GROUP_PARTICIPANT_ADD_REQUEST_JOIN=71 GROUP_PARTICIPANT_ADD_REQUEST_JOIN value - * @property {number} CHANGE_EPHEMERAL_SETTING=72 CHANGE_EPHEMERAL_SETTING value - * @property {number} E2E_DEVICE_CHANGED=73 E2E_DEVICE_CHANGED value - * @property {number} VIEWED_ONCE=74 VIEWED_ONCE value - * @property {number} E2E_ENCRYPTED_NOW=75 E2E_ENCRYPTED_NOW value - * @property {number} BLUE_MSG_BSP_FB_TO_BSP_PREMISE=76 BLUE_MSG_BSP_FB_TO_BSP_PREMISE value - * @property {number} BLUE_MSG_BSP_FB_TO_SELF_FB=77 BLUE_MSG_BSP_FB_TO_SELF_FB value - * @property {number} BLUE_MSG_BSP_FB_TO_SELF_PREMISE=78 BLUE_MSG_BSP_FB_TO_SELF_PREMISE value - * @property {number} BLUE_MSG_BSP_FB_UNVERIFIED=79 BLUE_MSG_BSP_FB_UNVERIFIED value - * @property {number} BLUE_MSG_BSP_FB_UNVERIFIED_TO_SELF_PREMISE_VERIFIED=80 BLUE_MSG_BSP_FB_UNVERIFIED_TO_SELF_PREMISE_VERIFIED value - * @property {number} BLUE_MSG_BSP_FB_VERIFIED=81 BLUE_MSG_BSP_FB_VERIFIED value - * @property {number} BLUE_MSG_BSP_FB_VERIFIED_TO_SELF_PREMISE_UNVERIFIED=82 BLUE_MSG_BSP_FB_VERIFIED_TO_SELF_PREMISE_UNVERIFIED value - * @property {number} BLUE_MSG_BSP_PREMISE_TO_SELF_PREMISE=83 BLUE_MSG_BSP_PREMISE_TO_SELF_PREMISE value - * @property {number} BLUE_MSG_BSP_PREMISE_UNVERIFIED=84 BLUE_MSG_BSP_PREMISE_UNVERIFIED value - * @property {number} BLUE_MSG_BSP_PREMISE_UNVERIFIED_TO_SELF_PREMISE_VERIFIED=85 BLUE_MSG_BSP_PREMISE_UNVERIFIED_TO_SELF_PREMISE_VERIFIED value - * @property {number} BLUE_MSG_BSP_PREMISE_VERIFIED=86 BLUE_MSG_BSP_PREMISE_VERIFIED value - * @property {number} BLUE_MSG_BSP_PREMISE_VERIFIED_TO_SELF_PREMISE_UNVERIFIED=87 BLUE_MSG_BSP_PREMISE_VERIFIED_TO_SELF_PREMISE_UNVERIFIED value - * @property {number} BLUE_MSG_CONSUMER_TO_BSP_FB_UNVERIFIED=88 BLUE_MSG_CONSUMER_TO_BSP_FB_UNVERIFIED value - * @property {number} BLUE_MSG_CONSUMER_TO_BSP_PREMISE_UNVERIFIED=89 BLUE_MSG_CONSUMER_TO_BSP_PREMISE_UNVERIFIED value - * @property {number} BLUE_MSG_CONSUMER_TO_SELF_FB_UNVERIFIED=90 BLUE_MSG_CONSUMER_TO_SELF_FB_UNVERIFIED value - * @property {number} BLUE_MSG_CONSUMER_TO_SELF_PREMISE_UNVERIFIED=91 BLUE_MSG_CONSUMER_TO_SELF_PREMISE_UNVERIFIED value - * @property {number} BLUE_MSG_SELF_FB_TO_BSP_PREMISE=92 BLUE_MSG_SELF_FB_TO_BSP_PREMISE value - * @property {number} BLUE_MSG_SELF_FB_TO_SELF_PREMISE=93 BLUE_MSG_SELF_FB_TO_SELF_PREMISE value - * @property {number} BLUE_MSG_SELF_FB_UNVERIFIED=94 BLUE_MSG_SELF_FB_UNVERIFIED value - * @property {number} BLUE_MSG_SELF_FB_UNVERIFIED_TO_SELF_PREMISE_VERIFIED=95 BLUE_MSG_SELF_FB_UNVERIFIED_TO_SELF_PREMISE_VERIFIED value - * @property {number} BLUE_MSG_SELF_FB_VERIFIED=96 BLUE_MSG_SELF_FB_VERIFIED value - * @property {number} BLUE_MSG_SELF_FB_VERIFIED_TO_SELF_PREMISE_UNVERIFIED=97 BLUE_MSG_SELF_FB_VERIFIED_TO_SELF_PREMISE_UNVERIFIED value - * @property {number} BLUE_MSG_SELF_PREMISE_TO_BSP_PREMISE=98 BLUE_MSG_SELF_PREMISE_TO_BSP_PREMISE value - * @property {number} BLUE_MSG_SELF_PREMISE_UNVERIFIED=99 BLUE_MSG_SELF_PREMISE_UNVERIFIED value - * @property {number} BLUE_MSG_SELF_PREMISE_VERIFIED=100 BLUE_MSG_SELF_PREMISE_VERIFIED value - * @property {number} BLUE_MSG_TO_BSP_FB=101 BLUE_MSG_TO_BSP_FB value - * @property {number} BLUE_MSG_TO_CONSUMER=102 BLUE_MSG_TO_CONSUMER value - * @property {number} BLUE_MSG_TO_SELF_FB=103 BLUE_MSG_TO_SELF_FB value - * @property {number} BLUE_MSG_UNVERIFIED_TO_BSP_FB_VERIFIED=104 BLUE_MSG_UNVERIFIED_TO_BSP_FB_VERIFIED value - * @property {number} BLUE_MSG_UNVERIFIED_TO_BSP_PREMISE_VERIFIED=105 BLUE_MSG_UNVERIFIED_TO_BSP_PREMISE_VERIFIED value - * @property {number} BLUE_MSG_UNVERIFIED_TO_SELF_FB_VERIFIED=106 BLUE_MSG_UNVERIFIED_TO_SELF_FB_VERIFIED value - * @property {number} BLUE_MSG_UNVERIFIED_TO_VERIFIED=107 BLUE_MSG_UNVERIFIED_TO_VERIFIED value - * @property {number} BLUE_MSG_VERIFIED_TO_BSP_FB_UNVERIFIED=108 BLUE_MSG_VERIFIED_TO_BSP_FB_UNVERIFIED value - * @property {number} BLUE_MSG_VERIFIED_TO_BSP_PREMISE_UNVERIFIED=109 BLUE_MSG_VERIFIED_TO_BSP_PREMISE_UNVERIFIED value - * @property {number} BLUE_MSG_VERIFIED_TO_SELF_FB_UNVERIFIED=110 BLUE_MSG_VERIFIED_TO_SELF_FB_UNVERIFIED value - * @property {number} BLUE_MSG_VERIFIED_TO_UNVERIFIED=111 BLUE_MSG_VERIFIED_TO_UNVERIFIED value - * @property {number} BLUE_MSG_BSP_FB_UNVERIFIED_TO_BSP_PREMISE_VERIFIED=112 BLUE_MSG_BSP_FB_UNVERIFIED_TO_BSP_PREMISE_VERIFIED value - * @property {number} BLUE_MSG_BSP_FB_UNVERIFIED_TO_SELF_FB_VERIFIED=113 BLUE_MSG_BSP_FB_UNVERIFIED_TO_SELF_FB_VERIFIED value - * @property {number} BLUE_MSG_BSP_FB_VERIFIED_TO_BSP_PREMISE_UNVERIFIED=114 BLUE_MSG_BSP_FB_VERIFIED_TO_BSP_PREMISE_UNVERIFIED value - * @property {number} BLUE_MSG_BSP_FB_VERIFIED_TO_SELF_FB_UNVERIFIED=115 BLUE_MSG_BSP_FB_VERIFIED_TO_SELF_FB_UNVERIFIED value - * @property {number} BLUE_MSG_SELF_FB_UNVERIFIED_TO_BSP_PREMISE_VERIFIED=116 BLUE_MSG_SELF_FB_UNVERIFIED_TO_BSP_PREMISE_VERIFIED value - * @property {number} BLUE_MSG_SELF_FB_VERIFIED_TO_BSP_PREMISE_UNVERIFIED=117 BLUE_MSG_SELF_FB_VERIFIED_TO_BSP_PREMISE_UNVERIFIED value - * @property {number} E2E_IDENTITY_UNAVAILABLE=118 E2E_IDENTITY_UNAVAILABLE value + * Properties of a SyncdMutations. + * @memberof proto + * @interface ISyncdMutations + * @property {Array.|null} [mutations] SyncdMutations mutations */ - WebMessageInfo.WebMessageInfoStubType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UNKNOWN"] = 0; - values[valuesById[1] = "REVOKE"] = 1; - values[valuesById[2] = "CIPHERTEXT"] = 2; - values[valuesById[3] = "FUTUREPROOF"] = 3; - values[valuesById[4] = "NON_VERIFIED_TRANSITION"] = 4; - values[valuesById[5] = "UNVERIFIED_TRANSITION"] = 5; - values[valuesById[6] = "VERIFIED_TRANSITION"] = 6; - values[valuesById[7] = "VERIFIED_LOW_UNKNOWN"] = 7; - values[valuesById[8] = "VERIFIED_HIGH"] = 8; - values[valuesById[9] = "VERIFIED_INITIAL_UNKNOWN"] = 9; - values[valuesById[10] = "VERIFIED_INITIAL_LOW"] = 10; - values[valuesById[11] = "VERIFIED_INITIAL_HIGH"] = 11; - values[valuesById[12] = "VERIFIED_TRANSITION_ANY_TO_NONE"] = 12; - values[valuesById[13] = "VERIFIED_TRANSITION_ANY_TO_HIGH"] = 13; - values[valuesById[14] = "VERIFIED_TRANSITION_HIGH_TO_LOW"] = 14; - values[valuesById[15] = "VERIFIED_TRANSITION_HIGH_TO_UNKNOWN"] = 15; - values[valuesById[16] = "VERIFIED_TRANSITION_UNKNOWN_TO_LOW"] = 16; - values[valuesById[17] = "VERIFIED_TRANSITION_LOW_TO_UNKNOWN"] = 17; - values[valuesById[18] = "VERIFIED_TRANSITION_NONE_TO_LOW"] = 18; - values[valuesById[19] = "VERIFIED_TRANSITION_NONE_TO_UNKNOWN"] = 19; - values[valuesById[20] = "GROUP_CREATE"] = 20; - values[valuesById[21] = "GROUP_CHANGE_SUBJECT"] = 21; - values[valuesById[22] = "GROUP_CHANGE_ICON"] = 22; - values[valuesById[23] = "GROUP_CHANGE_INVITE_LINK"] = 23; - values[valuesById[24] = "GROUP_CHANGE_DESCRIPTION"] = 24; - values[valuesById[25] = "GROUP_CHANGE_RESTRICT"] = 25; - values[valuesById[26] = "GROUP_CHANGE_ANNOUNCE"] = 26; - values[valuesById[27] = "GROUP_PARTICIPANT_ADD"] = 27; - values[valuesById[28] = "GROUP_PARTICIPANT_REMOVE"] = 28; - values[valuesById[29] = "GROUP_PARTICIPANT_PROMOTE"] = 29; - values[valuesById[30] = "GROUP_PARTICIPANT_DEMOTE"] = 30; - values[valuesById[31] = "GROUP_PARTICIPANT_INVITE"] = 31; - values[valuesById[32] = "GROUP_PARTICIPANT_LEAVE"] = 32; - values[valuesById[33] = "GROUP_PARTICIPANT_CHANGE_NUMBER"] = 33; - values[valuesById[34] = "BROADCAST_CREATE"] = 34; - values[valuesById[35] = "BROADCAST_ADD"] = 35; - values[valuesById[36] = "BROADCAST_REMOVE"] = 36; - values[valuesById[37] = "GENERIC_NOTIFICATION"] = 37; - values[valuesById[38] = "E2E_IDENTITY_CHANGED"] = 38; - values[valuesById[39] = "E2E_ENCRYPTED"] = 39; - values[valuesById[40] = "CALL_MISSED_VOICE"] = 40; - values[valuesById[41] = "CALL_MISSED_VIDEO"] = 41; - values[valuesById[42] = "INDIVIDUAL_CHANGE_NUMBER"] = 42; - values[valuesById[43] = "GROUP_DELETE"] = 43; - values[valuesById[44] = "GROUP_ANNOUNCE_MODE_MESSAGE_BOUNCE"] = 44; - values[valuesById[45] = "CALL_MISSED_GROUP_VOICE"] = 45; - values[valuesById[46] = "CALL_MISSED_GROUP_VIDEO"] = 46; - values[valuesById[47] = "PAYMENT_CIPHERTEXT"] = 47; - values[valuesById[48] = "PAYMENT_FUTUREPROOF"] = 48; - values[valuesById[49] = "PAYMENT_TRANSACTION_STATUS_UPDATE_FAILED"] = 49; - values[valuesById[50] = "PAYMENT_TRANSACTION_STATUS_UPDATE_REFUNDED"] = 50; - values[valuesById[51] = "PAYMENT_TRANSACTION_STATUS_UPDATE_REFUND_FAILED"] = 51; - values[valuesById[52] = "PAYMENT_TRANSACTION_STATUS_RECEIVER_PENDING_SETUP"] = 52; - values[valuesById[53] = "PAYMENT_TRANSACTION_STATUS_RECEIVER_SUCCESS_AFTER_HICCUP"] = 53; - values[valuesById[54] = "PAYMENT_ACTION_ACCOUNT_SETUP_REMINDER"] = 54; - values[valuesById[55] = "PAYMENT_ACTION_SEND_PAYMENT_REMINDER"] = 55; - values[valuesById[56] = "PAYMENT_ACTION_SEND_PAYMENT_INVITATION"] = 56; - values[valuesById[57] = "PAYMENT_ACTION_REQUEST_DECLINED"] = 57; - values[valuesById[58] = "PAYMENT_ACTION_REQUEST_EXPIRED"] = 58; - values[valuesById[59] = "PAYMENT_ACTION_REQUEST_CANCELLED"] = 59; - values[valuesById[60] = "BIZ_VERIFIED_TRANSITION_TOP_TO_BOTTOM"] = 60; - values[valuesById[61] = "BIZ_VERIFIED_TRANSITION_BOTTOM_TO_TOP"] = 61; - values[valuesById[62] = "BIZ_INTRO_TOP"] = 62; - values[valuesById[63] = "BIZ_INTRO_BOTTOM"] = 63; - values[valuesById[64] = "BIZ_NAME_CHANGE"] = 64; - values[valuesById[65] = "BIZ_MOVE_TO_CONSUMER_APP"] = 65; - values[valuesById[66] = "BIZ_TWO_TIER_MIGRATION_TOP"] = 66; - values[valuesById[67] = "BIZ_TWO_TIER_MIGRATION_BOTTOM"] = 67; - values[valuesById[68] = "OVERSIZED"] = 68; - values[valuesById[69] = "GROUP_CHANGE_NO_FREQUENTLY_FORWARDED"] = 69; - values[valuesById[70] = "GROUP_V4_ADD_INVITE_SENT"] = 70; - values[valuesById[71] = "GROUP_PARTICIPANT_ADD_REQUEST_JOIN"] = 71; - values[valuesById[72] = "CHANGE_EPHEMERAL_SETTING"] = 72; - values[valuesById[73] = "E2E_DEVICE_CHANGED"] = 73; - values[valuesById[74] = "VIEWED_ONCE"] = 74; - values[valuesById[75] = "E2E_ENCRYPTED_NOW"] = 75; - values[valuesById[76] = "BLUE_MSG_BSP_FB_TO_BSP_PREMISE"] = 76; - values[valuesById[77] = "BLUE_MSG_BSP_FB_TO_SELF_FB"] = 77; - values[valuesById[78] = "BLUE_MSG_BSP_FB_TO_SELF_PREMISE"] = 78; - values[valuesById[79] = "BLUE_MSG_BSP_FB_UNVERIFIED"] = 79; - values[valuesById[80] = "BLUE_MSG_BSP_FB_UNVERIFIED_TO_SELF_PREMISE_VERIFIED"] = 80; - values[valuesById[81] = "BLUE_MSG_BSP_FB_VERIFIED"] = 81; - values[valuesById[82] = "BLUE_MSG_BSP_FB_VERIFIED_TO_SELF_PREMISE_UNVERIFIED"] = 82; - values[valuesById[83] = "BLUE_MSG_BSP_PREMISE_TO_SELF_PREMISE"] = 83; - values[valuesById[84] = "BLUE_MSG_BSP_PREMISE_UNVERIFIED"] = 84; - values[valuesById[85] = "BLUE_MSG_BSP_PREMISE_UNVERIFIED_TO_SELF_PREMISE_VERIFIED"] = 85; - values[valuesById[86] = "BLUE_MSG_BSP_PREMISE_VERIFIED"] = 86; - values[valuesById[87] = "BLUE_MSG_BSP_PREMISE_VERIFIED_TO_SELF_PREMISE_UNVERIFIED"] = 87; - values[valuesById[88] = "BLUE_MSG_CONSUMER_TO_BSP_FB_UNVERIFIED"] = 88; - values[valuesById[89] = "BLUE_MSG_CONSUMER_TO_BSP_PREMISE_UNVERIFIED"] = 89; - values[valuesById[90] = "BLUE_MSG_CONSUMER_TO_SELF_FB_UNVERIFIED"] = 90; - values[valuesById[91] = "BLUE_MSG_CONSUMER_TO_SELF_PREMISE_UNVERIFIED"] = 91; - values[valuesById[92] = "BLUE_MSG_SELF_FB_TO_BSP_PREMISE"] = 92; - values[valuesById[93] = "BLUE_MSG_SELF_FB_TO_SELF_PREMISE"] = 93; - values[valuesById[94] = "BLUE_MSG_SELF_FB_UNVERIFIED"] = 94; - values[valuesById[95] = "BLUE_MSG_SELF_FB_UNVERIFIED_TO_SELF_PREMISE_VERIFIED"] = 95; - values[valuesById[96] = "BLUE_MSG_SELF_FB_VERIFIED"] = 96; - values[valuesById[97] = "BLUE_MSG_SELF_FB_VERIFIED_TO_SELF_PREMISE_UNVERIFIED"] = 97; - values[valuesById[98] = "BLUE_MSG_SELF_PREMISE_TO_BSP_PREMISE"] = 98; - values[valuesById[99] = "BLUE_MSG_SELF_PREMISE_UNVERIFIED"] = 99; - values[valuesById[100] = "BLUE_MSG_SELF_PREMISE_VERIFIED"] = 100; - values[valuesById[101] = "BLUE_MSG_TO_BSP_FB"] = 101; - values[valuesById[102] = "BLUE_MSG_TO_CONSUMER"] = 102; - values[valuesById[103] = "BLUE_MSG_TO_SELF_FB"] = 103; - values[valuesById[104] = "BLUE_MSG_UNVERIFIED_TO_BSP_FB_VERIFIED"] = 104; - values[valuesById[105] = "BLUE_MSG_UNVERIFIED_TO_BSP_PREMISE_VERIFIED"] = 105; - values[valuesById[106] = "BLUE_MSG_UNVERIFIED_TO_SELF_FB_VERIFIED"] = 106; - values[valuesById[107] = "BLUE_MSG_UNVERIFIED_TO_VERIFIED"] = 107; - values[valuesById[108] = "BLUE_MSG_VERIFIED_TO_BSP_FB_UNVERIFIED"] = 108; - values[valuesById[109] = "BLUE_MSG_VERIFIED_TO_BSP_PREMISE_UNVERIFIED"] = 109; - values[valuesById[110] = "BLUE_MSG_VERIFIED_TO_SELF_FB_UNVERIFIED"] = 110; - values[valuesById[111] = "BLUE_MSG_VERIFIED_TO_UNVERIFIED"] = 111; - values[valuesById[112] = "BLUE_MSG_BSP_FB_UNVERIFIED_TO_BSP_PREMISE_VERIFIED"] = 112; - values[valuesById[113] = "BLUE_MSG_BSP_FB_UNVERIFIED_TO_SELF_FB_VERIFIED"] = 113; - values[valuesById[114] = "BLUE_MSG_BSP_FB_VERIFIED_TO_BSP_PREMISE_UNVERIFIED"] = 114; - values[valuesById[115] = "BLUE_MSG_BSP_FB_VERIFIED_TO_SELF_FB_UNVERIFIED"] = 115; - values[valuesById[116] = "BLUE_MSG_SELF_FB_UNVERIFIED_TO_BSP_PREMISE_VERIFIED"] = 116; - values[valuesById[117] = "BLUE_MSG_SELF_FB_VERIFIED_TO_BSP_PREMISE_UNVERIFIED"] = 117; - values[valuesById[118] = "E2E_IDENTITY_UNAVAILABLE"] = 118; - return values; - })(); /** - * WebMessageInfoBizPrivacyStatus enum. - * @name proto.WebMessageInfo.WebMessageInfoBizPrivacyStatus - * @enum {number} - * @property {number} E2EE=0 E2EE value - * @property {number} FB=2 FB value - * @property {number} BSP=1 BSP value - * @property {number} BSP_AND_FB=3 BSP_AND_FB value + * Constructs a new SyncdMutations. + * @memberof proto + * @classdesc Represents a SyncdMutations. + * @implements ISyncdMutations + * @constructor + * @param {proto.ISyncdMutations=} [properties] Properties to set */ - WebMessageInfo.WebMessageInfoBizPrivacyStatus = (function() { + function SyncdMutations(properties) { + this.mutations = []; + 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]]; + } + + /** + * SyncdMutations mutations. + * @member {Array.} mutations + * @memberof proto.SyncdMutations + * @instance + */ + SyncdMutations.prototype.mutations = $util.emptyArray; + + /** + * Creates a new SyncdMutations instance using the specified properties. + * @function create + * @memberof proto.SyncdMutations + * @static + * @param {proto.ISyncdMutations=} [properties] Properties to set + * @returns {proto.SyncdMutations} SyncdMutations instance + */ + SyncdMutations.create = function create(properties) { + return new SyncdMutations(properties); + }; + + /** + * Encodes the specified SyncdMutations message. Does not implicitly {@link proto.SyncdMutations.verify|verify} messages. + * @function encode + * @memberof proto.SyncdMutations + * @static + * @param {proto.ISyncdMutations} message SyncdMutations message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SyncdMutations.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.mutations != null && message.mutations.length) + for (var i = 0; i < message.mutations.length; ++i) + $root.proto.SyncdMutation.encode(message.mutations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SyncdMutations message, length delimited. Does not implicitly {@link proto.SyncdMutations.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.SyncdMutations + * @static + * @param {proto.ISyncdMutations} message SyncdMutations message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SyncdMutations.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SyncdMutations message from the specified reader or buffer. + * @function decode + * @memberof proto.SyncdMutations + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.SyncdMutations} SyncdMutations + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SyncdMutations.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.SyncdMutations(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.mutations && message.mutations.length)) + message.mutations = []; + message.mutations.push($root.proto.SyncdMutation.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SyncdMutations message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.SyncdMutations + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.SyncdMutations} SyncdMutations + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SyncdMutations.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SyncdMutations message. + * @function verify + * @memberof proto.SyncdMutations + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SyncdMutations.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.mutations != null && message.hasOwnProperty("mutations")) { + if (!Array.isArray(message.mutations)) + return "mutations: array expected"; + for (var i = 0; i < message.mutations.length; ++i) { + var error = $root.proto.SyncdMutation.verify(message.mutations[i]); + if (error) + return "mutations." + error; + } + } + return null; + }; + + /** + * Creates a SyncdMutations message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.SyncdMutations + * @static + * @param {Object.} object Plain object + * @returns {proto.SyncdMutations} SyncdMutations + */ + SyncdMutations.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SyncdMutations) + return object; + var message = new $root.proto.SyncdMutations(); + if (object.mutations) { + if (!Array.isArray(object.mutations)) + throw TypeError(".proto.SyncdMutations.mutations: array expected"); + message.mutations = []; + for (var i = 0; i < object.mutations.length; ++i) { + if (typeof object.mutations[i] !== "object") + throw TypeError(".proto.SyncdMutations.mutations: object expected"); + message.mutations[i] = $root.proto.SyncdMutation.fromObject(object.mutations[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SyncdMutations message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.SyncdMutations + * @static + * @param {proto.SyncdMutations} message SyncdMutations + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SyncdMutations.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.mutations = []; + if (message.mutations && message.mutations.length) { + object.mutations = []; + for (var j = 0; j < message.mutations.length; ++j) + object.mutations[j] = $root.proto.SyncdMutation.toObject(message.mutations[j], options); + } + return object; + }; + + /** + * Converts this SyncdMutations to JSON. + * @function toJSON + * @memberof proto.SyncdMutations + * @instance + * @returns {Object.} JSON object + */ + SyncdMutations.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SyncdMutations; + })(); + + proto.SyncdSnapshot = (function() { + + /** + * Properties of a SyncdSnapshot. + * @memberof proto + * @interface ISyncdSnapshot + * @property {proto.ISyncdVersion|null} [version] SyncdSnapshot version + * @property {Array.|null} [records] SyncdSnapshot records + * @property {Uint8Array|null} [mac] SyncdSnapshot mac + * @property {proto.IKeyId|null} [keyId] SyncdSnapshot keyId + */ + + /** + * Constructs a new SyncdSnapshot. + * @memberof proto + * @classdesc Represents a SyncdSnapshot. + * @implements ISyncdSnapshot + * @constructor + * @param {proto.ISyncdSnapshot=} [properties] Properties to set + */ + function SyncdSnapshot(properties) { + this.records = []; + 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]]; + } + + /** + * SyncdSnapshot version. + * @member {proto.ISyncdVersion|null|undefined} version + * @memberof proto.SyncdSnapshot + * @instance + */ + SyncdSnapshot.prototype.version = null; + + /** + * SyncdSnapshot records. + * @member {Array.} records + * @memberof proto.SyncdSnapshot + * @instance + */ + SyncdSnapshot.prototype.records = $util.emptyArray; + + /** + * SyncdSnapshot mac. + * @member {Uint8Array} mac + * @memberof proto.SyncdSnapshot + * @instance + */ + SyncdSnapshot.prototype.mac = $util.newBuffer([]); + + /** + * SyncdSnapshot keyId. + * @member {proto.IKeyId|null|undefined} keyId + * @memberof proto.SyncdSnapshot + * @instance + */ + SyncdSnapshot.prototype.keyId = null; + + /** + * Creates a new SyncdSnapshot instance using the specified properties. + * @function create + * @memberof proto.SyncdSnapshot + * @static + * @param {proto.ISyncdSnapshot=} [properties] Properties to set + * @returns {proto.SyncdSnapshot} SyncdSnapshot instance + */ + SyncdSnapshot.create = function create(properties) { + return new SyncdSnapshot(properties); + }; + + /** + * Encodes the specified SyncdSnapshot message. Does not implicitly {@link proto.SyncdSnapshot.verify|verify} messages. + * @function encode + * @memberof proto.SyncdSnapshot + * @static + * @param {proto.ISyncdSnapshot} message SyncdSnapshot message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SyncdSnapshot.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + $root.proto.SyncdVersion.encode(message.version, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.records != null && message.records.length) + for (var i = 0; i < message.records.length; ++i) + $root.proto.SyncdRecord.encode(message.records[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.mac != null && Object.hasOwnProperty.call(message, "mac")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.mac); + if (message.keyId != null && Object.hasOwnProperty.call(message, "keyId")) + $root.proto.KeyId.encode(message.keyId, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SyncdSnapshot message, length delimited. Does not implicitly {@link proto.SyncdSnapshot.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.SyncdSnapshot + * @static + * @param {proto.ISyncdSnapshot} message SyncdSnapshot message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SyncdSnapshot.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SyncdSnapshot message from the specified reader or buffer. + * @function decode + * @memberof proto.SyncdSnapshot + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.SyncdSnapshot} SyncdSnapshot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SyncdSnapshot.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.SyncdSnapshot(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.version = $root.proto.SyncdVersion.decode(reader, reader.uint32()); + break; + case 2: + if (!(message.records && message.records.length)) + message.records = []; + message.records.push($root.proto.SyncdRecord.decode(reader, reader.uint32())); + break; + case 3: + message.mac = reader.bytes(); + break; + case 4: + message.keyId = $root.proto.KeyId.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SyncdSnapshot message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.SyncdSnapshot + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.SyncdSnapshot} SyncdSnapshot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SyncdSnapshot.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SyncdSnapshot message. + * @function verify + * @memberof proto.SyncdSnapshot + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SyncdSnapshot.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.version != null && message.hasOwnProperty("version")) { + var error = $root.proto.SyncdVersion.verify(message.version); + if (error) + return "version." + error; + } + if (message.records != null && message.hasOwnProperty("records")) { + if (!Array.isArray(message.records)) + return "records: array expected"; + for (var i = 0; i < message.records.length; ++i) { + var error = $root.proto.SyncdRecord.verify(message.records[i]); + if (error) + return "records." + error; + } + } + if (message.mac != null && message.hasOwnProperty("mac")) + if (!(message.mac && typeof message.mac.length === "number" || $util.isString(message.mac))) + return "mac: buffer expected"; + if (message.keyId != null && message.hasOwnProperty("keyId")) { + var error = $root.proto.KeyId.verify(message.keyId); + if (error) + return "keyId." + error; + } + return null; + }; + + /** + * Creates a SyncdSnapshot message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.SyncdSnapshot + * @static + * @param {Object.} object Plain object + * @returns {proto.SyncdSnapshot} SyncdSnapshot + */ + SyncdSnapshot.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SyncdSnapshot) + return object; + var message = new $root.proto.SyncdSnapshot(); + if (object.version != null) { + if (typeof object.version !== "object") + throw TypeError(".proto.SyncdSnapshot.version: object expected"); + message.version = $root.proto.SyncdVersion.fromObject(object.version); + } + if (object.records) { + if (!Array.isArray(object.records)) + throw TypeError(".proto.SyncdSnapshot.records: array expected"); + message.records = []; + for (var i = 0; i < object.records.length; ++i) { + if (typeof object.records[i] !== "object") + throw TypeError(".proto.SyncdSnapshot.records: object expected"); + message.records[i] = $root.proto.SyncdRecord.fromObject(object.records[i]); + } + } + if (object.mac != null) + if (typeof object.mac === "string") + $util.base64.decode(object.mac, message.mac = $util.newBuffer($util.base64.length(object.mac)), 0); + else if (object.mac.length) + message.mac = object.mac; + if (object.keyId != null) { + if (typeof object.keyId !== "object") + throw TypeError(".proto.SyncdSnapshot.keyId: object expected"); + message.keyId = $root.proto.KeyId.fromObject(object.keyId); + } + return message; + }; + + /** + * Creates a plain object from a SyncdSnapshot message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.SyncdSnapshot + * @static + * @param {proto.SyncdSnapshot} message SyncdSnapshot + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SyncdSnapshot.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.records = []; + if (options.defaults) { + object.version = null; + if (options.bytes === String) + object.mac = ""; + else { + object.mac = []; + if (options.bytes !== Array) + object.mac = $util.newBuffer(object.mac); + } + object.keyId = null; + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = $root.proto.SyncdVersion.toObject(message.version, options); + if (message.records && message.records.length) { + object.records = []; + for (var j = 0; j < message.records.length; ++j) + object.records[j] = $root.proto.SyncdRecord.toObject(message.records[j], options); + } + if (message.mac != null && message.hasOwnProperty("mac")) + object.mac = options.bytes === String ? $util.base64.encode(message.mac, 0, message.mac.length) : options.bytes === Array ? Array.prototype.slice.call(message.mac) : message.mac; + if (message.keyId != null && message.hasOwnProperty("keyId")) + object.keyId = $root.proto.KeyId.toObject(message.keyId, options); + return object; + }; + + /** + * Converts this SyncdSnapshot to JSON. + * @function toJSON + * @memberof proto.SyncdSnapshot + * @instance + * @returns {Object.} JSON object + */ + SyncdSnapshot.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SyncdSnapshot; + })(); + + proto.ExternalBlobReference = (function() { + + /** + * 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 + */ + + /** + * 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]]; + } + + /** + * ExternalBlobReference mediaKey. + * @member {Uint8Array} mediaKey + * @memberof proto.ExternalBlobReference + * @instance + */ + ExternalBlobReference.prototype.mediaKey = $util.newBuffer([]); + + /** + * ExternalBlobReference directPath. + * @member {string} directPath + * @memberof proto.ExternalBlobReference + * @instance + */ + ExternalBlobReference.prototype.directPath = ""; + + /** + * ExternalBlobReference handle. + * @member {string} handle + * @memberof proto.ExternalBlobReference + * @instance + */ + ExternalBlobReference.prototype.handle = ""; + + /** + * ExternalBlobReference fileSizeBytes. + * @member {number|Long} fileSizeBytes + * @memberof proto.ExternalBlobReference + * @instance + */ + ExternalBlobReference.prototype.fileSizeBytes = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * ExternalBlobReference fileSha256. + * @member {Uint8Array} fileSha256 + * @memberof proto.ExternalBlobReference + * @instance + */ + ExternalBlobReference.prototype.fileSha256 = $util.newBuffer([]); + + /** + * ExternalBlobReference fileEncSha256. + * @member {Uint8Array} fileEncSha256 + * @memberof proto.ExternalBlobReference + * @instance + */ + ExternalBlobReference.prototype.fileEncSha256 = $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); + }; + + /** + * 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; + }; + + /** + * 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(); + }; + + /** + * 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; + } + } + return message; + }; + + /** + * 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 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 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) + 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 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 ExternalBlobReference; + })(); + + proto.SyncdRecord = (function() { + + /** + * Properties of a SyncdRecord. + * @memberof proto + * @interface ISyncdRecord + * @property {proto.ISyncdIndex|null} [index] SyncdRecord index + * @property {proto.ISyncdValue|null} [value] SyncdRecord value + * @property {proto.IKeyId|null} [keyId] SyncdRecord keyId + */ + + /** + * Constructs a new SyncdRecord. + * @memberof proto + * @classdesc Represents a SyncdRecord. + * @implements ISyncdRecord + * @constructor + * @param {proto.ISyncdRecord=} [properties] Properties to set + */ + function SyncdRecord(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]]; + } + + /** + * SyncdRecord index. + * @member {proto.ISyncdIndex|null|undefined} index + * @memberof proto.SyncdRecord + * @instance + */ + SyncdRecord.prototype.index = null; + + /** + * SyncdRecord value. + * @member {proto.ISyncdValue|null|undefined} value + * @memberof proto.SyncdRecord + * @instance + */ + SyncdRecord.prototype.value = null; + + /** + * SyncdRecord keyId. + * @member {proto.IKeyId|null|undefined} keyId + * @memberof proto.SyncdRecord + * @instance + */ + SyncdRecord.prototype.keyId = null; + + /** + * Creates a new SyncdRecord instance using the specified properties. + * @function create + * @memberof proto.SyncdRecord + * @static + * @param {proto.ISyncdRecord=} [properties] Properties to set + * @returns {proto.SyncdRecord} SyncdRecord instance + */ + SyncdRecord.create = function create(properties) { + return new SyncdRecord(properties); + }; + + /** + * Encodes the specified SyncdRecord message. Does not implicitly {@link proto.SyncdRecord.verify|verify} messages. + * @function encode + * @memberof proto.SyncdRecord + * @static + * @param {proto.ISyncdRecord} message SyncdRecord message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SyncdRecord.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.index != null && Object.hasOwnProperty.call(message, "index")) + $root.proto.SyncdIndex.encode(message.index, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + $root.proto.SyncdValue.encode(message.value, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.keyId != null && Object.hasOwnProperty.call(message, "keyId")) + $root.proto.KeyId.encode(message.keyId, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SyncdRecord message, length delimited. Does not implicitly {@link proto.SyncdRecord.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.SyncdRecord + * @static + * @param {proto.ISyncdRecord} message SyncdRecord message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SyncdRecord.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SyncdRecord message from the specified reader or buffer. + * @function decode + * @memberof proto.SyncdRecord + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.SyncdRecord} SyncdRecord + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SyncdRecord.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.SyncdRecord(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.index = $root.proto.SyncdIndex.decode(reader, reader.uint32()); + break; + case 2: + message.value = $root.proto.SyncdValue.decode(reader, reader.uint32()); + break; + case 3: + message.keyId = $root.proto.KeyId.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SyncdRecord message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.SyncdRecord + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.SyncdRecord} SyncdRecord + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SyncdRecord.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SyncdRecord message. + * @function verify + * @memberof proto.SyncdRecord + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SyncdRecord.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.index != null && message.hasOwnProperty("index")) { + var error = $root.proto.SyncdIndex.verify(message.index); + if (error) + return "index." + error; + } + if (message.value != null && message.hasOwnProperty("value")) { + var error = $root.proto.SyncdValue.verify(message.value); + if (error) + return "value." + error; + } + if (message.keyId != null && message.hasOwnProperty("keyId")) { + var error = $root.proto.KeyId.verify(message.keyId); + if (error) + return "keyId." + error; + } + return null; + }; + + /** + * Creates a SyncdRecord message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.SyncdRecord + * @static + * @param {Object.} object Plain object + * @returns {proto.SyncdRecord} SyncdRecord + */ + SyncdRecord.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SyncdRecord) + return object; + var message = new $root.proto.SyncdRecord(); + if (object.index != null) { + if (typeof object.index !== "object") + throw TypeError(".proto.SyncdRecord.index: object expected"); + message.index = $root.proto.SyncdIndex.fromObject(object.index); + } + if (object.value != null) { + if (typeof object.value !== "object") + throw TypeError(".proto.SyncdRecord.value: object expected"); + message.value = $root.proto.SyncdValue.fromObject(object.value); + } + if (object.keyId != null) { + if (typeof object.keyId !== "object") + throw TypeError(".proto.SyncdRecord.keyId: object expected"); + message.keyId = $root.proto.KeyId.fromObject(object.keyId); + } + return message; + }; + + /** + * Creates a plain object from a SyncdRecord message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.SyncdRecord + * @static + * @param {proto.SyncdRecord} message SyncdRecord + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SyncdRecord.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.index = null; + object.value = null; + object.keyId = null; + } + if (message.index != null && message.hasOwnProperty("index")) + object.index = $root.proto.SyncdIndex.toObject(message.index, options); + if (message.value != null && message.hasOwnProperty("value")) + object.value = $root.proto.SyncdValue.toObject(message.value, options); + if (message.keyId != null && message.hasOwnProperty("keyId")) + object.keyId = $root.proto.KeyId.toObject(message.keyId, options); + return object; + }; + + /** + * Converts this SyncdRecord to JSON. + * @function toJSON + * @memberof proto.SyncdRecord + * @instance + * @returns {Object.} JSON object + */ + SyncdRecord.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SyncdRecord; + })(); + + proto.KeyId = (function() { + + /** + * Properties of a KeyId. + * @memberof proto + * @interface IKeyId + * @property {Uint8Array|null} [id] KeyId id + */ + + /** + * Constructs a new KeyId. + * @memberof proto + * @classdesc Represents a KeyId. + * @implements IKeyId + * @constructor + * @param {proto.IKeyId=} [properties] Properties to set + */ + function KeyId(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]]; + } + + /** + * KeyId id. + * @member {Uint8Array} id + * @memberof proto.KeyId + * @instance + */ + KeyId.prototype.id = $util.newBuffer([]); + + /** + * 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 + */ + KeyId.create = function create(properties) { + return new KeyId(properties); + }; + + /** + * 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 + */ + 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; + }; + + /** + * 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 + */ + KeyId.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * 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 + */ + 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; + }; + + /** + * 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 + */ + KeyId.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * 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 + */ + 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; + }; + + /** + * 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 + */ + 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; + }; + + /** + * 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 KeyId to JSON. + * @function toJSON + * @memberof proto.KeyId + * @instance + * @returns {Object.} JSON object + */ + KeyId.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return KeyId; + })(); + + proto.SyncdValue = (function() { + + /** + * Properties of a SyncdValue. + * @memberof proto + * @interface ISyncdValue + * @property {Uint8Array|null} [blob] SyncdValue blob + */ + + /** + * Constructs a new SyncdValue. + * @memberof proto + * @classdesc Represents a SyncdValue. + * @implements ISyncdValue + * @constructor + * @param {proto.ISyncdValue=} [properties] Properties to set + */ + function SyncdValue(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]]; + } + + /** + * SyncdValue blob. + * @member {Uint8Array} blob + * @memberof proto.SyncdValue + * @instance + */ + SyncdValue.prototype.blob = $util.newBuffer([]); + + /** + * Creates a new SyncdValue instance using the specified properties. + * @function create + * @memberof proto.SyncdValue + * @static + * @param {proto.ISyncdValue=} [properties] Properties to set + * @returns {proto.SyncdValue} SyncdValue instance + */ + SyncdValue.create = function create(properties) { + return new SyncdValue(properties); + }; + + /** + * Encodes the specified SyncdValue message. Does not implicitly {@link proto.SyncdValue.verify|verify} messages. + * @function encode + * @memberof proto.SyncdValue + * @static + * @param {proto.ISyncdValue} message SyncdValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SyncdValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.blob != null && Object.hasOwnProperty.call(message, "blob")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.blob); + return writer; + }; + + /** + * Encodes the specified SyncdValue message, length delimited. Does not implicitly {@link proto.SyncdValue.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.SyncdValue + * @static + * @param {proto.ISyncdValue} message SyncdValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SyncdValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SyncdValue message from the specified reader or buffer. + * @function decode + * @memberof proto.SyncdValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.SyncdValue} SyncdValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SyncdValue.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.SyncdValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.blob = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SyncdValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.SyncdValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.SyncdValue} SyncdValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SyncdValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SyncdValue message. + * @function verify + * @memberof proto.SyncdValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SyncdValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.blob != null && message.hasOwnProperty("blob")) + if (!(message.blob && typeof message.blob.length === "number" || $util.isString(message.blob))) + return "blob: buffer expected"; + return null; + }; + + /** + * Creates a SyncdValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.SyncdValue + * @static + * @param {Object.} object Plain object + * @returns {proto.SyncdValue} SyncdValue + */ + SyncdValue.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SyncdValue) + return object; + var message = new $root.proto.SyncdValue(); + if (object.blob != null) + if (typeof object.blob === "string") + $util.base64.decode(object.blob, message.blob = $util.newBuffer($util.base64.length(object.blob)), 0); + else if (object.blob.length) + message.blob = object.blob; + return message; + }; + + /** + * Creates a plain object from a SyncdValue message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.SyncdValue + * @static + * @param {proto.SyncdValue} message SyncdValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SyncdValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if (options.bytes === String) + object.blob = ""; + else { + object.blob = []; + if (options.bytes !== Array) + object.blob = $util.newBuffer(object.blob); + } + if (message.blob != null && message.hasOwnProperty("blob")) + object.blob = options.bytes === String ? $util.base64.encode(message.blob, 0, message.blob.length) : options.bytes === Array ? Array.prototype.slice.call(message.blob) : message.blob; + return object; + }; + + /** + * Converts this SyncdValue to JSON. + * @function toJSON + * @memberof proto.SyncdValue + * @instance + * @returns {Object.} JSON object + */ + SyncdValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SyncdValue; + })(); + + proto.SyncdIndex = (function() { + + /** + * Properties of a SyncdIndex. + * @memberof proto + * @interface ISyncdIndex + * @property {Uint8Array|null} [blob] SyncdIndex blob + */ + + /** + * Constructs a new SyncdIndex. + * @memberof proto + * @classdesc Represents a SyncdIndex. + * @implements ISyncdIndex + * @constructor + * @param {proto.ISyncdIndex=} [properties] Properties to set + */ + function SyncdIndex(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]]; + } + + /** + * SyncdIndex blob. + * @member {Uint8Array} blob + * @memberof proto.SyncdIndex + * @instance + */ + SyncdIndex.prototype.blob = $util.newBuffer([]); + + /** + * Creates a new SyncdIndex instance using the specified properties. + * @function create + * @memberof proto.SyncdIndex + * @static + * @param {proto.ISyncdIndex=} [properties] Properties to set + * @returns {proto.SyncdIndex} SyncdIndex instance + */ + SyncdIndex.create = function create(properties) { + return new SyncdIndex(properties); + }; + + /** + * Encodes the specified SyncdIndex message. Does not implicitly {@link proto.SyncdIndex.verify|verify} messages. + * @function encode + * @memberof proto.SyncdIndex + * @static + * @param {proto.ISyncdIndex} message SyncdIndex message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SyncdIndex.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.blob != null && Object.hasOwnProperty.call(message, "blob")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.blob); + return writer; + }; + + /** + * Encodes the specified SyncdIndex message, length delimited. Does not implicitly {@link proto.SyncdIndex.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.SyncdIndex + * @static + * @param {proto.ISyncdIndex} message SyncdIndex message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SyncdIndex.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SyncdIndex message from the specified reader or buffer. + * @function decode + * @memberof proto.SyncdIndex + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.SyncdIndex} SyncdIndex + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SyncdIndex.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.SyncdIndex(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.blob = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SyncdIndex message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.SyncdIndex + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.SyncdIndex} SyncdIndex + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SyncdIndex.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SyncdIndex message. + * @function verify + * @memberof proto.SyncdIndex + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SyncdIndex.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.blob != null && message.hasOwnProperty("blob")) + if (!(message.blob && typeof message.blob.length === "number" || $util.isString(message.blob))) + return "blob: buffer expected"; + return null; + }; + + /** + * Creates a SyncdIndex message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.SyncdIndex + * @static + * @param {Object.} object Plain object + * @returns {proto.SyncdIndex} SyncdIndex + */ + SyncdIndex.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SyncdIndex) + return object; + var message = new $root.proto.SyncdIndex(); + if (object.blob != null) + if (typeof object.blob === "string") + $util.base64.decode(object.blob, message.blob = $util.newBuffer($util.base64.length(object.blob)), 0); + else if (object.blob.length) + message.blob = object.blob; + return message; + }; + + /** + * Creates a plain object from a SyncdIndex message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.SyncdIndex + * @static + * @param {proto.SyncdIndex} message SyncdIndex + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SyncdIndex.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if (options.bytes === String) + object.blob = ""; + else { + object.blob = []; + if (options.bytes !== Array) + object.blob = $util.newBuffer(object.blob); + } + if (message.blob != null && message.hasOwnProperty("blob")) + object.blob = options.bytes === String ? $util.base64.encode(message.blob, 0, message.blob.length) : options.bytes === Array ? Array.prototype.slice.call(message.blob) : message.blob; + return object; + }; + + /** + * Converts this SyncdIndex to JSON. + * @function toJSON + * @memberof proto.SyncdIndex + * @instance + * @returns {Object.} JSON object + */ + SyncdIndex.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SyncdIndex; + })(); + + proto.ExitCode = (function() { + + /** + * Properties of an ExitCode. + * @memberof proto + * @interface IExitCode + * @property {number|Long|null} [code] ExitCode code + * @property {string|null} [text] ExitCode text + */ + + /** + * Constructs a new ExitCode. + * @memberof proto + * @classdesc Represents an ExitCode. + * @implements IExitCode + * @constructor + * @param {proto.IExitCode=} [properties] Properties to set + */ + function ExitCode(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]]; + } + + /** + * ExitCode code. + * @member {number|Long} code + * @memberof proto.ExitCode + * @instance + */ + ExitCode.prototype.code = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * ExitCode text. + * @member {string} text + * @memberof proto.ExitCode + * @instance + */ + ExitCode.prototype.text = ""; + + /** + * Creates a new ExitCode instance using the specified properties. + * @function create + * @memberof proto.ExitCode + * @static + * @param {proto.IExitCode=} [properties] Properties to set + * @returns {proto.ExitCode} ExitCode instance + */ + ExitCode.create = function create(properties) { + return new ExitCode(properties); + }; + + /** + * Encodes the specified ExitCode message. Does not implicitly {@link proto.ExitCode.verify|verify} messages. + * @function encode + * @memberof proto.ExitCode + * @static + * @param {proto.IExitCode} message ExitCode message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExitCode.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); + return writer; + }; + + /** + * Encodes the specified ExitCode message, length delimited. Does not implicitly {@link proto.ExitCode.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.ExitCode + * @static + * @param {proto.IExitCode} message ExitCode message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExitCode.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExitCode message from the specified reader or buffer. + * @function decode + * @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.ExitCode} ExitCode + * @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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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.code = reader.uint64(); + break; + case 2: + message.text = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExitCode message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.ExitCode + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + ExitCode.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExitCode message. + * @function verify + * @memberof proto.ExitCode + * @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) { + 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"; + return null; + }; + + /** + * Creates an ExitCode message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.ExitCode + * @static + * @param {Object.} object Plain object + * @returns {proto.ExitCode} ExitCode + */ + ExitCode.fromObject = function fromObject(object) { + if (object instanceof $root.proto.ExitCode) + 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); + 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; + }; + + /** + * 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); + }; + + return ExitCode; + })(); + + proto.SyncdVersion = (function() { + + /** + * Properties of a SyncdVersion. + * @memberof proto + * @interface ISyncdVersion + * @property {number|Long|null} [version] SyncdVersion version + */ + + /** + * Constructs a new SyncdVersion. + * @memberof proto + * @classdesc Represents a SyncdVersion. + * @implements ISyncdVersion + * @constructor + * @param {proto.ISyncdVersion=} [properties] Properties to set + */ + function SyncdVersion(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]]; + } + + /** + * SyncdVersion version. + * @member {number|Long} version + * @memberof proto.SyncdVersion + * @instance + */ + SyncdVersion.prototype.version = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new SyncdVersion instance using the specified properties. + * @function create + * @memberof proto.SyncdVersion + * @static + * @param {proto.ISyncdVersion=} [properties] Properties to set + * @returns {proto.SyncdVersion} SyncdVersion instance + */ + SyncdVersion.create = function create(properties) { + return new SyncdVersion(properties); + }; + + /** + * Encodes the specified SyncdVersion message. Does not implicitly {@link proto.SyncdVersion.verify|verify} messages. + * @function encode + * @memberof proto.SyncdVersion + * @static + * @param {proto.ISyncdVersion} message SyncdVersion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SyncdVersion.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.version); + return writer; + }; + + /** + * Encodes the specified SyncdVersion message, length delimited. Does not implicitly {@link proto.SyncdVersion.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.SyncdVersion + * @static + * @param {proto.ISyncdVersion} message SyncdVersion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SyncdVersion.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SyncdVersion message from the specified reader or buffer. + * @function decode + * @memberof proto.SyncdVersion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.SyncdVersion} SyncdVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SyncdVersion.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.SyncdVersion(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.version = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SyncdVersion message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.SyncdVersion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.SyncdVersion} SyncdVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SyncdVersion.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SyncdVersion message. + * @function verify + * @memberof proto.SyncdVersion + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SyncdVersion.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isInteger(message.version) && !(message.version && $util.isInteger(message.version.low) && $util.isInteger(message.version.high))) + return "version: integer|Long expected"; + return null; + }; + + /** + * Creates a SyncdVersion message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.SyncdVersion + * @static + * @param {Object.} object Plain object + * @returns {proto.SyncdVersion} SyncdVersion + */ + SyncdVersion.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SyncdVersion) + return object; + var message = new $root.proto.SyncdVersion(); + if (object.version != null) + if ($util.Long) + (message.version = $util.Long.fromValue(object.version)).unsigned = true; + else if (typeof object.version === "string") + message.version = parseInt(object.version, 10); + else if (typeof object.version === "number") + message.version = object.version; + else if (typeof object.version === "object") + message.version = new $util.LongBits(object.version.low >>> 0, object.version.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a SyncdVersion message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.SyncdVersion + * @static + * @param {proto.SyncdVersion} message SyncdVersion + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SyncdVersion.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.version = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.version = options.longs === String ? "0" : 0; + if (message.version != null && message.hasOwnProperty("version")) + if (typeof message.version === "number") + object.version = options.longs === String ? String(message.version) : message.version; + else + object.version = options.longs === String ? $util.Long.prototype.toString.call(message.version) : options.longs === Number ? new $util.LongBits(message.version.low >>> 0, message.version.high >>> 0).toNumber(true) : message.version; + return object; + }; + + /** + * Converts this SyncdVersion to JSON. + * @function toJSON + * @memberof proto.SyncdVersion + * @instance + * @returns {Object.} JSON object + */ + SyncdVersion.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SyncdVersion; + })(); + + proto.ServerErrorReceipt = (function() { + + /** + * Properties of a ServerErrorReceipt. + * @memberof proto + * @interface IServerErrorReceipt + * @property {string|null} [stanzaId] ServerErrorReceipt stanzaId + */ + + /** + * Constructs a new ServerErrorReceipt. + * @memberof proto + * @classdesc Represents a ServerErrorReceipt. + * @implements IServerErrorReceipt + * @constructor + * @param {proto.IServerErrorReceipt=} [properties] Properties to set + */ + function ServerErrorReceipt(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]]; + } + + /** + * ServerErrorReceipt stanzaId. + * @member {string} stanzaId + * @memberof proto.ServerErrorReceipt + * @instance + */ + ServerErrorReceipt.prototype.stanzaId = ""; + + /** + * Creates a new ServerErrorReceipt instance using the specified properties. + * @function create + * @memberof proto.ServerErrorReceipt + * @static + * @param {proto.IServerErrorReceipt=} [properties] Properties to set + * @returns {proto.ServerErrorReceipt} ServerErrorReceipt instance + */ + ServerErrorReceipt.create = function create(properties) { + return new ServerErrorReceipt(properties); + }; + + /** + * Encodes the specified ServerErrorReceipt message. Does not implicitly {@link proto.ServerErrorReceipt.verify|verify} messages. + * @function encode + * @memberof proto.ServerErrorReceipt + * @static + * @param {proto.IServerErrorReceipt} message ServerErrorReceipt message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServerErrorReceipt.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); + return writer; + }; + + /** + * Encodes the specified ServerErrorReceipt message, length delimited. Does not implicitly {@link proto.ServerErrorReceipt.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.ServerErrorReceipt + * @static + * @param {proto.IServerErrorReceipt} message ServerErrorReceipt message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServerErrorReceipt.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServerErrorReceipt message from the specified reader or buffer. + * @function decode + * @memberof proto.ServerErrorReceipt + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.ServerErrorReceipt} ServerErrorReceipt + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServerErrorReceipt.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.ServerErrorReceipt(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.stanzaId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServerErrorReceipt message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.ServerErrorReceipt + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.ServerErrorReceipt} ServerErrorReceipt + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServerErrorReceipt.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServerErrorReceipt message. + * @function verify + * @memberof proto.ServerErrorReceipt + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServerErrorReceipt.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"; + return null; + }; + + /** + * Creates a ServerErrorReceipt message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.ServerErrorReceipt + * @static + * @param {Object.} object Plain object + * @returns {proto.ServerErrorReceipt} ServerErrorReceipt + */ + ServerErrorReceipt.fromObject = function fromObject(object) { + if (object instanceof $root.proto.ServerErrorReceipt) + return object; + var message = new $root.proto.ServerErrorReceipt(); + if (object.stanzaId != null) + message.stanzaId = String(object.stanzaId); + return message; + }; + + /** + * Creates a plain object from a ServerErrorReceipt message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.ServerErrorReceipt + * @static + * @param {proto.ServerErrorReceipt} message ServerErrorReceipt + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServerErrorReceipt.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.stanzaId = ""; + if (message.stanzaId != null && message.hasOwnProperty("stanzaId")) + object.stanzaId = message.stanzaId; + return object; + }; + + /** + * Converts this ServerErrorReceipt to JSON. + * @function toJSON + * @memberof proto.ServerErrorReceipt + * @instance + * @returns {Object.} JSON object + */ + ServerErrorReceipt.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ServerErrorReceipt; + })(); + + 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.MediaRetryNotificationResultType|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.MediaRetryNotificationResultType} 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; + } + } + 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. + * @function fromObject + * @memberof proto.MediaRetryNotification + * @static + * @param {Object.} object Plain object + * @returns {proto.MediaRetryNotification} MediaRetryNotification + */ + MediaRetryNotification.fromObject = function fromObject(object) { + if (object instanceof $root.proto.MediaRetryNotification) + 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; + } + return message; + }; + + /** + * Creates a plain object from a MediaRetryNotification message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.MediaRetryNotification + * @static + * @param {proto.MediaRetryNotification} message MediaRetryNotification + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MediaRetryNotification.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; + } + 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.MediaRetryNotificationResultType[message.result] : message.result; + return object; + }; + + /** + * Converts this MediaRetryNotification to JSON. + * @function toJSON + * @memberof proto.MediaRetryNotification + * @instance + * @returns {Object.} JSON object + */ + MediaRetryNotification.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * MediaRetryNotificationResultType enum. + * @name proto.MediaRetryNotification.MediaRetryNotificationResultType + * @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.MediaRetryNotificationResultType = (function() { var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "E2EE"] = 0; - values[valuesById[2] = "FB"] = 2; - values[valuesById[1] = "BSP"] = 1; - values[valuesById[3] = "BSP_AND_FB"] = 3; + 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 WebMessageInfo; + return MediaRetryNotification; + })(); + + proto.MsgOpaqueData = (function() { + + /** + * Properties of a MsgOpaqueData. + * @memberof proto + * @interface IMsgOpaqueData + * @property {string|null} [body] MsgOpaqueData body + * @property {string|null} [caption] MsgOpaqueData caption + * @property {string|null} [clientUrl] MsgOpaqueData clientUrl + * @property {number|null} [lng] MsgOpaqueData lng + * @property {number|null} [lat] MsgOpaqueData lat + * @property {number|null} [paymentAmount1000] MsgOpaqueData paymentAmount1000 + * @property {string|null} [paymentNoteMsgBody] MsgOpaqueData paymentNoteMsgBody + * @property {string|null} [canonicalUrl] MsgOpaqueData canonicalUrl + * @property {string|null} [matchedText] MsgOpaqueData matchedText + * @property {string|null} [title] MsgOpaqueData title + * @property {string|null} [description] MsgOpaqueData description + */ + + /** + * Constructs a new MsgOpaqueData. + * @memberof proto + * @classdesc Represents a MsgOpaqueData. + * @implements IMsgOpaqueData + * @constructor + * @param {proto.IMsgOpaqueData=} [properties] Properties to set + */ + function MsgOpaqueData(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]]; + } + + /** + * MsgOpaqueData body. + * @member {string} body + * @memberof proto.MsgOpaqueData + * @instance + */ + MsgOpaqueData.prototype.body = ""; + + /** + * MsgOpaqueData caption. + * @member {string} caption + * @memberof proto.MsgOpaqueData + * @instance + */ + MsgOpaqueData.prototype.caption = ""; + + /** + * MsgOpaqueData clientUrl. + * @member {string} clientUrl + * @memberof proto.MsgOpaqueData + * @instance + */ + MsgOpaqueData.prototype.clientUrl = ""; + + /** + * MsgOpaqueData lng. + * @member {number} lng + * @memberof proto.MsgOpaqueData + * @instance + */ + MsgOpaqueData.prototype.lng = 0; + + /** + * MsgOpaqueData lat. + * @member {number} lat + * @memberof proto.MsgOpaqueData + * @instance + */ + MsgOpaqueData.prototype.lat = 0; + + /** + * MsgOpaqueData paymentAmount1000. + * @member {number} paymentAmount1000 + * @memberof proto.MsgOpaqueData + * @instance + */ + MsgOpaqueData.prototype.paymentAmount1000 = 0; + + /** + * MsgOpaqueData paymentNoteMsgBody. + * @member {string} paymentNoteMsgBody + * @memberof proto.MsgOpaqueData + * @instance + */ + MsgOpaqueData.prototype.paymentNoteMsgBody = ""; + + /** + * MsgOpaqueData canonicalUrl. + * @member {string} canonicalUrl + * @memberof proto.MsgOpaqueData + * @instance + */ + MsgOpaqueData.prototype.canonicalUrl = ""; + + /** + * MsgOpaqueData matchedText. + * @member {string} matchedText + * @memberof proto.MsgOpaqueData + * @instance + */ + MsgOpaqueData.prototype.matchedText = ""; + + /** + * MsgOpaqueData title. + * @member {string} title + * @memberof proto.MsgOpaqueData + * @instance + */ + MsgOpaqueData.prototype.title = ""; + + /** + * MsgOpaqueData description. + * @member {string} description + * @memberof proto.MsgOpaqueData + * @instance + */ + MsgOpaqueData.prototype.description = ""; + + /** + * Creates a new MsgOpaqueData instance using the specified properties. + * @function create + * @memberof proto.MsgOpaqueData + * @static + * @param {proto.IMsgOpaqueData=} [properties] Properties to set + * @returns {proto.MsgOpaqueData} MsgOpaqueData instance + */ + MsgOpaqueData.create = function create(properties) { + return new MsgOpaqueData(properties); + }; + + /** + * Encodes the specified MsgOpaqueData message. Does not implicitly {@link proto.MsgOpaqueData.verify|verify} messages. + * @function encode + * @memberof proto.MsgOpaqueData + * @static + * @param {proto.IMsgOpaqueData} message MsgOpaqueData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgOpaqueData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.body); + if (message.caption != null && Object.hasOwnProperty.call(message, "caption")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.caption); + if (message.clientUrl != null && Object.hasOwnProperty.call(message, "clientUrl")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.clientUrl); + if (message.lng != null && Object.hasOwnProperty.call(message, "lng")) + writer.uint32(/* id 5, wireType 1 =*/41).double(message.lng); + if (message.lat != null && Object.hasOwnProperty.call(message, "lat")) + writer.uint32(/* id 7, wireType 1 =*/57).double(message.lat); + if (message.paymentAmount1000 != null && Object.hasOwnProperty.call(message, "paymentAmount1000")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.paymentAmount1000); + if (message.paymentNoteMsgBody != null && Object.hasOwnProperty.call(message, "paymentNoteMsgBody")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.paymentNoteMsgBody); + if (message.canonicalUrl != null && Object.hasOwnProperty.call(message, "canonicalUrl")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.canonicalUrl); + if (message.matchedText != null && Object.hasOwnProperty.call(message, "matchedText")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.matchedText); + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.title); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.description); + return writer; + }; + + /** + * Encodes the specified MsgOpaqueData message, length delimited. Does not implicitly {@link proto.MsgOpaqueData.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.MsgOpaqueData + * @static + * @param {proto.IMsgOpaqueData} message MsgOpaqueData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgOpaqueData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgOpaqueData message from the specified reader or buffer. + * @function decode + * @memberof proto.MsgOpaqueData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.MsgOpaqueData} MsgOpaqueData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgOpaqueData.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.MsgOpaqueData(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.body = reader.string(); + break; + case 3: + message.caption = reader.string(); + break; + case 4: + message.clientUrl = reader.string(); + break; + case 5: + message.lng = reader.double(); + break; + case 7: + message.lat = reader.double(); + break; + case 8: + message.paymentAmount1000 = reader.int32(); + break; + case 9: + message.paymentNoteMsgBody = reader.string(); + break; + case 10: + message.canonicalUrl = reader.string(); + break; + case 11: + message.matchedText = reader.string(); + break; + case 12: + message.title = reader.string(); + break; + case 13: + message.description = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgOpaqueData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.MsgOpaqueData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.MsgOpaqueData} MsgOpaqueData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgOpaqueData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgOpaqueData message. + * @function verify + * @memberof proto.MsgOpaqueData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgOpaqueData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.body != null && message.hasOwnProperty("body")) + if (!$util.isString(message.body)) + return "body: string expected"; + if (message.caption != null && message.hasOwnProperty("caption")) + if (!$util.isString(message.caption)) + return "caption: string expected"; + if (message.clientUrl != null && message.hasOwnProperty("clientUrl")) + if (!$util.isString(message.clientUrl)) + return "clientUrl: string expected"; + if (message.lng != null && message.hasOwnProperty("lng")) + if (typeof message.lng !== "number") + return "lng: number expected"; + if (message.lat != null && message.hasOwnProperty("lat")) + if (typeof message.lat !== "number") + return "lat: number expected"; + if (message.paymentAmount1000 != null && message.hasOwnProperty("paymentAmount1000")) + if (!$util.isInteger(message.paymentAmount1000)) + return "paymentAmount1000: integer expected"; + if (message.paymentNoteMsgBody != null && message.hasOwnProperty("paymentNoteMsgBody")) + if (!$util.isString(message.paymentNoteMsgBody)) + return "paymentNoteMsgBody: string expected"; + if (message.canonicalUrl != null && message.hasOwnProperty("canonicalUrl")) + if (!$util.isString(message.canonicalUrl)) + return "canonicalUrl: string expected"; + if (message.matchedText != null && message.hasOwnProperty("matchedText")) + if (!$util.isString(message.matchedText)) + return "matchedText: 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"; + return null; + }; + + /** + * Creates a MsgOpaqueData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.MsgOpaqueData + * @static + * @param {Object.} object Plain object + * @returns {proto.MsgOpaqueData} MsgOpaqueData + */ + MsgOpaqueData.fromObject = function fromObject(object) { + if (object instanceof $root.proto.MsgOpaqueData) + return object; + var message = new $root.proto.MsgOpaqueData(); + if (object.body != null) + message.body = String(object.body); + if (object.caption != null) + message.caption = String(object.caption); + if (object.clientUrl != null) + message.clientUrl = String(object.clientUrl); + if (object.lng != null) + message.lng = Number(object.lng); + if (object.lat != null) + message.lat = Number(object.lat); + if (object.paymentAmount1000 != null) + message.paymentAmount1000 = object.paymentAmount1000 | 0; + if (object.paymentNoteMsgBody != null) + message.paymentNoteMsgBody = String(object.paymentNoteMsgBody); + if (object.canonicalUrl != null) + message.canonicalUrl = String(object.canonicalUrl); + if (object.matchedText != null) + message.matchedText = String(object.matchedText); + if (object.title != null) + message.title = String(object.title); + if (object.description != null) + message.description = String(object.description); + return message; + }; + + /** + * Creates a plain object from a MsgOpaqueData message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.MsgOpaqueData + * @static + * @param {proto.MsgOpaqueData} message MsgOpaqueData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgOpaqueData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.body = ""; + object.caption = ""; + object.clientUrl = ""; + object.lng = 0; + object.lat = 0; + object.paymentAmount1000 = 0; + object.paymentNoteMsgBody = ""; + object.canonicalUrl = ""; + object.matchedText = ""; + object.title = ""; + object.description = ""; + } + if (message.body != null && message.hasOwnProperty("body")) + object.body = message.body; + if (message.caption != null && message.hasOwnProperty("caption")) + object.caption = message.caption; + if (message.clientUrl != null && message.hasOwnProperty("clientUrl")) + object.clientUrl = message.clientUrl; + if (message.lng != null && message.hasOwnProperty("lng")) + object.lng = options.json && !isFinite(message.lng) ? String(message.lng) : message.lng; + if (message.lat != null && message.hasOwnProperty("lat")) + object.lat = options.json && !isFinite(message.lat) ? String(message.lat) : message.lat; + if (message.paymentAmount1000 != null && message.hasOwnProperty("paymentAmount1000")) + object.paymentAmount1000 = message.paymentAmount1000; + if (message.paymentNoteMsgBody != null && message.hasOwnProperty("paymentNoteMsgBody")) + object.paymentNoteMsgBody = message.paymentNoteMsgBody; + if (message.canonicalUrl != null && message.hasOwnProperty("canonicalUrl")) + object.canonicalUrl = message.canonicalUrl; + if (message.matchedText != null && message.hasOwnProperty("matchedText")) + object.matchedText = message.matchedText; + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + return object; + }; + + /** + * Converts this MsgOpaqueData to JSON. + * @function toJSON + * @memberof proto.MsgOpaqueData + * @instance + * @returns {Object.} JSON object + */ + MsgOpaqueData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgOpaqueData; + })(); + + proto.MsgRowOpaqueData = (function() { + + /** + * Properties of a MsgRowOpaqueData. + * @memberof proto + * @interface IMsgRowOpaqueData + * @property {proto.IMsgOpaqueData|null} [currentMsg] MsgRowOpaqueData currentMsg + * @property {proto.IMsgOpaqueData|null} [quotedMsg] MsgRowOpaqueData quotedMsg + */ + + /** + * Constructs a new MsgRowOpaqueData. + * @memberof proto + * @classdesc Represents a MsgRowOpaqueData. + * @implements IMsgRowOpaqueData + * @constructor + * @param {proto.IMsgRowOpaqueData=} [properties] Properties to set + */ + function MsgRowOpaqueData(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]]; + } + + /** + * MsgRowOpaqueData currentMsg. + * @member {proto.IMsgOpaqueData|null|undefined} currentMsg + * @memberof proto.MsgRowOpaqueData + * @instance + */ + MsgRowOpaqueData.prototype.currentMsg = null; + + /** + * MsgRowOpaqueData quotedMsg. + * @member {proto.IMsgOpaqueData|null|undefined} quotedMsg + * @memberof proto.MsgRowOpaqueData + * @instance + */ + MsgRowOpaqueData.prototype.quotedMsg = null; + + /** + * Creates a new MsgRowOpaqueData instance using the specified properties. + * @function create + * @memberof proto.MsgRowOpaqueData + * @static + * @param {proto.IMsgRowOpaqueData=} [properties] Properties to set + * @returns {proto.MsgRowOpaqueData} MsgRowOpaqueData instance + */ + MsgRowOpaqueData.create = function create(properties) { + return new MsgRowOpaqueData(properties); + }; + + /** + * Encodes the specified MsgRowOpaqueData message. Does not implicitly {@link proto.MsgRowOpaqueData.verify|verify} messages. + * @function encode + * @memberof proto.MsgRowOpaqueData + * @static + * @param {proto.IMsgRowOpaqueData} message MsgRowOpaqueData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgRowOpaqueData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.currentMsg != null && Object.hasOwnProperty.call(message, "currentMsg")) + $root.proto.MsgOpaqueData.encode(message.currentMsg, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.quotedMsg != null && Object.hasOwnProperty.call(message, "quotedMsg")) + $root.proto.MsgOpaqueData.encode(message.quotedMsg, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MsgRowOpaqueData message, length delimited. Does not implicitly {@link proto.MsgRowOpaqueData.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.MsgRowOpaqueData + * @static + * @param {proto.IMsgRowOpaqueData} message MsgRowOpaqueData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgRowOpaqueData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgRowOpaqueData message from the specified reader or buffer. + * @function decode + * @memberof proto.MsgRowOpaqueData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.MsgRowOpaqueData} MsgRowOpaqueData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgRowOpaqueData.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.MsgRowOpaqueData(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.currentMsg = $root.proto.MsgOpaqueData.decode(reader, reader.uint32()); + break; + case 2: + message.quotedMsg = $root.proto.MsgOpaqueData.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgRowOpaqueData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.MsgRowOpaqueData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.MsgRowOpaqueData} MsgRowOpaqueData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgRowOpaqueData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgRowOpaqueData message. + * @function verify + * @memberof proto.MsgRowOpaqueData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgRowOpaqueData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.currentMsg != null && message.hasOwnProperty("currentMsg")) { + var error = $root.proto.MsgOpaqueData.verify(message.currentMsg); + if (error) + return "currentMsg." + error; + } + if (message.quotedMsg != null && message.hasOwnProperty("quotedMsg")) { + var error = $root.proto.MsgOpaqueData.verify(message.quotedMsg); + if (error) + return "quotedMsg." + error; + } + return null; + }; + + /** + * Creates a MsgRowOpaqueData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.MsgRowOpaqueData + * @static + * @param {Object.} object Plain object + * @returns {proto.MsgRowOpaqueData} MsgRowOpaqueData + */ + MsgRowOpaqueData.fromObject = function fromObject(object) { + if (object instanceof $root.proto.MsgRowOpaqueData) + return object; + var message = new $root.proto.MsgRowOpaqueData(); + if (object.currentMsg != null) { + if (typeof object.currentMsg !== "object") + throw TypeError(".proto.MsgRowOpaqueData.currentMsg: object expected"); + message.currentMsg = $root.proto.MsgOpaqueData.fromObject(object.currentMsg); + } + if (object.quotedMsg != null) { + if (typeof object.quotedMsg !== "object") + throw TypeError(".proto.MsgRowOpaqueData.quotedMsg: object expected"); + message.quotedMsg = $root.proto.MsgOpaqueData.fromObject(object.quotedMsg); + } + return message; + }; + + /** + * Creates a plain object from a MsgRowOpaqueData message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.MsgRowOpaqueData + * @static + * @param {proto.MsgRowOpaqueData} message MsgRowOpaqueData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgRowOpaqueData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.currentMsg = null; + object.quotedMsg = null; + } + if (message.currentMsg != null && message.hasOwnProperty("currentMsg")) + object.currentMsg = $root.proto.MsgOpaqueData.toObject(message.currentMsg, options); + if (message.quotedMsg != null && message.hasOwnProperty("quotedMsg")) + object.quotedMsg = $root.proto.MsgOpaqueData.toObject(message.quotedMsg, options); + return object; + }; + + /** + * Converts this MsgRowOpaqueData to JSON. + * @function toJSON + * @memberof proto.MsgRowOpaqueData + * @instance + * @returns {Object.} JSON object + */ + MsgRowOpaqueData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgRowOpaqueData; + })(); + + proto.Pushname = (function() { + + /** + * Properties of a Pushname. + * @memberof proto + * @interface IPushname + * @property {string|null} [id] Pushname id + * @property {string|null} [pushname] Pushname pushname + */ + + /** + * Constructs a new Pushname. + * @memberof proto + * @classdesc Represents a Pushname. + * @implements IPushname + * @constructor + * @param {proto.IPushname=} [properties] Properties to set + */ + function Pushname(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]]; + } + + /** + * Pushname id. + * @member {string} id + * @memberof proto.Pushname + * @instance + */ + Pushname.prototype.id = ""; + + /** + * Pushname pushname. + * @member {string} pushname + * @memberof proto.Pushname + * @instance + */ + Pushname.prototype.pushname = ""; + + /** + * Creates a new Pushname instance using the specified properties. + * @function create + * @memberof proto.Pushname + * @static + * @param {proto.IPushname=} [properties] Properties to set + * @returns {proto.Pushname} Pushname instance + */ + Pushname.create = function create(properties) { + return new Pushname(properties); + }; + + /** + * Encodes the specified Pushname message. Does not implicitly {@link proto.Pushname.verify|verify} messages. + * @function encode + * @memberof proto.Pushname + * @static + * @param {proto.IPushname} message Pushname message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Pushname.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).string(message.id); + if (message.pushname != null && Object.hasOwnProperty.call(message, "pushname")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pushname); + return writer; + }; + + /** + * Encodes the specified Pushname message, length delimited. Does not implicitly {@link proto.Pushname.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Pushname + * @static + * @param {proto.IPushname} message Pushname message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Pushname.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Pushname message from the specified reader or buffer. + * @function decode + * @memberof proto.Pushname + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Pushname} Pushname + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Pushname.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.Pushname(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.id = reader.string(); + break; + case 2: + message.pushname = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Pushname message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Pushname + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Pushname} Pushname + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Pushname.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Pushname message. + * @function verify + * @memberof proto.Pushname + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Pushname.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.pushname != null && message.hasOwnProperty("pushname")) + if (!$util.isString(message.pushname)) + return "pushname: string expected"; + return null; + }; + + /** + * Creates a Pushname message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Pushname + * @static + * @param {Object.} object Plain object + * @returns {proto.Pushname} Pushname + */ + Pushname.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Pushname) + return object; + var message = new $root.proto.Pushname(); + if (object.id != null) + message.id = String(object.id); + if (object.pushname != null) + message.pushname = String(object.pushname); + return message; + }; + + /** + * Creates a plain object from a Pushname message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Pushname + * @static + * @param {proto.Pushname} message Pushname + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Pushname.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.id = ""; + object.pushname = ""; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.pushname != null && message.hasOwnProperty("pushname")) + object.pushname = message.pushname; + return object; + }; + + /** + * Converts this Pushname to JSON. + * @function toJSON + * @memberof proto.Pushname + * @instance + * @returns {Object.} JSON object + */ + Pushname.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Pushname; + })(); + + proto.HistorySyncMsg = (function() { + + /** + * Properties of a HistorySyncMsg. + * @memberof proto + * @interface IHistorySyncMsg + * @property {proto.IWebMessageInfo|null} [message] HistorySyncMsg message + * @property {number|Long|null} [msgOrderId] HistorySyncMsg msgOrderId + */ + + /** + * Constructs a new HistorySyncMsg. + * @memberof proto + * @classdesc Represents a HistorySyncMsg. + * @implements IHistorySyncMsg + * @constructor + * @param {proto.IHistorySyncMsg=} [properties] Properties to set + */ + function HistorySyncMsg(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]]; + } + + /** + * 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 + * @instance + */ + HistorySyncMsg.prototype.msgOrderId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new HistorySyncMsg instance using the specified properties. + * @function create + * @memberof proto.HistorySyncMsg + * @static + * @param {proto.IHistorySyncMsg=} [properties] Properties to set + * @returns {proto.HistorySyncMsg} HistorySyncMsg instance + */ + HistorySyncMsg.create = function create(properties) { + return new HistorySyncMsg(properties); + }; + + /** + * Encodes the specified HistorySyncMsg message. Does not implicitly {@link proto.HistorySyncMsg.verify|verify} messages. + * @function encode + * @memberof proto.HistorySyncMsg + * @static + * @param {proto.IHistorySyncMsg} message HistorySyncMsg message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HistorySyncMsg.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); + return writer; + }; + + /** + * Encodes the specified HistorySyncMsg message, length delimited. Does not implicitly {@link proto.HistorySyncMsg.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.HistorySyncMsg + * @static + * @param {proto.IHistorySyncMsg} message HistorySyncMsg message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HistorySyncMsg.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HistorySyncMsg message from the specified reader or buffer. + * @function decode + * @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.HistorySyncMsg} HistorySyncMsg + * @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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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.message = $root.proto.WebMessageInfo.decode(reader, reader.uint32()); + break; + case 2: + message.msgOrderId = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HistorySyncMsg message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.HistorySyncMsg + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + HistorySyncMsg.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HistorySyncMsg message. + * @function verify + * @memberof proto.HistorySyncMsg + * @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) { + 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"; + return null; + }; + + /** + * Creates a HistorySyncMsg message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.HistorySyncMsg + * @static + * @param {Object.} object Plain object + * @returns {proto.HistorySyncMsg} HistorySyncMsg + */ + HistorySyncMsg.fromObject = function fromObject(object) { + if (object instanceof $root.proto.HistorySyncMsg) + 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); + 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; + return object; + }; + + /** + * Converts this HistorySyncMsg to JSON. + * @function toJSON + * @memberof proto.HistorySyncMsg + * @instance + * @returns {Object.} JSON object + */ + HistorySyncMsg.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return HistorySyncMsg; + })(); + + 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.ConversationEndOfHistoryTransferType|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 + */ + + /** + * 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 = []; + 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.ConversationEndOfHistoryTransferType} 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 = ""; + + /** + * Conversation pHash. + * @member {string} pHash + * @memberof proto.Conversation + * @instance + */ + Conversation.prototype.pHash = ""; + + /** + * Conversation notSpam. + * @member {boolean} notSpam + * @memberof proto.Conversation + * @instance + */ + Conversation.prototype.notSpam = false; + + /** + * Creates a new Conversation instance using the specified properties. + * @function create + * @memberof proto.Conversation + * @static + * @param {proto.IConversation=} [properties] Properties to set + * @returns {proto.Conversation} Conversation instance + */ + Conversation.create = function create(properties) { + return new Conversation(properties); + }; + + /** + * Encodes the specified Conversation message. Does not implicitly {@link proto.Conversation.verify|verify} messages. + * @function encode + * @memberof proto.Conversation + * @static + * @param {proto.IConversation} message Conversation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Conversation.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); + return writer; + }; + + /** + * Encodes the specified Conversation message, length delimited. Does not implicitly {@link proto.Conversation.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Conversation + * @static + * @param {proto.IConversation} message Conversation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Conversation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Conversation message from the specified reader or buffer. + * @function decode + * @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.Conversation} Conversation + * @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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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.id = reader.string(); + break; + case 2: + if (!(message.messages && message.messages.length)) + message.messages = []; + message.messages.push($root.proto.HistorySyncMsg.decode(reader, reader.uint32())); + break; + case 3: + 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 14: + message.pHash = reader.string(); + break; + case 15: + message.notSpam = 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. + * @function decodeDelimited + * @memberof proto.Conversation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + Conversation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Conversation message. + * @function verify + * @memberof proto.Conversation + * @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) { + 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) { + default: + return "endOfHistoryTransferType: enum value expected"; + case 0: + case 1: + 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"; + return null; + }; + + /** + * Creates a Conversation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Conversation + * @static + * @param {Object.} object Plain object + * @returns {proto.Conversation} Conversation + */ + Conversation.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Conversation) + 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; + } + 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); + return message; + }; + + /** + * Creates a plain object from a Conversation message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Conversation + * @static + * @param {proto.Conversation} message Conversation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Conversation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.messages = []; + 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; + 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; + } + 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.ConversationEndOfHistoryTransferType[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; + return object; + }; + + /** + * Converts this Conversation to JSON. + * @function toJSON + * @memberof proto.Conversation + * @instance + * @returns {Object.} JSON object + */ + Conversation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * ConversationEndOfHistoryTransferType enum. + * @name proto.Conversation.ConversationEndOfHistoryTransferType + * @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 + */ + Conversation.ConversationEndOfHistoryTransferType = (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; + return values; + })(); + + return Conversation; + })(); + + proto.HistorySync = (function() { + + /** + * Properties of a HistorySync. + * @memberof proto + * @interface IHistorySync + * @property {proto.HistorySync.HistorySyncHistorySyncType} 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 + */ + + /** + * Constructs a new HistorySync. + * @memberof proto + * @classdesc Represents a HistorySync. + * @implements IHistorySync + * @constructor + * @param {proto.IHistorySync=} [properties] Properties to set + */ + function HistorySync(properties) { + this.conversations = []; + this.statusV3Messages = []; + this.pushnames = []; + 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]]; + } + + /** + * HistorySync syncType. + * @member {proto.HistorySync.HistorySyncHistorySyncType} syncType + * @memberof proto.HistorySync + * @instance + */ + HistorySync.prototype.syncType = 0; + + /** + * HistorySync conversations. + * @member {Array.} conversations + * @memberof proto.HistorySync + * @instance + */ + HistorySync.prototype.conversations = $util.emptyArray; + + /** + * HistorySync statusV3Messages. + * @member {Array.} statusV3Messages + * @memberof proto.HistorySync + * @instance + */ + HistorySync.prototype.statusV3Messages = $util.emptyArray; + + /** + * HistorySync chunkOrder. + * @member {number} chunkOrder + * @memberof proto.HistorySync + * @instance + */ + HistorySync.prototype.chunkOrder = 0; + + /** + * HistorySync progress. + * @member {number} progress + * @memberof proto.HistorySync + * @instance + */ + HistorySync.prototype.progress = 0; + + /** + * HistorySync pushnames. + * @member {Array.} pushnames + * @memberof proto.HistorySync + * @instance + */ + HistorySync.prototype.pushnames = $util.emptyArray; + + /** + * Creates a new HistorySync instance using the specified properties. + * @function create + * @memberof proto.HistorySync + * @static + * @param {proto.IHistorySync=} [properties] Properties to set + * @returns {proto.HistorySync} HistorySync instance + */ + HistorySync.create = function create(properties) { + return new HistorySync(properties); + }; + + /** + * Encodes the specified HistorySync message. Does not implicitly {@link proto.HistorySync.verify|verify} messages. + * @function encode + * @memberof proto.HistorySync + * @static + * @param {proto.IHistorySync} message HistorySync message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HistorySync.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(); + return writer; + }; + + /** + * Encodes the specified HistorySync message, length delimited. Does not implicitly {@link proto.HistorySync.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.HistorySync + * @static + * @param {proto.IHistorySync} message HistorySync message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HistorySync.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HistorySync message from the specified reader or buffer. + * @function decode + * @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.HistorySync} HistorySync + * @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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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.syncType = reader.int32(); + break; + case 2: + if (!(message.conversations && message.conversations.length)) + message.conversations = []; + message.conversations.push($root.proto.Conversation.decode(reader, reader.uint32())); + break; + case 3: + if (!(message.statusV3Messages && message.statusV3Messages.length)) + message.statusV3Messages = []; + message.statusV3Messages.push($root.proto.WebMessageInfo.decode(reader, reader.uint32())); + break; + case 5: + message.chunkOrder = reader.uint32(); + 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; + 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. + * @function decodeDelimited + * @memberof proto.HistorySync + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + HistorySync.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HistorySync message. + * @function verify + * @memberof proto.HistorySync + * @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) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.syncType) { + default: + return "syncType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + 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; + } + } + return null; + }; + + /** + * Creates a HistorySync message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.HistorySync + * @static + * @param {Object.} object Plain object + * @returns {proto.HistorySync} HistorySync + */ + HistorySync.fromObject = function fromObject(object) { + if (object instanceof $root.proto.HistorySync) + 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; + } + 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]); + } + } + return message; + }; + + /** + * Creates a plain object from a HistorySync message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.HistorySync + * @static + * @param {proto.HistorySync} message HistorySync + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HistorySync.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.conversations = []; + object.statusV3Messages = []; + object.pushnames = []; + } + if (options.defaults) { + object.syncType = options.enums === String ? "INITIAL_BOOTSTRAP" : 0; + object.chunkOrder = 0; + object.progress = 0; + } + if (message.syncType != null && message.hasOwnProperty("syncType")) + object.syncType = options.enums === String ? $root.proto.HistorySync.HistorySyncHistorySyncType[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); + } + return object; + }; + + /** + * Converts this HistorySync to JSON. + * @function toJSON + * @memberof proto.HistorySync + * @instance + * @returns {Object.} JSON object + */ + HistorySync.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * HistorySyncHistorySyncType enum. + * @name proto.HistorySync.HistorySyncHistorySyncType + * @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 + */ + HistorySync.HistorySyncHistorySyncType = (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; + return values; + })(); + + return HistorySync; + })(); + + 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 an EphemeralSetting message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.EphemeralSetting + * @static + * @param {Object.} object Plain object + * @returns {proto.EphemeralSetting} EphemeralSetting + */ + EphemeralSetting.fromObject = function fromObject(object) { + if (object instanceof $root.proto.EphemeralSetting) + 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(); + return message; + }; + + /** + * Creates a plain object from an EphemeralSetting message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.EphemeralSetting + * @static + * @param {proto.EphemeralSetting} message EphemeralSetting + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EphemeralSetting.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; + } + 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; + return object; + }; + + /** + * Converts this EphemeralSetting to JSON. + * @function toJSON + * @memberof proto.EphemeralSetting + * @instance + * @returns {Object.} JSON object + */ + EphemeralSetting.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EphemeralSetting; + })(); + + proto.PaymentBackground = (function() { + + /** + * Properties of a PaymentBackground. + * @memberof proto + * @interface IPaymentBackground + * @property {string|null} [id] PaymentBackground id + * @property {string|null} [fileLength] PaymentBackground fileLength + * @property {number|null} [width] PaymentBackground width + * @property {number|null} [height] PaymentBackground height + * @property {string|null} [mimetype] PaymentBackground mimetype + * @property {number|null} [placeholderArgb] PaymentBackground placeholderArgb + * @property {number|null} [textArgb] PaymentBackground textArgb + * @property {number|null} [subtextArgb] PaymentBackground subtextArgb + */ + + /** + * Constructs a new PaymentBackground. + * @memberof proto + * @classdesc Represents a PaymentBackground. + * @implements IPaymentBackground + * @constructor + * @param {proto.IPaymentBackground=} [properties] Properties to set + */ + function PaymentBackground(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]]; + } + + /** + * PaymentBackground id. + * @member {string} id + * @memberof proto.PaymentBackground + * @instance + */ + PaymentBackground.prototype.id = ""; + + /** + * PaymentBackground fileLength. + * @member {string} fileLength + * @memberof proto.PaymentBackground + * @instance + */ + PaymentBackground.prototype.fileLength = ""; + + /** + * PaymentBackground width. + * @member {number} width + * @memberof proto.PaymentBackground + * @instance + */ + PaymentBackground.prototype.width = 0; + + /** + * PaymentBackground height. + * @member {number} height + * @memberof proto.PaymentBackground + * @instance + */ + PaymentBackground.prototype.height = 0; + + /** + * PaymentBackground mimetype. + * @member {string} mimetype + * @memberof proto.PaymentBackground + * @instance + */ + PaymentBackground.prototype.mimetype = ""; + + /** + * PaymentBackground placeholderArgb. + * @member {number} placeholderArgb + * @memberof proto.PaymentBackground + * @instance + */ + PaymentBackground.prototype.placeholderArgb = 0; + + /** + * PaymentBackground textArgb. + * @member {number} textArgb + * @memberof proto.PaymentBackground + * @instance + */ + PaymentBackground.prototype.textArgb = 0; + + /** + * PaymentBackground subtextArgb. + * @member {number} subtextArgb + * @memberof proto.PaymentBackground + * @instance + */ + PaymentBackground.prototype.subtextArgb = 0; + + /** + * Creates a new PaymentBackground instance using the specified properties. + * @function create + * @memberof proto.PaymentBackground + * @static + * @param {proto.IPaymentBackground=} [properties] Properties to set + * @returns {proto.PaymentBackground} PaymentBackground instance + */ + PaymentBackground.create = function create(properties) { + return new PaymentBackground(properties); + }; + + /** + * Encodes the specified PaymentBackground message. Does not implicitly {@link proto.PaymentBackground.verify|verify} messages. + * @function encode + * @memberof proto.PaymentBackground + * @static + * @param {proto.IPaymentBackground} message PaymentBackground message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PaymentBackground.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).string(message.id); + if (message.fileLength != null && Object.hasOwnProperty.call(message, "fileLength")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.fileLength); + if (message.width != null && Object.hasOwnProperty.call(message, "width")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.width); + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.height); + if (message.mimetype != null && Object.hasOwnProperty.call(message, "mimetype")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.mimetype); + if (message.placeholderArgb != null && Object.hasOwnProperty.call(message, "placeholderArgb")) + writer.uint32(/* id 6, wireType 5 =*/53).fixed32(message.placeholderArgb); + if (message.textArgb != null && Object.hasOwnProperty.call(message, "textArgb")) + writer.uint32(/* id 7, wireType 5 =*/61).fixed32(message.textArgb); + if (message.subtextArgb != null && Object.hasOwnProperty.call(message, "subtextArgb")) + writer.uint32(/* id 8, wireType 5 =*/69).fixed32(message.subtextArgb); + return writer; + }; + + /** + * Encodes the specified PaymentBackground message, length delimited. Does not implicitly {@link proto.PaymentBackground.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.PaymentBackground + * @static + * @param {proto.IPaymentBackground} message PaymentBackground message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PaymentBackground.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PaymentBackground message from the specified reader or buffer. + * @function decode + * @memberof proto.PaymentBackground + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.PaymentBackground} PaymentBackground + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PaymentBackground.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.PaymentBackground(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.id = reader.string(); + break; + case 2: + message.fileLength = reader.string(); + break; + case 3: + message.width = reader.uint32(); + break; + case 4: + message.height = reader.uint32(); + break; + case 5: + message.mimetype = reader.string(); + break; + case 6: + message.placeholderArgb = reader.fixed32(); + break; + case 7: + message.textArgb = reader.fixed32(); + break; + case 8: + message.subtextArgb = reader.fixed32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PaymentBackground message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.PaymentBackground + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.PaymentBackground} PaymentBackground + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PaymentBackground.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PaymentBackground message. + * @function verify + * @memberof proto.PaymentBackground + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PaymentBackground.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.fileLength != null && message.hasOwnProperty("fileLength")) + if (!$util.isString(message.fileLength)) + return "fileLength: string expected"; + if (message.width != null && message.hasOwnProperty("width")) + if (!$util.isInteger(message.width)) + return "width: integer expected"; + if (message.height != null && message.hasOwnProperty("height")) + if (!$util.isInteger(message.height)) + return "height: integer expected"; + if (message.mimetype != null && message.hasOwnProperty("mimetype")) + if (!$util.isString(message.mimetype)) + return "mimetype: string expected"; + if (message.placeholderArgb != null && message.hasOwnProperty("placeholderArgb")) + if (!$util.isInteger(message.placeholderArgb)) + return "placeholderArgb: integer expected"; + if (message.textArgb != null && message.hasOwnProperty("textArgb")) + if (!$util.isInteger(message.textArgb)) + return "textArgb: integer expected"; + if (message.subtextArgb != null && message.hasOwnProperty("subtextArgb")) + if (!$util.isInteger(message.subtextArgb)) + return "subtextArgb: integer expected"; + return null; + }; + + /** + * Creates a PaymentBackground message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.PaymentBackground + * @static + * @param {Object.} object Plain object + * @returns {proto.PaymentBackground} PaymentBackground + */ + PaymentBackground.fromObject = function fromObject(object) { + if (object instanceof $root.proto.PaymentBackground) + return object; + var message = new $root.proto.PaymentBackground(); + if (object.id != null) + message.id = String(object.id); + if (object.fileLength != null) + message.fileLength = String(object.fileLength); + if (object.width != null) + message.width = object.width >>> 0; + if (object.height != null) + message.height = object.height >>> 0; + if (object.mimetype != null) + message.mimetype = String(object.mimetype); + if (object.placeholderArgb != null) + message.placeholderArgb = object.placeholderArgb >>> 0; + if (object.textArgb != null) + message.textArgb = object.textArgb >>> 0; + if (object.subtextArgb != null) + message.subtextArgb = object.subtextArgb >>> 0; + return message; + }; + + /** + * Creates a plain object from a PaymentBackground message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.PaymentBackground + * @static + * @param {proto.PaymentBackground} message PaymentBackground + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PaymentBackground.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.id = ""; + object.fileLength = ""; + object.width = 0; + object.height = 0; + object.mimetype = ""; + object.placeholderArgb = 0; + object.textArgb = 0; + object.subtextArgb = 0; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.fileLength != null && message.hasOwnProperty("fileLength")) + object.fileLength = message.fileLength; + if (message.width != null && message.hasOwnProperty("width")) + object.width = message.width; + if (message.height != null && message.hasOwnProperty("height")) + object.height = message.height; + if (message.mimetype != null && message.hasOwnProperty("mimetype")) + object.mimetype = message.mimetype; + if (message.placeholderArgb != null && message.hasOwnProperty("placeholderArgb")) + object.placeholderArgb = message.placeholderArgb; + if (message.textArgb != null && message.hasOwnProperty("textArgb")) + object.textArgb = message.textArgb; + if (message.subtextArgb != null && message.hasOwnProperty("subtextArgb")) + object.subtextArgb = message.subtextArgb; + return object; + }; + + /** + * Converts this PaymentBackground to JSON. + * @function toJSON + * @memberof proto.PaymentBackground + * @instance + * @returns {Object.} JSON object + */ + PaymentBackground.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PaymentBackground; + })(); + + proto.Money = (function() { + + /** + * Properties of a Money. + * @memberof proto + * @interface IMoney + * @property {number|Long|null} [value] Money value + * @property {number|null} [offset] Money offset + * @property {string|null} [currencyCode] Money currencyCode + */ + + /** + * Constructs a new Money. + * @memberof proto + * @classdesc Represents a Money. + * @implements IMoney + * @constructor + * @param {proto.IMoney=} [properties] Properties to set + */ + function Money(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]]; + } + + /** + * Money value. + * @member {number|Long} value + * @memberof proto.Money + * @instance + */ + Money.prototype.value = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Money offset. + * @member {number} offset + * @memberof proto.Money + * @instance + */ + Money.prototype.offset = 0; + + /** + * Money currencyCode. + * @member {string} currencyCode + * @memberof proto.Money + * @instance + */ + Money.prototype.currencyCode = ""; + + /** + * Creates a new Money instance using the specified properties. + * @function create + * @memberof proto.Money + * @static + * @param {proto.IMoney=} [properties] Properties to set + * @returns {proto.Money} Money instance + */ + Money.create = function create(properties) { + return new Money(properties); + }; + + /** + * Encodes the specified Money message. Does not implicitly {@link proto.Money.verify|verify} messages. + * @function encode + * @memberof proto.Money + * @static + * @param {proto.IMoney} message Money message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Money.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.value); + if (message.offset != null && Object.hasOwnProperty.call(message, "offset")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.offset); + if (message.currencyCode != null && Object.hasOwnProperty.call(message, "currencyCode")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.currencyCode); + return writer; + }; + + /** + * Encodes the specified Money message, length delimited. Does not implicitly {@link proto.Money.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Money + * @static + * @param {proto.IMoney} message Money message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Money.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Money message from the specified reader or buffer. + * @function decode + * @memberof proto.Money + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Money} Money + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Money.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.Money(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.value = reader.int64(); + break; + case 2: + message.offset = reader.uint32(); + break; + case 3: + message.currencyCode = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Money message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Money + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Money} Money + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Money.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Money message. + * @function verify + * @memberof proto.Money + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Money.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high))) + return "value: integer|Long expected"; + if (message.offset != null && message.hasOwnProperty("offset")) + if (!$util.isInteger(message.offset)) + return "offset: integer expected"; + if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) + if (!$util.isString(message.currencyCode)) + return "currencyCode: string expected"; + return null; + }; + + /** + * Creates a Money message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Money + * @static + * @param {Object.} object Plain object + * @returns {proto.Money} Money + */ + Money.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Money) + return object; + var message = new $root.proto.Money(); + if (object.value != null) + if ($util.Long) + (message.value = $util.Long.fromValue(object.value)).unsigned = false; + else if (typeof object.value === "string") + message.value = parseInt(object.value, 10); + else if (typeof object.value === "number") + message.value = object.value; + else if (typeof object.value === "object") + message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(); + if (object.offset != null) + message.offset = object.offset >>> 0; + if (object.currencyCode != null) + message.currencyCode = String(object.currencyCode); + return message; + }; + + /** + * Creates a plain object from a Money message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Money + * @static + * @param {proto.Money} message Money + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Money.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.value = options.longs === String ? "0" : 0; + object.offset = 0; + object.currencyCode = ""; + } + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value === "number") + object.value = options.longs === String ? String(message.value) : message.value; + else + object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber() : message.value; + if (message.offset != null && message.hasOwnProperty("offset")) + object.offset = message.offset; + if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) + object.currencyCode = message.currencyCode; + return object; + }; + + /** + * Converts this Money to JSON. + * @function toJSON + * @memberof proto.Money + * @instance + * @returns {Object.} JSON object + */ + Money.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Money; })(); proto.HydratedQuickReplyButton = (function() { @@ -7630,6 +20998,615 @@ $root.proto = (function() { return InteractiveAnnotation; })(); + proto.DeviceListMetadata = (function() { + + /** + * 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 {Uint8Array|null} [recipientKeyHash] DeviceListMetadata recipientKeyHash + * @property {number|Long|null} [recipientTimestamp] DeviceListMetadata recipientTimestamp + * @property {Array.|null} [recipientKeyIndexes] DeviceListMetadata recipientKeyIndexes + */ + + /** + * 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]]; + } + + /** + * 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 + * @instance + */ + DeviceListMetadata.prototype.recipientTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * DeviceListMetadata recipientKeyIndexes. + * @member {Array.} recipientKeyIndexes + * @memberof proto.DeviceListMetadata + * @instance + */ + DeviceListMetadata.prototype.recipientKeyIndexes = $util.emptyArray; + + /** + * 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); + }; + + /** + * 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.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; + }; + + /** + * 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(); + }; + + /** + * 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 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; + }; + + /** + * 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()); + }; + + /** + * 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.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; + }; + + /** + * 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; + } + 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; + 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.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; + }; + + /** + * 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); + }; + + return DeviceListMetadata; + })(); + + proto.MessageContextInfo = (function() { + + /** + * Properties of a MessageContextInfo. + * @memberof proto + * @interface IMessageContextInfo + * @property {proto.IDeviceListMetadata|null} [deviceListMetadata] MessageContextInfo deviceListMetadata + * @property {number|null} [deviceListMetadataVersion] MessageContextInfo deviceListMetadataVersion + */ + + /** + * Constructs a new MessageContextInfo. + * @memberof proto + * @classdesc Represents a MessageContextInfo. + * @implements IMessageContextInfo + * @constructor + * @param {proto.IMessageContextInfo=} [properties] Properties to set + */ + function MessageContextInfo(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]]; + } + + /** + * MessageContextInfo deviceListMetadata. + * @member {proto.IDeviceListMetadata|null|undefined} deviceListMetadata + * @memberof proto.MessageContextInfo + * @instance + */ + MessageContextInfo.prototype.deviceListMetadata = null; + + /** + * MessageContextInfo deviceListMetadataVersion. + * @member {number} deviceListMetadataVersion + * @memberof proto.MessageContextInfo + * @instance + */ + MessageContextInfo.prototype.deviceListMetadataVersion = 0; + + /** + * Creates a new MessageContextInfo instance using the specified properties. + * @function create + * @memberof proto.MessageContextInfo + * @static + * @param {proto.IMessageContextInfo=} [properties] Properties to set + * @returns {proto.MessageContextInfo} MessageContextInfo instance + */ + MessageContextInfo.create = function create(properties) { + return new MessageContextInfo(properties); + }; + + /** + * Encodes the specified MessageContextInfo message. Does not implicitly {@link proto.MessageContextInfo.verify|verify} messages. + * @function encode + * @memberof proto.MessageContextInfo + * @static + * @param {proto.IMessageContextInfo} message MessageContextInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageContextInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deviceListMetadata != null && Object.hasOwnProperty.call(message, "deviceListMetadata")) + $root.proto.DeviceListMetadata.encode(message.deviceListMetadata, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.deviceListMetadataVersion != null && Object.hasOwnProperty.call(message, "deviceListMetadataVersion")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.deviceListMetadataVersion); + return writer; + }; + + /** + * Encodes the specified MessageContextInfo message, length delimited. Does not implicitly {@link proto.MessageContextInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.MessageContextInfo + * @static + * @param {proto.IMessageContextInfo} message MessageContextInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageContextInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MessageContextInfo message from the specified reader or buffer. + * @function decode + * @memberof proto.MessageContextInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.MessageContextInfo} MessageContextInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageContextInfo.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.MessageContextInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.deviceListMetadata = $root.proto.DeviceListMetadata.decode(reader, reader.uint32()); + break; + case 2: + message.deviceListMetadataVersion = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MessageContextInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.MessageContextInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.MessageContextInfo} MessageContextInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageContextInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MessageContextInfo message. + * @function verify + * @memberof proto.MessageContextInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MessageContextInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deviceListMetadata != null && message.hasOwnProperty("deviceListMetadata")) { + var error = $root.proto.DeviceListMetadata.verify(message.deviceListMetadata); + if (error) + return "deviceListMetadata." + error; + } + if (message.deviceListMetadataVersion != null && message.hasOwnProperty("deviceListMetadataVersion")) + if (!$util.isInteger(message.deviceListMetadataVersion)) + return "deviceListMetadataVersion: integer expected"; + return null; + }; + + /** + * Creates a MessageContextInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.MessageContextInfo + * @static + * @param {Object.} object Plain object + * @returns {proto.MessageContextInfo} MessageContextInfo + */ + MessageContextInfo.fromObject = function fromObject(object) { + if (object instanceof $root.proto.MessageContextInfo) + return object; + var message = new $root.proto.MessageContextInfo(); + if (object.deviceListMetadata != null) { + if (typeof object.deviceListMetadata !== "object") + throw TypeError(".proto.MessageContextInfo.deviceListMetadata: object expected"); + message.deviceListMetadata = $root.proto.DeviceListMetadata.fromObject(object.deviceListMetadata); + } + if (object.deviceListMetadataVersion != null) + message.deviceListMetadataVersion = object.deviceListMetadataVersion | 0; + return message; + }; + + /** + * Creates a plain object from a MessageContextInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.MessageContextInfo + * @static + * @param {proto.MessageContextInfo} message MessageContextInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MessageContextInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.deviceListMetadata = null; + object.deviceListMetadataVersion = 0; + } + if (message.deviceListMetadata != null && message.hasOwnProperty("deviceListMetadata")) + object.deviceListMetadata = $root.proto.DeviceListMetadata.toObject(message.deviceListMetadata, options); + if (message.deviceListMetadataVersion != null && message.hasOwnProperty("deviceListMetadataVersion")) + object.deviceListMetadataVersion = message.deviceListMetadataVersion; + return object; + }; + + /** + * Converts this MessageContextInfo to JSON. + * @function toJSON + * @memberof proto.MessageContextInfo + * @instance + * @returns {Object.} JSON object + */ + MessageContextInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MessageContextInfo; + })(); + proto.AdReplyInfo = (function() { /** @@ -8356,6 +22333,9 @@ $root.proto = (function() { * @property {number|Long|null} [ephemeralSettingTimestamp] ContextInfo ephemeralSettingTimestamp * @property {Uint8Array|null} [ephemeralSharedSecret] ContextInfo ephemeralSharedSecret * @property {proto.IExternalAdReplyInfo|null} [externalAdReply] ContextInfo externalAdReply + * @property {string|null} [entryPointConversionSource] ContextInfo entryPointConversionSource + * @property {string|null} [entryPointConversionApp] ContextInfo entryPointConversionApp + * @property {number|null} [entryPointConversionDelaySeconds] ContextInfo entryPointConversionDelaySeconds */ /** @@ -8502,6 +22482,30 @@ $root.proto = (function() { */ 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; + /** * Creates a new ContextInfo instance using the specified properties. * @function create @@ -8559,6 +22563,12 @@ $root.proto = (function() { writer.uint32(/* id 27, wireType 2 =*/218).bytes(message.ephemeralSharedSecret); if (message.externalAdReply != null && Object.hasOwnProperty.call(message, "externalAdReply")) $root.proto.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); return writer; }; @@ -8643,6 +22653,15 @@ $root.proto = (function() { case 28: message.externalAdReply = $root.proto.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; default: reader.skipType(tag & 7); break; @@ -8738,6 +22757,15 @@ $root.proto = (function() { 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"; return null; }; @@ -8815,6 +22843,12 @@ $root.proto = (function() { throw TypeError(".proto.ContextInfo.externalAdReply: object expected"); message.externalAdReply = $root.proto.ExternalAdReplyInfo.fromObject(object.externalAdReply); } + 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; return message; }; @@ -8865,6 +22899,9 @@ $root.proto = (function() { object.ephemeralSharedSecret = $util.newBuffer(object.ephemeralSharedSecret); } object.externalAdReply = null; + object.entryPointConversionSource = ""; + object.entryPointConversionApp = ""; + object.entryPointConversionDelaySeconds = 0; } if (message.stanzaId != null && message.hasOwnProperty("stanzaId")) object.stanzaId = message.stanzaId; @@ -8904,6 +22941,12 @@ $root.proto = (function() { 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.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; return object; }; @@ -9168,6 +23211,9 @@ $root.proto = (function() { * @property {Uint8Array|null} [midQualityFileSha256] ImageMessage midQualityFileSha256 * @property {Uint8Array|null} [midQualityFileEncSha256] ImageMessage midQualityFileEncSha256 * @property {boolean|null} [viewOnce] ImageMessage viewOnce + * @property {string|null} [thumbnailDirectPath] ImageMessage thumbnailDirectPath + * @property {Uint8Array|null} [thumbnailSha256] ImageMessage thumbnailSha256 + * @property {Uint8Array|null} [thumbnailEncSha256] ImageMessage thumbnailEncSha256 */ /** @@ -9363,6 +23409,30 @@ $root.proto = (function() { */ ImageMessage.prototype.viewOnce = false; + /** + * ImageMessage thumbnailDirectPath. + * @member {string} thumbnailDirectPath + * @memberof proto.ImageMessage + * @instance + */ + ImageMessage.prototype.thumbnailDirectPath = ""; + + /** + * ImageMessage thumbnailSha256. + * @member {Uint8Array} thumbnailSha256 + * @memberof proto.ImageMessage + * @instance + */ + ImageMessage.prototype.thumbnailSha256 = $util.newBuffer([]); + + /** + * ImageMessage thumbnailEncSha256. + * @member {Uint8Array} thumbnailEncSha256 + * @memberof proto.ImageMessage + * @instance + */ + ImageMessage.prototype.thumbnailEncSha256 = $util.newBuffer([]); + /** * Creates a new ImageMessage instance using the specified properties. * @function create @@ -9433,6 +23503,12 @@ $root.proto = (function() { writer.uint32(/* id 24, wireType 2 =*/194).bytes(message.midQualityFileEncSha256); if (message.viewOnce != null && Object.hasOwnProperty.call(message, "viewOnce")) writer.uint32(/* id 25, wireType 0 =*/200).bool(message.viewOnce); + if (message.thumbnailDirectPath != null && Object.hasOwnProperty.call(message, "thumbnailDirectPath")) + writer.uint32(/* id 26, wireType 2 =*/210).string(message.thumbnailDirectPath); + if (message.thumbnailSha256 != null && Object.hasOwnProperty.call(message, "thumbnailSha256")) + writer.uint32(/* id 27, wireType 2 =*/218).bytes(message.thumbnailSha256); + if (message.thumbnailEncSha256 != null && Object.hasOwnProperty.call(message, "thumbnailEncSha256")) + writer.uint32(/* id 28, wireType 2 =*/226).bytes(message.thumbnailEncSha256); return writer; }; @@ -9542,6 +23618,15 @@ $root.proto = (function() { case 25: message.viewOnce = reader.bool(); break; + case 26: + message.thumbnailDirectPath = reader.string(); + break; + case 27: + message.thumbnailSha256 = reader.bytes(); + break; + case 28: + message.thumbnailEncSha256 = reader.bytes(); + break; default: reader.skipType(tag & 7); break; @@ -9655,6 +23740,15 @@ $root.proto = (function() { if (message.viewOnce != null && message.hasOwnProperty("viewOnce")) if (typeof message.viewOnce !== "boolean") return "viewOnce: 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"; return null; }; @@ -9768,6 +23862,18 @@ $root.proto = (function() { message.midQualityFileEncSha256 = object.midQualityFileEncSha256; if (object.viewOnce != null) message.viewOnce = Boolean(object.viewOnce); + 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; return message; }; @@ -9865,6 +23971,21 @@ $root.proto = (function() { object.midQualityFileEncSha256 = $util.newBuffer(object.midQualityFileEncSha256); } object.viewOnce = 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 (message.url != null && message.hasOwnProperty("url")) object.url = message.url; @@ -9922,6 +24043,12 @@ $root.proto = (function() { object.midQualityFileEncSha256 = options.bytes === String ? $util.base64.encode(message.midQualityFileEncSha256, 0, message.midQualityFileEncSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.midQualityFileEncSha256) : message.midQualityFileEncSha256; if (message.viewOnce != null && message.hasOwnProperty("viewOnce")) object.viewOnce = message.viewOnce; + 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; return object; }; @@ -9939,6 +24066,469 @@ $root.proto = (function() { return ImageMessage; })(); + proto.InvoiceMessage = (function() { + + /** + * Properties of an InvoiceMessage. + * @memberof proto + * @interface IInvoiceMessage + * @property {string|null} [note] InvoiceMessage note + * @property {string|null} [token] InvoiceMessage token + * @property {proto.InvoiceMessage.InvoiceMessageAttachmentType|null} [attachmentType] InvoiceMessage attachmentType + * @property {string|null} [attachmentMimetype] InvoiceMessage attachmentMimetype + * @property {Uint8Array|null} [attachmentMediaKey] InvoiceMessage attachmentMediaKey + * @property {number|Long|null} [attachmentMediaKeyTimestamp] InvoiceMessage attachmentMediaKeyTimestamp + * @property {Uint8Array|null} [attachmentFileSha256] InvoiceMessage attachmentFileSha256 + * @property {Uint8Array|null} [attachmentFileEncSha256] InvoiceMessage attachmentFileEncSha256 + * @property {string|null} [attachmentDirectPath] InvoiceMessage attachmentDirectPath + * @property {Uint8Array|null} [attachmentJpegThumbnail] InvoiceMessage attachmentJpegThumbnail + */ + + /** + * Constructs a new InvoiceMessage. + * @memberof proto + * @classdesc Represents an InvoiceMessage. + * @implements IInvoiceMessage + * @constructor + * @param {proto.IInvoiceMessage=} [properties] Properties to set + */ + function InvoiceMessage(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]]; + } + + /** + * InvoiceMessage note. + * @member {string} note + * @memberof proto.InvoiceMessage + * @instance + */ + InvoiceMessage.prototype.note = ""; + + /** + * InvoiceMessage token. + * @member {string} token + * @memberof proto.InvoiceMessage + * @instance + */ + InvoiceMessage.prototype.token = ""; + + /** + * InvoiceMessage attachmentType. + * @member {proto.InvoiceMessage.InvoiceMessageAttachmentType} attachmentType + * @memberof proto.InvoiceMessage + * @instance + */ + InvoiceMessage.prototype.attachmentType = 0; + + /** + * InvoiceMessage attachmentMimetype. + * @member {string} attachmentMimetype + * @memberof proto.InvoiceMessage + * @instance + */ + InvoiceMessage.prototype.attachmentMimetype = ""; + + /** + * InvoiceMessage attachmentMediaKey. + * @member {Uint8Array} attachmentMediaKey + * @memberof proto.InvoiceMessage + * @instance + */ + InvoiceMessage.prototype.attachmentMediaKey = $util.newBuffer([]); + + /** + * InvoiceMessage attachmentMediaKeyTimestamp. + * @member {number|Long} attachmentMediaKeyTimestamp + * @memberof proto.InvoiceMessage + * @instance + */ + InvoiceMessage.prototype.attachmentMediaKeyTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * InvoiceMessage attachmentFileSha256. + * @member {Uint8Array} attachmentFileSha256 + * @memberof proto.InvoiceMessage + * @instance + */ + InvoiceMessage.prototype.attachmentFileSha256 = $util.newBuffer([]); + + /** + * InvoiceMessage attachmentFileEncSha256. + * @member {Uint8Array} attachmentFileEncSha256 + * @memberof proto.InvoiceMessage + * @instance + */ + InvoiceMessage.prototype.attachmentFileEncSha256 = $util.newBuffer([]); + + /** + * InvoiceMessage attachmentDirectPath. + * @member {string} attachmentDirectPath + * @memberof proto.InvoiceMessage + * @instance + */ + InvoiceMessage.prototype.attachmentDirectPath = ""; + + /** + * InvoiceMessage attachmentJpegThumbnail. + * @member {Uint8Array} attachmentJpegThumbnail + * @memberof proto.InvoiceMessage + * @instance + */ + InvoiceMessage.prototype.attachmentJpegThumbnail = $util.newBuffer([]); + + /** + * Creates a new InvoiceMessage instance using the specified properties. + * @function create + * @memberof proto.InvoiceMessage + * @static + * @param {proto.IInvoiceMessage=} [properties] Properties to set + * @returns {proto.InvoiceMessage} InvoiceMessage instance + */ + InvoiceMessage.create = function create(properties) { + return new InvoiceMessage(properties); + }; + + /** + * Encodes the specified InvoiceMessage message. Does not implicitly {@link proto.InvoiceMessage.verify|verify} messages. + * @function encode + * @memberof proto.InvoiceMessage + * @static + * @param {proto.IInvoiceMessage} message InvoiceMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InvoiceMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.note != null && Object.hasOwnProperty.call(message, "note")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.note); + if (message.token != null && Object.hasOwnProperty.call(message, "token")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.token); + if (message.attachmentType != null && Object.hasOwnProperty.call(message, "attachmentType")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.attachmentType); + if (message.attachmentMimetype != null && Object.hasOwnProperty.call(message, "attachmentMimetype")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.attachmentMimetype); + if (message.attachmentMediaKey != null && Object.hasOwnProperty.call(message, "attachmentMediaKey")) + writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.attachmentMediaKey); + if (message.attachmentMediaKeyTimestamp != null && Object.hasOwnProperty.call(message, "attachmentMediaKeyTimestamp")) + writer.uint32(/* id 6, wireType 0 =*/48).int64(message.attachmentMediaKeyTimestamp); + if (message.attachmentFileSha256 != null && Object.hasOwnProperty.call(message, "attachmentFileSha256")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.attachmentFileSha256); + if (message.attachmentFileEncSha256 != null && Object.hasOwnProperty.call(message, "attachmentFileEncSha256")) + writer.uint32(/* id 8, wireType 2 =*/66).bytes(message.attachmentFileEncSha256); + if (message.attachmentDirectPath != null && Object.hasOwnProperty.call(message, "attachmentDirectPath")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.attachmentDirectPath); + if (message.attachmentJpegThumbnail != null && Object.hasOwnProperty.call(message, "attachmentJpegThumbnail")) + writer.uint32(/* id 10, wireType 2 =*/82).bytes(message.attachmentJpegThumbnail); + return writer; + }; + + /** + * Encodes the specified InvoiceMessage message, length delimited. Does not implicitly {@link proto.InvoiceMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.InvoiceMessage + * @static + * @param {proto.IInvoiceMessage} message InvoiceMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InvoiceMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InvoiceMessage message from the specified reader or buffer. + * @function decode + * @memberof proto.InvoiceMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.InvoiceMessage} InvoiceMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InvoiceMessage.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.InvoiceMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.note = reader.string(); + break; + case 2: + message.token = reader.string(); + break; + case 3: + message.attachmentType = reader.int32(); + break; + case 4: + message.attachmentMimetype = reader.string(); + break; + case 5: + message.attachmentMediaKey = reader.bytes(); + break; + case 6: + message.attachmentMediaKeyTimestamp = reader.int64(); + break; + case 7: + message.attachmentFileSha256 = reader.bytes(); + break; + case 8: + message.attachmentFileEncSha256 = reader.bytes(); + break; + case 9: + message.attachmentDirectPath = reader.string(); + break; + case 10: + message.attachmentJpegThumbnail = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InvoiceMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.InvoiceMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.InvoiceMessage} InvoiceMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InvoiceMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InvoiceMessage message. + * @function verify + * @memberof proto.InvoiceMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InvoiceMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.note != null && message.hasOwnProperty("note")) + if (!$util.isString(message.note)) + return "note: string expected"; + if (message.token != null && message.hasOwnProperty("token")) + if (!$util.isString(message.token)) + return "token: string expected"; + if (message.attachmentType != null && message.hasOwnProperty("attachmentType")) + switch (message.attachmentType) { + default: + return "attachmentType: enum value expected"; + case 0: + case 1: + break; + } + if (message.attachmentMimetype != null && message.hasOwnProperty("attachmentMimetype")) + if (!$util.isString(message.attachmentMimetype)) + return "attachmentMimetype: string expected"; + if (message.attachmentMediaKey != null && message.hasOwnProperty("attachmentMediaKey")) + if (!(message.attachmentMediaKey && typeof message.attachmentMediaKey.length === "number" || $util.isString(message.attachmentMediaKey))) + return "attachmentMediaKey: buffer expected"; + if (message.attachmentMediaKeyTimestamp != null && message.hasOwnProperty("attachmentMediaKeyTimestamp")) + if (!$util.isInteger(message.attachmentMediaKeyTimestamp) && !(message.attachmentMediaKeyTimestamp && $util.isInteger(message.attachmentMediaKeyTimestamp.low) && $util.isInteger(message.attachmentMediaKeyTimestamp.high))) + return "attachmentMediaKeyTimestamp: integer|Long expected"; + if (message.attachmentFileSha256 != null && message.hasOwnProperty("attachmentFileSha256")) + if (!(message.attachmentFileSha256 && typeof message.attachmentFileSha256.length === "number" || $util.isString(message.attachmentFileSha256))) + return "attachmentFileSha256: buffer expected"; + if (message.attachmentFileEncSha256 != null && message.hasOwnProperty("attachmentFileEncSha256")) + if (!(message.attachmentFileEncSha256 && typeof message.attachmentFileEncSha256.length === "number" || $util.isString(message.attachmentFileEncSha256))) + return "attachmentFileEncSha256: buffer expected"; + if (message.attachmentDirectPath != null && message.hasOwnProperty("attachmentDirectPath")) + if (!$util.isString(message.attachmentDirectPath)) + return "attachmentDirectPath: string expected"; + if (message.attachmentJpegThumbnail != null && message.hasOwnProperty("attachmentJpegThumbnail")) + if (!(message.attachmentJpegThumbnail && typeof message.attachmentJpegThumbnail.length === "number" || $util.isString(message.attachmentJpegThumbnail))) + return "attachmentJpegThumbnail: buffer expected"; + return null; + }; + + /** + * Creates an InvoiceMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.InvoiceMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.InvoiceMessage} InvoiceMessage + */ + InvoiceMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.InvoiceMessage) + return object; + var message = new $root.proto.InvoiceMessage(); + if (object.note != null) + message.note = String(object.note); + if (object.token != null) + message.token = String(object.token); + switch (object.attachmentType) { + case "IMAGE": + case 0: + message.attachmentType = 0; + break; + case "PDF": + case 1: + message.attachmentType = 1; + break; + } + if (object.attachmentMimetype != null) + message.attachmentMimetype = String(object.attachmentMimetype); + if (object.attachmentMediaKey != null) + if (typeof object.attachmentMediaKey === "string") + $util.base64.decode(object.attachmentMediaKey, message.attachmentMediaKey = $util.newBuffer($util.base64.length(object.attachmentMediaKey)), 0); + else if (object.attachmentMediaKey.length) + message.attachmentMediaKey = object.attachmentMediaKey; + if (object.attachmentMediaKeyTimestamp != null) + if ($util.Long) + (message.attachmentMediaKeyTimestamp = $util.Long.fromValue(object.attachmentMediaKeyTimestamp)).unsigned = false; + else if (typeof object.attachmentMediaKeyTimestamp === "string") + message.attachmentMediaKeyTimestamp = parseInt(object.attachmentMediaKeyTimestamp, 10); + else if (typeof object.attachmentMediaKeyTimestamp === "number") + message.attachmentMediaKeyTimestamp = object.attachmentMediaKeyTimestamp; + else if (typeof object.attachmentMediaKeyTimestamp === "object") + message.attachmentMediaKeyTimestamp = new $util.LongBits(object.attachmentMediaKeyTimestamp.low >>> 0, object.attachmentMediaKeyTimestamp.high >>> 0).toNumber(); + if (object.attachmentFileSha256 != null) + if (typeof object.attachmentFileSha256 === "string") + $util.base64.decode(object.attachmentFileSha256, message.attachmentFileSha256 = $util.newBuffer($util.base64.length(object.attachmentFileSha256)), 0); + else if (object.attachmentFileSha256.length) + message.attachmentFileSha256 = object.attachmentFileSha256; + if (object.attachmentFileEncSha256 != null) + if (typeof object.attachmentFileEncSha256 === "string") + $util.base64.decode(object.attachmentFileEncSha256, message.attachmentFileEncSha256 = $util.newBuffer($util.base64.length(object.attachmentFileEncSha256)), 0); + else if (object.attachmentFileEncSha256.length) + message.attachmentFileEncSha256 = object.attachmentFileEncSha256; + if (object.attachmentDirectPath != null) + message.attachmentDirectPath = String(object.attachmentDirectPath); + if (object.attachmentJpegThumbnail != null) + if (typeof object.attachmentJpegThumbnail === "string") + $util.base64.decode(object.attachmentJpegThumbnail, message.attachmentJpegThumbnail = $util.newBuffer($util.base64.length(object.attachmentJpegThumbnail)), 0); + else if (object.attachmentJpegThumbnail.length) + message.attachmentJpegThumbnail = object.attachmentJpegThumbnail; + return message; + }; + + /** + * Creates a plain object from an InvoiceMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.InvoiceMessage + * @static + * @param {proto.InvoiceMessage} message InvoiceMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InvoiceMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.note = ""; + object.token = ""; + object.attachmentType = options.enums === String ? "IMAGE" : 0; + object.attachmentMimetype = ""; + if (options.bytes === String) + object.attachmentMediaKey = ""; + else { + object.attachmentMediaKey = []; + if (options.bytes !== Array) + object.attachmentMediaKey = $util.newBuffer(object.attachmentMediaKey); + } + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.attachmentMediaKeyTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.attachmentMediaKeyTimestamp = options.longs === String ? "0" : 0; + if (options.bytes === String) + object.attachmentFileSha256 = ""; + else { + object.attachmentFileSha256 = []; + if (options.bytes !== Array) + object.attachmentFileSha256 = $util.newBuffer(object.attachmentFileSha256); + } + if (options.bytes === String) + object.attachmentFileEncSha256 = ""; + else { + object.attachmentFileEncSha256 = []; + if (options.bytes !== Array) + object.attachmentFileEncSha256 = $util.newBuffer(object.attachmentFileEncSha256); + } + object.attachmentDirectPath = ""; + if (options.bytes === String) + object.attachmentJpegThumbnail = ""; + else { + object.attachmentJpegThumbnail = []; + if (options.bytes !== Array) + object.attachmentJpegThumbnail = $util.newBuffer(object.attachmentJpegThumbnail); + } + } + if (message.note != null && message.hasOwnProperty("note")) + object.note = message.note; + if (message.token != null && message.hasOwnProperty("token")) + object.token = message.token; + if (message.attachmentType != null && message.hasOwnProperty("attachmentType")) + object.attachmentType = options.enums === String ? $root.proto.InvoiceMessage.InvoiceMessageAttachmentType[message.attachmentType] : message.attachmentType; + if (message.attachmentMimetype != null && message.hasOwnProperty("attachmentMimetype")) + object.attachmentMimetype = message.attachmentMimetype; + if (message.attachmentMediaKey != null && message.hasOwnProperty("attachmentMediaKey")) + object.attachmentMediaKey = options.bytes === String ? $util.base64.encode(message.attachmentMediaKey, 0, message.attachmentMediaKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.attachmentMediaKey) : message.attachmentMediaKey; + if (message.attachmentMediaKeyTimestamp != null && message.hasOwnProperty("attachmentMediaKeyTimestamp")) + if (typeof message.attachmentMediaKeyTimestamp === "number") + object.attachmentMediaKeyTimestamp = options.longs === String ? String(message.attachmentMediaKeyTimestamp) : message.attachmentMediaKeyTimestamp; + else + object.attachmentMediaKeyTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.attachmentMediaKeyTimestamp) : options.longs === Number ? new $util.LongBits(message.attachmentMediaKeyTimestamp.low >>> 0, message.attachmentMediaKeyTimestamp.high >>> 0).toNumber() : message.attachmentMediaKeyTimestamp; + if (message.attachmentFileSha256 != null && message.hasOwnProperty("attachmentFileSha256")) + object.attachmentFileSha256 = options.bytes === String ? $util.base64.encode(message.attachmentFileSha256, 0, message.attachmentFileSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.attachmentFileSha256) : message.attachmentFileSha256; + if (message.attachmentFileEncSha256 != null && message.hasOwnProperty("attachmentFileEncSha256")) + object.attachmentFileEncSha256 = options.bytes === String ? $util.base64.encode(message.attachmentFileEncSha256, 0, message.attachmentFileEncSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.attachmentFileEncSha256) : message.attachmentFileEncSha256; + if (message.attachmentDirectPath != null && message.hasOwnProperty("attachmentDirectPath")) + object.attachmentDirectPath = message.attachmentDirectPath; + if (message.attachmentJpegThumbnail != null && message.hasOwnProperty("attachmentJpegThumbnail")) + object.attachmentJpegThumbnail = options.bytes === String ? $util.base64.encode(message.attachmentJpegThumbnail, 0, message.attachmentJpegThumbnail.length) : options.bytes === Array ? Array.prototype.slice.call(message.attachmentJpegThumbnail) : message.attachmentJpegThumbnail; + return object; + }; + + /** + * Converts this InvoiceMessage to JSON. + * @function toJSON + * @memberof proto.InvoiceMessage + * @instance + * @returns {Object.} JSON object + */ + InvoiceMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * InvoiceMessageAttachmentType enum. + * @name proto.InvoiceMessage.InvoiceMessageAttachmentType + * @enum {number} + * @property {number} IMAGE=0 IMAGE value + * @property {number} PDF=1 PDF value + */ + InvoiceMessage.InvoiceMessageAttachmentType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IMAGE"] = 0; + values[valuesById[1] = "PDF"] = 1; + return values; + })(); + + return InvoiceMessage; + })(); + proto.ContactMessage = (function() { /** @@ -10638,6 +25228,13 @@ $root.proto = (function() { * @property {Uint8Array|null} [jpegThumbnail] ExtendedTextMessage jpegThumbnail * @property {proto.IContextInfo|null} [contextInfo] ExtendedTextMessage contextInfo * @property {boolean|null} [doNotPlayInline] ExtendedTextMessage doNotPlayInline + * @property {string|null} [thumbnailDirectPath] ExtendedTextMessage thumbnailDirectPath + * @property {Uint8Array|null} [thumbnailSha256] ExtendedTextMessage thumbnailSha256 + * @property {Uint8Array|null} [thumbnailEncSha256] ExtendedTextMessage thumbnailEncSha256 + * @property {Uint8Array|null} [mediaKey] ExtendedTextMessage mediaKey + * @property {number|Long|null} [mediaKeyTimestamp] ExtendedTextMessage mediaKeyTimestamp + * @property {number|null} [thumbnailHeight] ExtendedTextMessage thumbnailHeight + * @property {number|null} [thumbnailWidth] ExtendedTextMessage thumbnailWidth */ /** @@ -10751,6 +25348,62 @@ $root.proto = (function() { */ ExtendedTextMessage.prototype.doNotPlayInline = false; + /** + * ExtendedTextMessage thumbnailDirectPath. + * @member {string} thumbnailDirectPath + * @memberof proto.ExtendedTextMessage + * @instance + */ + ExtendedTextMessage.prototype.thumbnailDirectPath = ""; + + /** + * ExtendedTextMessage thumbnailSha256. + * @member {Uint8Array} thumbnailSha256 + * @memberof proto.ExtendedTextMessage + * @instance + */ + ExtendedTextMessage.prototype.thumbnailSha256 = $util.newBuffer([]); + + /** + * ExtendedTextMessage thumbnailEncSha256. + * @member {Uint8Array} thumbnailEncSha256 + * @memberof proto.ExtendedTextMessage + * @instance + */ + ExtendedTextMessage.prototype.thumbnailEncSha256 = $util.newBuffer([]); + + /** + * ExtendedTextMessage mediaKey. + * @member {Uint8Array} mediaKey + * @memberof proto.ExtendedTextMessage + * @instance + */ + ExtendedTextMessage.prototype.mediaKey = $util.newBuffer([]); + + /** + * ExtendedTextMessage mediaKeyTimestamp. + * @member {number|Long} mediaKeyTimestamp + * @memberof proto.ExtendedTextMessage + * @instance + */ + ExtendedTextMessage.prototype.mediaKeyTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ExtendedTextMessage thumbnailHeight. + * @member {number} thumbnailHeight + * @memberof proto.ExtendedTextMessage + * @instance + */ + ExtendedTextMessage.prototype.thumbnailHeight = 0; + + /** + * ExtendedTextMessage thumbnailWidth. + * @member {number} thumbnailWidth + * @memberof proto.ExtendedTextMessage + * @instance + */ + ExtendedTextMessage.prototype.thumbnailWidth = 0; + /** * Creates a new ExtendedTextMessage instance using the specified properties. * @function create @@ -10799,6 +25452,20 @@ $root.proto = (function() { $root.proto.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); if (message.doNotPlayInline != null && Object.hasOwnProperty.call(message, "doNotPlayInline")) writer.uint32(/* id 18, wireType 0 =*/144).bool(message.doNotPlayInline); + if (message.thumbnailDirectPath != null && Object.hasOwnProperty.call(message, "thumbnailDirectPath")) + writer.uint32(/* id 19, wireType 2 =*/154).string(message.thumbnailDirectPath); + if (message.thumbnailSha256 != null && Object.hasOwnProperty.call(message, "thumbnailSha256")) + writer.uint32(/* id 20, wireType 2 =*/162).bytes(message.thumbnailSha256); + if (message.thumbnailEncSha256 != null && Object.hasOwnProperty.call(message, "thumbnailEncSha256")) + writer.uint32(/* id 21, wireType 2 =*/170).bytes(message.thumbnailEncSha256); + if (message.mediaKey != null && Object.hasOwnProperty.call(message, "mediaKey")) + writer.uint32(/* id 22, wireType 2 =*/178).bytes(message.mediaKey); + if (message.mediaKeyTimestamp != null && Object.hasOwnProperty.call(message, "mediaKeyTimestamp")) + writer.uint32(/* id 23, wireType 0 =*/184).int64(message.mediaKeyTimestamp); + if (message.thumbnailHeight != null && Object.hasOwnProperty.call(message, "thumbnailHeight")) + writer.uint32(/* id 24, wireType 0 =*/192).uint32(message.thumbnailHeight); + if (message.thumbnailWidth != null && Object.hasOwnProperty.call(message, "thumbnailWidth")) + writer.uint32(/* id 25, wireType 0 =*/200).uint32(message.thumbnailWidth); return writer; }; @@ -10869,6 +25536,27 @@ $root.proto = (function() { case 18: message.doNotPlayInline = reader.bool(); break; + case 19: + message.thumbnailDirectPath = reader.string(); + break; + case 20: + message.thumbnailSha256 = reader.bytes(); + break; + case 21: + message.thumbnailEncSha256 = reader.bytes(); + break; + case 22: + message.mediaKey = reader.bytes(); + break; + case 23: + message.mediaKeyTimestamp = reader.int64(); + break; + case 24: + message.thumbnailHeight = reader.uint32(); + break; + case 25: + message.thumbnailWidth = reader.uint32(); + break; default: reader.skipType(tag & 7); break; @@ -10956,6 +25644,27 @@ $root.proto = (function() { if (message.doNotPlayInline != null && message.hasOwnProperty("doNotPlayInline")) if (typeof message.doNotPlayInline !== "boolean") return "doNotPlayInline: 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.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.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"; return null; }; @@ -11033,6 +25742,36 @@ $root.proto = (function() { } if (object.doNotPlayInline != null) message.doNotPlayInline = Boolean(object.doNotPlayInline); + 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.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.thumbnailHeight != null) + message.thumbnailHeight = object.thumbnailHeight >>> 0; + if (object.thumbnailWidth != null) + message.thumbnailWidth = object.thumbnailWidth >>> 0; return message; }; @@ -11068,6 +25807,35 @@ $root.proto = (function() { } object.contextInfo = null; object.doNotPlayInline = 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.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.thumbnailHeight = 0; + object.thumbnailWidth = 0; } if (message.text != null && message.hasOwnProperty("text")) object.text = message.text; @@ -11093,6 +25861,23 @@ $root.proto = (function() { object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); if (message.doNotPlayInline != null && message.hasOwnProperty("doNotPlayInline")) object.doNotPlayInline = message.doNotPlayInline; + 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.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.thumbnailHeight != null && message.hasOwnProperty("thumbnailHeight")) + object.thumbnailHeight = message.thumbnailHeight; + if (message.thumbnailWidth != null && message.hasOwnProperty("thumbnailWidth")) + object.thumbnailWidth = message.thumbnailWidth; return object; }; @@ -12341,6 +27126,9 @@ $root.proto = (function() { * @property {Uint8Array|null} [streamingSidecar] VideoMessage streamingSidecar * @property {proto.VideoMessage.VideoMessageAttribution|null} [gifAttribution] VideoMessage gifAttribution * @property {boolean|null} [viewOnce] VideoMessage viewOnce + * @property {string|null} [thumbnailDirectPath] VideoMessage thumbnailDirectPath + * @property {Uint8Array|null} [thumbnailSha256] VideoMessage thumbnailSha256 + * @property {Uint8Array|null} [thumbnailEncSha256] VideoMessage thumbnailEncSha256 */ /** @@ -12511,6 +27299,30 @@ $root.proto = (function() { */ VideoMessage.prototype.viewOnce = false; + /** + * VideoMessage thumbnailDirectPath. + * @member {string} thumbnailDirectPath + * @memberof proto.VideoMessage + * @instance + */ + VideoMessage.prototype.thumbnailDirectPath = ""; + + /** + * VideoMessage thumbnailSha256. + * @member {Uint8Array} thumbnailSha256 + * @memberof proto.VideoMessage + * @instance + */ + VideoMessage.prototype.thumbnailSha256 = $util.newBuffer([]); + + /** + * VideoMessage thumbnailEncSha256. + * @member {Uint8Array} thumbnailEncSha256 + * @memberof proto.VideoMessage + * @instance + */ + VideoMessage.prototype.thumbnailEncSha256 = $util.newBuffer([]); + /** * Creates a new VideoMessage instance using the specified properties. * @function create @@ -12574,6 +27386,12 @@ $root.proto = (function() { writer.uint32(/* id 19, wireType 0 =*/152).int32(message.gifAttribution); if (message.viewOnce != null && Object.hasOwnProperty.call(message, "viewOnce")) writer.uint32(/* id 20, wireType 0 =*/160).bool(message.viewOnce); + if (message.thumbnailDirectPath != null && Object.hasOwnProperty.call(message, "thumbnailDirectPath")) + writer.uint32(/* id 21, wireType 2 =*/170).string(message.thumbnailDirectPath); + if (message.thumbnailSha256 != null && Object.hasOwnProperty.call(message, "thumbnailSha256")) + writer.uint32(/* id 22, wireType 2 =*/178).bytes(message.thumbnailSha256); + if (message.thumbnailEncSha256 != null && Object.hasOwnProperty.call(message, "thumbnailEncSha256")) + writer.uint32(/* id 23, wireType 2 =*/186).bytes(message.thumbnailEncSha256); return writer; }; @@ -12667,6 +27485,15 @@ $root.proto = (function() { case 20: message.viewOnce = reader.bool(); break; + case 21: + message.thumbnailDirectPath = reader.string(); + break; + case 22: + message.thumbnailSha256 = reader.bytes(); + break; + case 23: + message.thumbnailEncSha256 = reader.bytes(); + break; default: reader.skipType(tag & 7); break; @@ -12773,6 +27600,15 @@ $root.proto = (function() { if (message.viewOnce != null && message.hasOwnProperty("viewOnce")) if (typeof message.viewOnce !== "boolean") return "viewOnce: 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"; return null; }; @@ -12878,6 +27714,18 @@ $root.proto = (function() { } if (object.viewOnce != null) message.viewOnce = Boolean(object.viewOnce); + 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; return message; }; @@ -12953,6 +27801,21 @@ $root.proto = (function() { } object.gifAttribution = options.enums === String ? "NONE" : 0; object.viewOnce = 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 (message.url != null && message.hasOwnProperty("url")) object.url = message.url; @@ -13001,6 +27864,12 @@ $root.proto = (function() { object.gifAttribution = options.enums === String ? $root.proto.VideoMessage.VideoMessageAttribution[message.gifAttribution] : message.gifAttribution; if (message.viewOnce != null && message.hasOwnProperty("viewOnce")) object.viewOnce = message.viewOnce; + 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; return object; }; @@ -13041,6 +27910,9 @@ $root.proto = (function() { * @memberof proto * @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 */ /** @@ -13066,6 +27938,30 @@ $root.proto = (function() { */ Call.prototype.callKey = $util.newBuffer([]); + /** + * Call conversionSource. + * @member {string} conversionSource + * @memberof proto.Call + * @instance + */ + Call.prototype.conversionSource = ""; + + /** + * Call conversionData. + * @member {Uint8Array} conversionData + * @memberof proto.Call + * @instance + */ + Call.prototype.conversionData = $util.newBuffer([]); + + /** + * Call conversionDelaySeconds. + * @member {number} conversionDelaySeconds + * @memberof proto.Call + * @instance + */ + Call.prototype.conversionDelaySeconds = 0; + /** * Creates a new Call instance using the specified properties. * @function create @@ -13092,6 +27988,12 @@ $root.proto = (function() { 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); return writer; }; @@ -13129,6 +28031,15 @@ $root.proto = (function() { case 1: message.callKey = reader.bytes(); break; + case 2: + message.conversionSource = reader.string(); + break; + case 3: + message.conversionData = reader.bytes(); + break; + case 4: + message.conversionDelaySeconds = reader.uint32(); + break; default: reader.skipType(tag & 7); break; @@ -13167,6 +28078,15 @@ $root.proto = (function() { 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; }; @@ -13187,6 +28107,15 @@ $root.proto = (function() { $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; }; @@ -13203,7 +28132,7 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { if (options.bytes === String) object.callKey = ""; else { @@ -13211,8 +28140,24 @@ $root.proto = (function() { 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.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; }; @@ -13454,6 +28399,7 @@ $root.proto = (function() { * @property {proto.IAppStateSyncKeyShare|null} [appStateSyncKeyShare] ProtocolMessage appStateSyncKeyShare * @property {proto.IAppStateSyncKeyRequest|null} [appStateSyncKeyRequest] ProtocolMessage appStateSyncKeyRequest * @property {proto.IInitialSecurityNotificationSettingSync|null} [initialSecurityNotificationSettingSync] ProtocolMessage initialSecurityNotificationSettingSync + * @property {proto.IAppStateFatalExceptionNotification|null} [appStateFatalExceptionNotification] ProtocolMessage appStateFatalExceptionNotification */ /** @@ -13535,6 +28481,14 @@ $root.proto = (function() { */ ProtocolMessage.prototype.initialSecurityNotificationSettingSync = null; + /** + * ProtocolMessage appStateFatalExceptionNotification. + * @member {proto.IAppStateFatalExceptionNotification|null|undefined} appStateFatalExceptionNotification + * @memberof proto.ProtocolMessage + * @instance + */ + ProtocolMessage.prototype.appStateFatalExceptionNotification = null; + /** * Creates a new ProtocolMessage instance using the specified properties. * @function create @@ -13575,6 +28529,8 @@ $root.proto = (function() { $root.proto.AppStateSyncKeyRequest.encode(message.appStateSyncKeyRequest, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); if (message.initialSecurityNotificationSettingSync != null && Object.hasOwnProperty.call(message, "initialSecurityNotificationSettingSync")) $root.proto.InitialSecurityNotificationSettingSync.encode(message.initialSecurityNotificationSettingSync, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.appStateFatalExceptionNotification != null && Object.hasOwnProperty.call(message, "appStateFatalExceptionNotification")) + $root.proto.AppStateFatalExceptionNotification.encode(message.appStateFatalExceptionNotification, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); return writer; }; @@ -13633,6 +28589,9 @@ $root.proto = (function() { case 9: message.initialSecurityNotificationSettingSync = $root.proto.InitialSecurityNotificationSettingSync.decode(reader, reader.uint32()); break; + case 10: + message.appStateFatalExceptionNotification = $root.proto.AppStateFatalExceptionNotification.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -13685,6 +28644,7 @@ $root.proto = (function() { case 7: case 8: case 9: + case 10: break; } if (message.ephemeralExpiration != null && message.hasOwnProperty("ephemeralExpiration")) @@ -13713,6 +28673,11 @@ $root.proto = (function() { if (error) return "initialSecurityNotificationSettingSync." + error; } + if (message.appStateFatalExceptionNotification != null && message.hasOwnProperty("appStateFatalExceptionNotification")) { + var error = $root.proto.AppStateFatalExceptionNotification.verify(message.appStateFatalExceptionNotification); + if (error) + return "appStateFatalExceptionNotification." + error; + } return null; }; @@ -13766,6 +28731,10 @@ $root.proto = (function() { case 9: message.type = 9; break; + case "APP_STATE_FATAL_EXCEPTION_NOTIFICATION": + case 10: + message.type = 10; + break; } if (object.ephemeralExpiration != null) message.ephemeralExpiration = object.ephemeralExpiration >>> 0; @@ -13798,6 +28767,11 @@ $root.proto = (function() { throw TypeError(".proto.ProtocolMessage.initialSecurityNotificationSettingSync: object expected"); message.initialSecurityNotificationSettingSync = $root.proto.InitialSecurityNotificationSettingSync.fromObject(object.initialSecurityNotificationSettingSync); } + if (object.appStateFatalExceptionNotification != null) { + if (typeof object.appStateFatalExceptionNotification !== "object") + throw TypeError(".proto.ProtocolMessage.appStateFatalExceptionNotification: object expected"); + message.appStateFatalExceptionNotification = $root.proto.AppStateFatalExceptionNotification.fromObject(object.appStateFatalExceptionNotification); + } return message; }; @@ -13827,6 +28801,7 @@ $root.proto = (function() { object.appStateSyncKeyShare = null; object.appStateSyncKeyRequest = null; object.initialSecurityNotificationSettingSync = null; + object.appStateFatalExceptionNotification = null; } if (message.key != null && message.hasOwnProperty("key")) object.key = $root.proto.MessageKey.toObject(message.key, options); @@ -13847,6 +28822,8 @@ $root.proto = (function() { object.appStateSyncKeyRequest = $root.proto.AppStateSyncKeyRequest.toObject(message.appStateSyncKeyRequest, options); if (message.initialSecurityNotificationSettingSync != null && message.hasOwnProperty("initialSecurityNotificationSettingSync")) object.initialSecurityNotificationSettingSync = $root.proto.InitialSecurityNotificationSettingSync.toObject(message.initialSecurityNotificationSettingSync, options); + if (message.appStateFatalExceptionNotification != null && message.hasOwnProperty("appStateFatalExceptionNotification")) + object.appStateFatalExceptionNotification = $root.proto.AppStateFatalExceptionNotification.toObject(message.appStateFatalExceptionNotification, options); return object; }; @@ -13873,6 +28850,7 @@ $root.proto = (function() { * @property {number} APP_STATE_SYNC_KEY_REQUEST=7 APP_STATE_SYNC_KEY_REQUEST value * @property {number} MSG_FANOUT_BACKFILL_REQUEST=8 MSG_FANOUT_BACKFILL_REQUEST value * @property {number} INITIAL_SECURITY_NOTIFICATION_SETTING_SYNC=9 INITIAL_SECURITY_NOTIFICATION_SETTING_SYNC value + * @property {number} APP_STATE_FATAL_EXCEPTION_NOTIFICATION=10 APP_STATE_FATAL_EXCEPTION_NOTIFICATION value */ ProtocolMessage.ProtocolMessageType = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -13884,6 +28862,7 @@ $root.proto = (function() { values[valuesById[7] = "APP_STATE_SYNC_KEY_REQUEST"] = 7; values[valuesById[8] = "MSG_FANOUT_BACKFILL_REQUEST"] = 8; values[valuesById[9] = "INITIAL_SECURITY_NOTIFICATION_SETTING_SYNC"] = 9; + values[valuesById[10] = "APP_STATE_FATAL_EXCEPTION_NOTIFICATION"] = 10; return values; })(); @@ -14141,6 +29120,7 @@ $root.proto = (function() { case 1: case 2: case 3: + case 4: break; } if (message.chunkOrder != null && message.hasOwnProperty("chunkOrder")) @@ -14207,6 +29187,10 @@ $root.proto = (function() { case 3: message.syncType = 3; break; + case "PUSH_NAME": + case 4: + message.syncType = 4; + break; } if (object.chunkOrder != null) message.chunkOrder = object.chunkOrder >>> 0; @@ -14301,6 +29285,7 @@ $root.proto = (function() { * @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 */ HistorySyncNotification.HistorySyncNotificationHistorySyncType = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -14308,6 +29293,7 @@ $root.proto = (function() { values[valuesById[1] = "INITIAL_STATUS_V3"] = 1; values[valuesById[2] = "FULL"] = 2; values[valuesById[3] = "RECENT"] = 3; + values[valuesById[4] = "PUSH_NAME"] = 4; return values; })(); @@ -14738,6 +29724,7 @@ $root.proto = (function() { * @interface IAppStateSyncKeyFingerprint * @property {number|null} [rawId] AppStateSyncKeyFingerprint rawId * @property {number|null} [currentIndex] AppStateSyncKeyFingerprint currentIndex + * @property {Array.|null} [deviceIndexes] AppStateSyncKeyFingerprint deviceIndexes */ /** @@ -14749,6 +29736,7 @@ $root.proto = (function() { * @param {proto.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) @@ -14771,6 +29759,14 @@ $root.proto = (function() { */ AppStateSyncKeyFingerprint.prototype.currentIndex = 0; + /** + * AppStateSyncKeyFingerprint deviceIndexes. + * @member {Array.} deviceIndexes + * @memberof proto.AppStateSyncKeyFingerprint + * @instance + */ + AppStateSyncKeyFingerprint.prototype.deviceIndexes = $util.emptyArray; + /** * Creates a new AppStateSyncKeyFingerprint instance using the specified properties. * @function create @@ -14799,6 +29795,12 @@ $root.proto = (function() { 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; }; @@ -14839,6 +29841,16 @@ $root.proto = (function() { 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; @@ -14880,6 +29892,13 @@ $root.proto = (function() { 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; }; @@ -14899,6 +29918,13 @@ $root.proto = (function() { 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.AppStateSyncKeyFingerprint.deviceIndexes: array expected"); + message.deviceIndexes = []; + for (var i = 0; i < object.deviceIndexes.length; ++i) + message.deviceIndexes[i] = object.deviceIndexes[i] >>> 0; + } return message; }; @@ -14915,6 +29941,8 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.deviceIndexes = []; if (options.defaults) { object.rawId = 0; object.currentIndex = 0; @@ -14923,6 +29951,11 @@ $root.proto = (function() { 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; }; @@ -15616,6 +30649,246 @@ $root.proto = (function() { return AppStateSyncKeyRequest; })(); + proto.AppStateFatalExceptionNotification = (function() { + + /** + * Properties of an AppStateFatalExceptionNotification. + * @memberof proto + * @interface IAppStateFatalExceptionNotification + * @property {Array.|null} [collectionNames] AppStateFatalExceptionNotification collectionNames + * @property {number|Long|null} [timestamp] AppStateFatalExceptionNotification timestamp + */ + + /** + * Constructs a new AppStateFatalExceptionNotification. + * @memberof proto + * @classdesc Represents an AppStateFatalExceptionNotification. + * @implements IAppStateFatalExceptionNotification + * @constructor + * @param {proto.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]]; + } + + /** + * AppStateFatalExceptionNotification collectionNames. + * @member {Array.} collectionNames + * @memberof proto.AppStateFatalExceptionNotification + * @instance + */ + AppStateFatalExceptionNotification.prototype.collectionNames = $util.emptyArray; + + /** + * AppStateFatalExceptionNotification timestamp. + * @member {number|Long} timestamp + * @memberof proto.AppStateFatalExceptionNotification + * @instance + */ + AppStateFatalExceptionNotification.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new AppStateFatalExceptionNotification instance using the specified properties. + * @function create + * @memberof proto.AppStateFatalExceptionNotification + * @static + * @param {proto.IAppStateFatalExceptionNotification=} [properties] Properties to set + * @returns {proto.AppStateFatalExceptionNotification} AppStateFatalExceptionNotification instance + */ + AppStateFatalExceptionNotification.create = function create(properties) { + return new AppStateFatalExceptionNotification(properties); + }; + + /** + * Encodes the specified AppStateFatalExceptionNotification message. Does not implicitly {@link proto.AppStateFatalExceptionNotification.verify|verify} messages. + * @function encode + * @memberof proto.AppStateFatalExceptionNotification + * @static + * @param {proto.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; + }; + + /** + * Encodes the specified AppStateFatalExceptionNotification message, length delimited. Does not implicitly {@link proto.AppStateFatalExceptionNotification.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.AppStateFatalExceptionNotification + * @static + * @param {proto.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(); + }; + + /** + * Decodes an AppStateFatalExceptionNotification message from the specified reader or buffer. + * @function decode + * @memberof proto.AppStateFatalExceptionNotification + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.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.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; + }; + + /** + * Decodes an AppStateFatalExceptionNotification message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.AppStateFatalExceptionNotification + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.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()); + }; + + /** + * Verifies an AppStateFatalExceptionNotification message. + * @function verify + * @memberof proto.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; + }; + + /** + * Creates an AppStateFatalExceptionNotification message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.AppStateFatalExceptionNotification + * @static + * @param {Object.} object Plain object + * @returns {proto.AppStateFatalExceptionNotification} AppStateFatalExceptionNotification + */ + AppStateFatalExceptionNotification.fromObject = function fromObject(object) { + if (object instanceof $root.proto.AppStateFatalExceptionNotification) + return object; + var message = new $root.proto.AppStateFatalExceptionNotification(); + if (object.collectionNames) { + if (!Array.isArray(object.collectionNames)) + throw TypeError(".proto.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; + }; + + /** + * Creates a plain object from an AppStateFatalExceptionNotification message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.AppStateFatalExceptionNotification + * @static + * @param {proto.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; + }; + + /** + * Converts this AppStateFatalExceptionNotification to JSON. + * @function toJSON + * @memberof proto.AppStateFatalExceptionNotification + * @instance + * @returns {Object.} JSON object + */ + AppStateFatalExceptionNotification.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AppStateFatalExceptionNotification; + })(); + proto.InitialSecurityNotificationSettingSync = (function() { /** @@ -17825,6 +33098,7 @@ $root.proto = (function() { * @interface ISendPaymentMessage * @property {proto.IMessage|null} [noteMessage] SendPaymentMessage noteMessage * @property {proto.IMessageKey|null} [requestMessageKey] SendPaymentMessage requestMessageKey + * @property {proto.IPaymentBackground|null} [background] SendPaymentMessage background */ /** @@ -17858,6 +33132,14 @@ $root.proto = (function() { */ SendPaymentMessage.prototype.requestMessageKey = null; + /** + * SendPaymentMessage background. + * @member {proto.IPaymentBackground|null|undefined} background + * @memberof proto.SendPaymentMessage + * @instance + */ + SendPaymentMessage.prototype.background = null; + /** * Creates a new SendPaymentMessage instance using the specified properties. * @function create @@ -17886,6 +33168,8 @@ $root.proto = (function() { $root.proto.Message.encode(message.noteMessage, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.requestMessageKey != null && Object.hasOwnProperty.call(message, "requestMessageKey")) $root.proto.MessageKey.encode(message.requestMessageKey, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.background != null && Object.hasOwnProperty.call(message, "background")) + $root.proto.PaymentBackground.encode(message.background, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; @@ -17926,6 +33210,9 @@ $root.proto = (function() { case 3: message.requestMessageKey = $root.proto.MessageKey.decode(reader, reader.uint32()); break; + case 4: + message.background = $root.proto.PaymentBackground.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -17971,6 +33258,11 @@ $root.proto = (function() { if (error) return "requestMessageKey." + error; } + if (message.background != null && message.hasOwnProperty("background")) { + var error = $root.proto.PaymentBackground.verify(message.background); + if (error) + return "background." + error; + } return null; }; @@ -17996,6 +33288,11 @@ $root.proto = (function() { throw TypeError(".proto.SendPaymentMessage.requestMessageKey: object expected"); message.requestMessageKey = $root.proto.MessageKey.fromObject(object.requestMessageKey); } + if (object.background != null) { + if (typeof object.background !== "object") + throw TypeError(".proto.SendPaymentMessage.background: object expected"); + message.background = $root.proto.PaymentBackground.fromObject(object.background); + } return message; }; @@ -18015,11 +33312,14 @@ $root.proto = (function() { if (options.defaults) { object.noteMessage = null; object.requestMessageKey = null; + object.background = null; } if (message.noteMessage != null && message.hasOwnProperty("noteMessage")) object.noteMessage = $root.proto.Message.toObject(message.noteMessage, options); if (message.requestMessageKey != null && message.hasOwnProperty("requestMessageKey")) object.requestMessageKey = $root.proto.MessageKey.toObject(message.requestMessageKey, options); + if (message.background != null && message.hasOwnProperty("background")) + object.background = $root.proto.PaymentBackground.toObject(message.background, options); return object; }; @@ -18048,6 +33348,8 @@ $root.proto = (function() { * @property {number|Long|null} [amount1000] RequestPaymentMessage amount1000 * @property {string|null} [requestFrom] RequestPaymentMessage requestFrom * @property {number|Long|null} [expiryTimestamp] RequestPaymentMessage expiryTimestamp + * @property {proto.IMoney|null} [amount] RequestPaymentMessage amount + * @property {proto.IPaymentBackground|null} [background] RequestPaymentMessage background */ /** @@ -18105,6 +33407,22 @@ $root.proto = (function() { */ RequestPaymentMessage.prototype.expiryTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** + * RequestPaymentMessage amount. + * @member {proto.IMoney|null|undefined} amount + * @memberof proto.RequestPaymentMessage + * @instance + */ + RequestPaymentMessage.prototype.amount = null; + + /** + * RequestPaymentMessage background. + * @member {proto.IPaymentBackground|null|undefined} background + * @memberof proto.RequestPaymentMessage + * @instance + */ + RequestPaymentMessage.prototype.background = null; + /** * Creates a new RequestPaymentMessage instance using the specified properties. * @function create @@ -18139,6 +33457,10 @@ $root.proto = (function() { $root.proto.Message.encode(message.noteMessage, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.expiryTimestamp != null && Object.hasOwnProperty.call(message, "expiryTimestamp")) writer.uint32(/* id 5, wireType 0 =*/40).int64(message.expiryTimestamp); + if (message.amount != null && Object.hasOwnProperty.call(message, "amount")) + $root.proto.Money.encode(message.amount, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.background != null && Object.hasOwnProperty.call(message, "background")) + $root.proto.PaymentBackground.encode(message.background, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); return writer; }; @@ -18188,6 +33510,12 @@ $root.proto = (function() { case 5: message.expiryTimestamp = reader.int64(); break; + case 6: + message.amount = $root.proto.Money.decode(reader, reader.uint32()); + break; + case 7: + message.background = $root.proto.PaymentBackground.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -18240,6 +33568,16 @@ $root.proto = (function() { if (message.expiryTimestamp != null && message.hasOwnProperty("expiryTimestamp")) if (!$util.isInteger(message.expiryTimestamp) && !(message.expiryTimestamp && $util.isInteger(message.expiryTimestamp.low) && $util.isInteger(message.expiryTimestamp.high))) return "expiryTimestamp: integer|Long expected"; + if (message.amount != null && message.hasOwnProperty("amount")) { + var error = $root.proto.Money.verify(message.amount); + if (error) + return "amount." + error; + } + if (message.background != null && message.hasOwnProperty("background")) { + var error = $root.proto.PaymentBackground.verify(message.background); + if (error) + return "background." + error; + } return null; }; @@ -18282,6 +33620,16 @@ $root.proto = (function() { message.expiryTimestamp = object.expiryTimestamp; else if (typeof object.expiryTimestamp === "object") message.expiryTimestamp = new $util.LongBits(object.expiryTimestamp.low >>> 0, object.expiryTimestamp.high >>> 0).toNumber(); + if (object.amount != null) { + if (typeof object.amount !== "object") + throw TypeError(".proto.RequestPaymentMessage.amount: object expected"); + message.amount = $root.proto.Money.fromObject(object.amount); + } + if (object.background != null) { + if (typeof object.background !== "object") + throw TypeError(".proto.RequestPaymentMessage.background: object expected"); + message.background = $root.proto.PaymentBackground.fromObject(object.background); + } return message; }; @@ -18312,6 +33660,8 @@ $root.proto = (function() { object.expiryTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.expiryTimestamp = options.longs === String ? "0" : 0; + object.amount = null; + object.background = null; } if (message.currencyCodeIso4217 != null && message.hasOwnProperty("currencyCodeIso4217")) object.currencyCodeIso4217 = message.currencyCodeIso4217; @@ -18329,6 +33679,10 @@ $root.proto = (function() { object.expiryTimestamp = options.longs === String ? String(message.expiryTimestamp) : message.expiryTimestamp; else object.expiryTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.expiryTimestamp) : options.longs === Number ? new $util.LongBits(message.expiryTimestamp.low >>> 0, message.expiryTimestamp.high >>> 0).toNumber() : message.expiryTimestamp; + if (message.amount != null && message.hasOwnProperty("amount")) + object.amount = $root.proto.Money.toObject(message.amount, options); + if (message.background != null && message.hasOwnProperty("background")) + object.background = $root.proto.PaymentBackground.toObject(message.background, options); return object; }; @@ -18730,6 +34084,271 @@ $root.proto = (function() { return CancelPaymentRequestMessage; })(); + proto.PaymentInviteMessage = (function() { + + /** + * Properties of a PaymentInviteMessage. + * @memberof proto + * @interface IPaymentInviteMessage + * @property {proto.PaymentInviteMessage.PaymentInviteMessageServiceType|null} [serviceType] PaymentInviteMessage serviceType + * @property {number|Long|null} [expiryTimestamp] PaymentInviteMessage expiryTimestamp + */ + + /** + * Constructs a new PaymentInviteMessage. + * @memberof proto + * @classdesc Represents a PaymentInviteMessage. + * @implements IPaymentInviteMessage + * @constructor + * @param {proto.IPaymentInviteMessage=} [properties] Properties to set + */ + function PaymentInviteMessage(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]]; + } + + /** + * PaymentInviteMessage serviceType. + * @member {proto.PaymentInviteMessage.PaymentInviteMessageServiceType} serviceType + * @memberof proto.PaymentInviteMessage + * @instance + */ + PaymentInviteMessage.prototype.serviceType = 0; + + /** + * PaymentInviteMessage expiryTimestamp. + * @member {number|Long} expiryTimestamp + * @memberof proto.PaymentInviteMessage + * @instance + */ + PaymentInviteMessage.prototype.expiryTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new PaymentInviteMessage instance using the specified properties. + * @function create + * @memberof proto.PaymentInviteMessage + * @static + * @param {proto.IPaymentInviteMessage=} [properties] Properties to set + * @returns {proto.PaymentInviteMessage} PaymentInviteMessage instance + */ + PaymentInviteMessage.create = function create(properties) { + return new PaymentInviteMessage(properties); + }; + + /** + * Encodes the specified PaymentInviteMessage message. Does not implicitly {@link proto.PaymentInviteMessage.verify|verify} messages. + * @function encode + * @memberof proto.PaymentInviteMessage + * @static + * @param {proto.IPaymentInviteMessage} message PaymentInviteMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PaymentInviteMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.serviceType != null && Object.hasOwnProperty.call(message, "serviceType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.serviceType); + if (message.expiryTimestamp != null && Object.hasOwnProperty.call(message, "expiryTimestamp")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.expiryTimestamp); + return writer; + }; + + /** + * Encodes the specified PaymentInviteMessage message, length delimited. Does not implicitly {@link proto.PaymentInviteMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.PaymentInviteMessage + * @static + * @param {proto.IPaymentInviteMessage} message PaymentInviteMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PaymentInviteMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PaymentInviteMessage message from the specified reader or buffer. + * @function decode + * @memberof proto.PaymentInviteMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.PaymentInviteMessage} PaymentInviteMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PaymentInviteMessage.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.PaymentInviteMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.serviceType = reader.int32(); + break; + case 2: + message.expiryTimestamp = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PaymentInviteMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.PaymentInviteMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.PaymentInviteMessage} PaymentInviteMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PaymentInviteMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PaymentInviteMessage message. + * @function verify + * @memberof proto.PaymentInviteMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PaymentInviteMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.serviceType != null && message.hasOwnProperty("serviceType")) + switch (message.serviceType) { + default: + return "serviceType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.expiryTimestamp != null && message.hasOwnProperty("expiryTimestamp")) + if (!$util.isInteger(message.expiryTimestamp) && !(message.expiryTimestamp && $util.isInteger(message.expiryTimestamp.low) && $util.isInteger(message.expiryTimestamp.high))) + return "expiryTimestamp: integer|Long expected"; + return null; + }; + + /** + * Creates a PaymentInviteMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.PaymentInviteMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.PaymentInviteMessage} PaymentInviteMessage + */ + PaymentInviteMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.PaymentInviteMessage) + return object; + var message = new $root.proto.PaymentInviteMessage(); + switch (object.serviceType) { + case "UNKNOWN": + case 0: + message.serviceType = 0; + break; + case "FBPAY": + case 1: + message.serviceType = 1; + break; + case "NOVI": + case 2: + message.serviceType = 2; + break; + case "UPI": + case 3: + message.serviceType = 3; + break; + } + if (object.expiryTimestamp != null) + if ($util.Long) + (message.expiryTimestamp = $util.Long.fromValue(object.expiryTimestamp)).unsigned = false; + else if (typeof object.expiryTimestamp === "string") + message.expiryTimestamp = parseInt(object.expiryTimestamp, 10); + else if (typeof object.expiryTimestamp === "number") + message.expiryTimestamp = object.expiryTimestamp; + else if (typeof object.expiryTimestamp === "object") + message.expiryTimestamp = new $util.LongBits(object.expiryTimestamp.low >>> 0, object.expiryTimestamp.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a PaymentInviteMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.PaymentInviteMessage + * @static + * @param {proto.PaymentInviteMessage} message PaymentInviteMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PaymentInviteMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.serviceType = options.enums === String ? "UNKNOWN" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.expiryTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.expiryTimestamp = options.longs === String ? "0" : 0; + } + if (message.serviceType != null && message.hasOwnProperty("serviceType")) + object.serviceType = options.enums === String ? $root.proto.PaymentInviteMessage.PaymentInviteMessageServiceType[message.serviceType] : message.serviceType; + if (message.expiryTimestamp != null && message.hasOwnProperty("expiryTimestamp")) + if (typeof message.expiryTimestamp === "number") + object.expiryTimestamp = options.longs === String ? String(message.expiryTimestamp) : message.expiryTimestamp; + else + object.expiryTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.expiryTimestamp) : options.longs === Number ? new $util.LongBits(message.expiryTimestamp.low >>> 0, message.expiryTimestamp.high >>> 0).toNumber() : message.expiryTimestamp; + return object; + }; + + /** + * Converts this PaymentInviteMessage to JSON. + * @function toJSON + * @memberof proto.PaymentInviteMessage + * @instance + * @returns {Object.} JSON object + */ + PaymentInviteMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * PaymentInviteMessageServiceType enum. + * @name proto.PaymentInviteMessage.PaymentInviteMessageServiceType + * @enum {number} + * @property {number} UNKNOWN=0 UNKNOWN value + * @property {number} FBPAY=1 FBPAY value + * @property {number} NOVI=2 NOVI value + * @property {number} UPI=3 UPI value + */ + PaymentInviteMessage.PaymentInviteMessageServiceType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN"] = 0; + values[valuesById[1] = "FBPAY"] = 1; + values[valuesById[2] = "NOVI"] = 2; + values[valuesById[3] = "UPI"] = 3; + return values; + })(); + + return PaymentInviteMessage; + })(); + proto.LiveLocationMessage = (function() { /** @@ -20240,11 +35859,11 @@ $root.proto = (function() { /** * HydratedFourRowTemplate hydratedTitleText. - * @member {string} hydratedTitleText + * @member {string|null|undefined} hydratedTitleText * @memberof proto.HydratedFourRowTemplate * @instance */ - HydratedFourRowTemplate.prototype.hydratedTitleText = ""; + HydratedFourRowTemplate.prototype.hydratedTitleText = null; /** * HydratedFourRowTemplate imageMessage. @@ -21431,6 +37050,7 @@ $root.proto = (function() { * @property {string|null} [url] ProductSnapshot url * @property {number|null} [productImageCount] ProductSnapshot productImageCount * @property {string|null} [firstImageId] ProductSnapshot firstImageId + * @property {number|Long|null} [salePriceAmount1000] ProductSnapshot salePriceAmount1000 */ /** @@ -21528,6 +37148,14 @@ $root.proto = (function() { */ ProductSnapshot.prototype.firstImageId = ""; + /** + * ProductSnapshot salePriceAmount1000. + * @member {number|Long} salePriceAmount1000 + * @memberof proto.ProductSnapshot + * @instance + */ + ProductSnapshot.prototype.salePriceAmount1000 = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** * Creates a new ProductSnapshot instance using the specified properties. * @function create @@ -21572,6 +37200,8 @@ $root.proto = (function() { writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.productImageCount); if (message.firstImageId != null && Object.hasOwnProperty.call(message, "firstImageId")) writer.uint32(/* id 11, wireType 2 =*/90).string(message.firstImageId); + if (message.salePriceAmount1000 != null && Object.hasOwnProperty.call(message, "salePriceAmount1000")) + writer.uint32(/* id 12, wireType 0 =*/96).int64(message.salePriceAmount1000); return writer; }; @@ -21636,6 +37266,9 @@ $root.proto = (function() { case 11: message.firstImageId = reader.string(); break; + case 12: + message.salePriceAmount1000 = reader.int64(); + break; default: reader.skipType(tag & 7); break; @@ -21703,6 +37336,9 @@ $root.proto = (function() { if (message.firstImageId != null && message.hasOwnProperty("firstImageId")) if (!$util.isString(message.firstImageId)) return "firstImageId: string expected"; + if (message.salePriceAmount1000 != null && message.hasOwnProperty("salePriceAmount1000")) + if (!$util.isInteger(message.salePriceAmount1000) && !(message.salePriceAmount1000 && $util.isInteger(message.salePriceAmount1000.low) && $util.isInteger(message.salePriceAmount1000.high))) + return "salePriceAmount1000: integer|Long expected"; return null; }; @@ -21748,6 +37384,15 @@ $root.proto = (function() { message.productImageCount = object.productImageCount >>> 0; if (object.firstImageId != null) message.firstImageId = String(object.firstImageId); + if (object.salePriceAmount1000 != null) + if ($util.Long) + (message.salePriceAmount1000 = $util.Long.fromValue(object.salePriceAmount1000)).unsigned = false; + else if (typeof object.salePriceAmount1000 === "string") + message.salePriceAmount1000 = parseInt(object.salePriceAmount1000, 10); + else if (typeof object.salePriceAmount1000 === "number") + message.salePriceAmount1000 = object.salePriceAmount1000; + else if (typeof object.salePriceAmount1000 === "object") + message.salePriceAmount1000 = new $util.LongBits(object.salePriceAmount1000.low >>> 0, object.salePriceAmount1000.high >>> 0).toNumber(); return message; }; @@ -21779,6 +37424,11 @@ $root.proto = (function() { object.url = ""; object.productImageCount = 0; object.firstImageId = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.salePriceAmount1000 = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.salePriceAmount1000 = options.longs === String ? "0" : 0; } if (message.productImage != null && message.hasOwnProperty("productImage")) object.productImage = $root.proto.ImageMessage.toObject(message.productImage, options); @@ -21803,6 +37453,11 @@ $root.proto = (function() { object.productImageCount = message.productImageCount; if (message.firstImageId != null && message.hasOwnProperty("firstImageId")) object.firstImageId = message.firstImageId; + if (message.salePriceAmount1000 != null && message.hasOwnProperty("salePriceAmount1000")) + if (typeof message.salePriceAmount1000 === "number") + object.salePriceAmount1000 = options.longs === String ? String(message.salePriceAmount1000) : message.salePriceAmount1000; + else + object.salePriceAmount1000 = options.longs === String ? $util.Long.prototype.toString.call(message.salePriceAmount1000) : options.longs === Number ? new $util.LongBits(message.salePriceAmount1000.low >>> 0, message.salePriceAmount1000.high >>> 0).toNumber() : message.salePriceAmount1000; return object; }; @@ -22104,6 +37759,8 @@ $root.proto = (function() { * @property {string|null} [orderTitle] OrderMessage orderTitle * @property {string|null} [sellerJid] OrderMessage sellerJid * @property {string|null} [token] OrderMessage token + * @property {number|Long|null} [totalAmount1000] OrderMessage totalAmount1000 + * @property {string|null} [totalCurrencyCode] OrderMessage totalCurrencyCode * @property {proto.IContextInfo|null} [contextInfo] OrderMessage contextInfo */ @@ -22194,6 +37851,22 @@ $root.proto = (function() { */ OrderMessage.prototype.token = ""; + /** + * OrderMessage totalAmount1000. + * @member {number|Long} totalAmount1000 + * @memberof proto.OrderMessage + * @instance + */ + OrderMessage.prototype.totalAmount1000 = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * OrderMessage totalCurrencyCode. + * @member {string} totalCurrencyCode + * @memberof proto.OrderMessage + * @instance + */ + OrderMessage.prototype.totalCurrencyCode = ""; + /** * OrderMessage contextInfo. * @member {proto.IContextInfo|null|undefined} contextInfo @@ -22244,6 +37917,10 @@ $root.proto = (function() { writer.uint32(/* id 8, wireType 2 =*/66).string(message.sellerJid); if (message.token != null && Object.hasOwnProperty.call(message, "token")) writer.uint32(/* id 9, wireType 2 =*/74).string(message.token); + if (message.totalAmount1000 != null && Object.hasOwnProperty.call(message, "totalAmount1000")) + 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.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo")) $root.proto.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); return writer; @@ -22307,6 +37984,12 @@ $root.proto = (function() { case 9: message.token = reader.string(); break; + case 10: + message.totalAmount1000 = reader.int64(); + break; + case 11: + message.totalCurrencyCode = reader.string(); + break; case 17: message.contextInfo = $root.proto.ContextInfo.decode(reader, reader.uint32()); break; @@ -22380,6 +38063,12 @@ $root.proto = (function() { if (message.token != null && message.hasOwnProperty("token")) if (!$util.isString(message.token)) return "token: string expected"; + if (message.totalAmount1000 != null && message.hasOwnProperty("totalAmount1000")) + if (!$util.isInteger(message.totalAmount1000) && !(message.totalAmount1000 && $util.isInteger(message.totalAmount1000.low) && $util.isInteger(message.totalAmount1000.high))) + return "totalAmount1000: integer|Long expected"; + if (message.totalCurrencyCode != null && message.hasOwnProperty("totalCurrencyCode")) + if (!$util.isString(message.totalCurrencyCode)) + return "totalCurrencyCode: string expected"; if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { var error = $root.proto.ContextInfo.verify(message.contextInfo); if (error) @@ -22429,6 +38118,17 @@ $root.proto = (function() { message.sellerJid = String(object.sellerJid); if (object.token != null) message.token = String(object.token); + if (object.totalAmount1000 != null) + if ($util.Long) + (message.totalAmount1000 = $util.Long.fromValue(object.totalAmount1000)).unsigned = false; + else if (typeof object.totalAmount1000 === "string") + message.totalAmount1000 = parseInt(object.totalAmount1000, 10); + else if (typeof object.totalAmount1000 === "number") + message.totalAmount1000 = object.totalAmount1000; + else if (typeof object.totalAmount1000 === "object") + message.totalAmount1000 = new $util.LongBits(object.totalAmount1000.low >>> 0, object.totalAmount1000.high >>> 0).toNumber(); + if (object.totalCurrencyCode != null) + message.totalCurrencyCode = String(object.totalCurrencyCode); if (object.contextInfo != null) { if (typeof object.contextInfo !== "object") throw TypeError(".proto.OrderMessage.contextInfo: object expected"); @@ -22466,6 +38166,12 @@ $root.proto = (function() { object.orderTitle = ""; object.sellerJid = ""; object.token = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.totalAmount1000 = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.totalAmount1000 = options.longs === String ? "0" : 0; + object.totalCurrencyCode = ""; object.contextInfo = null; } if (message.orderId != null && message.hasOwnProperty("orderId")) @@ -22486,6 +38192,13 @@ $root.proto = (function() { object.sellerJid = message.sellerJid; if (message.token != null && message.hasOwnProperty("token")) object.token = message.token; + if (message.totalAmount1000 != null && message.hasOwnProperty("totalAmount1000")) + if (typeof message.totalAmount1000 === "number") + object.totalAmount1000 = options.longs === String ? String(message.totalAmount1000) : message.totalAmount1000; + else + 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.contextInfo != null && message.hasOwnProperty("contextInfo")) object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); return object; @@ -22992,6 +38705,902 @@ $root.proto = (function() { return Section; })(); + proto.Product = (function() { + + /** + * Properties of a Product. + * @memberof proto + * @interface IProduct + * @property {string|null} [productId] Product productId + */ + + /** + * Constructs a new Product. + * @memberof proto + * @classdesc Represents a Product. + * @implements IProduct + * @constructor + * @param {proto.IProduct=} [properties] Properties to set + */ + function Product(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]]; + } + + /** + * Product productId. + * @member {string} productId + * @memberof proto.Product + * @instance + */ + Product.prototype.productId = ""; + + /** + * Creates a new Product instance using the specified properties. + * @function create + * @memberof proto.Product + * @static + * @param {proto.IProduct=} [properties] Properties to set + * @returns {proto.Product} Product instance + */ + Product.create = function create(properties) { + return new Product(properties); + }; + + /** + * Encodes the specified Product message. Does not implicitly {@link proto.Product.verify|verify} messages. + * @function encode + * @memberof proto.Product + * @static + * @param {proto.IProduct} message Product message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Product.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.productId != null && Object.hasOwnProperty.call(message, "productId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.productId); + return writer; + }; + + /** + * Encodes the specified Product message, length delimited. Does not implicitly {@link proto.Product.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Product + * @static + * @param {proto.IProduct} message Product message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Product.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Product message from the specified reader or buffer. + * @function decode + * @memberof proto.Product + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Product} Product + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Product.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.Product(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.productId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Product message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Product + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Product} Product + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Product.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Product message. + * @function verify + * @memberof proto.Product + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Product.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.productId != null && message.hasOwnProperty("productId")) + if (!$util.isString(message.productId)) + return "productId: string expected"; + return null; + }; + + /** + * Creates a Product message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Product + * @static + * @param {Object.} object Plain object + * @returns {proto.Product} Product + */ + Product.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Product) + return object; + var message = new $root.proto.Product(); + if (object.productId != null) + message.productId = String(object.productId); + return message; + }; + + /** + * Creates a plain object from a Product message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Product + * @static + * @param {proto.Product} message Product + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Product.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.productId = ""; + if (message.productId != null && message.hasOwnProperty("productId")) + object.productId = message.productId; + return object; + }; + + /** + * Converts this Product to JSON. + * @function toJSON + * @memberof proto.Product + * @instance + * @returns {Object.} JSON object + */ + Product.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Product; + })(); + + proto.ProductSection = (function() { + + /** + * Properties of a ProductSection. + * @memberof proto + * @interface IProductSection + * @property {string|null} [title] ProductSection title + * @property {Array.|null} [products] ProductSection products + */ + + /** + * Constructs a new ProductSection. + * @memberof proto + * @classdesc Represents a ProductSection. + * @implements IProductSection + * @constructor + * @param {proto.IProductSection=} [properties] Properties to set + */ + function ProductSection(properties) { + this.products = []; + 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]]; + } + + /** + * ProductSection title. + * @member {string} title + * @memberof proto.ProductSection + * @instance + */ + ProductSection.prototype.title = ""; + + /** + * ProductSection products. + * @member {Array.} products + * @memberof proto.ProductSection + * @instance + */ + ProductSection.prototype.products = $util.emptyArray; + + /** + * Creates a new ProductSection instance using the specified properties. + * @function create + * @memberof proto.ProductSection + * @static + * @param {proto.IProductSection=} [properties] Properties to set + * @returns {proto.ProductSection} ProductSection instance + */ + ProductSection.create = function create(properties) { + return new ProductSection(properties); + }; + + /** + * Encodes the specified ProductSection message. Does not implicitly {@link proto.ProductSection.verify|verify} messages. + * @function encode + * @memberof proto.ProductSection + * @static + * @param {proto.IProductSection} message ProductSection message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProductSection.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.products != null && message.products.length) + for (var i = 0; i < message.products.length; ++i) + $root.proto.Product.encode(message.products[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ProductSection message, length delimited. Does not implicitly {@link proto.ProductSection.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.ProductSection + * @static + * @param {proto.IProductSection} message ProductSection message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProductSection.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ProductSection message from the specified reader or buffer. + * @function decode + * @memberof proto.ProductSection + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.ProductSection} ProductSection + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProductSection.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.ProductSection(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.title = reader.string(); + break; + case 2: + if (!(message.products && message.products.length)) + message.products = []; + message.products.push($root.proto.Product.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ProductSection message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.ProductSection + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.ProductSection} ProductSection + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProductSection.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ProductSection message. + * @function verify + * @memberof proto.ProductSection + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ProductSection.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.products != null && message.hasOwnProperty("products")) { + if (!Array.isArray(message.products)) + return "products: array expected"; + for (var i = 0; i < message.products.length; ++i) { + var error = $root.proto.Product.verify(message.products[i]); + if (error) + return "products." + error; + } + } + return null; + }; + + /** + * Creates a ProductSection message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.ProductSection + * @static + * @param {Object.} object Plain object + * @returns {proto.ProductSection} ProductSection + */ + ProductSection.fromObject = function fromObject(object) { + if (object instanceof $root.proto.ProductSection) + return object; + var message = new $root.proto.ProductSection(); + if (object.title != null) + message.title = String(object.title); + if (object.products) { + if (!Array.isArray(object.products)) + throw TypeError(".proto.ProductSection.products: array expected"); + message.products = []; + for (var i = 0; i < object.products.length; ++i) { + if (typeof object.products[i] !== "object") + throw TypeError(".proto.ProductSection.products: object expected"); + message.products[i] = $root.proto.Product.fromObject(object.products[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ProductSection message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.ProductSection + * @static + * @param {proto.ProductSection} message ProductSection + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ProductSection.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.products = []; + if (options.defaults) + object.title = ""; + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.products && message.products.length) { + object.products = []; + for (var j = 0; j < message.products.length; ++j) + object.products[j] = $root.proto.Product.toObject(message.products[j], options); + } + return object; + }; + + /** + * Converts this ProductSection to JSON. + * @function toJSON + * @memberof proto.ProductSection + * @instance + * @returns {Object.} JSON object + */ + ProductSection.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ProductSection; + })(); + + proto.ProductListHeaderImage = (function() { + + /** + * Properties of a ProductListHeaderImage. + * @memberof proto + * @interface IProductListHeaderImage + * @property {string|null} [productId] ProductListHeaderImage productId + * @property {Uint8Array|null} [jpegThumbnail] ProductListHeaderImage jpegThumbnail + */ + + /** + * Constructs a new ProductListHeaderImage. + * @memberof proto + * @classdesc Represents a ProductListHeaderImage. + * @implements IProductListHeaderImage + * @constructor + * @param {proto.IProductListHeaderImage=} [properties] Properties to set + */ + function ProductListHeaderImage(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]]; + } + + /** + * ProductListHeaderImage productId. + * @member {string} productId + * @memberof proto.ProductListHeaderImage + * @instance + */ + ProductListHeaderImage.prototype.productId = ""; + + /** + * ProductListHeaderImage jpegThumbnail. + * @member {Uint8Array} jpegThumbnail + * @memberof proto.ProductListHeaderImage + * @instance + */ + ProductListHeaderImage.prototype.jpegThumbnail = $util.newBuffer([]); + + /** + * Creates a new ProductListHeaderImage instance using the specified properties. + * @function create + * @memberof proto.ProductListHeaderImage + * @static + * @param {proto.IProductListHeaderImage=} [properties] Properties to set + * @returns {proto.ProductListHeaderImage} ProductListHeaderImage instance + */ + ProductListHeaderImage.create = function create(properties) { + return new ProductListHeaderImage(properties); + }; + + /** + * Encodes the specified ProductListHeaderImage message. Does not implicitly {@link proto.ProductListHeaderImage.verify|verify} messages. + * @function encode + * @memberof proto.ProductListHeaderImage + * @static + * @param {proto.IProductListHeaderImage} message ProductListHeaderImage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProductListHeaderImage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.productId != null && Object.hasOwnProperty.call(message, "productId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.productId); + if (message.jpegThumbnail != null && Object.hasOwnProperty.call(message, "jpegThumbnail")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.jpegThumbnail); + return writer; + }; + + /** + * Encodes the specified ProductListHeaderImage message, length delimited. Does not implicitly {@link proto.ProductListHeaderImage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.ProductListHeaderImage + * @static + * @param {proto.IProductListHeaderImage} message ProductListHeaderImage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProductListHeaderImage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ProductListHeaderImage message from the specified reader or buffer. + * @function decode + * @memberof proto.ProductListHeaderImage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.ProductListHeaderImage} ProductListHeaderImage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProductListHeaderImage.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.ProductListHeaderImage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.productId = reader.string(); + break; + case 2: + message.jpegThumbnail = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ProductListHeaderImage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.ProductListHeaderImage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.ProductListHeaderImage} ProductListHeaderImage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProductListHeaderImage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ProductListHeaderImage message. + * @function verify + * @memberof proto.ProductListHeaderImage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ProductListHeaderImage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.productId != null && message.hasOwnProperty("productId")) + if (!$util.isString(message.productId)) + return "productId: 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"; + return null; + }; + + /** + * Creates a ProductListHeaderImage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.ProductListHeaderImage + * @static + * @param {Object.} object Plain object + * @returns {proto.ProductListHeaderImage} ProductListHeaderImage + */ + ProductListHeaderImage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.ProductListHeaderImage) + return object; + var message = new $root.proto.ProductListHeaderImage(); + if (object.productId != null) + message.productId = String(object.productId); + 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; + return message; + }; + + /** + * Creates a plain object from a ProductListHeaderImage message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.ProductListHeaderImage + * @static + * @param {proto.ProductListHeaderImage} message ProductListHeaderImage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ProductListHeaderImage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.productId = ""; + if (options.bytes === String) + object.jpegThumbnail = ""; + else { + object.jpegThumbnail = []; + if (options.bytes !== Array) + object.jpegThumbnail = $util.newBuffer(object.jpegThumbnail); + } + } + if (message.productId != null && message.hasOwnProperty("productId")) + object.productId = message.productId; + 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; + return object; + }; + + /** + * Converts this ProductListHeaderImage to JSON. + * @function toJSON + * @memberof proto.ProductListHeaderImage + * @instance + * @returns {Object.} JSON object + */ + ProductListHeaderImage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ProductListHeaderImage; + })(); + + proto.ProductListInfo = (function() { + + /** + * Properties of a ProductListInfo. + * @memberof proto + * @interface IProductListInfo + * @property {Array.|null} [productSections] ProductListInfo productSections + * @property {proto.IProductListHeaderImage|null} [headerImage] ProductListInfo headerImage + * @property {string|null} [businessOwnerJid] ProductListInfo businessOwnerJid + */ + + /** + * Constructs a new ProductListInfo. + * @memberof proto + * @classdesc Represents a ProductListInfo. + * @implements IProductListInfo + * @constructor + * @param {proto.IProductListInfo=} [properties] Properties to set + */ + function ProductListInfo(properties) { + this.productSections = []; + 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]]; + } + + /** + * ProductListInfo productSections. + * @member {Array.} productSections + * @memberof proto.ProductListInfo + * @instance + */ + ProductListInfo.prototype.productSections = $util.emptyArray; + + /** + * ProductListInfo headerImage. + * @member {proto.IProductListHeaderImage|null|undefined} headerImage + * @memberof proto.ProductListInfo + * @instance + */ + ProductListInfo.prototype.headerImage = null; + + /** + * ProductListInfo businessOwnerJid. + * @member {string} businessOwnerJid + * @memberof proto.ProductListInfo + * @instance + */ + ProductListInfo.prototype.businessOwnerJid = ""; + + /** + * Creates a new ProductListInfo instance using the specified properties. + * @function create + * @memberof proto.ProductListInfo + * @static + * @param {proto.IProductListInfo=} [properties] Properties to set + * @returns {proto.ProductListInfo} ProductListInfo instance + */ + ProductListInfo.create = function create(properties) { + return new ProductListInfo(properties); + }; + + /** + * Encodes the specified ProductListInfo message. Does not implicitly {@link proto.ProductListInfo.verify|verify} messages. + * @function encode + * @memberof proto.ProductListInfo + * @static + * @param {proto.IProductListInfo} message ProductListInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProductListInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.productSections != null && message.productSections.length) + for (var i = 0; i < message.productSections.length; ++i) + $root.proto.ProductSection.encode(message.productSections[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.headerImage != null && Object.hasOwnProperty.call(message, "headerImage")) + $root.proto.ProductListHeaderImage.encode(message.headerImage, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.businessOwnerJid != null && Object.hasOwnProperty.call(message, "businessOwnerJid")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.businessOwnerJid); + return writer; + }; + + /** + * Encodes the specified ProductListInfo message, length delimited. Does not implicitly {@link proto.ProductListInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.ProductListInfo + * @static + * @param {proto.IProductListInfo} message ProductListInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProductListInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ProductListInfo message from the specified reader or buffer. + * @function decode + * @memberof proto.ProductListInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.ProductListInfo} ProductListInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProductListInfo.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.ProductListInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.productSections && message.productSections.length)) + message.productSections = []; + message.productSections.push($root.proto.ProductSection.decode(reader, reader.uint32())); + break; + case 2: + message.headerImage = $root.proto.ProductListHeaderImage.decode(reader, reader.uint32()); + break; + case 3: + message.businessOwnerJid = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ProductListInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.ProductListInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.ProductListInfo} ProductListInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProductListInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ProductListInfo message. + * @function verify + * @memberof proto.ProductListInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ProductListInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.productSections != null && message.hasOwnProperty("productSections")) { + if (!Array.isArray(message.productSections)) + return "productSections: array expected"; + for (var i = 0; i < message.productSections.length; ++i) { + var error = $root.proto.ProductSection.verify(message.productSections[i]); + if (error) + return "productSections." + error; + } + } + if (message.headerImage != null && message.hasOwnProperty("headerImage")) { + var error = $root.proto.ProductListHeaderImage.verify(message.headerImage); + if (error) + return "headerImage." + error; + } + if (message.businessOwnerJid != null && message.hasOwnProperty("businessOwnerJid")) + if (!$util.isString(message.businessOwnerJid)) + return "businessOwnerJid: string expected"; + return null; + }; + + /** + * Creates a ProductListInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.ProductListInfo + * @static + * @param {Object.} object Plain object + * @returns {proto.ProductListInfo} ProductListInfo + */ + ProductListInfo.fromObject = function fromObject(object) { + if (object instanceof $root.proto.ProductListInfo) + return object; + var message = new $root.proto.ProductListInfo(); + if (object.productSections) { + if (!Array.isArray(object.productSections)) + throw TypeError(".proto.ProductListInfo.productSections: array expected"); + message.productSections = []; + for (var i = 0; i < object.productSections.length; ++i) { + if (typeof object.productSections[i] !== "object") + throw TypeError(".proto.ProductListInfo.productSections: object expected"); + message.productSections[i] = $root.proto.ProductSection.fromObject(object.productSections[i]); + } + } + if (object.headerImage != null) { + if (typeof object.headerImage !== "object") + throw TypeError(".proto.ProductListInfo.headerImage: object expected"); + message.headerImage = $root.proto.ProductListHeaderImage.fromObject(object.headerImage); + } + if (object.businessOwnerJid != null) + message.businessOwnerJid = String(object.businessOwnerJid); + return message; + }; + + /** + * Creates a plain object from a ProductListInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.ProductListInfo + * @static + * @param {proto.ProductListInfo} message ProductListInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ProductListInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.productSections = []; + if (options.defaults) { + object.headerImage = null; + object.businessOwnerJid = ""; + } + if (message.productSections && message.productSections.length) { + object.productSections = []; + for (var j = 0; j < message.productSections.length; ++j) + object.productSections[j] = $root.proto.ProductSection.toObject(message.productSections[j], options); + } + if (message.headerImage != null && message.hasOwnProperty("headerImage")) + object.headerImage = $root.proto.ProductListHeaderImage.toObject(message.headerImage, options); + if (message.businessOwnerJid != null && message.hasOwnProperty("businessOwnerJid")) + object.businessOwnerJid = message.businessOwnerJid; + return object; + }; + + /** + * Converts this ProductListInfo to JSON. + * @function toJSON + * @memberof proto.ProductListInfo + * @instance + * @returns {Object.} JSON object + */ + ProductListInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ProductListInfo; + })(); + proto.ListMessage = (function() { /** @@ -23003,6 +39612,9 @@ $root.proto = (function() { * @property {string|null} [buttonText] ListMessage buttonText * @property {proto.ListMessage.ListMessageListType|null} [listType] ListMessage listType * @property {Array.|null} [sections] ListMessage sections + * @property {proto.IProductListInfo|null} [productListInfo] ListMessage productListInfo + * @property {string|null} [footerText] ListMessage footerText + * @property {proto.IContextInfo|null} [contextInfo] ListMessage contextInfo */ /** @@ -23061,6 +39673,30 @@ $root.proto = (function() { */ ListMessage.prototype.sections = $util.emptyArray; + /** + * ListMessage productListInfo. + * @member {proto.IProductListInfo|null|undefined} productListInfo + * @memberof proto.ListMessage + * @instance + */ + ListMessage.prototype.productListInfo = null; + + /** + * ListMessage footerText. + * @member {string} footerText + * @memberof proto.ListMessage + * @instance + */ + ListMessage.prototype.footerText = ""; + + /** + * ListMessage contextInfo. + * @member {proto.IContextInfo|null|undefined} contextInfo + * @memberof proto.ListMessage + * @instance + */ + ListMessage.prototype.contextInfo = null; + /** * Creates a new ListMessage instance using the specified properties. * @function create @@ -23096,6 +39732,12 @@ $root.proto = (function() { if (message.sections != null && message.sections.length) for (var i = 0; i < message.sections.length; ++i) $root.proto.Section.encode(message.sections[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.productListInfo != null && Object.hasOwnProperty.call(message, "productListInfo")) + $root.proto.ProductListInfo.encode(message.productListInfo, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + 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(); return writer; }; @@ -23147,6 +39789,15 @@ $root.proto = (function() { message.sections = []; message.sections.push($root.proto.Section.decode(reader, reader.uint32())); break; + case 6: + message.productListInfo = $root.proto.ProductListInfo.decode(reader, reader.uint32()); + break; + case 7: + message.footerText = reader.string(); + break; + case 8: + message.contextInfo = $root.proto.ContextInfo.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -23197,6 +39848,7 @@ $root.proto = (function() { return "listType: enum value expected"; case 0: case 1: + case 2: break; } if (message.sections != null && message.hasOwnProperty("sections")) { @@ -23208,6 +39860,19 @@ $root.proto = (function() { return "sections." + error; } } + if (message.productListInfo != null && message.hasOwnProperty("productListInfo")) { + var error = $root.proto.ProductListInfo.verify(message.productListInfo); + if (error) + return "productListInfo." + error; + } + 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; + } return null; }; @@ -23238,6 +39903,10 @@ $root.proto = (function() { case 1: message.listType = 1; break; + case "PRODUCT_LIST": + case 2: + message.listType = 2; + break; } if (object.sections) { if (!Array.isArray(object.sections)) @@ -23249,6 +39918,18 @@ $root.proto = (function() { message.sections[i] = $root.proto.Section.fromObject(object.sections[i]); } } + if (object.productListInfo != null) { + if (typeof object.productListInfo !== "object") + throw TypeError(".proto.ListMessage.productListInfo: object expected"); + message.productListInfo = $root.proto.ProductListInfo.fromObject(object.productListInfo); + } + if (object.footerText != null) + message.footerText = String(object.footerText); + if (object.contextInfo != null) { + if (typeof object.contextInfo !== "object") + throw TypeError(".proto.ListMessage.contextInfo: object expected"); + message.contextInfo = $root.proto.ContextInfo.fromObject(object.contextInfo); + } return message; }; @@ -23272,6 +39953,9 @@ $root.proto = (function() { object.description = ""; object.buttonText = ""; object.listType = options.enums === String ? "UNKNOWN" : 0; + object.productListInfo = null; + object.footerText = ""; + object.contextInfo = null; } if (message.title != null && message.hasOwnProperty("title")) object.title = message.title; @@ -23286,6 +39970,12 @@ $root.proto = (function() { for (var j = 0; j < message.sections.length; ++j) object.sections[j] = $root.proto.Section.toObject(message.sections[j], options); } + if (message.productListInfo != null && message.hasOwnProperty("productListInfo")) + object.productListInfo = $root.proto.ProductListInfo.toObject(message.productListInfo, options); + 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); return object; }; @@ -23306,11 +39996,13 @@ $root.proto = (function() { * @enum {number} * @property {number} UNKNOWN=0 UNKNOWN value * @property {number} SINGLE_SELECT=1 SINGLE_SELECT value + * @property {number} PRODUCT_LIST=2 PRODUCT_LIST value */ ListMessage.ListMessageListType = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "UNKNOWN"] = 0; values[valuesById[1] = "SINGLE_SELECT"] = 1; + values[valuesById[2] = "PRODUCT_LIST"] = 2; return values; })(); @@ -23510,10 +40202,11 @@ $root.proto = (function() { * Properties of a ListResponseMessage. * @memberof proto * @interface IListResponseMessage - * @property {string|null} [selectedDisplayText] ListResponseMessage selectedDisplayText + * @property {string|null} [title] ListResponseMessage title * @property {proto.ListResponseMessage.ListResponseMessageListType|null} [listType] ListResponseMessage listType * @property {proto.ISingleSelectReply|null} [singleSelectReply] ListResponseMessage singleSelectReply * @property {proto.IContextInfo|null} [contextInfo] ListResponseMessage contextInfo + * @property {string|null} [description] ListResponseMessage description */ /** @@ -23532,12 +40225,12 @@ $root.proto = (function() { } /** - * ListResponseMessage selectedDisplayText. - * @member {string} selectedDisplayText + * ListResponseMessage title. + * @member {string} title * @memberof proto.ListResponseMessage * @instance */ - ListResponseMessage.prototype.selectedDisplayText = ""; + ListResponseMessage.prototype.title = ""; /** * ListResponseMessage listType. @@ -23563,6 +40256,14 @@ $root.proto = (function() { */ ListResponseMessage.prototype.contextInfo = null; + /** + * ListResponseMessage description. + * @member {string} description + * @memberof proto.ListResponseMessage + * @instance + */ + ListResponseMessage.prototype.description = ""; + /** * Creates a new ListResponseMessage instance using the specified properties. * @function create @@ -23587,14 +40288,16 @@ $root.proto = (function() { ListResponseMessage.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.selectedDisplayText != null && Object.hasOwnProperty.call(message, "selectedDisplayText")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.selectedDisplayText); + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.title); if (message.listType != null && Object.hasOwnProperty.call(message, "listType")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.listType); if (message.singleSelectReply != null && Object.hasOwnProperty.call(message, "singleSelectReply")) $root.proto.SingleSelectReply.encode(message.singleSelectReply, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo")) $root.proto.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.description); return writer; }; @@ -23630,7 +40333,7 @@ $root.proto = (function() { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.selectedDisplayText = reader.string(); + message.title = reader.string(); break; case 2: message.listType = reader.int32(); @@ -23641,6 +40344,9 @@ $root.proto = (function() { case 4: message.contextInfo = $root.proto.ContextInfo.decode(reader, reader.uint32()); break; + case 5: + message.description = reader.string(); + break; default: reader.skipType(tag & 7); break; @@ -23676,9 +40382,9 @@ $root.proto = (function() { ListResponseMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.selectedDisplayText != null && message.hasOwnProperty("selectedDisplayText")) - if (!$util.isString(message.selectedDisplayText)) - return "selectedDisplayText: string expected"; + if (message.title != null && message.hasOwnProperty("title")) + if (!$util.isString(message.title)) + return "title: string expected"; if (message.listType != null && message.hasOwnProperty("listType")) switch (message.listType) { default: @@ -23697,6 +40403,9 @@ $root.proto = (function() { if (error) return "contextInfo." + error; } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; return null; }; @@ -23712,8 +40421,8 @@ $root.proto = (function() { if (object instanceof $root.proto.ListResponseMessage) return object; var message = new $root.proto.ListResponseMessage(); - if (object.selectedDisplayText != null) - message.selectedDisplayText = String(object.selectedDisplayText); + if (object.title != null) + message.title = String(object.title); switch (object.listType) { case "UNKNOWN": case 0: @@ -23734,6 +40443,8 @@ $root.proto = (function() { throw TypeError(".proto.ListResponseMessage.contextInfo: object expected"); message.contextInfo = $root.proto.ContextInfo.fromObject(object.contextInfo); } + if (object.description != null) + message.description = String(object.description); return message; }; @@ -23751,19 +40462,22 @@ $root.proto = (function() { options = {}; var object = {}; if (options.defaults) { - object.selectedDisplayText = ""; + object.title = ""; object.listType = options.enums === String ? "UNKNOWN" : 0; object.singleSelectReply = null; object.contextInfo = null; + object.description = ""; } - if (message.selectedDisplayText != null && message.hasOwnProperty("selectedDisplayText")) - object.selectedDisplayText = message.selectedDisplayText; + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; if (message.listType != null && message.hasOwnProperty("listType")) object.listType = options.enums === String ? $root.proto.ListResponseMessage.ListResponseMessageListType[message.listType] : message.listType; if (message.singleSelectReply != null && message.hasOwnProperty("singleSelectReply")) object.singleSelectReply = $root.proto.SingleSelectReply.toObject(message.singleSelectReply, options); if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; return object; }; @@ -24143,252 +40857,6 @@ $root.proto = (function() { return GroupInviteMessage; })(); - proto.EphemeralSetting = (function() { - - /** - * Properties of an EphemeralSetting. - * @memberof proto - * @interface IEphemeralSetting - * @property {string|null} [chatJid] EphemeralSetting chatJid - * @property {number|null} [ephemeralExpiration] EphemeralSetting ephemeralExpiration - * @property {number|Long|null} [ephemeralSettingTimestamp] EphemeralSetting ephemeralSettingTimestamp - */ - - /** - * 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 chatJid. - * @member {string} chatJid - * @memberof proto.EphemeralSetting - * @instance - */ - EphemeralSetting.prototype.chatJid = ""; - - /** - * EphemeralSetting ephemeralExpiration. - * @member {number} ephemeralExpiration - * @memberof proto.EphemeralSetting - * @instance - */ - EphemeralSetting.prototype.ephemeralExpiration = 0; - - /** - * EphemeralSetting ephemeralSettingTimestamp. - * @member {number|Long} ephemeralSettingTimestamp - * @memberof proto.EphemeralSetting - * @instance - */ - EphemeralSetting.prototype.ephemeralSettingTimestamp = $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.chatJid != null && Object.hasOwnProperty.call(message, "chatJid")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.chatJid); - if (message.ephemeralExpiration != null && Object.hasOwnProperty.call(message, "ephemeralExpiration")) - writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.ephemeralExpiration); - if (message.ephemeralSettingTimestamp != null && Object.hasOwnProperty.call(message, "ephemeralSettingTimestamp")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.ephemeralSettingTimestamp); - 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.chatJid = reader.string(); - break; - case 2: - message.ephemeralExpiration = reader.uint32(); - break; - case 3: - message.ephemeralSettingTimestamp = reader.int64(); - 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.chatJid != null && message.hasOwnProperty("chatJid")) - if (!$util.isString(message.chatJid)) - return "chatJid: string 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"; - return null; - }; - - /** - * Creates an EphemeralSetting message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.EphemeralSetting - * @static - * @param {Object.} object Plain object - * @returns {proto.EphemeralSetting} EphemeralSetting - */ - EphemeralSetting.fromObject = function fromObject(object) { - if (object instanceof $root.proto.EphemeralSetting) - return object; - var message = new $root.proto.EphemeralSetting(); - if (object.chatJid != null) - message.chatJid = String(object.chatJid); - 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(); - return message; - }; - - /** - * Creates a plain object from an EphemeralSetting message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.EphemeralSetting - * @static - * @param {proto.EphemeralSetting} message EphemeralSetting - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EphemeralSetting.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.chatJid = ""; - 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; - } - if (message.chatJid != null && message.hasOwnProperty("chatJid")) - object.chatJid = message.chatJid; - 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; - return object; - }; - - /** - * Converts this EphemeralSetting to JSON. - * @function toJSON - * @memberof proto.EphemeralSetting - * @instance - * @returns {Object.} JSON object - */ - EphemeralSetting.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return EphemeralSetting; - })(); - proto.DeviceSentMessage = (function() { /** @@ -24398,7 +40866,6 @@ $root.proto = (function() { * @property {string|null} [destinationJid] DeviceSentMessage destinationJid * @property {proto.IMessage|null} [message] DeviceSentMessage message * @property {string|null} [phash] DeviceSentMessage phash - * @property {Array.|null} [broadcastEphemeralSettings] DeviceSentMessage broadcastEphemeralSettings */ /** @@ -24410,7 +40877,6 @@ $root.proto = (function() { * @param {proto.IDeviceSentMessage=} [properties] Properties to set */ function DeviceSentMessage(properties) { - this.broadcastEphemeralSettings = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -24441,14 +40907,6 @@ $root.proto = (function() { */ DeviceSentMessage.prototype.phash = ""; - /** - * DeviceSentMessage broadcastEphemeralSettings. - * @member {Array.} broadcastEphemeralSettings - * @memberof proto.DeviceSentMessage - * @instance - */ - DeviceSentMessage.prototype.broadcastEphemeralSettings = $util.emptyArray; - /** * Creates a new DeviceSentMessage instance using the specified properties. * @function create @@ -24479,9 +40937,6 @@ $root.proto = (function() { $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.broadcastEphemeralSettings != null && message.broadcastEphemeralSettings.length) - for (var i = 0; i < message.broadcastEphemeralSettings.length; ++i) - $root.proto.EphemeralSetting.encode(message.broadcastEphemeralSettings[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; @@ -24525,11 +40980,6 @@ $root.proto = (function() { case 3: message.phash = reader.string(); break; - case 4: - if (!(message.broadcastEphemeralSettings && message.broadcastEphemeralSettings.length)) - message.broadcastEphemeralSettings = []; - message.broadcastEphemeralSettings.push($root.proto.EphemeralSetting.decode(reader, reader.uint32())); - break; default: reader.skipType(tag & 7); break; @@ -24576,15 +41026,6 @@ $root.proto = (function() { if (message.phash != null && message.hasOwnProperty("phash")) if (!$util.isString(message.phash)) return "phash: string expected"; - if (message.broadcastEphemeralSettings != null && message.hasOwnProperty("broadcastEphemeralSettings")) { - if (!Array.isArray(message.broadcastEphemeralSettings)) - return "broadcastEphemeralSettings: array expected"; - for (var i = 0; i < message.broadcastEphemeralSettings.length; ++i) { - var error = $root.proto.EphemeralSetting.verify(message.broadcastEphemeralSettings[i]); - if (error) - return "broadcastEphemeralSettings." + error; - } - } return null; }; @@ -24609,16 +41050,6 @@ $root.proto = (function() { } if (object.phash != null) message.phash = String(object.phash); - if (object.broadcastEphemeralSettings) { - if (!Array.isArray(object.broadcastEphemeralSettings)) - throw TypeError(".proto.DeviceSentMessage.broadcastEphemeralSettings: array expected"); - message.broadcastEphemeralSettings = []; - for (var i = 0; i < object.broadcastEphemeralSettings.length; ++i) { - if (typeof object.broadcastEphemeralSettings[i] !== "object") - throw TypeError(".proto.DeviceSentMessage.broadcastEphemeralSettings: object expected"); - message.broadcastEphemeralSettings[i] = $root.proto.EphemeralSetting.fromObject(object.broadcastEphemeralSettings[i]); - } - } return message; }; @@ -24635,8 +41066,6 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.broadcastEphemeralSettings = []; if (options.defaults) { object.destinationJid = ""; object.message = null; @@ -24648,11 +41077,6 @@ $root.proto = (function() { object.message = $root.proto.Message.toObject(message.message, options); if (message.phash != null && message.hasOwnProperty("phash")) object.phash = message.phash; - if (message.broadcastEphemeralSettings && message.broadcastEphemeralSettings.length) { - object.broadcastEphemeralSettings = []; - for (var j = 0; j < message.broadcastEphemeralSettings.length; ++j) - object.broadcastEphemeralSettings[j] = $root.proto.EphemeralSetting.toObject(message.broadcastEphemeralSettings[j], options); - } return object; }; @@ -24862,6 +41286,1548 @@ $root.proto = (function() { return FutureProofMessage; })(); + proto.ButtonText = (function() { + + /** + * Properties of a ButtonText. + * @memberof proto + * @interface IButtonText + * @property {string|null} [displayText] ButtonText displayText + */ + + /** + * Constructs a new ButtonText. + * @memberof proto + * @classdesc Represents a ButtonText. + * @implements IButtonText + * @constructor + * @param {proto.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.ButtonText + * @instance + */ + ButtonText.prototype.displayText = ""; + + /** + * Creates a new ButtonText instance using the specified properties. + * @function create + * @memberof proto.ButtonText + * @static + * @param {proto.IButtonText=} [properties] Properties to set + * @returns {proto.ButtonText} ButtonText instance + */ + ButtonText.create = function create(properties) { + return new ButtonText(properties); + }; + + /** + * Encodes the specified ButtonText message. Does not implicitly {@link proto.ButtonText.verify|verify} messages. + * @function encode + * @memberof proto.ButtonText + * @static + * @param {proto.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; + }; + + /** + * Encodes the specified ButtonText message, length delimited. Does not implicitly {@link proto.ButtonText.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.ButtonText + * @static + * @param {proto.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(); + }; + + /** + * Decodes a ButtonText message from the specified reader or buffer. + * @function decode + * @memberof proto.ButtonText + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.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.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; + }; + + /** + * Decodes a ButtonText message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.ButtonText + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.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()); + }; + + /** + * Verifies a ButtonText message. + * @function verify + * @memberof proto.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 ButtonText message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.ButtonText + * @static + * @param {Object.} object Plain object + * @returns {proto.ButtonText} ButtonText + */ + ButtonText.fromObject = function fromObject(object) { + if (object instanceof $root.proto.ButtonText) + return object; + var message = new $root.proto.ButtonText(); + if (object.displayText != null) + message.displayText = String(object.displayText); + return message; + }; + + /** + * Creates a plain object from a ButtonText message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.ButtonText + * @static + * @param {proto.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; + }; + + /** + * Converts this ButtonText to JSON. + * @function toJSON + * @memberof proto.ButtonText + * @instance + * @returns {Object.} JSON object + */ + ButtonText.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ButtonText; + })(); + + proto.NativeFlowInfo = (function() { + + /** + * Properties of a NativeFlowInfo. + * @memberof proto + * @interface INativeFlowInfo + * @property {string|null} [name] NativeFlowInfo name + * @property {string|null} [paramsJson] NativeFlowInfo paramsJson + */ + + /** + * Constructs a new NativeFlowInfo. + * @memberof proto + * @classdesc Represents a NativeFlowInfo. + * @implements INativeFlowInfo + * @constructor + * @param {proto.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]]; + } + + /** + * NativeFlowInfo name. + * @member {string} name + * @memberof proto.NativeFlowInfo + * @instance + */ + NativeFlowInfo.prototype.name = ""; + + /** + * NativeFlowInfo paramsJson. + * @member {string} paramsJson + * @memberof proto.NativeFlowInfo + * @instance + */ + NativeFlowInfo.prototype.paramsJson = ""; + + /** + * Creates a new NativeFlowInfo instance using the specified properties. + * @function create + * @memberof proto.NativeFlowInfo + * @static + * @param {proto.INativeFlowInfo=} [properties] Properties to set + * @returns {proto.NativeFlowInfo} NativeFlowInfo instance + */ + NativeFlowInfo.create = function create(properties) { + return new NativeFlowInfo(properties); + }; + + /** + * Encodes the specified NativeFlowInfo message. Does not implicitly {@link proto.NativeFlowInfo.verify|verify} messages. + * @function encode + * @memberof proto.NativeFlowInfo + * @static + * @param {proto.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; + }; + + /** + * Encodes the specified NativeFlowInfo message, length delimited. Does not implicitly {@link proto.NativeFlowInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.NativeFlowInfo + * @static + * @param {proto.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(); + }; + + /** + * Decodes a NativeFlowInfo message from the specified reader or buffer. + * @function decode + * @memberof proto.NativeFlowInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.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.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; + }; + + /** + * Decodes a NativeFlowInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.NativeFlowInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.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()); + }; + + /** + * Verifies a NativeFlowInfo message. + * @function verify + * @memberof proto.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 NativeFlowInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.NativeFlowInfo + * @static + * @param {Object.} object Plain object + * @returns {proto.NativeFlowInfo} NativeFlowInfo + */ + NativeFlowInfo.fromObject = function fromObject(object) { + if (object instanceof $root.proto.NativeFlowInfo) + return object; + var message = new $root.proto.NativeFlowInfo(); + if (object.name != null) + message.name = String(object.name); + if (object.paramsJson != null) + message.paramsJson = String(object.paramsJson); + return message; + }; + + /** + * Creates a plain object from a NativeFlowInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.NativeFlowInfo + * @static + * @param {proto.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; + }; + + /** + * Converts this NativeFlowInfo to JSON. + * @function toJSON + * @memberof proto.NativeFlowInfo + * @instance + * @returns {Object.} JSON object + */ + NativeFlowInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return NativeFlowInfo; + })(); + + proto.Button = (function() { + + /** + * Properties of a Button. + * @memberof proto + * @interface IButton + * @property {string|null} [buttonId] Button buttonId + * @property {proto.IButtonText|null} [buttonText] Button buttonText + * @property {proto.Button.ButtonType|null} [type] Button type + * @property {proto.INativeFlowInfo|null} [nativeFlowInfo] Button nativeFlowInfo + */ + + /** + * Constructs a new Button. + * @memberof proto + * @classdesc Represents a Button. + * @implements IButton + * @constructor + * @param {proto.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.Button + * @instance + */ + Button.prototype.buttonId = ""; + + /** + * Button buttonText. + * @member {proto.IButtonText|null|undefined} buttonText + * @memberof proto.Button + * @instance + */ + Button.prototype.buttonText = null; + + /** + * Button type. + * @member {proto.Button.ButtonType} type + * @memberof proto.Button + * @instance + */ + Button.prototype.type = 0; + + /** + * Button nativeFlowInfo. + * @member {proto.INativeFlowInfo|null|undefined} nativeFlowInfo + * @memberof proto.Button + * @instance + */ + Button.prototype.nativeFlowInfo = null; + + /** + * Creates a new Button instance using the specified properties. + * @function create + * @memberof proto.Button + * @static + * @param {proto.IButton=} [properties] Properties to set + * @returns {proto.Button} Button instance + */ + Button.create = function create(properties) { + return new Button(properties); + }; + + /** + * Encodes the specified Button message. Does not implicitly {@link proto.Button.verify|verify} messages. + * @function encode + * @memberof proto.Button + * @static + * @param {proto.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.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.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.Button.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Button + * @static + * @param {proto.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.Button + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.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.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.ButtonText.decode(reader, reader.uint32()); + break; + case 3: + message.type = reader.int32(); + break; + case 4: + message.nativeFlowInfo = $root.proto.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.Button + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.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.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.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.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.Button + * @static + * @param {Object.} object Plain object + * @returns {proto.Button} Button + */ + Button.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Button) + return object; + var message = new $root.proto.Button(); + if (object.buttonId != null) + message.buttonId = String(object.buttonId); + if (object.buttonText != null) { + if (typeof object.buttonText !== "object") + throw TypeError(".proto.Button.buttonText: object expected"); + message.buttonText = $root.proto.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.Button.nativeFlowInfo: object expected"); + message.nativeFlowInfo = $root.proto.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.Button + * @static + * @param {proto.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.ButtonText.toObject(message.buttonText, options); + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.proto.Button.ButtonType[message.type] : message.type; + if (message.nativeFlowInfo != null && message.hasOwnProperty("nativeFlowInfo")) + object.nativeFlowInfo = $root.proto.NativeFlowInfo.toObject(message.nativeFlowInfo, options); + return object; + }; + + /** + * Converts this Button to JSON. + * @function toJSON + * @memberof proto.Button + * @instance + * @returns {Object.} JSON object + */ + Button.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * ButtonType enum. + * @name proto.Button.ButtonType + * @enum {number} + * @property {number} UNKNOWN=0 UNKNOWN value + * @property {number} RESPONSE=1 RESPONSE value + * @property {number} NATIVE_FLOW=2 NATIVE_FLOW value + */ + Button.ButtonType = (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; + })(); + + proto.ButtonsMessage = (function() { + + /** + * Properties of a ButtonsMessage. + * @memberof proto + * @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.ButtonsMessage.ButtonsMessageHeaderType|null} [headerType] ButtonsMessage headerType + * @property {string|null} [text] ButtonsMessage text + * @property {proto.IDocumentMessage|null} [documentMessage] ButtonsMessage documentMessage + * @property {proto.IImageMessage|null} [imageMessage] ButtonsMessage imageMessage + * @property {proto.IVideoMessage|null} [videoMessage] ButtonsMessage videoMessage + * @property {proto.ILocationMessage|null} [locationMessage] ButtonsMessage locationMessage + */ + + /** + * Constructs a new ButtonsMessage. + * @memberof proto + * @classdesc Represents a ButtonsMessage. + * @implements IButtonsMessage + * @constructor + * @param {proto.IButtonsMessage=} [properties] Properties to set + */ + function ButtonsMessage(properties) { + this.buttons = []; + 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]]; + } + + /** + * ButtonsMessage contentText. + * @member {string} contentText + * @memberof proto.ButtonsMessage + * @instance + */ + ButtonsMessage.prototype.contentText = ""; + + /** + * ButtonsMessage footerText. + * @member {string} footerText + * @memberof proto.ButtonsMessage + * @instance + */ + ButtonsMessage.prototype.footerText = ""; + + /** + * ButtonsMessage contextInfo. + * @member {proto.IContextInfo|null|undefined} contextInfo + * @memberof proto.ButtonsMessage + * @instance + */ + ButtonsMessage.prototype.contextInfo = null; + + /** + * ButtonsMessage buttons. + * @member {Array.} buttons + * @memberof proto.ButtonsMessage + * @instance + */ + ButtonsMessage.prototype.buttons = $util.emptyArray; + + /** + * ButtonsMessage headerType. + * @member {proto.ButtonsMessage.ButtonsMessageHeaderType} headerType + * @memberof proto.ButtonsMessage + * @instance + */ + ButtonsMessage.prototype.headerType = 0; + + /** + * ButtonsMessage text. + * @member {string|null|undefined} text + * @memberof proto.ButtonsMessage + * @instance + */ + ButtonsMessage.prototype.text = null; + + /** + * ButtonsMessage documentMessage. + * @member {proto.IDocumentMessage|null|undefined} documentMessage + * @memberof proto.ButtonsMessage + * @instance + */ + ButtonsMessage.prototype.documentMessage = null; + + /** + * ButtonsMessage imageMessage. + * @member {proto.IImageMessage|null|undefined} imageMessage + * @memberof proto.ButtonsMessage + * @instance + */ + ButtonsMessage.prototype.imageMessage = null; + + /** + * ButtonsMessage videoMessage. + * @member {proto.IVideoMessage|null|undefined} videoMessage + * @memberof proto.ButtonsMessage + * @instance + */ + ButtonsMessage.prototype.videoMessage = null; + + /** + * ButtonsMessage locationMessage. + * @member {proto.ILocationMessage|null|undefined} locationMessage + * @memberof proto.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.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.ButtonsMessage + * @static + * @param {proto.IButtonsMessage=} [properties] Properties to set + * @returns {proto.ButtonsMessage} ButtonsMessage instance + */ + ButtonsMessage.create = function create(properties) { + return new ButtonsMessage(properties); + }; + + /** + * Encodes the specified ButtonsMessage message. Does not implicitly {@link proto.ButtonsMessage.verify|verify} messages. + * @function encode + * @memberof proto.ButtonsMessage + * @static + * @param {proto.IButtonsMessage} message ButtonsMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ButtonsMessage.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.DocumentMessage.encode(message.documentMessage, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.imageMessage != null && Object.hasOwnProperty.call(message, "imageMessage")) + $root.proto.ImageMessage.encode(message.imageMessage, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.videoMessage != null && Object.hasOwnProperty.call(message, "videoMessage")) + $root.proto.VideoMessage.encode(message.videoMessage, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.locationMessage != null && Object.hasOwnProperty.call(message, "locationMessage")) + $root.proto.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.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 ButtonsMessage message, length delimited. Does not implicitly {@link proto.ButtonsMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.ButtonsMessage + * @static + * @param {proto.IButtonsMessage} message ButtonsMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ButtonsMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ButtonsMessage message from the specified reader or buffer. + * @function decode + * @memberof proto.ButtonsMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.ButtonsMessage} ButtonsMessage + * @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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.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.Button.decode(reader, reader.uint32())); + break; + case 10: + message.headerType = reader.int32(); + break; + case 1: + message.text = reader.string(); + break; + case 2: + message.documentMessage = $root.proto.DocumentMessage.decode(reader, reader.uint32()); + break; + case 3: + message.imageMessage = $root.proto.ImageMessage.decode(reader, reader.uint32()); + break; + case 4: + message.videoMessage = $root.proto.VideoMessage.decode(reader, reader.uint32()); + break; + case 5: + message.locationMessage = $root.proto.LocationMessage.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ButtonsMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.ButtonsMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.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.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.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.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.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.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.LocationMessage.verify(message.locationMessage); + if (error) + return "locationMessage." + error; + } + } + return null; + }; + + /** + * Creates a ButtonsMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.ButtonsMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.ButtonsMessage} ButtonsMessage + */ + ButtonsMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.ButtonsMessage) + return object; + var message = new $root.proto.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.ButtonsMessage.contextInfo: object expected"); + message.contextInfo = $root.proto.ContextInfo.fromObject(object.contextInfo); + } + if (object.buttons) { + if (!Array.isArray(object.buttons)) + throw TypeError(".proto.ButtonsMessage.buttons: array expected"); + message.buttons = []; + for (var i = 0; i < object.buttons.length; ++i) { + if (typeof object.buttons[i] !== "object") + throw TypeError(".proto.ButtonsMessage.buttons: object expected"); + message.buttons[i] = $root.proto.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.ButtonsMessage.documentMessage: object expected"); + message.documentMessage = $root.proto.DocumentMessage.fromObject(object.documentMessage); + } + if (object.imageMessage != null) { + if (typeof object.imageMessage !== "object") + throw TypeError(".proto.ButtonsMessage.imageMessage: object expected"); + message.imageMessage = $root.proto.ImageMessage.fromObject(object.imageMessage); + } + if (object.videoMessage != null) { + if (typeof object.videoMessage !== "object") + throw TypeError(".proto.ButtonsMessage.videoMessage: object expected"); + message.videoMessage = $root.proto.VideoMessage.fromObject(object.videoMessage); + } + if (object.locationMessage != null) { + if (typeof object.locationMessage !== "object") + throw TypeError(".proto.ButtonsMessage.locationMessage: object expected"); + message.locationMessage = $root.proto.LocationMessage.fromObject(object.locationMessage); + } + return message; + }; + + /** + * Creates a plain object from a ButtonsMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.ButtonsMessage + * @static + * @param {proto.ButtonsMessage} message ButtonsMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ButtonsMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + 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.DocumentMessage.toObject(message.documentMessage, options); + if (options.oneofs) + object.header = "documentMessage"; + } + if (message.imageMessage != null && message.hasOwnProperty("imageMessage")) { + object.imageMessage = $root.proto.ImageMessage.toObject(message.imageMessage, options); + if (options.oneofs) + object.header = "imageMessage"; + } + if (message.videoMessage != null && message.hasOwnProperty("videoMessage")) { + object.videoMessage = $root.proto.VideoMessage.toObject(message.videoMessage, options); + if (options.oneofs) + object.header = "videoMessage"; + } + if (message.locationMessage != null && message.hasOwnProperty("locationMessage")) { + object.locationMessage = $root.proto.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.Button.toObject(message.buttons[j], options); + } + if (message.headerType != null && message.hasOwnProperty("headerType")) + object.headerType = options.enums === String ? $root.proto.ButtonsMessage.ButtonsMessageHeaderType[message.headerType] : message.headerType; + return object; + }; + + /** + * Converts this ButtonsMessage to JSON. + * @function toJSON + * @memberof proto.ButtonsMessage + * @instance + * @returns {Object.} JSON object + */ + ButtonsMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * ButtonsMessageHeaderType enum. + * @name proto.ButtonsMessage.ButtonsMessageHeaderType + * @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 + */ + ButtonsMessage.ButtonsMessageHeaderType = (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 ButtonsMessage; + })(); + + proto.ButtonsResponseMessage = (function() { + + /** + * Properties of a ButtonsResponseMessage. + * @memberof proto + * @interface IButtonsResponseMessage + * @property {string|null} [selectedButtonId] ButtonsResponseMessage selectedButtonId + * @property {proto.IContextInfo|null} [contextInfo] ButtonsResponseMessage contextInfo + * @property {proto.ButtonsResponseMessage.ButtonsResponseMessageType|null} [type] ButtonsResponseMessage type + * @property {string|null} [selectedDisplayText] ButtonsResponseMessage selectedDisplayText + */ + + /** + * Constructs a new ButtonsResponseMessage. + * @memberof proto + * @classdesc Represents a ButtonsResponseMessage. + * @implements IButtonsResponseMessage + * @constructor + * @param {proto.IButtonsResponseMessage=} [properties] Properties to set + */ + function ButtonsResponseMessage(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]]; + } + + /** + * ButtonsResponseMessage selectedButtonId. + * @member {string} selectedButtonId + * @memberof proto.ButtonsResponseMessage + * @instance + */ + ButtonsResponseMessage.prototype.selectedButtonId = ""; + + /** + * ButtonsResponseMessage contextInfo. + * @member {proto.IContextInfo|null|undefined} contextInfo + * @memberof proto.ButtonsResponseMessage + * @instance + */ + ButtonsResponseMessage.prototype.contextInfo = null; + + /** + * ButtonsResponseMessage type. + * @member {proto.ButtonsResponseMessage.ButtonsResponseMessageType} type + * @memberof proto.ButtonsResponseMessage + * @instance + */ + ButtonsResponseMessage.prototype.type = 0; + + /** + * ButtonsResponseMessage selectedDisplayText. + * @member {string|null|undefined} selectedDisplayText + * @memberof proto.ButtonsResponseMessage + * @instance + */ + ButtonsResponseMessage.prototype.selectedDisplayText = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ButtonsResponseMessage response. + * @member {"selectedDisplayText"|undefined} response + * @memberof proto.ButtonsResponseMessage + * @instance + */ + Object.defineProperty(ButtonsResponseMessage.prototype, "response", { + get: $util.oneOfGetter($oneOfFields = ["selectedDisplayText"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ButtonsResponseMessage instance using the specified properties. + * @function create + * @memberof proto.ButtonsResponseMessage + * @static + * @param {proto.IButtonsResponseMessage=} [properties] Properties to set + * @returns {proto.ButtonsResponseMessage} ButtonsResponseMessage instance + */ + ButtonsResponseMessage.create = function create(properties) { + return new ButtonsResponseMessage(properties); + }; + + /** + * Encodes the specified ButtonsResponseMessage message. Does not implicitly {@link proto.ButtonsResponseMessage.verify|verify} messages. + * @function encode + * @memberof proto.ButtonsResponseMessage + * @static + * @param {proto.IButtonsResponseMessage} message ButtonsResponseMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ButtonsResponseMessage.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.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); + return writer; + }; + + /** + * Encodes the specified ButtonsResponseMessage message, length delimited. Does not implicitly {@link proto.ButtonsResponseMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.ButtonsResponseMessage + * @static + * @param {proto.IButtonsResponseMessage} message ButtonsResponseMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ButtonsResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ButtonsResponseMessage message from the specified reader or buffer. + * @function decode + * @memberof proto.ButtonsResponseMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.ButtonsResponseMessage} ButtonsResponseMessage + * @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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.ButtonsResponseMessage(); + 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()); + break; + case 4: + message.type = reader.int32(); + break; + case 2: + message.selectedDisplayText = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ButtonsResponseMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.ButtonsResponseMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.ButtonsResponseMessage} ButtonsResponseMessage + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ButtonsResponseMessage message. + * @function verify + * @memberof proto.ButtonsResponseMessage + * @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) { + 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.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. + * @function fromObject + * @memberof proto.ButtonsResponseMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.ButtonsResponseMessage} ButtonsResponseMessage + */ + ButtonsResponseMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.ButtonsResponseMessage) + return object; + var message = new $root.proto.ButtonsResponseMessage(); + if (object.selectedButtonId != null) + message.selectedButtonId = String(object.selectedButtonId); + if (object.contextInfo != null) { + if (typeof object.contextInfo !== "object") + throw TypeError(".proto.ButtonsResponseMessage.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. + * @function toObject + * @memberof proto.ButtonsResponseMessage + * @static + * @param {proto.ButtonsResponseMessage} message ButtonsResponseMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ButtonsResponseMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.selectedButtonId = ""; + 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.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.ButtonsResponseMessage.ButtonsResponseMessageType[message.type] : message.type; + return object; + }; + + /** + * Converts this ButtonsResponseMessage to JSON. + * @function toJSON + * @memberof proto.ButtonsResponseMessage + * @instance + * @returns {Object.} JSON object + */ + ButtonsResponseMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * ButtonsResponseMessageType enum. + * @name proto.ButtonsResponseMessage.ButtonsResponseMessageType + * @enum {number} + * @property {number} UNKNOWN=0 UNKNOWN value + * @property {number} DISPLAY_TEXT=1 DISPLAY_TEXT value + */ + ButtonsResponseMessage.ButtonsResponseMessageType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN"] = 0; + values[valuesById[1] = "DISPLAY_TEXT"] = 1; + return values; + })(); + + return ButtonsResponseMessage; + })(); + proto.Message = (function() { /** @@ -24894,11 +42860,16 @@ $root.proto = (function() { * @property {proto.ITemplateButtonReplyMessage|null} [templateButtonReplyMessage] Message templateButtonReplyMessage * @property {proto.IProductMessage|null} [productMessage] Message productMessage * @property {proto.IDeviceSentMessage|null} [deviceSentMessage] Message deviceSentMessage + * @property {proto.IMessageContextInfo|null} [messageContextInfo] Message messageContextInfo * @property {proto.IListMessage|null} [listMessage] Message listMessage * @property {proto.IFutureProofMessage|null} [viewOnceMessage] Message viewOnceMessage * @property {proto.IOrderMessage|null} [orderMessage] Message orderMessage * @property {proto.IListResponseMessage|null} [listResponseMessage] Message listResponseMessage * @property {proto.IFutureProofMessage|null} [ephemeralMessage] Message ephemeralMessage + * @property {proto.IInvoiceMessage|null} [invoiceMessage] Message invoiceMessage + * @property {proto.IButtonsMessage|null} [buttonsMessage] Message buttonsMessage + * @property {proto.IButtonsResponseMessage|null} [buttonsResponseMessage] Message buttonsResponseMessage + * @property {proto.IPaymentInviteMessage|null} [paymentInviteMessage] Message paymentInviteMessage */ /** @@ -25124,6 +43095,14 @@ $root.proto = (function() { */ Message.prototype.deviceSentMessage = null; + /** + * Message messageContextInfo. + * @member {proto.IMessageContextInfo|null|undefined} messageContextInfo + * @memberof proto.Message + * @instance + */ + Message.prototype.messageContextInfo = null; + /** * Message listMessage. * @member {proto.IListMessage|null|undefined} listMessage @@ -25164,6 +43143,38 @@ $root.proto = (function() { */ Message.prototype.ephemeralMessage = null; + /** + * Message invoiceMessage. + * @member {proto.IInvoiceMessage|null|undefined} invoiceMessage + * @memberof proto.Message + * @instance + */ + Message.prototype.invoiceMessage = null; + + /** + * Message buttonsMessage. + * @member {proto.IButtonsMessage|null|undefined} buttonsMessage + * @memberof proto.Message + * @instance + */ + Message.prototype.buttonsMessage = null; + + /** + * Message buttonsResponseMessage. + * @member {proto.IButtonsResponseMessage|null|undefined} buttonsResponseMessage + * @memberof proto.Message + * @instance + */ + Message.prototype.buttonsResponseMessage = null; + + /** + * Message paymentInviteMessage. + * @member {proto.IPaymentInviteMessage|null|undefined} paymentInviteMessage + * @memberof proto.Message + * @instance + */ + Message.prototype.paymentInviteMessage = null; + /** * Creates a new Message instance using the specified properties. * @function create @@ -25240,6 +43251,8 @@ $root.proto = (function() { $root.proto.ProductMessage.encode(message.productMessage, writer.uint32(/* id 30, wireType 2 =*/242).fork()).ldelim(); if (message.deviceSentMessage != null && Object.hasOwnProperty.call(message, "deviceSentMessage")) $root.proto.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.ListMessage.encode(message.listMessage, writer.uint32(/* id 36, wireType 2 =*/290).fork()).ldelim(); if (message.viewOnceMessage != null && Object.hasOwnProperty.call(message, "viewOnceMessage")) @@ -25250,6 +43263,14 @@ $root.proto = (function() { $root.proto.ListResponseMessage.encode(message.listResponseMessage, writer.uint32(/* id 39, wireType 2 =*/314).fork()).ldelim(); if (message.ephemeralMessage != null && Object.hasOwnProperty.call(message, "ephemeralMessage")) $root.proto.FutureProofMessage.encode(message.ephemeralMessage, writer.uint32(/* id 40, wireType 2 =*/322).fork()).ldelim(); + if (message.invoiceMessage != null && Object.hasOwnProperty.call(message, "invoiceMessage")) + $root.proto.InvoiceMessage.encode(message.invoiceMessage, writer.uint32(/* id 41, wireType 2 =*/330).fork()).ldelim(); + if (message.buttonsMessage != null && Object.hasOwnProperty.call(message, "buttonsMessage")) + $root.proto.ButtonsMessage.encode(message.buttonsMessage, writer.uint32(/* id 42, wireType 2 =*/338).fork()).ldelim(); + if (message.buttonsResponseMessage != null && Object.hasOwnProperty.call(message, "buttonsResponseMessage")) + $root.proto.ButtonsResponseMessage.encode(message.buttonsResponseMessage, writer.uint32(/* id 43, wireType 2 =*/346).fork()).ldelim(); + if (message.paymentInviteMessage != null && Object.hasOwnProperty.call(message, "paymentInviteMessage")) + $root.proto.PaymentInviteMessage.encode(message.paymentInviteMessage, writer.uint32(/* id 44, wireType 2 =*/354).fork()).ldelim(); return writer; }; @@ -25362,6 +43383,9 @@ $root.proto = (function() { case 31: message.deviceSentMessage = $root.proto.DeviceSentMessage.decode(reader, reader.uint32()); break; + case 35: + message.messageContextInfo = $root.proto.MessageContextInfo.decode(reader, reader.uint32()); + break; case 36: message.listMessage = $root.proto.ListMessage.decode(reader, reader.uint32()); break; @@ -25377,6 +43401,18 @@ $root.proto = (function() { case 40: message.ephemeralMessage = $root.proto.FutureProofMessage.decode(reader, reader.uint32()); break; + case 41: + message.invoiceMessage = $root.proto.InvoiceMessage.decode(reader, reader.uint32()); + break; + case 42: + message.buttonsMessage = $root.proto.ButtonsMessage.decode(reader, reader.uint32()); + break; + case 43: + message.buttonsResponseMessage = $root.proto.ButtonsResponseMessage.decode(reader, reader.uint32()); + break; + case 44: + message.paymentInviteMessage = $root.proto.PaymentInviteMessage.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -25540,6 +43576,11 @@ $root.proto = (function() { 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.ListMessage.verify(message.listMessage); if (error) @@ -25565,6 +43606,26 @@ $root.proto = (function() { if (error) return "ephemeralMessage." + error; } + if (message.invoiceMessage != null && message.hasOwnProperty("invoiceMessage")) { + var error = $root.proto.InvoiceMessage.verify(message.invoiceMessage); + if (error) + return "invoiceMessage." + error; + } + if (message.buttonsMessage != null && message.hasOwnProperty("buttonsMessage")) { + var error = $root.proto.ButtonsMessage.verify(message.buttonsMessage); + if (error) + return "buttonsMessage." + error; + } + if (message.buttonsResponseMessage != null && message.hasOwnProperty("buttonsResponseMessage")) { + var error = $root.proto.ButtonsResponseMessage.verify(message.buttonsResponseMessage); + if (error) + return "buttonsResponseMessage." + error; + } + if (message.paymentInviteMessage != null && message.hasOwnProperty("paymentInviteMessage")) { + var error = $root.proto.PaymentInviteMessage.verify(message.paymentInviteMessage); + if (error) + return "paymentInviteMessage." + error; + } return null; }; @@ -25707,6 +43768,11 @@ $root.proto = (function() { throw TypeError(".proto.Message.deviceSentMessage: object expected"); message.deviceSentMessage = $root.proto.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"); @@ -25732,6 +43798,26 @@ $root.proto = (function() { throw TypeError(".proto.Message.ephemeralMessage: object expected"); message.ephemeralMessage = $root.proto.FutureProofMessage.fromObject(object.ephemeralMessage); } + if (object.invoiceMessage != null) { + if (typeof object.invoiceMessage !== "object") + throw TypeError(".proto.Message.invoiceMessage: object expected"); + message.invoiceMessage = $root.proto.InvoiceMessage.fromObject(object.invoiceMessage); + } + if (object.buttonsMessage != null) { + if (typeof object.buttonsMessage !== "object") + throw TypeError(".proto.Message.buttonsMessage: object expected"); + message.buttonsMessage = $root.proto.ButtonsMessage.fromObject(object.buttonsMessage); + } + if (object.buttonsResponseMessage != null) { + if (typeof object.buttonsResponseMessage !== "object") + throw TypeError(".proto.Message.buttonsResponseMessage: object expected"); + message.buttonsResponseMessage = $root.proto.ButtonsResponseMessage.fromObject(object.buttonsResponseMessage); + } + if (object.paymentInviteMessage != null) { + if (typeof object.paymentInviteMessage !== "object") + throw TypeError(".proto.Message.paymentInviteMessage: object expected"); + message.paymentInviteMessage = $root.proto.PaymentInviteMessage.fromObject(object.paymentInviteMessage); + } return message; }; @@ -25775,11 +43861,16 @@ $root.proto = (function() { 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; } if (message.conversation != null && message.hasOwnProperty("conversation")) object.conversation = message.conversation; @@ -25833,6 +43924,8 @@ $root.proto = (function() { object.productMessage = $root.proto.ProductMessage.toObject(message.productMessage, options); if (message.deviceSentMessage != null && message.hasOwnProperty("deviceSentMessage")) object.deviceSentMessage = $root.proto.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.ListMessage.toObject(message.listMessage, options); if (message.viewOnceMessage != null && message.hasOwnProperty("viewOnceMessage")) @@ -25843,6 +43936,14 @@ $root.proto = (function() { object.listResponseMessage = $root.proto.ListResponseMessage.toObject(message.listResponseMessage, options); if (message.ephemeralMessage != null && message.hasOwnProperty("ephemeralMessage")) object.ephemeralMessage = $root.proto.FutureProofMessage.toObject(message.ephemeralMessage, options); + if (message.invoiceMessage != null && message.hasOwnProperty("invoiceMessage")) + object.invoiceMessage = $root.proto.InvoiceMessage.toObject(message.invoiceMessage, options); + if (message.buttonsMessage != null && message.hasOwnProperty("buttonsMessage")) + object.buttonsMessage = $root.proto.ButtonsMessage.toObject(message.buttonsMessage, options); + if (message.buttonsResponseMessage != null && message.hasOwnProperty("buttonsResponseMessage")) + object.buttonsResponseMessage = $root.proto.ButtonsResponseMessage.toObject(message.buttonsResponseMessage, options); + if (message.paymentInviteMessage != null && message.hasOwnProperty("paymentInviteMessage")) + object.paymentInviteMessage = $root.proto.PaymentInviteMessage.toObject(message.paymentInviteMessage, options); return object; }; @@ -25860,6 +43961,1654 @@ $root.proto = (function() { return Message; })(); + proto.CompanionProps = (function() { + + /** + * Properties of a CompanionProps. + * @memberof proto + * @interface ICompanionProps + * @property {string|null} [os] CompanionProps os + * @property {proto.IAppVersion|null} [version] CompanionProps version + * @property {proto.CompanionProps.CompanionPropsPlatformType|null} [platformType] CompanionProps platformType + * @property {boolean|null} [requireFullSync] CompanionProps requireFullSync + */ + + /** + * Constructs a new CompanionProps. + * @memberof proto + * @classdesc Represents a CompanionProps. + * @implements ICompanionProps + * @constructor + * @param {proto.ICompanionProps=} [properties] Properties to set + */ + function CompanionProps(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]]; + } + + /** + * CompanionProps os. + * @member {string} os + * @memberof proto.CompanionProps + * @instance + */ + CompanionProps.prototype.os = ""; + + /** + * CompanionProps version. + * @member {proto.IAppVersion|null|undefined} version + * @memberof proto.CompanionProps + * @instance + */ + CompanionProps.prototype.version = null; + + /** + * CompanionProps platformType. + * @member {proto.CompanionProps.CompanionPropsPlatformType} platformType + * @memberof proto.CompanionProps + * @instance + */ + CompanionProps.prototype.platformType = 0; + + /** + * CompanionProps requireFullSync. + * @member {boolean} requireFullSync + * @memberof proto.CompanionProps + * @instance + */ + CompanionProps.prototype.requireFullSync = false; + + /** + * Creates a new CompanionProps instance using the specified properties. + * @function create + * @memberof proto.CompanionProps + * @static + * @param {proto.ICompanionProps=} [properties] Properties to set + * @returns {proto.CompanionProps} CompanionProps instance + */ + CompanionProps.create = function create(properties) { + return new CompanionProps(properties); + }; + + /** + * Encodes the specified CompanionProps message. Does not implicitly {@link proto.CompanionProps.verify|verify} messages. + * @function encode + * @memberof proto.CompanionProps + * @static + * @param {proto.ICompanionProps} message CompanionProps message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompanionProps.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.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); + return writer; + }; + + /** + * Encodes the specified CompanionProps message, length delimited. Does not implicitly {@link proto.CompanionProps.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.CompanionProps + * @static + * @param {proto.ICompanionProps} message CompanionProps message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompanionProps.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CompanionProps message from the specified reader or buffer. + * @function decode + * @memberof proto.CompanionProps + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.CompanionProps} CompanionProps + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompanionProps.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.CompanionProps(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.os = reader.string(); + break; + case 2: + message.version = $root.proto.AppVersion.decode(reader, reader.uint32()); + break; + case 3: + message.platformType = reader.int32(); + break; + case 4: + message.requireFullSync = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CompanionProps message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.CompanionProps + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.CompanionProps} CompanionProps + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompanionProps.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CompanionProps message. + * @function verify + * @memberof proto.CompanionProps + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CompanionProps.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.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: + break; + } + if (message.requireFullSync != null && message.hasOwnProperty("requireFullSync")) + if (typeof message.requireFullSync !== "boolean") + return "requireFullSync: boolean expected"; + return null; + }; + + /** + * Creates a CompanionProps message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.CompanionProps + * @static + * @param {Object.} object Plain object + * @returns {proto.CompanionProps} CompanionProps + */ + CompanionProps.fromObject = function fromObject(object) { + if (object instanceof $root.proto.CompanionProps) + return object; + var message = new $root.proto.CompanionProps(); + if (object.os != null) + message.os = String(object.os); + if (object.version != null) { + if (typeof object.version !== "object") + throw TypeError(".proto.CompanionProps.version: object expected"); + message.version = $root.proto.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; + } + if (object.requireFullSync != null) + message.requireFullSync = Boolean(object.requireFullSync); + return message; + }; + + /** + * Creates a plain object from a CompanionProps message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.CompanionProps + * @static + * @param {proto.CompanionProps} message CompanionProps + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CompanionProps.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; + } + if (message.os != null && message.hasOwnProperty("os")) + object.os = message.os; + if (message.version != null && message.hasOwnProperty("version")) + object.version = $root.proto.AppVersion.toObject(message.version, options); + if (message.platformType != null && message.hasOwnProperty("platformType")) + object.platformType = options.enums === String ? $root.proto.CompanionProps.CompanionPropsPlatformType[message.platformType] : message.platformType; + if (message.requireFullSync != null && message.hasOwnProperty("requireFullSync")) + object.requireFullSync = message.requireFullSync; + return object; + }; + + /** + * Converts this CompanionProps to JSON. + * @function toJSON + * @memberof proto.CompanionProps + * @instance + * @returns {Object.} JSON object + */ + CompanionProps.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * CompanionPropsPlatformType enum. + * @name proto.CompanionProps.CompanionPropsPlatformType + * @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 + */ + CompanionProps.CompanionPropsPlatformType = (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; + return values; + })(); + + return CompanionProps; + })(); + + proto.ADVSignedDeviceIdentityHMAC = (function() { + + /** + * Properties of a ADVSignedDeviceIdentityHMAC. + * @memberof proto + * @interface IADVSignedDeviceIdentityHMAC + * @property {Uint8Array|null} [details] ADVSignedDeviceIdentityHMAC details + * @property {Uint8Array|null} [hmac] ADVSignedDeviceIdentityHMAC hmac + */ + + /** + * Constructs a new ADVSignedDeviceIdentityHMAC. + * @memberof proto + * @classdesc Represents a ADVSignedDeviceIdentityHMAC. + * @implements IADVSignedDeviceIdentityHMAC + * @constructor + * @param {proto.IADVSignedDeviceIdentityHMAC=} [properties] Properties to set + */ + function ADVSignedDeviceIdentityHMAC(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]]; + } + + /** + * ADVSignedDeviceIdentityHMAC details. + * @member {Uint8Array} details + * @memberof proto.ADVSignedDeviceIdentityHMAC + * @instance + */ + ADVSignedDeviceIdentityHMAC.prototype.details = $util.newBuffer([]); + + /** + * ADVSignedDeviceIdentityHMAC hmac. + * @member {Uint8Array} hmac + * @memberof proto.ADVSignedDeviceIdentityHMAC + * @instance + */ + ADVSignedDeviceIdentityHMAC.prototype.hmac = $util.newBuffer([]); + + /** + * Creates a new ADVSignedDeviceIdentityHMAC instance using the specified properties. + * @function create + * @memberof proto.ADVSignedDeviceIdentityHMAC + * @static + * @param {proto.IADVSignedDeviceIdentityHMAC=} [properties] Properties to set + * @returns {proto.ADVSignedDeviceIdentityHMAC} ADVSignedDeviceIdentityHMAC instance + */ + ADVSignedDeviceIdentityHMAC.create = function create(properties) { + return new ADVSignedDeviceIdentityHMAC(properties); + }; + + /** + * Encodes the specified ADVSignedDeviceIdentityHMAC message. Does not implicitly {@link proto.ADVSignedDeviceIdentityHMAC.verify|verify} messages. + * @function encode + * @memberof proto.ADVSignedDeviceIdentityHMAC + * @static + * @param {proto.IADVSignedDeviceIdentityHMAC} message ADVSignedDeviceIdentityHMAC message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ADVSignedDeviceIdentityHMAC.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.hmac != null && Object.hasOwnProperty.call(message, "hmac")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.hmac); + return writer; + }; + + /** + * Encodes the specified ADVSignedDeviceIdentityHMAC message, length delimited. Does not implicitly {@link proto.ADVSignedDeviceIdentityHMAC.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.ADVSignedDeviceIdentityHMAC + * @static + * @param {proto.IADVSignedDeviceIdentityHMAC} message ADVSignedDeviceIdentityHMAC message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ADVSignedDeviceIdentityHMAC.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ADVSignedDeviceIdentityHMAC message from the specified reader or buffer. + * @function decode + * @memberof proto.ADVSignedDeviceIdentityHMAC + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.ADVSignedDeviceIdentityHMAC} ADVSignedDeviceIdentityHMAC + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ADVSignedDeviceIdentityHMAC.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.ADVSignedDeviceIdentityHMAC(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.details = reader.bytes(); + break; + case 2: + message.hmac = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ADVSignedDeviceIdentityHMAC message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.ADVSignedDeviceIdentityHMAC + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.ADVSignedDeviceIdentityHMAC} ADVSignedDeviceIdentityHMAC + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ADVSignedDeviceIdentityHMAC.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ADVSignedDeviceIdentityHMAC message. + * @function verify + * @memberof proto.ADVSignedDeviceIdentityHMAC + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ADVSignedDeviceIdentityHMAC.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.hmac != null && message.hasOwnProperty("hmac")) + if (!(message.hmac && typeof message.hmac.length === "number" || $util.isString(message.hmac))) + return "hmac: buffer expected"; + return null; + }; + + /** + * Creates a ADVSignedDeviceIdentityHMAC message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.ADVSignedDeviceIdentityHMAC + * @static + * @param {Object.} object Plain object + * @returns {proto.ADVSignedDeviceIdentityHMAC} ADVSignedDeviceIdentityHMAC + */ + ADVSignedDeviceIdentityHMAC.fromObject = function fromObject(object) { + if (object instanceof $root.proto.ADVSignedDeviceIdentityHMAC) + return object; + var message = new $root.proto.ADVSignedDeviceIdentityHMAC(); + 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.hmac != null) + if (typeof object.hmac === "string") + $util.base64.decode(object.hmac, message.hmac = $util.newBuffer($util.base64.length(object.hmac)), 0); + else if (object.hmac.length) + message.hmac = object.hmac; + return message; + }; + + /** + * Creates a plain object from a ADVSignedDeviceIdentityHMAC message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.ADVSignedDeviceIdentityHMAC + * @static + * @param {proto.ADVSignedDeviceIdentityHMAC} message ADVSignedDeviceIdentityHMAC + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ADVSignedDeviceIdentityHMAC.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.hmac = ""; + else { + object.hmac = []; + if (options.bytes !== Array) + object.hmac = $util.newBuffer(object.hmac); + } + } + 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; + return object; + }; + + /** + * Converts this ADVSignedDeviceIdentityHMAC to JSON. + * @function toJSON + * @memberof proto.ADVSignedDeviceIdentityHMAC + * @instance + * @returns {Object.} JSON object + */ + ADVSignedDeviceIdentityHMAC.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ADVSignedDeviceIdentityHMAC; + })(); + + proto.ADVSignedDeviceIdentity = (function() { + + /** + * Properties of a ADVSignedDeviceIdentity. + * @memberof proto + * @interface IADVSignedDeviceIdentity + * @property {Uint8Array|null} [details] ADVSignedDeviceIdentity details + * @property {Uint8Array|null} [accountSignatureKey] ADVSignedDeviceIdentity accountSignatureKey + * @property {Uint8Array|null} [accountSignature] ADVSignedDeviceIdentity accountSignature + * @property {Uint8Array|null} [deviceSignature] ADVSignedDeviceIdentity deviceSignature + */ + + /** + * Constructs a new ADVSignedDeviceIdentity. + * @memberof proto + * @classdesc Represents a ADVSignedDeviceIdentity. + * @implements IADVSignedDeviceIdentity + * @constructor + * @param {proto.IADVSignedDeviceIdentity=} [properties] Properties to set + */ + function ADVSignedDeviceIdentity(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]]; + } + + /** + * ADVSignedDeviceIdentity details. + * @member {Uint8Array} details + * @memberof proto.ADVSignedDeviceIdentity + * @instance + */ + ADVSignedDeviceIdentity.prototype.details = $util.newBuffer([]); + + /** + * ADVSignedDeviceIdentity accountSignatureKey. + * @member {Uint8Array} accountSignatureKey + * @memberof proto.ADVSignedDeviceIdentity + * @instance + */ + ADVSignedDeviceIdentity.prototype.accountSignatureKey = $util.newBuffer([]); + + /** + * ADVSignedDeviceIdentity accountSignature. + * @member {Uint8Array} accountSignature + * @memberof proto.ADVSignedDeviceIdentity + * @instance + */ + ADVSignedDeviceIdentity.prototype.accountSignature = $util.newBuffer([]); + + /** + * ADVSignedDeviceIdentity deviceSignature. + * @member {Uint8Array} deviceSignature + * @memberof proto.ADVSignedDeviceIdentity + * @instance + */ + ADVSignedDeviceIdentity.prototype.deviceSignature = $util.newBuffer([]); + + /** + * Creates a new ADVSignedDeviceIdentity instance using the specified properties. + * @function create + * @memberof proto.ADVSignedDeviceIdentity + * @static + * @param {proto.IADVSignedDeviceIdentity=} [properties] Properties to set + * @returns {proto.ADVSignedDeviceIdentity} ADVSignedDeviceIdentity instance + */ + ADVSignedDeviceIdentity.create = function create(properties) { + return new ADVSignedDeviceIdentity(properties); + }; + + /** + * Encodes the specified ADVSignedDeviceIdentity message. Does not implicitly {@link proto.ADVSignedDeviceIdentity.verify|verify} messages. + * @function encode + * @memberof proto.ADVSignedDeviceIdentity + * @static + * @param {proto.IADVSignedDeviceIdentity} message ADVSignedDeviceIdentity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ADVSignedDeviceIdentity.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.accountSignatureKey != null && Object.hasOwnProperty.call(message, "accountSignatureKey")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.accountSignatureKey); + if (message.accountSignature != null && Object.hasOwnProperty.call(message, "accountSignature")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.accountSignature); + if (message.deviceSignature != null && Object.hasOwnProperty.call(message, "deviceSignature")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.deviceSignature); + return writer; + }; + + /** + * Encodes the specified ADVSignedDeviceIdentity message, length delimited. Does not implicitly {@link proto.ADVSignedDeviceIdentity.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.ADVSignedDeviceIdentity + * @static + * @param {proto.IADVSignedDeviceIdentity} message ADVSignedDeviceIdentity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ADVSignedDeviceIdentity.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ADVSignedDeviceIdentity message from the specified reader or buffer. + * @function decode + * @memberof proto.ADVSignedDeviceIdentity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.ADVSignedDeviceIdentity} ADVSignedDeviceIdentity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ADVSignedDeviceIdentity.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.ADVSignedDeviceIdentity(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.details = reader.bytes(); + break; + case 2: + message.accountSignatureKey = reader.bytes(); + break; + case 3: + message.accountSignature = reader.bytes(); + break; + case 4: + message.deviceSignature = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ADVSignedDeviceIdentity message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.ADVSignedDeviceIdentity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.ADVSignedDeviceIdentity} ADVSignedDeviceIdentity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ADVSignedDeviceIdentity.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ADVSignedDeviceIdentity message. + * @function verify + * @memberof proto.ADVSignedDeviceIdentity + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ADVSignedDeviceIdentity.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.accountSignatureKey != null && message.hasOwnProperty("accountSignatureKey")) + if (!(message.accountSignatureKey && typeof message.accountSignatureKey.length === "number" || $util.isString(message.accountSignatureKey))) + return "accountSignatureKey: buffer expected"; + 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.deviceSignature != null && message.hasOwnProperty("deviceSignature")) + if (!(message.deviceSignature && typeof message.deviceSignature.length === "number" || $util.isString(message.deviceSignature))) + return "deviceSignature: buffer expected"; + return null; + }; + + /** + * Creates a ADVSignedDeviceIdentity message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.ADVSignedDeviceIdentity + * @static + * @param {Object.} object Plain object + * @returns {proto.ADVSignedDeviceIdentity} ADVSignedDeviceIdentity + */ + ADVSignedDeviceIdentity.fromObject = function fromObject(object) { + if (object instanceof $root.proto.ADVSignedDeviceIdentity) + return object; + var message = new $root.proto.ADVSignedDeviceIdentity(); + 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.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; + if (object.accountSignature != null) + if (typeof object.accountSignature === "string") + $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.deviceSignature != null) + if (typeof object.deviceSignature === "string") + $util.base64.decode(object.deviceSignature, message.deviceSignature = $util.newBuffer($util.base64.length(object.deviceSignature)), 0); + else if (object.deviceSignature.length) + message.deviceSignature = object.deviceSignature; + return message; + }; + + /** + * Creates a plain object from a ADVSignedDeviceIdentity message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.ADVSignedDeviceIdentity + * @static + * @param {proto.ADVSignedDeviceIdentity} message ADVSignedDeviceIdentity + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ADVSignedDeviceIdentity.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.accountSignatureKey = ""; + else { + object.accountSignatureKey = []; + if (options.bytes !== Array) + object.accountSignatureKey = $util.newBuffer(object.accountSignatureKey); + } + if (options.bytes === String) + object.accountSignature = ""; + else { + object.accountSignature = []; + if (options.bytes !== Array) + object.accountSignature = $util.newBuffer(object.accountSignature); + } + if (options.bytes === String) + object.deviceSignature = ""; + else { + object.deviceSignature = []; + if (options.bytes !== Array) + object.deviceSignature = $util.newBuffer(object.deviceSignature); + } + } + 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.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; + 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.deviceSignature != null && message.hasOwnProperty("deviceSignature")) + object.deviceSignature = options.bytes === String ? $util.base64.encode(message.deviceSignature, 0, message.deviceSignature.length) : options.bytes === Array ? Array.prototype.slice.call(message.deviceSignature) : message.deviceSignature; + return object; + }; + + /** + * Converts this ADVSignedDeviceIdentity to JSON. + * @function toJSON + * @memberof proto.ADVSignedDeviceIdentity + * @instance + * @returns {Object.} JSON object + */ + ADVSignedDeviceIdentity.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ADVSignedDeviceIdentity; + })(); + + proto.ADVDeviceIdentity = (function() { + + /** + * Properties of a ADVDeviceIdentity. + * @memberof proto + * @interface IADVDeviceIdentity + * @property {number|null} [rawId] ADVDeviceIdentity rawId + * @property {number|Long|null} [timestamp] ADVDeviceIdentity timestamp + * @property {number|null} [keyIndex] ADVDeviceIdentity keyIndex + */ + + /** + * Constructs a new ADVDeviceIdentity. + * @memberof proto + * @classdesc Represents a ADVDeviceIdentity. + * @implements IADVDeviceIdentity + * @constructor + * @param {proto.IADVDeviceIdentity=} [properties] Properties to set + */ + function ADVDeviceIdentity(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]]; + } + + /** + * ADVDeviceIdentity rawId. + * @member {number} rawId + * @memberof proto.ADVDeviceIdentity + * @instance + */ + ADVDeviceIdentity.prototype.rawId = 0; + + /** + * ADVDeviceIdentity timestamp. + * @member {number|Long} timestamp + * @memberof proto.ADVDeviceIdentity + * @instance + */ + ADVDeviceIdentity.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * ADVDeviceIdentity keyIndex. + * @member {number} keyIndex + * @memberof proto.ADVDeviceIdentity + * @instance + */ + ADVDeviceIdentity.prototype.keyIndex = 0; + + /** + * Creates a new ADVDeviceIdentity instance using the specified properties. + * @function create + * @memberof proto.ADVDeviceIdentity + * @static + * @param {proto.IADVDeviceIdentity=} [properties] Properties to set + * @returns {proto.ADVDeviceIdentity} ADVDeviceIdentity instance + */ + ADVDeviceIdentity.create = function create(properties) { + return new ADVDeviceIdentity(properties); + }; + + /** + * Encodes the specified ADVDeviceIdentity message. Does not implicitly {@link proto.ADVDeviceIdentity.verify|verify} messages. + * @function encode + * @memberof proto.ADVDeviceIdentity + * @static + * @param {proto.IADVDeviceIdentity} message ADVDeviceIdentity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ADVDeviceIdentity.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.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.timestamp); + if (message.keyIndex != null && Object.hasOwnProperty.call(message, "keyIndex")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.keyIndex); + return writer; + }; + + /** + * Encodes the specified ADVDeviceIdentity message, length delimited. Does not implicitly {@link proto.ADVDeviceIdentity.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.ADVDeviceIdentity + * @static + * @param {proto.IADVDeviceIdentity} message ADVDeviceIdentity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ADVDeviceIdentity.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ADVDeviceIdentity message from the specified reader or buffer. + * @function decode + * @memberof proto.ADVDeviceIdentity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.ADVDeviceIdentity} ADVDeviceIdentity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ADVDeviceIdentity.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.ADVDeviceIdentity(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.rawId = reader.uint32(); + break; + case 2: + message.timestamp = reader.uint64(); + break; + case 3: + message.keyIndex = reader.uint32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ADVDeviceIdentity message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.ADVDeviceIdentity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.ADVDeviceIdentity} ADVDeviceIdentity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ADVDeviceIdentity.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ADVDeviceIdentity message. + * @function verify + * @memberof proto.ADVDeviceIdentity + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ADVDeviceIdentity.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.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.keyIndex != null && message.hasOwnProperty("keyIndex")) + if (!$util.isInteger(message.keyIndex)) + return "keyIndex: integer expected"; + return null; + }; + + /** + * Creates a ADVDeviceIdentity message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.ADVDeviceIdentity + * @static + * @param {Object.} object Plain object + * @returns {proto.ADVDeviceIdentity} ADVDeviceIdentity + */ + ADVDeviceIdentity.fromObject = function fromObject(object) { + if (object instanceof $root.proto.ADVDeviceIdentity) + return object; + var message = new $root.proto.ADVDeviceIdentity(); + if (object.rawId != null) + message.rawId = object.rawId >>> 0; + if (object.timestamp != null) + if ($util.Long) + (message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = true; + 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(true); + if (object.keyIndex != null) + message.keyIndex = object.keyIndex >>> 0; + return message; + }; + + /** + * Creates a plain object from a ADVDeviceIdentity message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.ADVDeviceIdentity + * @static + * @param {proto.ADVDeviceIdentity} message ADVDeviceIdentity + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ADVDeviceIdentity.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.rawId = 0; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.timestamp = options.longs === String ? "0" : 0; + object.keyIndex = 0; + } + if (message.rawId != null && message.hasOwnProperty("rawId")) + object.rawId = message.rawId; + 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(true) : message.timestamp; + if (message.keyIndex != null && message.hasOwnProperty("keyIndex")) + object.keyIndex = message.keyIndex; + return object; + }; + + /** + * Converts this ADVDeviceIdentity to JSON. + * @function toJSON + * @memberof proto.ADVDeviceIdentity + * @instance + * @returns {Object.} JSON object + */ + ADVDeviceIdentity.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ADVDeviceIdentity; + })(); + + proto.ADVSignedKeyIndexList = (function() { + + /** + * Properties of a ADVSignedKeyIndexList. + * @memberof proto + * @interface IADVSignedKeyIndexList + * @property {Uint8Array|null} [details] ADVSignedKeyIndexList details + * @property {Uint8Array|null} [accountSignature] ADVSignedKeyIndexList accountSignature + */ + + /** + * Constructs a new ADVSignedKeyIndexList. + * @memberof proto + * @classdesc Represents a ADVSignedKeyIndexList. + * @implements IADVSignedKeyIndexList + * @constructor + * @param {proto.IADVSignedKeyIndexList=} [properties] Properties to set + */ + function ADVSignedKeyIndexList(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]]; + } + + /** + * ADVSignedKeyIndexList details. + * @member {Uint8Array} details + * @memberof proto.ADVSignedKeyIndexList + * @instance + */ + ADVSignedKeyIndexList.prototype.details = $util.newBuffer([]); + + /** + * ADVSignedKeyIndexList accountSignature. + * @member {Uint8Array} accountSignature + * @memberof proto.ADVSignedKeyIndexList + * @instance + */ + ADVSignedKeyIndexList.prototype.accountSignature = $util.newBuffer([]); + + /** + * Creates a new ADVSignedKeyIndexList instance using the specified properties. + * @function create + * @memberof proto.ADVSignedKeyIndexList + * @static + * @param {proto.IADVSignedKeyIndexList=} [properties] Properties to set + * @returns {proto.ADVSignedKeyIndexList} ADVSignedKeyIndexList instance + */ + ADVSignedKeyIndexList.create = function create(properties) { + return new ADVSignedKeyIndexList(properties); + }; + + /** + * Encodes the specified ADVSignedKeyIndexList message. Does not implicitly {@link proto.ADVSignedKeyIndexList.verify|verify} messages. + * @function encode + * @memberof proto.ADVSignedKeyIndexList + * @static + * @param {proto.IADVSignedKeyIndexList} message ADVSignedKeyIndexList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ADVSignedKeyIndexList.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.accountSignature != null && Object.hasOwnProperty.call(message, "accountSignature")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.accountSignature); + return writer; + }; + + /** + * Encodes the specified ADVSignedKeyIndexList message, length delimited. Does not implicitly {@link proto.ADVSignedKeyIndexList.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.ADVSignedKeyIndexList + * @static + * @param {proto.IADVSignedKeyIndexList} message ADVSignedKeyIndexList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ADVSignedKeyIndexList.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ADVSignedKeyIndexList message from the specified reader or buffer. + * @function decode + * @memberof proto.ADVSignedKeyIndexList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.ADVSignedKeyIndexList} ADVSignedKeyIndexList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ADVSignedKeyIndexList.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.ADVSignedKeyIndexList(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.details = reader.bytes(); + break; + case 2: + message.accountSignature = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ADVSignedKeyIndexList message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.ADVSignedKeyIndexList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.ADVSignedKeyIndexList} ADVSignedKeyIndexList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ADVSignedKeyIndexList.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ADVSignedKeyIndexList message. + * @function verify + * @memberof proto.ADVSignedKeyIndexList + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ADVSignedKeyIndexList.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.accountSignature != null && message.hasOwnProperty("accountSignature")) + if (!(message.accountSignature && typeof message.accountSignature.length === "number" || $util.isString(message.accountSignature))) + return "accountSignature: buffer expected"; + return null; + }; + + /** + * Creates a ADVSignedKeyIndexList message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.ADVSignedKeyIndexList + * @static + * @param {Object.} object Plain object + * @returns {proto.ADVSignedKeyIndexList} ADVSignedKeyIndexList + */ + ADVSignedKeyIndexList.fromObject = function fromObject(object) { + if (object instanceof $root.proto.ADVSignedKeyIndexList) + return object; + var message = new $root.proto.ADVSignedKeyIndexList(); + 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.accountSignature != null) + if (typeof object.accountSignature === "string") + $util.base64.decode(object.accountSignature, message.accountSignature = $util.newBuffer($util.base64.length(object.accountSignature)), 0); + else if (object.accountSignature.length) + message.accountSignature = object.accountSignature; + return message; + }; + + /** + * Creates a plain object from a ADVSignedKeyIndexList message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.ADVSignedKeyIndexList + * @static + * @param {proto.ADVSignedKeyIndexList} message ADVSignedKeyIndexList + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ADVSignedKeyIndexList.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.accountSignature = ""; + else { + object.accountSignature = []; + if (options.bytes !== Array) + object.accountSignature = $util.newBuffer(object.accountSignature); + } + } + 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; + return object; + }; + + /** + * Converts this ADVSignedKeyIndexList to JSON. + * @function toJSON + * @memberof proto.ADVSignedKeyIndexList + * @instance + * @returns {Object.} JSON object + */ + ADVSignedKeyIndexList.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ADVSignedKeyIndexList; + })(); + + proto.ADVKeyIndexList = (function() { + + /** + * Properties of a ADVKeyIndexList. + * @memberof proto + * @interface IADVKeyIndexList + * @property {number|null} [rawId] ADVKeyIndexList rawId + * @property {number|Long|null} [timestamp] ADVKeyIndexList timestamp + * @property {number|null} [currentIndex] ADVKeyIndexList currentIndex + * @property {Array.|null} [validIndexes] ADVKeyIndexList validIndexes + */ + + /** + * Constructs a new ADVKeyIndexList. + * @memberof proto + * @classdesc Represents a ADVKeyIndexList. + * @implements IADVKeyIndexList + * @constructor + * @param {proto.IADVKeyIndexList=} [properties] Properties to set + */ + function ADVKeyIndexList(properties) { + this.validIndexes = []; + 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]]; + } + + /** + * ADVKeyIndexList rawId. + * @member {number} rawId + * @memberof proto.ADVKeyIndexList + * @instance + */ + ADVKeyIndexList.prototype.rawId = 0; + + /** + * ADVKeyIndexList timestamp. + * @member {number|Long} timestamp + * @memberof proto.ADVKeyIndexList + * @instance + */ + ADVKeyIndexList.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * ADVKeyIndexList currentIndex. + * @member {number} currentIndex + * @memberof proto.ADVKeyIndexList + * @instance + */ + ADVKeyIndexList.prototype.currentIndex = 0; + + /** + * ADVKeyIndexList validIndexes. + * @member {Array.} validIndexes + * @memberof proto.ADVKeyIndexList + * @instance + */ + ADVKeyIndexList.prototype.validIndexes = $util.emptyArray; + + /** + * Creates a new ADVKeyIndexList instance using the specified properties. + * @function create + * @memberof proto.ADVKeyIndexList + * @static + * @param {proto.IADVKeyIndexList=} [properties] Properties to set + * @returns {proto.ADVKeyIndexList} ADVKeyIndexList instance + */ + ADVKeyIndexList.create = function create(properties) { + return new ADVKeyIndexList(properties); + }; + + /** + * Encodes the specified ADVKeyIndexList message. Does not implicitly {@link proto.ADVKeyIndexList.verify|verify} messages. + * @function encode + * @memberof proto.ADVKeyIndexList + * @static + * @param {proto.IADVKeyIndexList} message ADVKeyIndexList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ADVKeyIndexList.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.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.timestamp); + if (message.currentIndex != null && Object.hasOwnProperty.call(message, "currentIndex")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.currentIndex); + if (message.validIndexes != null && message.validIndexes.length) { + writer.uint32(/* id 4, wireType 2 =*/34).fork(); + for (var i = 0; i < message.validIndexes.length; ++i) + writer.uint32(message.validIndexes[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified ADVKeyIndexList message, length delimited. Does not implicitly {@link proto.ADVKeyIndexList.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.ADVKeyIndexList + * @static + * @param {proto.IADVKeyIndexList} message ADVKeyIndexList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ADVKeyIndexList.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ADVKeyIndexList message from the specified reader or buffer. + * @function decode + * @memberof proto.ADVKeyIndexList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.ADVKeyIndexList} ADVKeyIndexList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ADVKeyIndexList.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.ADVKeyIndexList(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.rawId = reader.uint32(); + break; + case 2: + message.timestamp = reader.uint64(); + break; + case 3: + message.currentIndex = reader.uint32(); + break; + case 4: + if (!(message.validIndexes && message.validIndexes.length)) + message.validIndexes = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.validIndexes.push(reader.uint32()); + } else + message.validIndexes.push(reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ADVKeyIndexList message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.ADVKeyIndexList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.ADVKeyIndexList} ADVKeyIndexList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ADVKeyIndexList.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ADVKeyIndexList message. + * @function verify + * @memberof proto.ADVKeyIndexList + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ADVKeyIndexList.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.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.currentIndex != null && message.hasOwnProperty("currentIndex")) + if (!$util.isInteger(message.currentIndex)) + return "currentIndex: integer expected"; + if (message.validIndexes != null && message.hasOwnProperty("validIndexes")) { + if (!Array.isArray(message.validIndexes)) + return "validIndexes: array expected"; + for (var i = 0; i < message.validIndexes.length; ++i) + if (!$util.isInteger(message.validIndexes[i])) + return "validIndexes: integer[] expected"; + } + return null; + }; + + /** + * Creates a ADVKeyIndexList message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.ADVKeyIndexList + * @static + * @param {Object.} object Plain object + * @returns {proto.ADVKeyIndexList} ADVKeyIndexList + */ + ADVKeyIndexList.fromObject = function fromObject(object) { + if (object instanceof $root.proto.ADVKeyIndexList) + return object; + var message = new $root.proto.ADVKeyIndexList(); + if (object.rawId != null) + message.rawId = object.rawId >>> 0; + if (object.timestamp != null) + if ($util.Long) + (message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = true; + 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(true); + if (object.currentIndex != null) + message.currentIndex = object.currentIndex >>> 0; + if (object.validIndexes) { + if (!Array.isArray(object.validIndexes)) + throw TypeError(".proto.ADVKeyIndexList.validIndexes: array expected"); + message.validIndexes = []; + for (var i = 0; i < object.validIndexes.length; ++i) + message.validIndexes[i] = object.validIndexes[i] >>> 0; + } + return message; + }; + + /** + * Creates a plain object from a ADVKeyIndexList message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.ADVKeyIndexList + * @static + * @param {proto.ADVKeyIndexList} message ADVKeyIndexList + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ADVKeyIndexList.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.validIndexes = []; + if (options.defaults) { + object.rawId = 0; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.timestamp = options.longs === String ? "0" : 0; + object.currentIndex = 0; + } + if (message.rawId != null && message.hasOwnProperty("rawId")) + object.rawId = message.rawId; + 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(true) : message.timestamp; + if (message.currentIndex != null && message.hasOwnProperty("currentIndex")) + object.currentIndex = message.currentIndex; + if (message.validIndexes && message.validIndexes.length) { + object.validIndexes = []; + for (var j = 0; j < message.validIndexes.length; ++j) + object.validIndexes[j] = message.validIndexes[j]; + } + return object; + }; + + /** + * Converts this ADVKeyIndexList to JSON. + * @function toJSON + * @memberof proto.ADVKeyIndexList + * @instance + * @returns {Object.} JSON object + */ + ADVKeyIndexList.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ADVKeyIndexList; + })(); + proto.MessageKey = (function() { /** @@ -26114,7 +45863,5901 @@ $root.proto = (function() { return MessageKey; })(); + proto.PhotoChange = (function() { + + /** + * Properties of a PhotoChange. + * @memberof proto + * @interface IPhotoChange + * @property {Uint8Array|null} [oldPhoto] PhotoChange oldPhoto + * @property {Uint8Array|null} [newPhoto] PhotoChange newPhoto + * @property {number|null} [newPhotoId] PhotoChange newPhotoId + */ + + /** + * Constructs a new PhotoChange. + * @memberof proto + * @classdesc Represents a PhotoChange. + * @implements IPhotoChange + * @constructor + * @param {proto.IPhotoChange=} [properties] Properties to set + */ + function PhotoChange(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]]; + } + + /** + * PhotoChange oldPhoto. + * @member {Uint8Array} oldPhoto + * @memberof proto.PhotoChange + * @instance + */ + PhotoChange.prototype.oldPhoto = $util.newBuffer([]); + + /** + * PhotoChange newPhoto. + * @member {Uint8Array} newPhoto + * @memberof proto.PhotoChange + * @instance + */ + PhotoChange.prototype.newPhoto = $util.newBuffer([]); + + /** + * PhotoChange newPhotoId. + * @member {number} newPhotoId + * @memberof proto.PhotoChange + * @instance + */ + PhotoChange.prototype.newPhotoId = 0; + + /** + * Creates a new PhotoChange instance using the specified properties. + * @function create + * @memberof proto.PhotoChange + * @static + * @param {proto.IPhotoChange=} [properties] Properties to set + * @returns {proto.PhotoChange} PhotoChange instance + */ + PhotoChange.create = function create(properties) { + return new PhotoChange(properties); + }; + + /** + * Encodes the specified PhotoChange message. Does not implicitly {@link proto.PhotoChange.verify|verify} messages. + * @function encode + * @memberof proto.PhotoChange + * @static + * @param {proto.IPhotoChange} message PhotoChange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhotoChange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.oldPhoto != null && Object.hasOwnProperty.call(message, "oldPhoto")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.oldPhoto); + if (message.newPhoto != null && Object.hasOwnProperty.call(message, "newPhoto")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.newPhoto); + if (message.newPhotoId != null && Object.hasOwnProperty.call(message, "newPhotoId")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.newPhotoId); + return writer; + }; + + /** + * Encodes the specified PhotoChange message, length delimited. Does not implicitly {@link proto.PhotoChange.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.PhotoChange + * @static + * @param {proto.IPhotoChange} message PhotoChange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhotoChange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PhotoChange message from the specified reader or buffer. + * @function decode + * @memberof proto.PhotoChange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.PhotoChange} PhotoChange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhotoChange.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.PhotoChange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.oldPhoto = reader.bytes(); + break; + case 2: + message.newPhoto = reader.bytes(); + break; + case 3: + message.newPhotoId = reader.uint32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PhotoChange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.PhotoChange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.PhotoChange} PhotoChange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhotoChange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PhotoChange message. + * @function verify + * @memberof proto.PhotoChange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PhotoChange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.oldPhoto != null && message.hasOwnProperty("oldPhoto")) + if (!(message.oldPhoto && typeof message.oldPhoto.length === "number" || $util.isString(message.oldPhoto))) + return "oldPhoto: buffer expected"; + if (message.newPhoto != null && message.hasOwnProperty("newPhoto")) + if (!(message.newPhoto && typeof message.newPhoto.length === "number" || $util.isString(message.newPhoto))) + return "newPhoto: buffer expected"; + if (message.newPhotoId != null && message.hasOwnProperty("newPhotoId")) + if (!$util.isInteger(message.newPhotoId)) + return "newPhotoId: integer expected"; + return null; + }; + + /** + * Creates a PhotoChange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.PhotoChange + * @static + * @param {Object.} object Plain object + * @returns {proto.PhotoChange} PhotoChange + */ + PhotoChange.fromObject = function fromObject(object) { + if (object instanceof $root.proto.PhotoChange) + return object; + var message = new $root.proto.PhotoChange(); + if (object.oldPhoto != null) + if (typeof object.oldPhoto === "string") + $util.base64.decode(object.oldPhoto, message.oldPhoto = $util.newBuffer($util.base64.length(object.oldPhoto)), 0); + else if (object.oldPhoto.length) + message.oldPhoto = object.oldPhoto; + if (object.newPhoto != null) + if (typeof object.newPhoto === "string") + $util.base64.decode(object.newPhoto, message.newPhoto = $util.newBuffer($util.base64.length(object.newPhoto)), 0); + else if (object.newPhoto.length) + message.newPhoto = object.newPhoto; + if (object.newPhotoId != null) + message.newPhotoId = object.newPhotoId >>> 0; + return message; + }; + + /** + * Creates a plain object from a PhotoChange message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.PhotoChange + * @static + * @param {proto.PhotoChange} message PhotoChange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PhotoChange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.oldPhoto = ""; + else { + object.oldPhoto = []; + if (options.bytes !== Array) + object.oldPhoto = $util.newBuffer(object.oldPhoto); + } + if (options.bytes === String) + object.newPhoto = ""; + else { + object.newPhoto = []; + if (options.bytes !== Array) + object.newPhoto = $util.newBuffer(object.newPhoto); + } + object.newPhotoId = 0; + } + if (message.oldPhoto != null && message.hasOwnProperty("oldPhoto")) + object.oldPhoto = options.bytes === String ? $util.base64.encode(message.oldPhoto, 0, message.oldPhoto.length) : options.bytes === Array ? Array.prototype.slice.call(message.oldPhoto) : message.oldPhoto; + if (message.newPhoto != null && message.hasOwnProperty("newPhoto")) + object.newPhoto = options.bytes === String ? $util.base64.encode(message.newPhoto, 0, message.newPhoto.length) : options.bytes === Array ? Array.prototype.slice.call(message.newPhoto) : message.newPhoto; + if (message.newPhotoId != null && message.hasOwnProperty("newPhotoId")) + object.newPhotoId = message.newPhotoId; + return object; + }; + + /** + * Converts this PhotoChange to JSON. + * @function toJSON + * @memberof proto.PhotoChange + * @instance + * @returns {Object.} JSON object + */ + PhotoChange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PhotoChange; + })(); + + proto.MediaData = (function() { + + /** + * Properties of a MediaData. + * @memberof proto + * @interface IMediaData + * @property {string|null} [localPath] MediaData localPath + */ + + /** + * 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]]; + } + + /** + * MediaData localPath. + * @member {string} localPath + * @memberof proto.MediaData + * @instance + */ + MediaData.prototype.localPath = ""; + + /** + * 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 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 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 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 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()); + }; + + /** + * 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 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.WebFeatures = (function() { + + /** + * Properties of a WebFeatures. + * @memberof proto + * @interface IWebFeatures + * @property {proto.WebFeatures.WebFeaturesFlag|null} [labelsDisplay] WebFeatures labelsDisplay + * @property {proto.WebFeatures.WebFeaturesFlag|null} [voipIndividualOutgoing] WebFeatures voipIndividualOutgoing + * @property {proto.WebFeatures.WebFeaturesFlag|null} [groupsV3] WebFeatures groupsV3 + * @property {proto.WebFeatures.WebFeaturesFlag|null} [groupsV3Create] WebFeatures groupsV3Create + * @property {proto.WebFeatures.WebFeaturesFlag|null} [changeNumberV2] WebFeatures changeNumberV2 + * @property {proto.WebFeatures.WebFeaturesFlag|null} [queryStatusV3Thumbnail] WebFeatures queryStatusV3Thumbnail + * @property {proto.WebFeatures.WebFeaturesFlag|null} [liveLocations] WebFeatures liveLocations + * @property {proto.WebFeatures.WebFeaturesFlag|null} [queryVname] WebFeatures queryVname + * @property {proto.WebFeatures.WebFeaturesFlag|null} [voipIndividualIncoming] WebFeatures voipIndividualIncoming + * @property {proto.WebFeatures.WebFeaturesFlag|null} [quickRepliesQuery] WebFeatures quickRepliesQuery + * @property {proto.WebFeatures.WebFeaturesFlag|null} [payments] WebFeatures payments + * @property {proto.WebFeatures.WebFeaturesFlag|null} [stickerPackQuery] WebFeatures stickerPackQuery + * @property {proto.WebFeatures.WebFeaturesFlag|null} [liveLocationsFinal] WebFeatures liveLocationsFinal + * @property {proto.WebFeatures.WebFeaturesFlag|null} [labelsEdit] WebFeatures labelsEdit + * @property {proto.WebFeatures.WebFeaturesFlag|null} [mediaUpload] WebFeatures mediaUpload + * @property {proto.WebFeatures.WebFeaturesFlag|null} [mediaUploadRichQuickReplies] WebFeatures mediaUploadRichQuickReplies + * @property {proto.WebFeatures.WebFeaturesFlag|null} [vnameV2] WebFeatures vnameV2 + * @property {proto.WebFeatures.WebFeaturesFlag|null} [videoPlaybackUrl] WebFeatures videoPlaybackUrl + * @property {proto.WebFeatures.WebFeaturesFlag|null} [statusRanking] WebFeatures statusRanking + * @property {proto.WebFeatures.WebFeaturesFlag|null} [voipIndividualVideo] WebFeatures voipIndividualVideo + * @property {proto.WebFeatures.WebFeaturesFlag|null} [thirdPartyStickers] WebFeatures thirdPartyStickers + * @property {proto.WebFeatures.WebFeaturesFlag|null} [frequentlyForwardedSetting] WebFeatures frequentlyForwardedSetting + * @property {proto.WebFeatures.WebFeaturesFlag|null} [groupsV4JoinPermission] WebFeatures groupsV4JoinPermission + * @property {proto.WebFeatures.WebFeaturesFlag|null} [recentStickers] WebFeatures recentStickers + * @property {proto.WebFeatures.WebFeaturesFlag|null} [catalog] WebFeatures catalog + * @property {proto.WebFeatures.WebFeaturesFlag|null} [starredStickers] WebFeatures starredStickers + * @property {proto.WebFeatures.WebFeaturesFlag|null} [voipGroupCall] WebFeatures voipGroupCall + * @property {proto.WebFeatures.WebFeaturesFlag|null} [templateMessage] WebFeatures templateMessage + * @property {proto.WebFeatures.WebFeaturesFlag|null} [templateMessageInteractivity] WebFeatures templateMessageInteractivity + * @property {proto.WebFeatures.WebFeaturesFlag|null} [ephemeralMessages] WebFeatures ephemeralMessages + * @property {proto.WebFeatures.WebFeaturesFlag|null} [e2ENotificationSync] WebFeatures e2ENotificationSync + * @property {proto.WebFeatures.WebFeaturesFlag|null} [recentStickersV2] WebFeatures recentStickersV2 + * @property {proto.WebFeatures.WebFeaturesFlag|null} [recentStickersV3] WebFeatures recentStickersV3 + * @property {proto.WebFeatures.WebFeaturesFlag|null} [userNotice] WebFeatures userNotice + * @property {proto.WebFeatures.WebFeaturesFlag|null} [support] WebFeatures support + * @property {proto.WebFeatures.WebFeaturesFlag|null} [groupUiiCleanup] WebFeatures groupUiiCleanup + * @property {proto.WebFeatures.WebFeaturesFlag|null} [groupDogfoodingInternalOnly] WebFeatures groupDogfoodingInternalOnly + * @property {proto.WebFeatures.WebFeaturesFlag|null} [settingsSync] WebFeatures settingsSync + * @property {proto.WebFeatures.WebFeaturesFlag|null} [archiveV2] WebFeatures archiveV2 + * @property {proto.WebFeatures.WebFeaturesFlag|null} [ephemeralAllowGroupMembers] WebFeatures ephemeralAllowGroupMembers + * @property {proto.WebFeatures.WebFeaturesFlag|null} [ephemeral24HDuration] WebFeatures ephemeral24HDuration + * @property {proto.WebFeatures.WebFeaturesFlag|null} [mdForceUpgrade] WebFeatures mdForceUpgrade + */ + + /** + * Constructs a new WebFeatures. + * @memberof proto + * @classdesc Represents a WebFeatures. + * @implements IWebFeatures + * @constructor + * @param {proto.IWebFeatures=} [properties] Properties to set + */ + function WebFeatures(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]]; + } + + /** + * WebFeatures labelsDisplay. + * @member {proto.WebFeatures.WebFeaturesFlag} labelsDisplay + * @memberof proto.WebFeatures + * @instance + */ + WebFeatures.prototype.labelsDisplay = 0; + + /** + * WebFeatures voipIndividualOutgoing. + * @member {proto.WebFeatures.WebFeaturesFlag} voipIndividualOutgoing + * @memberof proto.WebFeatures + * @instance + */ + WebFeatures.prototype.voipIndividualOutgoing = 0; + + /** + * WebFeatures groupsV3. + * @member {proto.WebFeatures.WebFeaturesFlag} groupsV3 + * @memberof proto.WebFeatures + * @instance + */ + WebFeatures.prototype.groupsV3 = 0; + + /** + * WebFeatures groupsV3Create. + * @member {proto.WebFeatures.WebFeaturesFlag} groupsV3Create + * @memberof proto.WebFeatures + * @instance + */ + WebFeatures.prototype.groupsV3Create = 0; + + /** + * WebFeatures changeNumberV2. + * @member {proto.WebFeatures.WebFeaturesFlag} changeNumberV2 + * @memberof proto.WebFeatures + * @instance + */ + WebFeatures.prototype.changeNumberV2 = 0; + + /** + * WebFeatures queryStatusV3Thumbnail. + * @member {proto.WebFeatures.WebFeaturesFlag} queryStatusV3Thumbnail + * @memberof proto.WebFeatures + * @instance + */ + WebFeatures.prototype.queryStatusV3Thumbnail = 0; + + /** + * WebFeatures liveLocations. + * @member {proto.WebFeatures.WebFeaturesFlag} liveLocations + * @memberof proto.WebFeatures + * @instance + */ + WebFeatures.prototype.liveLocations = 0; + + /** + * WebFeatures queryVname. + * @member {proto.WebFeatures.WebFeaturesFlag} queryVname + * @memberof proto.WebFeatures + * @instance + */ + WebFeatures.prototype.queryVname = 0; + + /** + * WebFeatures voipIndividualIncoming. + * @member {proto.WebFeatures.WebFeaturesFlag} voipIndividualIncoming + * @memberof proto.WebFeatures + * @instance + */ + WebFeatures.prototype.voipIndividualIncoming = 0; + + /** + * WebFeatures quickRepliesQuery. + * @member {proto.WebFeatures.WebFeaturesFlag} quickRepliesQuery + * @memberof proto.WebFeatures + * @instance + */ + WebFeatures.prototype.quickRepliesQuery = 0; + + /** + * WebFeatures payments. + * @member {proto.WebFeatures.WebFeaturesFlag} payments + * @memberof proto.WebFeatures + * @instance + */ + WebFeatures.prototype.payments = 0; + + /** + * WebFeatures stickerPackQuery. + * @member {proto.WebFeatures.WebFeaturesFlag} stickerPackQuery + * @memberof proto.WebFeatures + * @instance + */ + WebFeatures.prototype.stickerPackQuery = 0; + + /** + * WebFeatures liveLocationsFinal. + * @member {proto.WebFeatures.WebFeaturesFlag} liveLocationsFinal + * @memberof proto.WebFeatures + * @instance + */ + WebFeatures.prototype.liveLocationsFinal = 0; + + /** + * WebFeatures labelsEdit. + * @member {proto.WebFeatures.WebFeaturesFlag} labelsEdit + * @memberof proto.WebFeatures + * @instance + */ + WebFeatures.prototype.labelsEdit = 0; + + /** + * WebFeatures mediaUpload. + * @member {proto.WebFeatures.WebFeaturesFlag} mediaUpload + * @memberof proto.WebFeatures + * @instance + */ + WebFeatures.prototype.mediaUpload = 0; + + /** + * WebFeatures mediaUploadRichQuickReplies. + * @member {proto.WebFeatures.WebFeaturesFlag} mediaUploadRichQuickReplies + * @memberof proto.WebFeatures + * @instance + */ + WebFeatures.prototype.mediaUploadRichQuickReplies = 0; + + /** + * WebFeatures vnameV2. + * @member {proto.WebFeatures.WebFeaturesFlag} vnameV2 + * @memberof proto.WebFeatures + * @instance + */ + WebFeatures.prototype.vnameV2 = 0; + + /** + * WebFeatures videoPlaybackUrl. + * @member {proto.WebFeatures.WebFeaturesFlag} videoPlaybackUrl + * @memberof proto.WebFeatures + * @instance + */ + WebFeatures.prototype.videoPlaybackUrl = 0; + + /** + * WebFeatures statusRanking. + * @member {proto.WebFeatures.WebFeaturesFlag} statusRanking + * @memberof proto.WebFeatures + * @instance + */ + WebFeatures.prototype.statusRanking = 0; + + /** + * WebFeatures voipIndividualVideo. + * @member {proto.WebFeatures.WebFeaturesFlag} voipIndividualVideo + * @memberof proto.WebFeatures + * @instance + */ + WebFeatures.prototype.voipIndividualVideo = 0; + + /** + * WebFeatures thirdPartyStickers. + * @member {proto.WebFeatures.WebFeaturesFlag} thirdPartyStickers + * @memberof proto.WebFeatures + * @instance + */ + WebFeatures.prototype.thirdPartyStickers = 0; + + /** + * WebFeatures frequentlyForwardedSetting. + * @member {proto.WebFeatures.WebFeaturesFlag} frequentlyForwardedSetting + * @memberof proto.WebFeatures + * @instance + */ + WebFeatures.prototype.frequentlyForwardedSetting = 0; + + /** + * WebFeatures groupsV4JoinPermission. + * @member {proto.WebFeatures.WebFeaturesFlag} groupsV4JoinPermission + * @memberof proto.WebFeatures + * @instance + */ + WebFeatures.prototype.groupsV4JoinPermission = 0; + + /** + * WebFeatures recentStickers. + * @member {proto.WebFeatures.WebFeaturesFlag} recentStickers + * @memberof proto.WebFeatures + * @instance + */ + WebFeatures.prototype.recentStickers = 0; + + /** + * WebFeatures catalog. + * @member {proto.WebFeatures.WebFeaturesFlag} catalog + * @memberof proto.WebFeatures + * @instance + */ + WebFeatures.prototype.catalog = 0; + + /** + * WebFeatures starredStickers. + * @member {proto.WebFeatures.WebFeaturesFlag} starredStickers + * @memberof proto.WebFeatures + * @instance + */ + WebFeatures.prototype.starredStickers = 0; + + /** + * WebFeatures voipGroupCall. + * @member {proto.WebFeatures.WebFeaturesFlag} voipGroupCall + * @memberof proto.WebFeatures + * @instance + */ + WebFeatures.prototype.voipGroupCall = 0; + + /** + * WebFeatures templateMessage. + * @member {proto.WebFeatures.WebFeaturesFlag} templateMessage + * @memberof proto.WebFeatures + * @instance + */ + WebFeatures.prototype.templateMessage = 0; + + /** + * WebFeatures templateMessageInteractivity. + * @member {proto.WebFeatures.WebFeaturesFlag} templateMessageInteractivity + * @memberof proto.WebFeatures + * @instance + */ + WebFeatures.prototype.templateMessageInteractivity = 0; + + /** + * WebFeatures ephemeralMessages. + * @member {proto.WebFeatures.WebFeaturesFlag} ephemeralMessages + * @memberof proto.WebFeatures + * @instance + */ + WebFeatures.prototype.ephemeralMessages = 0; + + /** + * WebFeatures e2ENotificationSync. + * @member {proto.WebFeatures.WebFeaturesFlag} e2ENotificationSync + * @memberof proto.WebFeatures + * @instance + */ + WebFeatures.prototype.e2ENotificationSync = 0; + + /** + * WebFeatures recentStickersV2. + * @member {proto.WebFeatures.WebFeaturesFlag} recentStickersV2 + * @memberof proto.WebFeatures + * @instance + */ + WebFeatures.prototype.recentStickersV2 = 0; + + /** + * WebFeatures recentStickersV3. + * @member {proto.WebFeatures.WebFeaturesFlag} recentStickersV3 + * @memberof proto.WebFeatures + * @instance + */ + WebFeatures.prototype.recentStickersV3 = 0; + + /** + * WebFeatures userNotice. + * @member {proto.WebFeatures.WebFeaturesFlag} userNotice + * @memberof proto.WebFeatures + * @instance + */ + WebFeatures.prototype.userNotice = 0; + + /** + * WebFeatures support. + * @member {proto.WebFeatures.WebFeaturesFlag} support + * @memberof proto.WebFeatures + * @instance + */ + WebFeatures.prototype.support = 0; + + /** + * WebFeatures groupUiiCleanup. + * @member {proto.WebFeatures.WebFeaturesFlag} groupUiiCleanup + * @memberof proto.WebFeatures + * @instance + */ + WebFeatures.prototype.groupUiiCleanup = 0; + + /** + * WebFeatures groupDogfoodingInternalOnly. + * @member {proto.WebFeatures.WebFeaturesFlag} groupDogfoodingInternalOnly + * @memberof proto.WebFeatures + * @instance + */ + WebFeatures.prototype.groupDogfoodingInternalOnly = 0; + + /** + * WebFeatures settingsSync. + * @member {proto.WebFeatures.WebFeaturesFlag} settingsSync + * @memberof proto.WebFeatures + * @instance + */ + WebFeatures.prototype.settingsSync = 0; + + /** + * WebFeatures archiveV2. + * @member {proto.WebFeatures.WebFeaturesFlag} archiveV2 + * @memberof proto.WebFeatures + * @instance + */ + WebFeatures.prototype.archiveV2 = 0; + + /** + * WebFeatures ephemeralAllowGroupMembers. + * @member {proto.WebFeatures.WebFeaturesFlag} ephemeralAllowGroupMembers + * @memberof proto.WebFeatures + * @instance + */ + WebFeatures.prototype.ephemeralAllowGroupMembers = 0; + + /** + * WebFeatures ephemeral24HDuration. + * @member {proto.WebFeatures.WebFeaturesFlag} ephemeral24HDuration + * @memberof proto.WebFeatures + * @instance + */ + WebFeatures.prototype.ephemeral24HDuration = 0; + + /** + * WebFeatures mdForceUpgrade. + * @member {proto.WebFeatures.WebFeaturesFlag} mdForceUpgrade + * @memberof proto.WebFeatures + * @instance + */ + WebFeatures.prototype.mdForceUpgrade = 0; + + /** + * Creates a new WebFeatures instance using the specified properties. + * @function create + * @memberof proto.WebFeatures + * @static + * @param {proto.IWebFeatures=} [properties] Properties to set + * @returns {proto.WebFeatures} WebFeatures instance + */ + WebFeatures.create = function create(properties) { + return new WebFeatures(properties); + }; + + /** + * Encodes the specified WebFeatures message. Does not implicitly {@link proto.WebFeatures.verify|verify} messages. + * @function encode + * @memberof proto.WebFeatures + * @static + * @param {proto.IWebFeatures} message WebFeatures message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WebFeatures.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.labelsDisplay != null && Object.hasOwnProperty.call(message, "labelsDisplay")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.labelsDisplay); + if (message.voipIndividualOutgoing != null && Object.hasOwnProperty.call(message, "voipIndividualOutgoing")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.voipIndividualOutgoing); + if (message.groupsV3 != null && Object.hasOwnProperty.call(message, "groupsV3")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.groupsV3); + if (message.groupsV3Create != null && Object.hasOwnProperty.call(message, "groupsV3Create")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.groupsV3Create); + if (message.changeNumberV2 != null && Object.hasOwnProperty.call(message, "changeNumberV2")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.changeNumberV2); + if (message.queryStatusV3Thumbnail != null && Object.hasOwnProperty.call(message, "queryStatusV3Thumbnail")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.queryStatusV3Thumbnail); + if (message.liveLocations != null && Object.hasOwnProperty.call(message, "liveLocations")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.liveLocations); + if (message.queryVname != null && Object.hasOwnProperty.call(message, "queryVname")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.queryVname); + if (message.voipIndividualIncoming != null && Object.hasOwnProperty.call(message, "voipIndividualIncoming")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.voipIndividualIncoming); + if (message.quickRepliesQuery != null && Object.hasOwnProperty.call(message, "quickRepliesQuery")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.quickRepliesQuery); + if (message.payments != null && Object.hasOwnProperty.call(message, "payments")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.payments); + if (message.stickerPackQuery != null && Object.hasOwnProperty.call(message, "stickerPackQuery")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.stickerPackQuery); + if (message.liveLocationsFinal != null && Object.hasOwnProperty.call(message, "liveLocationsFinal")) + writer.uint32(/* id 13, wireType 0 =*/104).int32(message.liveLocationsFinal); + if (message.labelsEdit != null && Object.hasOwnProperty.call(message, "labelsEdit")) + writer.uint32(/* id 14, wireType 0 =*/112).int32(message.labelsEdit); + if (message.mediaUpload != null && Object.hasOwnProperty.call(message, "mediaUpload")) + writer.uint32(/* id 15, wireType 0 =*/120).int32(message.mediaUpload); + if (message.mediaUploadRichQuickReplies != null && Object.hasOwnProperty.call(message, "mediaUploadRichQuickReplies")) + writer.uint32(/* id 18, wireType 0 =*/144).int32(message.mediaUploadRichQuickReplies); + if (message.vnameV2 != null && Object.hasOwnProperty.call(message, "vnameV2")) + writer.uint32(/* id 19, wireType 0 =*/152).int32(message.vnameV2); + if (message.videoPlaybackUrl != null && Object.hasOwnProperty.call(message, "videoPlaybackUrl")) + writer.uint32(/* id 20, wireType 0 =*/160).int32(message.videoPlaybackUrl); + if (message.statusRanking != null && Object.hasOwnProperty.call(message, "statusRanking")) + writer.uint32(/* id 21, wireType 0 =*/168).int32(message.statusRanking); + if (message.voipIndividualVideo != null && Object.hasOwnProperty.call(message, "voipIndividualVideo")) + writer.uint32(/* id 22, wireType 0 =*/176).int32(message.voipIndividualVideo); + if (message.thirdPartyStickers != null && Object.hasOwnProperty.call(message, "thirdPartyStickers")) + writer.uint32(/* id 23, wireType 0 =*/184).int32(message.thirdPartyStickers); + if (message.frequentlyForwardedSetting != null && Object.hasOwnProperty.call(message, "frequentlyForwardedSetting")) + writer.uint32(/* id 24, wireType 0 =*/192).int32(message.frequentlyForwardedSetting); + if (message.groupsV4JoinPermission != null && Object.hasOwnProperty.call(message, "groupsV4JoinPermission")) + writer.uint32(/* id 25, wireType 0 =*/200).int32(message.groupsV4JoinPermission); + if (message.recentStickers != null && Object.hasOwnProperty.call(message, "recentStickers")) + writer.uint32(/* id 26, wireType 0 =*/208).int32(message.recentStickers); + if (message.catalog != null && Object.hasOwnProperty.call(message, "catalog")) + writer.uint32(/* id 27, wireType 0 =*/216).int32(message.catalog); + if (message.starredStickers != null && Object.hasOwnProperty.call(message, "starredStickers")) + writer.uint32(/* id 28, wireType 0 =*/224).int32(message.starredStickers); + if (message.voipGroupCall != null && Object.hasOwnProperty.call(message, "voipGroupCall")) + writer.uint32(/* id 29, wireType 0 =*/232).int32(message.voipGroupCall); + if (message.templateMessage != null && Object.hasOwnProperty.call(message, "templateMessage")) + writer.uint32(/* id 30, wireType 0 =*/240).int32(message.templateMessage); + if (message.templateMessageInteractivity != null && Object.hasOwnProperty.call(message, "templateMessageInteractivity")) + writer.uint32(/* id 31, wireType 0 =*/248).int32(message.templateMessageInteractivity); + if (message.ephemeralMessages != null && Object.hasOwnProperty.call(message, "ephemeralMessages")) + writer.uint32(/* id 32, wireType 0 =*/256).int32(message.ephemeralMessages); + if (message.e2ENotificationSync != null && Object.hasOwnProperty.call(message, "e2ENotificationSync")) + writer.uint32(/* id 33, wireType 0 =*/264).int32(message.e2ENotificationSync); + if (message.recentStickersV2 != null && Object.hasOwnProperty.call(message, "recentStickersV2")) + writer.uint32(/* id 34, wireType 0 =*/272).int32(message.recentStickersV2); + if (message.recentStickersV3 != null && Object.hasOwnProperty.call(message, "recentStickersV3")) + writer.uint32(/* id 36, wireType 0 =*/288).int32(message.recentStickersV3); + if (message.userNotice != null && Object.hasOwnProperty.call(message, "userNotice")) + writer.uint32(/* id 37, wireType 0 =*/296).int32(message.userNotice); + if (message.support != null && Object.hasOwnProperty.call(message, "support")) + writer.uint32(/* id 39, wireType 0 =*/312).int32(message.support); + if (message.groupUiiCleanup != null && Object.hasOwnProperty.call(message, "groupUiiCleanup")) + writer.uint32(/* id 40, wireType 0 =*/320).int32(message.groupUiiCleanup); + if (message.groupDogfoodingInternalOnly != null && Object.hasOwnProperty.call(message, "groupDogfoodingInternalOnly")) + writer.uint32(/* id 41, wireType 0 =*/328).int32(message.groupDogfoodingInternalOnly); + if (message.settingsSync != null && Object.hasOwnProperty.call(message, "settingsSync")) + writer.uint32(/* id 42, wireType 0 =*/336).int32(message.settingsSync); + if (message.archiveV2 != null && Object.hasOwnProperty.call(message, "archiveV2")) + writer.uint32(/* id 43, wireType 0 =*/344).int32(message.archiveV2); + if (message.ephemeralAllowGroupMembers != null && Object.hasOwnProperty.call(message, "ephemeralAllowGroupMembers")) + writer.uint32(/* id 44, wireType 0 =*/352).int32(message.ephemeralAllowGroupMembers); + if (message.ephemeral24HDuration != null && Object.hasOwnProperty.call(message, "ephemeral24HDuration")) + writer.uint32(/* id 45, wireType 0 =*/360).int32(message.ephemeral24HDuration); + if (message.mdForceUpgrade != null && Object.hasOwnProperty.call(message, "mdForceUpgrade")) + writer.uint32(/* id 46, wireType 0 =*/368).int32(message.mdForceUpgrade); + return writer; + }; + + /** + * Encodes the specified WebFeatures message, length delimited. Does not implicitly {@link proto.WebFeatures.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.WebFeatures + * @static + * @param {proto.IWebFeatures} message WebFeatures message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WebFeatures.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WebFeatures message from the specified reader or buffer. + * @function decode + * @memberof proto.WebFeatures + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.WebFeatures} WebFeatures + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WebFeatures.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.WebFeatures(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.labelsDisplay = reader.int32(); + break; + case 2: + message.voipIndividualOutgoing = reader.int32(); + break; + case 3: + message.groupsV3 = reader.int32(); + break; + case 4: + message.groupsV3Create = reader.int32(); + break; + case 5: + message.changeNumberV2 = reader.int32(); + break; + case 6: + message.queryStatusV3Thumbnail = reader.int32(); + break; + case 7: + message.liveLocations = reader.int32(); + break; + case 8: + message.queryVname = reader.int32(); + break; + case 9: + message.voipIndividualIncoming = reader.int32(); + break; + case 10: + message.quickRepliesQuery = reader.int32(); + break; + case 11: + message.payments = reader.int32(); + break; + case 12: + message.stickerPackQuery = reader.int32(); + break; + case 13: + message.liveLocationsFinal = reader.int32(); + break; + case 14: + message.labelsEdit = reader.int32(); + break; + case 15: + message.mediaUpload = reader.int32(); + break; + case 18: + message.mediaUploadRichQuickReplies = reader.int32(); + break; + case 19: + message.vnameV2 = reader.int32(); + break; + case 20: + message.videoPlaybackUrl = reader.int32(); + break; + case 21: + message.statusRanking = reader.int32(); + break; + case 22: + message.voipIndividualVideo = reader.int32(); + break; + case 23: + message.thirdPartyStickers = reader.int32(); + break; + case 24: + message.frequentlyForwardedSetting = reader.int32(); + break; + case 25: + message.groupsV4JoinPermission = reader.int32(); + break; + case 26: + message.recentStickers = reader.int32(); + break; + case 27: + message.catalog = reader.int32(); + break; + case 28: + message.starredStickers = reader.int32(); + break; + case 29: + message.voipGroupCall = reader.int32(); + break; + case 30: + message.templateMessage = reader.int32(); + break; + case 31: + message.templateMessageInteractivity = reader.int32(); + break; + case 32: + message.ephemeralMessages = reader.int32(); + break; + case 33: + message.e2ENotificationSync = reader.int32(); + break; + case 34: + message.recentStickersV2 = reader.int32(); + break; + case 36: + message.recentStickersV3 = reader.int32(); + break; + case 37: + message.userNotice = reader.int32(); + break; + case 39: + message.support = reader.int32(); + break; + case 40: + message.groupUiiCleanup = reader.int32(); + break; + case 41: + message.groupDogfoodingInternalOnly = reader.int32(); + break; + case 42: + message.settingsSync = reader.int32(); + break; + case 43: + message.archiveV2 = reader.int32(); + break; + case 44: + message.ephemeralAllowGroupMembers = reader.int32(); + break; + case 45: + message.ephemeral24HDuration = reader.int32(); + break; + case 46: + message.mdForceUpgrade = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WebFeatures message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.WebFeatures + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.WebFeatures} WebFeatures + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WebFeatures.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WebFeatures message. + * @function verify + * @memberof proto.WebFeatures + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WebFeatures.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.labelsDisplay != null && message.hasOwnProperty("labelsDisplay")) + switch (message.labelsDisplay) { + default: + return "labelsDisplay: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.voipIndividualOutgoing != null && message.hasOwnProperty("voipIndividualOutgoing")) + switch (message.voipIndividualOutgoing) { + default: + return "voipIndividualOutgoing: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.groupsV3 != null && message.hasOwnProperty("groupsV3")) + switch (message.groupsV3) { + default: + return "groupsV3: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.groupsV3Create != null && message.hasOwnProperty("groupsV3Create")) + switch (message.groupsV3Create) { + default: + return "groupsV3Create: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.changeNumberV2 != null && message.hasOwnProperty("changeNumberV2")) + switch (message.changeNumberV2) { + default: + return "changeNumberV2: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.queryStatusV3Thumbnail != null && message.hasOwnProperty("queryStatusV3Thumbnail")) + switch (message.queryStatusV3Thumbnail) { + default: + return "queryStatusV3Thumbnail: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.liveLocations != null && message.hasOwnProperty("liveLocations")) + switch (message.liveLocations) { + default: + return "liveLocations: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.queryVname != null && message.hasOwnProperty("queryVname")) + switch (message.queryVname) { + default: + return "queryVname: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.voipIndividualIncoming != null && message.hasOwnProperty("voipIndividualIncoming")) + switch (message.voipIndividualIncoming) { + default: + return "voipIndividualIncoming: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.quickRepliesQuery != null && message.hasOwnProperty("quickRepliesQuery")) + switch (message.quickRepliesQuery) { + default: + return "quickRepliesQuery: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.payments != null && message.hasOwnProperty("payments")) + switch (message.payments) { + default: + return "payments: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.stickerPackQuery != null && message.hasOwnProperty("stickerPackQuery")) + switch (message.stickerPackQuery) { + default: + return "stickerPackQuery: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.liveLocationsFinal != null && message.hasOwnProperty("liveLocationsFinal")) + switch (message.liveLocationsFinal) { + default: + return "liveLocationsFinal: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.labelsEdit != null && message.hasOwnProperty("labelsEdit")) + switch (message.labelsEdit) { + default: + return "labelsEdit: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.mediaUpload != null && message.hasOwnProperty("mediaUpload")) + switch (message.mediaUpload) { + default: + return "mediaUpload: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.mediaUploadRichQuickReplies != null && message.hasOwnProperty("mediaUploadRichQuickReplies")) + switch (message.mediaUploadRichQuickReplies) { + default: + return "mediaUploadRichQuickReplies: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.vnameV2 != null && message.hasOwnProperty("vnameV2")) + switch (message.vnameV2) { + default: + return "vnameV2: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.videoPlaybackUrl != null && message.hasOwnProperty("videoPlaybackUrl")) + switch (message.videoPlaybackUrl) { + default: + return "videoPlaybackUrl: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.statusRanking != null && message.hasOwnProperty("statusRanking")) + switch (message.statusRanking) { + default: + return "statusRanking: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.voipIndividualVideo != null && message.hasOwnProperty("voipIndividualVideo")) + switch (message.voipIndividualVideo) { + default: + return "voipIndividualVideo: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.thirdPartyStickers != null && message.hasOwnProperty("thirdPartyStickers")) + switch (message.thirdPartyStickers) { + default: + return "thirdPartyStickers: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.frequentlyForwardedSetting != null && message.hasOwnProperty("frequentlyForwardedSetting")) + switch (message.frequentlyForwardedSetting) { + default: + return "frequentlyForwardedSetting: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.groupsV4JoinPermission != null && message.hasOwnProperty("groupsV4JoinPermission")) + switch (message.groupsV4JoinPermission) { + default: + return "groupsV4JoinPermission: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.recentStickers != null && message.hasOwnProperty("recentStickers")) + switch (message.recentStickers) { + default: + return "recentStickers: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.catalog != null && message.hasOwnProperty("catalog")) + switch (message.catalog) { + default: + return "catalog: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.starredStickers != null && message.hasOwnProperty("starredStickers")) + switch (message.starredStickers) { + default: + return "starredStickers: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.voipGroupCall != null && message.hasOwnProperty("voipGroupCall")) + switch (message.voipGroupCall) { + default: + return "voipGroupCall: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.templateMessage != null && message.hasOwnProperty("templateMessage")) + switch (message.templateMessage) { + default: + return "templateMessage: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.templateMessageInteractivity != null && message.hasOwnProperty("templateMessageInteractivity")) + switch (message.templateMessageInteractivity) { + default: + return "templateMessageInteractivity: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.ephemeralMessages != null && message.hasOwnProperty("ephemeralMessages")) + switch (message.ephemeralMessages) { + default: + return "ephemeralMessages: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.e2ENotificationSync != null && message.hasOwnProperty("e2ENotificationSync")) + switch (message.e2ENotificationSync) { + default: + return "e2ENotificationSync: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.recentStickersV2 != null && message.hasOwnProperty("recentStickersV2")) + switch (message.recentStickersV2) { + default: + return "recentStickersV2: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.recentStickersV3 != null && message.hasOwnProperty("recentStickersV3")) + switch (message.recentStickersV3) { + default: + return "recentStickersV3: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.userNotice != null && message.hasOwnProperty("userNotice")) + switch (message.userNotice) { + default: + return "userNotice: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.support != null && message.hasOwnProperty("support")) + switch (message.support) { + default: + return "support: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.groupUiiCleanup != null && message.hasOwnProperty("groupUiiCleanup")) + switch (message.groupUiiCleanup) { + default: + return "groupUiiCleanup: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.groupDogfoodingInternalOnly != null && message.hasOwnProperty("groupDogfoodingInternalOnly")) + switch (message.groupDogfoodingInternalOnly) { + default: + return "groupDogfoodingInternalOnly: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.settingsSync != null && message.hasOwnProperty("settingsSync")) + switch (message.settingsSync) { + default: + return "settingsSync: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.archiveV2 != null && message.hasOwnProperty("archiveV2")) + switch (message.archiveV2) { + default: + return "archiveV2: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.ephemeralAllowGroupMembers != null && message.hasOwnProperty("ephemeralAllowGroupMembers")) + switch (message.ephemeralAllowGroupMembers) { + default: + return "ephemeralAllowGroupMembers: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.ephemeral24HDuration != null && message.hasOwnProperty("ephemeral24HDuration")) + switch (message.ephemeral24HDuration) { + default: + return "ephemeral24HDuration: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.mdForceUpgrade != null && message.hasOwnProperty("mdForceUpgrade")) + switch (message.mdForceUpgrade) { + default: + return "mdForceUpgrade: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates a WebFeatures message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.WebFeatures + * @static + * @param {Object.} object Plain object + * @returns {proto.WebFeatures} WebFeatures + */ + WebFeatures.fromObject = function fromObject(object) { + if (object instanceof $root.proto.WebFeatures) + return object; + var message = new $root.proto.WebFeatures(); + switch (object.labelsDisplay) { + case "NOT_STARTED": + case 0: + message.labelsDisplay = 0; + break; + case "FORCE_UPGRADE": + case 1: + message.labelsDisplay = 1; + break; + case "DEVELOPMENT": + case 2: + message.labelsDisplay = 2; + break; + case "PRODUCTION": + case 3: + message.labelsDisplay = 3; + break; + } + switch (object.voipIndividualOutgoing) { + case "NOT_STARTED": + case 0: + message.voipIndividualOutgoing = 0; + break; + case "FORCE_UPGRADE": + case 1: + message.voipIndividualOutgoing = 1; + break; + case "DEVELOPMENT": + case 2: + message.voipIndividualOutgoing = 2; + break; + case "PRODUCTION": + case 3: + message.voipIndividualOutgoing = 3; + break; + } + switch (object.groupsV3) { + case "NOT_STARTED": + case 0: + message.groupsV3 = 0; + break; + case "FORCE_UPGRADE": + case 1: + message.groupsV3 = 1; + break; + case "DEVELOPMENT": + case 2: + message.groupsV3 = 2; + break; + case "PRODUCTION": + case 3: + message.groupsV3 = 3; + break; + } + switch (object.groupsV3Create) { + case "NOT_STARTED": + case 0: + message.groupsV3Create = 0; + break; + case "FORCE_UPGRADE": + case 1: + message.groupsV3Create = 1; + break; + case "DEVELOPMENT": + case 2: + message.groupsV3Create = 2; + break; + case "PRODUCTION": + case 3: + message.groupsV3Create = 3; + break; + } + switch (object.changeNumberV2) { + case "NOT_STARTED": + case 0: + message.changeNumberV2 = 0; + break; + case "FORCE_UPGRADE": + case 1: + message.changeNumberV2 = 1; + break; + case "DEVELOPMENT": + case 2: + message.changeNumberV2 = 2; + break; + case "PRODUCTION": + case 3: + message.changeNumberV2 = 3; + break; + } + switch (object.queryStatusV3Thumbnail) { + case "NOT_STARTED": + case 0: + message.queryStatusV3Thumbnail = 0; + break; + case "FORCE_UPGRADE": + case 1: + message.queryStatusV3Thumbnail = 1; + break; + case "DEVELOPMENT": + case 2: + message.queryStatusV3Thumbnail = 2; + break; + case "PRODUCTION": + case 3: + message.queryStatusV3Thumbnail = 3; + break; + } + switch (object.liveLocations) { + case "NOT_STARTED": + case 0: + message.liveLocations = 0; + break; + case "FORCE_UPGRADE": + case 1: + message.liveLocations = 1; + break; + case "DEVELOPMENT": + case 2: + message.liveLocations = 2; + break; + case "PRODUCTION": + case 3: + message.liveLocations = 3; + break; + } + switch (object.queryVname) { + case "NOT_STARTED": + case 0: + message.queryVname = 0; + break; + case "FORCE_UPGRADE": + case 1: + message.queryVname = 1; + break; + case "DEVELOPMENT": + case 2: + message.queryVname = 2; + break; + case "PRODUCTION": + case 3: + message.queryVname = 3; + break; + } + switch (object.voipIndividualIncoming) { + case "NOT_STARTED": + case 0: + message.voipIndividualIncoming = 0; + break; + case "FORCE_UPGRADE": + case 1: + message.voipIndividualIncoming = 1; + break; + case "DEVELOPMENT": + case 2: + message.voipIndividualIncoming = 2; + break; + case "PRODUCTION": + case 3: + message.voipIndividualIncoming = 3; + break; + } + switch (object.quickRepliesQuery) { + case "NOT_STARTED": + case 0: + message.quickRepliesQuery = 0; + break; + case "FORCE_UPGRADE": + case 1: + message.quickRepliesQuery = 1; + break; + case "DEVELOPMENT": + case 2: + message.quickRepliesQuery = 2; + break; + case "PRODUCTION": + case 3: + message.quickRepliesQuery = 3; + break; + } + switch (object.payments) { + case "NOT_STARTED": + case 0: + message.payments = 0; + break; + case "FORCE_UPGRADE": + case 1: + message.payments = 1; + break; + case "DEVELOPMENT": + case 2: + message.payments = 2; + break; + case "PRODUCTION": + case 3: + message.payments = 3; + break; + } + switch (object.stickerPackQuery) { + case "NOT_STARTED": + case 0: + message.stickerPackQuery = 0; + break; + case "FORCE_UPGRADE": + case 1: + message.stickerPackQuery = 1; + break; + case "DEVELOPMENT": + case 2: + message.stickerPackQuery = 2; + break; + case "PRODUCTION": + case 3: + message.stickerPackQuery = 3; + break; + } + switch (object.liveLocationsFinal) { + case "NOT_STARTED": + case 0: + message.liveLocationsFinal = 0; + break; + case "FORCE_UPGRADE": + case 1: + message.liveLocationsFinal = 1; + break; + case "DEVELOPMENT": + case 2: + message.liveLocationsFinal = 2; + break; + case "PRODUCTION": + case 3: + message.liveLocationsFinal = 3; + break; + } + switch (object.labelsEdit) { + case "NOT_STARTED": + case 0: + message.labelsEdit = 0; + break; + case "FORCE_UPGRADE": + case 1: + message.labelsEdit = 1; + break; + case "DEVELOPMENT": + case 2: + message.labelsEdit = 2; + break; + case "PRODUCTION": + case 3: + message.labelsEdit = 3; + break; + } + switch (object.mediaUpload) { + case "NOT_STARTED": + case 0: + message.mediaUpload = 0; + break; + case "FORCE_UPGRADE": + case 1: + message.mediaUpload = 1; + break; + case "DEVELOPMENT": + case 2: + message.mediaUpload = 2; + break; + case "PRODUCTION": + case 3: + message.mediaUpload = 3; + break; + } + switch (object.mediaUploadRichQuickReplies) { + case "NOT_STARTED": + case 0: + message.mediaUploadRichQuickReplies = 0; + break; + case "FORCE_UPGRADE": + case 1: + message.mediaUploadRichQuickReplies = 1; + break; + case "DEVELOPMENT": + case 2: + message.mediaUploadRichQuickReplies = 2; + break; + case "PRODUCTION": + case 3: + message.mediaUploadRichQuickReplies = 3; + break; + } + switch (object.vnameV2) { + case "NOT_STARTED": + case 0: + message.vnameV2 = 0; + break; + case "FORCE_UPGRADE": + case 1: + message.vnameV2 = 1; + break; + case "DEVELOPMENT": + case 2: + message.vnameV2 = 2; + break; + case "PRODUCTION": + case 3: + message.vnameV2 = 3; + break; + } + switch (object.videoPlaybackUrl) { + case "NOT_STARTED": + case 0: + message.videoPlaybackUrl = 0; + break; + case "FORCE_UPGRADE": + case 1: + message.videoPlaybackUrl = 1; + break; + case "DEVELOPMENT": + case 2: + message.videoPlaybackUrl = 2; + break; + case "PRODUCTION": + case 3: + message.videoPlaybackUrl = 3; + break; + } + switch (object.statusRanking) { + case "NOT_STARTED": + case 0: + message.statusRanking = 0; + break; + case "FORCE_UPGRADE": + case 1: + message.statusRanking = 1; + break; + case "DEVELOPMENT": + case 2: + message.statusRanking = 2; + break; + case "PRODUCTION": + case 3: + message.statusRanking = 3; + break; + } + switch (object.voipIndividualVideo) { + case "NOT_STARTED": + case 0: + message.voipIndividualVideo = 0; + break; + case "FORCE_UPGRADE": + case 1: + message.voipIndividualVideo = 1; + break; + case "DEVELOPMENT": + case 2: + message.voipIndividualVideo = 2; + break; + case "PRODUCTION": + case 3: + message.voipIndividualVideo = 3; + break; + } + switch (object.thirdPartyStickers) { + case "NOT_STARTED": + case 0: + message.thirdPartyStickers = 0; + break; + case "FORCE_UPGRADE": + case 1: + message.thirdPartyStickers = 1; + break; + case "DEVELOPMENT": + case 2: + message.thirdPartyStickers = 2; + break; + case "PRODUCTION": + case 3: + message.thirdPartyStickers = 3; + break; + } + switch (object.frequentlyForwardedSetting) { + case "NOT_STARTED": + case 0: + message.frequentlyForwardedSetting = 0; + break; + case "FORCE_UPGRADE": + case 1: + message.frequentlyForwardedSetting = 1; + break; + case "DEVELOPMENT": + case 2: + message.frequentlyForwardedSetting = 2; + break; + case "PRODUCTION": + case 3: + message.frequentlyForwardedSetting = 3; + break; + } + switch (object.groupsV4JoinPermission) { + case "NOT_STARTED": + case 0: + message.groupsV4JoinPermission = 0; + break; + case "FORCE_UPGRADE": + case 1: + message.groupsV4JoinPermission = 1; + break; + case "DEVELOPMENT": + case 2: + message.groupsV4JoinPermission = 2; + break; + case "PRODUCTION": + case 3: + message.groupsV4JoinPermission = 3; + break; + } + switch (object.recentStickers) { + case "NOT_STARTED": + case 0: + message.recentStickers = 0; + break; + case "FORCE_UPGRADE": + case 1: + message.recentStickers = 1; + break; + case "DEVELOPMENT": + case 2: + message.recentStickers = 2; + break; + case "PRODUCTION": + case 3: + message.recentStickers = 3; + break; + } + switch (object.catalog) { + case "NOT_STARTED": + case 0: + message.catalog = 0; + break; + case "FORCE_UPGRADE": + case 1: + message.catalog = 1; + break; + case "DEVELOPMENT": + case 2: + message.catalog = 2; + break; + case "PRODUCTION": + case 3: + message.catalog = 3; + break; + } + switch (object.starredStickers) { + case "NOT_STARTED": + case 0: + message.starredStickers = 0; + break; + case "FORCE_UPGRADE": + case 1: + message.starredStickers = 1; + break; + case "DEVELOPMENT": + case 2: + message.starredStickers = 2; + break; + case "PRODUCTION": + case 3: + message.starredStickers = 3; + break; + } + switch (object.voipGroupCall) { + case "NOT_STARTED": + case 0: + message.voipGroupCall = 0; + break; + case "FORCE_UPGRADE": + case 1: + message.voipGroupCall = 1; + break; + case "DEVELOPMENT": + case 2: + message.voipGroupCall = 2; + break; + case "PRODUCTION": + case 3: + message.voipGroupCall = 3; + break; + } + switch (object.templateMessage) { + case "NOT_STARTED": + case 0: + message.templateMessage = 0; + break; + case "FORCE_UPGRADE": + case 1: + message.templateMessage = 1; + break; + case "DEVELOPMENT": + case 2: + message.templateMessage = 2; + break; + case "PRODUCTION": + case 3: + message.templateMessage = 3; + break; + } + switch (object.templateMessageInteractivity) { + case "NOT_STARTED": + case 0: + message.templateMessageInteractivity = 0; + break; + case "FORCE_UPGRADE": + case 1: + message.templateMessageInteractivity = 1; + break; + case "DEVELOPMENT": + case 2: + message.templateMessageInteractivity = 2; + break; + case "PRODUCTION": + case 3: + message.templateMessageInteractivity = 3; + break; + } + switch (object.ephemeralMessages) { + case "NOT_STARTED": + case 0: + message.ephemeralMessages = 0; + break; + case "FORCE_UPGRADE": + case 1: + message.ephemeralMessages = 1; + break; + case "DEVELOPMENT": + case 2: + message.ephemeralMessages = 2; + break; + case "PRODUCTION": + case 3: + message.ephemeralMessages = 3; + break; + } + switch (object.e2ENotificationSync) { + case "NOT_STARTED": + case 0: + message.e2ENotificationSync = 0; + break; + case "FORCE_UPGRADE": + case 1: + message.e2ENotificationSync = 1; + break; + case "DEVELOPMENT": + case 2: + message.e2ENotificationSync = 2; + break; + case "PRODUCTION": + case 3: + message.e2ENotificationSync = 3; + break; + } + switch (object.recentStickersV2) { + case "NOT_STARTED": + case 0: + message.recentStickersV2 = 0; + break; + case "FORCE_UPGRADE": + case 1: + message.recentStickersV2 = 1; + break; + case "DEVELOPMENT": + case 2: + message.recentStickersV2 = 2; + break; + case "PRODUCTION": + case 3: + message.recentStickersV2 = 3; + break; + } + switch (object.recentStickersV3) { + case "NOT_STARTED": + case 0: + message.recentStickersV3 = 0; + break; + case "FORCE_UPGRADE": + case 1: + message.recentStickersV3 = 1; + break; + case "DEVELOPMENT": + case 2: + message.recentStickersV3 = 2; + break; + case "PRODUCTION": + case 3: + message.recentStickersV3 = 3; + break; + } + switch (object.userNotice) { + case "NOT_STARTED": + case 0: + message.userNotice = 0; + break; + case "FORCE_UPGRADE": + case 1: + message.userNotice = 1; + break; + case "DEVELOPMENT": + case 2: + message.userNotice = 2; + break; + case "PRODUCTION": + case 3: + message.userNotice = 3; + break; + } + switch (object.support) { + case "NOT_STARTED": + case 0: + message.support = 0; + break; + case "FORCE_UPGRADE": + case 1: + message.support = 1; + break; + case "DEVELOPMENT": + case 2: + message.support = 2; + break; + case "PRODUCTION": + case 3: + message.support = 3; + break; + } + switch (object.groupUiiCleanup) { + case "NOT_STARTED": + case 0: + message.groupUiiCleanup = 0; + break; + case "FORCE_UPGRADE": + case 1: + message.groupUiiCleanup = 1; + break; + case "DEVELOPMENT": + case 2: + message.groupUiiCleanup = 2; + break; + case "PRODUCTION": + case 3: + message.groupUiiCleanup = 3; + break; + } + switch (object.groupDogfoodingInternalOnly) { + case "NOT_STARTED": + case 0: + message.groupDogfoodingInternalOnly = 0; + break; + case "FORCE_UPGRADE": + case 1: + message.groupDogfoodingInternalOnly = 1; + break; + case "DEVELOPMENT": + case 2: + message.groupDogfoodingInternalOnly = 2; + break; + case "PRODUCTION": + case 3: + message.groupDogfoodingInternalOnly = 3; + break; + } + switch (object.settingsSync) { + case "NOT_STARTED": + case 0: + message.settingsSync = 0; + break; + case "FORCE_UPGRADE": + case 1: + message.settingsSync = 1; + break; + case "DEVELOPMENT": + case 2: + message.settingsSync = 2; + break; + case "PRODUCTION": + case 3: + message.settingsSync = 3; + break; + } + switch (object.archiveV2) { + case "NOT_STARTED": + case 0: + message.archiveV2 = 0; + break; + case "FORCE_UPGRADE": + case 1: + message.archiveV2 = 1; + break; + case "DEVELOPMENT": + case 2: + message.archiveV2 = 2; + break; + case "PRODUCTION": + case 3: + message.archiveV2 = 3; + break; + } + switch (object.ephemeralAllowGroupMembers) { + case "NOT_STARTED": + case 0: + message.ephemeralAllowGroupMembers = 0; + break; + case "FORCE_UPGRADE": + case 1: + message.ephemeralAllowGroupMembers = 1; + break; + case "DEVELOPMENT": + case 2: + message.ephemeralAllowGroupMembers = 2; + break; + case "PRODUCTION": + case 3: + message.ephemeralAllowGroupMembers = 3; + break; + } + switch (object.ephemeral24HDuration) { + case "NOT_STARTED": + case 0: + message.ephemeral24HDuration = 0; + break; + case "FORCE_UPGRADE": + case 1: + message.ephemeral24HDuration = 1; + break; + case "DEVELOPMENT": + case 2: + message.ephemeral24HDuration = 2; + break; + case "PRODUCTION": + case 3: + message.ephemeral24HDuration = 3; + break; + } + switch (object.mdForceUpgrade) { + case "NOT_STARTED": + case 0: + message.mdForceUpgrade = 0; + break; + case "FORCE_UPGRADE": + case 1: + message.mdForceUpgrade = 1; + break; + case "DEVELOPMENT": + case 2: + message.mdForceUpgrade = 2; + break; + case "PRODUCTION": + case 3: + message.mdForceUpgrade = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a WebFeatures message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.WebFeatures + * @static + * @param {proto.WebFeatures} message WebFeatures + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WebFeatures.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.labelsDisplay = options.enums === String ? "NOT_STARTED" : 0; + object.voipIndividualOutgoing = options.enums === String ? "NOT_STARTED" : 0; + object.groupsV3 = options.enums === String ? "NOT_STARTED" : 0; + object.groupsV3Create = options.enums === String ? "NOT_STARTED" : 0; + object.changeNumberV2 = options.enums === String ? "NOT_STARTED" : 0; + object.queryStatusV3Thumbnail = options.enums === String ? "NOT_STARTED" : 0; + object.liveLocations = options.enums === String ? "NOT_STARTED" : 0; + object.queryVname = options.enums === String ? "NOT_STARTED" : 0; + object.voipIndividualIncoming = options.enums === String ? "NOT_STARTED" : 0; + object.quickRepliesQuery = options.enums === String ? "NOT_STARTED" : 0; + object.payments = options.enums === String ? "NOT_STARTED" : 0; + object.stickerPackQuery = options.enums === String ? "NOT_STARTED" : 0; + object.liveLocationsFinal = options.enums === String ? "NOT_STARTED" : 0; + object.labelsEdit = options.enums === String ? "NOT_STARTED" : 0; + object.mediaUpload = options.enums === String ? "NOT_STARTED" : 0; + object.mediaUploadRichQuickReplies = options.enums === String ? "NOT_STARTED" : 0; + object.vnameV2 = options.enums === String ? "NOT_STARTED" : 0; + object.videoPlaybackUrl = options.enums === String ? "NOT_STARTED" : 0; + object.statusRanking = options.enums === String ? "NOT_STARTED" : 0; + object.voipIndividualVideo = options.enums === String ? "NOT_STARTED" : 0; + object.thirdPartyStickers = options.enums === String ? "NOT_STARTED" : 0; + object.frequentlyForwardedSetting = options.enums === String ? "NOT_STARTED" : 0; + object.groupsV4JoinPermission = options.enums === String ? "NOT_STARTED" : 0; + object.recentStickers = options.enums === String ? "NOT_STARTED" : 0; + object.catalog = options.enums === String ? "NOT_STARTED" : 0; + object.starredStickers = options.enums === String ? "NOT_STARTED" : 0; + object.voipGroupCall = options.enums === String ? "NOT_STARTED" : 0; + object.templateMessage = options.enums === String ? "NOT_STARTED" : 0; + object.templateMessageInteractivity = options.enums === String ? "NOT_STARTED" : 0; + object.ephemeralMessages = options.enums === String ? "NOT_STARTED" : 0; + object.e2ENotificationSync = options.enums === String ? "NOT_STARTED" : 0; + object.recentStickersV2 = options.enums === String ? "NOT_STARTED" : 0; + object.recentStickersV3 = options.enums === String ? "NOT_STARTED" : 0; + object.userNotice = options.enums === String ? "NOT_STARTED" : 0; + object.support = options.enums === String ? "NOT_STARTED" : 0; + object.groupUiiCleanup = options.enums === String ? "NOT_STARTED" : 0; + object.groupDogfoodingInternalOnly = options.enums === String ? "NOT_STARTED" : 0; + object.settingsSync = options.enums === String ? "NOT_STARTED" : 0; + object.archiveV2 = options.enums === String ? "NOT_STARTED" : 0; + object.ephemeralAllowGroupMembers = options.enums === String ? "NOT_STARTED" : 0; + object.ephemeral24HDuration = options.enums === String ? "NOT_STARTED" : 0; + object.mdForceUpgrade = options.enums === String ? "NOT_STARTED" : 0; + } + if (message.labelsDisplay != null && message.hasOwnProperty("labelsDisplay")) + object.labelsDisplay = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.labelsDisplay] : message.labelsDisplay; + if (message.voipIndividualOutgoing != null && message.hasOwnProperty("voipIndividualOutgoing")) + object.voipIndividualOutgoing = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.voipIndividualOutgoing] : message.voipIndividualOutgoing; + if (message.groupsV3 != null && message.hasOwnProperty("groupsV3")) + object.groupsV3 = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.groupsV3] : message.groupsV3; + if (message.groupsV3Create != null && message.hasOwnProperty("groupsV3Create")) + object.groupsV3Create = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.groupsV3Create] : message.groupsV3Create; + if (message.changeNumberV2 != null && message.hasOwnProperty("changeNumberV2")) + object.changeNumberV2 = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.changeNumberV2] : message.changeNumberV2; + if (message.queryStatusV3Thumbnail != null && message.hasOwnProperty("queryStatusV3Thumbnail")) + object.queryStatusV3Thumbnail = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.queryStatusV3Thumbnail] : message.queryStatusV3Thumbnail; + if (message.liveLocations != null && message.hasOwnProperty("liveLocations")) + object.liveLocations = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.liveLocations] : message.liveLocations; + if (message.queryVname != null && message.hasOwnProperty("queryVname")) + object.queryVname = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.queryVname] : message.queryVname; + if (message.voipIndividualIncoming != null && message.hasOwnProperty("voipIndividualIncoming")) + object.voipIndividualIncoming = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.voipIndividualIncoming] : message.voipIndividualIncoming; + if (message.quickRepliesQuery != null && message.hasOwnProperty("quickRepliesQuery")) + object.quickRepliesQuery = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.quickRepliesQuery] : message.quickRepliesQuery; + if (message.payments != null && message.hasOwnProperty("payments")) + object.payments = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.payments] : message.payments; + if (message.stickerPackQuery != null && message.hasOwnProperty("stickerPackQuery")) + object.stickerPackQuery = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.stickerPackQuery] : message.stickerPackQuery; + if (message.liveLocationsFinal != null && message.hasOwnProperty("liveLocationsFinal")) + object.liveLocationsFinal = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.liveLocationsFinal] : message.liveLocationsFinal; + if (message.labelsEdit != null && message.hasOwnProperty("labelsEdit")) + object.labelsEdit = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.labelsEdit] : message.labelsEdit; + if (message.mediaUpload != null && message.hasOwnProperty("mediaUpload")) + object.mediaUpload = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.mediaUpload] : message.mediaUpload; + if (message.mediaUploadRichQuickReplies != null && message.hasOwnProperty("mediaUploadRichQuickReplies")) + object.mediaUploadRichQuickReplies = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.mediaUploadRichQuickReplies] : message.mediaUploadRichQuickReplies; + if (message.vnameV2 != null && message.hasOwnProperty("vnameV2")) + object.vnameV2 = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.vnameV2] : message.vnameV2; + if (message.videoPlaybackUrl != null && message.hasOwnProperty("videoPlaybackUrl")) + object.videoPlaybackUrl = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.videoPlaybackUrl] : message.videoPlaybackUrl; + if (message.statusRanking != null && message.hasOwnProperty("statusRanking")) + object.statusRanking = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.statusRanking] : message.statusRanking; + if (message.voipIndividualVideo != null && message.hasOwnProperty("voipIndividualVideo")) + object.voipIndividualVideo = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.voipIndividualVideo] : message.voipIndividualVideo; + if (message.thirdPartyStickers != null && message.hasOwnProperty("thirdPartyStickers")) + object.thirdPartyStickers = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.thirdPartyStickers] : message.thirdPartyStickers; + if (message.frequentlyForwardedSetting != null && message.hasOwnProperty("frequentlyForwardedSetting")) + object.frequentlyForwardedSetting = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.frequentlyForwardedSetting] : message.frequentlyForwardedSetting; + if (message.groupsV4JoinPermission != null && message.hasOwnProperty("groupsV4JoinPermission")) + object.groupsV4JoinPermission = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.groupsV4JoinPermission] : message.groupsV4JoinPermission; + if (message.recentStickers != null && message.hasOwnProperty("recentStickers")) + object.recentStickers = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.recentStickers] : message.recentStickers; + if (message.catalog != null && message.hasOwnProperty("catalog")) + object.catalog = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.catalog] : message.catalog; + if (message.starredStickers != null && message.hasOwnProperty("starredStickers")) + object.starredStickers = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.starredStickers] : message.starredStickers; + if (message.voipGroupCall != null && message.hasOwnProperty("voipGroupCall")) + object.voipGroupCall = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.voipGroupCall] : message.voipGroupCall; + if (message.templateMessage != null && message.hasOwnProperty("templateMessage")) + object.templateMessage = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.templateMessage] : message.templateMessage; + if (message.templateMessageInteractivity != null && message.hasOwnProperty("templateMessageInteractivity")) + object.templateMessageInteractivity = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.templateMessageInteractivity] : message.templateMessageInteractivity; + if (message.ephemeralMessages != null && message.hasOwnProperty("ephemeralMessages")) + object.ephemeralMessages = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.ephemeralMessages] : message.ephemeralMessages; + if (message.e2ENotificationSync != null && message.hasOwnProperty("e2ENotificationSync")) + object.e2ENotificationSync = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.e2ENotificationSync] : message.e2ENotificationSync; + if (message.recentStickersV2 != null && message.hasOwnProperty("recentStickersV2")) + object.recentStickersV2 = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.recentStickersV2] : message.recentStickersV2; + if (message.recentStickersV3 != null && message.hasOwnProperty("recentStickersV3")) + object.recentStickersV3 = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.recentStickersV3] : message.recentStickersV3; + if (message.userNotice != null && message.hasOwnProperty("userNotice")) + object.userNotice = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.userNotice] : message.userNotice; + if (message.support != null && message.hasOwnProperty("support")) + object.support = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.support] : message.support; + if (message.groupUiiCleanup != null && message.hasOwnProperty("groupUiiCleanup")) + object.groupUiiCleanup = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.groupUiiCleanup] : message.groupUiiCleanup; + if (message.groupDogfoodingInternalOnly != null && message.hasOwnProperty("groupDogfoodingInternalOnly")) + object.groupDogfoodingInternalOnly = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.groupDogfoodingInternalOnly] : message.groupDogfoodingInternalOnly; + if (message.settingsSync != null && message.hasOwnProperty("settingsSync")) + object.settingsSync = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.settingsSync] : message.settingsSync; + if (message.archiveV2 != null && message.hasOwnProperty("archiveV2")) + object.archiveV2 = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.archiveV2] : message.archiveV2; + if (message.ephemeralAllowGroupMembers != null && message.hasOwnProperty("ephemeralAllowGroupMembers")) + object.ephemeralAllowGroupMembers = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.ephemeralAllowGroupMembers] : message.ephemeralAllowGroupMembers; + if (message.ephemeral24HDuration != null && message.hasOwnProperty("ephemeral24HDuration")) + object.ephemeral24HDuration = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.ephemeral24HDuration] : message.ephemeral24HDuration; + if (message.mdForceUpgrade != null && message.hasOwnProperty("mdForceUpgrade")) + object.mdForceUpgrade = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.mdForceUpgrade] : message.mdForceUpgrade; + return object; + }; + + /** + * Converts this WebFeatures to JSON. + * @function toJSON + * @memberof proto.WebFeatures + * @instance + * @returns {Object.} JSON object + */ + WebFeatures.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * WebFeaturesFlag enum. + * @name proto.WebFeatures.WebFeaturesFlag + * @enum {number} + * @property {number} NOT_STARTED=0 NOT_STARTED value + * @property {number} FORCE_UPGRADE=1 FORCE_UPGRADE value + * @property {number} DEVELOPMENT=2 DEVELOPMENT value + * @property {number} PRODUCTION=3 PRODUCTION value + */ + WebFeatures.WebFeaturesFlag = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NOT_STARTED"] = 0; + values[valuesById[1] = "FORCE_UPGRADE"] = 1; + values[valuesById[2] = "DEVELOPMENT"] = 2; + values[valuesById[3] = "PRODUCTION"] = 3; + return values; + })(); + + return WebFeatures; + })(); + + proto.NotificationMessageInfo = (function() { + + /** + * Properties of a NotificationMessageInfo. + * @memberof proto + * @interface INotificationMessageInfo + * @property {proto.IMessageKey|null} [key] NotificationMessageInfo key + * @property {proto.IMessage|null} [message] NotificationMessageInfo message + * @property {number|Long|null} [messageTimestamp] NotificationMessageInfo messageTimestamp + * @property {string|null} [participant] NotificationMessageInfo participant + */ + + /** + * Constructs a new NotificationMessageInfo. + * @memberof proto + * @classdesc Represents a NotificationMessageInfo. + * @implements INotificationMessageInfo + * @constructor + * @param {proto.INotificationMessageInfo=} [properties] Properties to set + */ + function NotificationMessageInfo(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]]; + } + + /** + * NotificationMessageInfo key. + * @member {proto.IMessageKey|null|undefined} key + * @memberof proto.NotificationMessageInfo + * @instance + */ + NotificationMessageInfo.prototype.key = null; + + /** + * NotificationMessageInfo message. + * @member {proto.IMessage|null|undefined} message + * @memberof proto.NotificationMessageInfo + * @instance + */ + NotificationMessageInfo.prototype.message = null; + + /** + * NotificationMessageInfo messageTimestamp. + * @member {number|Long} messageTimestamp + * @memberof proto.NotificationMessageInfo + * @instance + */ + NotificationMessageInfo.prototype.messageTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * NotificationMessageInfo participant. + * @member {string} participant + * @memberof proto.NotificationMessageInfo + * @instance + */ + NotificationMessageInfo.prototype.participant = ""; + + /** + * Creates a new NotificationMessageInfo instance using the specified properties. + * @function create + * @memberof proto.NotificationMessageInfo + * @static + * @param {proto.INotificationMessageInfo=} [properties] Properties to set + * @returns {proto.NotificationMessageInfo} NotificationMessageInfo instance + */ + NotificationMessageInfo.create = function create(properties) { + return new NotificationMessageInfo(properties); + }; + + /** + * Encodes the specified NotificationMessageInfo message. Does not implicitly {@link proto.NotificationMessageInfo.verify|verify} messages. + * @function encode + * @memberof proto.NotificationMessageInfo + * @static + * @param {proto.INotificationMessageInfo} message NotificationMessageInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NotificationMessageInfo.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.message != null && Object.hasOwnProperty.call(message, "message")) + $root.proto.Message.encode(message.message, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.messageTimestamp != null && Object.hasOwnProperty.call(message, "messageTimestamp")) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.messageTimestamp); + if (message.participant != null && Object.hasOwnProperty.call(message, "participant")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.participant); + return writer; + }; + + /** + * Encodes the specified NotificationMessageInfo message, length delimited. Does not implicitly {@link proto.NotificationMessageInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.NotificationMessageInfo + * @static + * @param {proto.INotificationMessageInfo} message NotificationMessageInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NotificationMessageInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NotificationMessageInfo message from the specified reader or buffer. + * @function decode + * @memberof proto.NotificationMessageInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.NotificationMessageInfo} NotificationMessageInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NotificationMessageInfo.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.NotificationMessageInfo(); + 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.message = $root.proto.Message.decode(reader, reader.uint32()); + break; + case 3: + message.messageTimestamp = reader.uint64(); + break; + case 4: + message.participant = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NotificationMessageInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.NotificationMessageInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.NotificationMessageInfo} NotificationMessageInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NotificationMessageInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NotificationMessageInfo message. + * @function verify + * @memberof proto.NotificationMessageInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NotificationMessageInfo.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.message != null && message.hasOwnProperty("message")) { + var error = $root.proto.Message.verify(message.message); + if (error) + return "message." + error; + } + if (message.messageTimestamp != null && message.hasOwnProperty("messageTimestamp")) + if (!$util.isInteger(message.messageTimestamp) && !(message.messageTimestamp && $util.isInteger(message.messageTimestamp.low) && $util.isInteger(message.messageTimestamp.high))) + return "messageTimestamp: integer|Long expected"; + if (message.participant != null && message.hasOwnProperty("participant")) + if (!$util.isString(message.participant)) + return "participant: string expected"; + return null; + }; + + /** + * Creates a NotificationMessageInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.NotificationMessageInfo + * @static + * @param {Object.} object Plain object + * @returns {proto.NotificationMessageInfo} NotificationMessageInfo + */ + NotificationMessageInfo.fromObject = function fromObject(object) { + if (object instanceof $root.proto.NotificationMessageInfo) + return object; + var message = new $root.proto.NotificationMessageInfo(); + if (object.key != null) { + if (typeof object.key !== "object") + throw TypeError(".proto.NotificationMessageInfo.key: object expected"); + message.key = $root.proto.MessageKey.fromObject(object.key); + } + if (object.message != null) { + if (typeof object.message !== "object") + throw TypeError(".proto.NotificationMessageInfo.message: object expected"); + message.message = $root.proto.Message.fromObject(object.message); + } + if (object.messageTimestamp != null) + if ($util.Long) + (message.messageTimestamp = $util.Long.fromValue(object.messageTimestamp)).unsigned = true; + else if (typeof object.messageTimestamp === "string") + message.messageTimestamp = parseInt(object.messageTimestamp, 10); + else if (typeof object.messageTimestamp === "number") + message.messageTimestamp = object.messageTimestamp; + else if (typeof object.messageTimestamp === "object") + message.messageTimestamp = new $util.LongBits(object.messageTimestamp.low >>> 0, object.messageTimestamp.high >>> 0).toNumber(true); + if (object.participant != null) + message.participant = String(object.participant); + return message; + }; + + /** + * Creates a plain object from a NotificationMessageInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.NotificationMessageInfo + * @static + * @param {proto.NotificationMessageInfo} message NotificationMessageInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NotificationMessageInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.key = null; + object.message = null; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.messageTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.messageTimestamp = options.longs === String ? "0" : 0; + object.participant = ""; + } + if (message.key != null && message.hasOwnProperty("key")) + object.key = $root.proto.MessageKey.toObject(message.key, options); + if (message.message != null && message.hasOwnProperty("message")) + object.message = $root.proto.Message.toObject(message.message, options); + if (message.messageTimestamp != null && message.hasOwnProperty("messageTimestamp")) + if (typeof message.messageTimestamp === "number") + object.messageTimestamp = options.longs === String ? String(message.messageTimestamp) : message.messageTimestamp; + else + object.messageTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.messageTimestamp) : options.longs === Number ? new $util.LongBits(message.messageTimestamp.low >>> 0, message.messageTimestamp.high >>> 0).toNumber(true) : message.messageTimestamp; + if (message.participant != null && message.hasOwnProperty("participant")) + object.participant = message.participant; + return object; + }; + + /** + * Converts this NotificationMessageInfo to JSON. + * @function toJSON + * @memberof proto.NotificationMessageInfo + * @instance + * @returns {Object.} JSON object + */ + NotificationMessageInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return NotificationMessageInfo; + })(); + + proto.WebNotificationsInfo = (function() { + + /** + * Properties of a WebNotificationsInfo. + * @memberof proto + * @interface IWebNotificationsInfo + * @property {number|Long|null} [timestamp] WebNotificationsInfo timestamp + * @property {number|null} [unreadChats] WebNotificationsInfo unreadChats + * @property {number|null} [notifyMessageCount] WebNotificationsInfo notifyMessageCount + * @property {Array.|null} [notifyMessages] WebNotificationsInfo notifyMessages + */ + + /** + * Constructs a new WebNotificationsInfo. + * @memberof proto + * @classdesc Represents a WebNotificationsInfo. + * @implements IWebNotificationsInfo + * @constructor + * @param {proto.IWebNotificationsInfo=} [properties] Properties to set + */ + function WebNotificationsInfo(properties) { + this.notifyMessages = []; + 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]]; + } + + /** + * WebNotificationsInfo timestamp. + * @member {number|Long} timestamp + * @memberof proto.WebNotificationsInfo + * @instance + */ + WebNotificationsInfo.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * WebNotificationsInfo unreadChats. + * @member {number} unreadChats + * @memberof proto.WebNotificationsInfo + * @instance + */ + WebNotificationsInfo.prototype.unreadChats = 0; + + /** + * WebNotificationsInfo notifyMessageCount. + * @member {number} notifyMessageCount + * @memberof proto.WebNotificationsInfo + * @instance + */ + WebNotificationsInfo.prototype.notifyMessageCount = 0; + + /** + * WebNotificationsInfo notifyMessages. + * @member {Array.} notifyMessages + * @memberof proto.WebNotificationsInfo + * @instance + */ + WebNotificationsInfo.prototype.notifyMessages = $util.emptyArray; + + /** + * Creates a new WebNotificationsInfo instance using the specified properties. + * @function create + * @memberof proto.WebNotificationsInfo + * @static + * @param {proto.IWebNotificationsInfo=} [properties] Properties to set + * @returns {proto.WebNotificationsInfo} WebNotificationsInfo instance + */ + WebNotificationsInfo.create = function create(properties) { + return new WebNotificationsInfo(properties); + }; + + /** + * Encodes the specified WebNotificationsInfo message. Does not implicitly {@link proto.WebNotificationsInfo.verify|verify} messages. + * @function encode + * @memberof proto.WebNotificationsInfo + * @static + * @param {proto.IWebNotificationsInfo} message WebNotificationsInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WebNotificationsInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.timestamp); + if (message.unreadChats != null && Object.hasOwnProperty.call(message, "unreadChats")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.unreadChats); + if (message.notifyMessageCount != null && Object.hasOwnProperty.call(message, "notifyMessageCount")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.notifyMessageCount); + if (message.notifyMessages != null && message.notifyMessages.length) + for (var i = 0; i < message.notifyMessages.length; ++i) + $root.proto.WebMessageInfo.encode(message.notifyMessages[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified WebNotificationsInfo message, length delimited. Does not implicitly {@link proto.WebNotificationsInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.WebNotificationsInfo + * @static + * @param {proto.IWebNotificationsInfo} message WebNotificationsInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WebNotificationsInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WebNotificationsInfo message from the specified reader or buffer. + * @function decode + * @memberof proto.WebNotificationsInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.WebNotificationsInfo} WebNotificationsInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WebNotificationsInfo.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.WebNotificationsInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.timestamp = reader.uint64(); + break; + case 3: + message.unreadChats = reader.uint32(); + break; + case 4: + message.notifyMessageCount = reader.uint32(); + break; + case 5: + if (!(message.notifyMessages && message.notifyMessages.length)) + message.notifyMessages = []; + message.notifyMessages.push($root.proto.WebMessageInfo.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WebNotificationsInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.WebNotificationsInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.WebNotificationsInfo} WebNotificationsInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WebNotificationsInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WebNotificationsInfo message. + * @function verify + * @memberof proto.WebNotificationsInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WebNotificationsInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object 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 (message.unreadChats != null && message.hasOwnProperty("unreadChats")) + if (!$util.isInteger(message.unreadChats)) + return "unreadChats: integer expected"; + if (message.notifyMessageCount != null && message.hasOwnProperty("notifyMessageCount")) + if (!$util.isInteger(message.notifyMessageCount)) + return "notifyMessageCount: integer expected"; + if (message.notifyMessages != null && message.hasOwnProperty("notifyMessages")) { + if (!Array.isArray(message.notifyMessages)) + return "notifyMessages: array expected"; + for (var i = 0; i < message.notifyMessages.length; ++i) { + var error = $root.proto.WebMessageInfo.verify(message.notifyMessages[i]); + if (error) + return "notifyMessages." + error; + } + } + return null; + }; + + /** + * Creates a WebNotificationsInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.WebNotificationsInfo + * @static + * @param {Object.} object Plain object + * @returns {proto.WebNotificationsInfo} WebNotificationsInfo + */ + WebNotificationsInfo.fromObject = function fromObject(object) { + if (object instanceof $root.proto.WebNotificationsInfo) + return object; + var message = new $root.proto.WebNotificationsInfo(); + if (object.timestamp != null) + if ($util.Long) + (message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = true; + 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(true); + if (object.unreadChats != null) + message.unreadChats = object.unreadChats >>> 0; + if (object.notifyMessageCount != null) + message.notifyMessageCount = object.notifyMessageCount >>> 0; + if (object.notifyMessages) { + if (!Array.isArray(object.notifyMessages)) + throw TypeError(".proto.WebNotificationsInfo.notifyMessages: array expected"); + message.notifyMessages = []; + for (var i = 0; i < object.notifyMessages.length; ++i) { + if (typeof object.notifyMessages[i] !== "object") + throw TypeError(".proto.WebNotificationsInfo.notifyMessages: object expected"); + message.notifyMessages[i] = $root.proto.WebMessageInfo.fromObject(object.notifyMessages[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a WebNotificationsInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.WebNotificationsInfo + * @static + * @param {proto.WebNotificationsInfo} message WebNotificationsInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WebNotificationsInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.notifyMessages = []; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.timestamp = options.longs === String ? "0" : 0; + object.unreadChats = 0; + object.notifyMessageCount = 0; + } + 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(true) : message.timestamp; + if (message.unreadChats != null && message.hasOwnProperty("unreadChats")) + object.unreadChats = message.unreadChats; + if (message.notifyMessageCount != null && message.hasOwnProperty("notifyMessageCount")) + object.notifyMessageCount = message.notifyMessageCount; + if (message.notifyMessages && message.notifyMessages.length) { + object.notifyMessages = []; + for (var j = 0; j < message.notifyMessages.length; ++j) + object.notifyMessages[j] = $root.proto.WebMessageInfo.toObject(message.notifyMessages[j], options); + } + return object; + }; + + /** + * Converts this WebNotificationsInfo to JSON. + * @function toJSON + * @memberof proto.WebNotificationsInfo + * @instance + * @returns {Object.} JSON object + */ + WebNotificationsInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return WebNotificationsInfo; + })(); + + proto.PaymentInfo = (function() { + + /** + * Properties of a PaymentInfo. + * @memberof proto + * @interface IPaymentInfo + * @property {proto.PaymentInfo.PaymentInfoCurrency|null} [currencyDeprecated] PaymentInfo currencyDeprecated + * @property {number|Long|null} [amount1000] PaymentInfo amount1000 + * @property {string|null} [receiverJid] PaymentInfo receiverJid + * @property {proto.PaymentInfo.PaymentInfoStatus|null} [status] PaymentInfo status + * @property {number|Long|null} [transactionTimestamp] PaymentInfo transactionTimestamp + * @property {proto.IMessageKey|null} [requestMessageKey] PaymentInfo requestMessageKey + * @property {number|Long|null} [expiryTimestamp] PaymentInfo expiryTimestamp + * @property {boolean|null} [futureproofed] PaymentInfo futureproofed + * @property {string|null} [currency] PaymentInfo currency + * @property {proto.PaymentInfo.PaymentInfoTxnStatus|null} [txnStatus] PaymentInfo txnStatus + * @property {boolean|null} [useNoviFiatFormat] PaymentInfo useNoviFiatFormat + * @property {proto.IMoney|null} [primaryAmount] PaymentInfo primaryAmount + * @property {proto.IMoney|null} [exchangeAmount] PaymentInfo exchangeAmount + */ + + /** + * Constructs a new PaymentInfo. + * @memberof proto + * @classdesc Represents a PaymentInfo. + * @implements IPaymentInfo + * @constructor + * @param {proto.IPaymentInfo=} [properties] Properties to set + */ + function PaymentInfo(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]]; + } + + /** + * PaymentInfo currencyDeprecated. + * @member {proto.PaymentInfo.PaymentInfoCurrency} currencyDeprecated + * @memberof proto.PaymentInfo + * @instance + */ + PaymentInfo.prototype.currencyDeprecated = 0; + + /** + * PaymentInfo amount1000. + * @member {number|Long} amount1000 + * @memberof proto.PaymentInfo + * @instance + */ + PaymentInfo.prototype.amount1000 = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * PaymentInfo receiverJid. + * @member {string} receiverJid + * @memberof proto.PaymentInfo + * @instance + */ + PaymentInfo.prototype.receiverJid = ""; + + /** + * PaymentInfo status. + * @member {proto.PaymentInfo.PaymentInfoStatus} status + * @memberof proto.PaymentInfo + * @instance + */ + PaymentInfo.prototype.status = 0; + + /** + * PaymentInfo transactionTimestamp. + * @member {number|Long} transactionTimestamp + * @memberof proto.PaymentInfo + * @instance + */ + PaymentInfo.prototype.transactionTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * PaymentInfo requestMessageKey. + * @member {proto.IMessageKey|null|undefined} requestMessageKey + * @memberof proto.PaymentInfo + * @instance + */ + PaymentInfo.prototype.requestMessageKey = null; + + /** + * PaymentInfo expiryTimestamp. + * @member {number|Long} expiryTimestamp + * @memberof proto.PaymentInfo + * @instance + */ + PaymentInfo.prototype.expiryTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * PaymentInfo futureproofed. + * @member {boolean} futureproofed + * @memberof proto.PaymentInfo + * @instance + */ + PaymentInfo.prototype.futureproofed = false; + + /** + * PaymentInfo currency. + * @member {string} currency + * @memberof proto.PaymentInfo + * @instance + */ + PaymentInfo.prototype.currency = ""; + + /** + * PaymentInfo txnStatus. + * @member {proto.PaymentInfo.PaymentInfoTxnStatus} txnStatus + * @memberof proto.PaymentInfo + * @instance + */ + PaymentInfo.prototype.txnStatus = 0; + + /** + * PaymentInfo useNoviFiatFormat. + * @member {boolean} useNoviFiatFormat + * @memberof proto.PaymentInfo + * @instance + */ + PaymentInfo.prototype.useNoviFiatFormat = false; + + /** + * PaymentInfo primaryAmount. + * @member {proto.IMoney|null|undefined} primaryAmount + * @memberof proto.PaymentInfo + * @instance + */ + PaymentInfo.prototype.primaryAmount = null; + + /** + * PaymentInfo exchangeAmount. + * @member {proto.IMoney|null|undefined} exchangeAmount + * @memberof proto.PaymentInfo + * @instance + */ + PaymentInfo.prototype.exchangeAmount = null; + + /** + * Creates a new PaymentInfo instance using the specified properties. + * @function create + * @memberof proto.PaymentInfo + * @static + * @param {proto.IPaymentInfo=} [properties] Properties to set + * @returns {proto.PaymentInfo} PaymentInfo instance + */ + PaymentInfo.create = function create(properties) { + return new PaymentInfo(properties); + }; + + /** + * Encodes the specified PaymentInfo message. Does not implicitly {@link proto.PaymentInfo.verify|verify} messages. + * @function encode + * @memberof proto.PaymentInfo + * @static + * @param {proto.IPaymentInfo} message PaymentInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PaymentInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.currencyDeprecated != null && Object.hasOwnProperty.call(message, "currencyDeprecated")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.currencyDeprecated); + if (message.amount1000 != null && Object.hasOwnProperty.call(message, "amount1000")) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.amount1000); + if (message.receiverJid != null && Object.hasOwnProperty.call(message, "receiverJid")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.receiverJid); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.status); + if (message.transactionTimestamp != null && Object.hasOwnProperty.call(message, "transactionTimestamp")) + writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.transactionTimestamp); + if (message.requestMessageKey != null && Object.hasOwnProperty.call(message, "requestMessageKey")) + $root.proto.MessageKey.encode(message.requestMessageKey, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.expiryTimestamp != null && Object.hasOwnProperty.call(message, "expiryTimestamp")) + writer.uint32(/* id 7, wireType 0 =*/56).uint64(message.expiryTimestamp); + if (message.futureproofed != null && Object.hasOwnProperty.call(message, "futureproofed")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.futureproofed); + if (message.currency != null && Object.hasOwnProperty.call(message, "currency")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.currency); + if (message.txnStatus != null && Object.hasOwnProperty.call(message, "txnStatus")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.txnStatus); + if (message.useNoviFiatFormat != null && Object.hasOwnProperty.call(message, "useNoviFiatFormat")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.useNoviFiatFormat); + if (message.primaryAmount != null && Object.hasOwnProperty.call(message, "primaryAmount")) + $root.proto.Money.encode(message.primaryAmount, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.exchangeAmount != null && Object.hasOwnProperty.call(message, "exchangeAmount")) + $root.proto.Money.encode(message.exchangeAmount, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PaymentInfo message, length delimited. Does not implicitly {@link proto.PaymentInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.PaymentInfo + * @static + * @param {proto.IPaymentInfo} message PaymentInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PaymentInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PaymentInfo message from the specified reader or buffer. + * @function decode + * @memberof proto.PaymentInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.PaymentInfo} PaymentInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PaymentInfo.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.PaymentInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.currencyDeprecated = reader.int32(); + break; + case 2: + message.amount1000 = reader.uint64(); + break; + case 3: + message.receiverJid = reader.string(); + break; + case 4: + message.status = reader.int32(); + break; + case 5: + message.transactionTimestamp = reader.uint64(); + break; + case 6: + message.requestMessageKey = $root.proto.MessageKey.decode(reader, reader.uint32()); + break; + case 7: + message.expiryTimestamp = reader.uint64(); + break; + case 8: + message.futureproofed = reader.bool(); + break; + case 9: + message.currency = reader.string(); + break; + case 10: + message.txnStatus = reader.int32(); + break; + case 11: + message.useNoviFiatFormat = reader.bool(); + break; + case 12: + message.primaryAmount = $root.proto.Money.decode(reader, reader.uint32()); + break; + case 13: + message.exchangeAmount = $root.proto.Money.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PaymentInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.PaymentInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.PaymentInfo} PaymentInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PaymentInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PaymentInfo message. + * @function verify + * @memberof proto.PaymentInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PaymentInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.currencyDeprecated != null && message.hasOwnProperty("currencyDeprecated")) + switch (message.currencyDeprecated) { + default: + return "currencyDeprecated: enum value expected"; + case 0: + case 1: + break; + } + if (message.amount1000 != null && message.hasOwnProperty("amount1000")) + if (!$util.isInteger(message.amount1000) && !(message.amount1000 && $util.isInteger(message.amount1000.low) && $util.isInteger(message.amount1000.high))) + return "amount1000: integer|Long expected"; + if (message.receiverJid != null && message.hasOwnProperty("receiverJid")) + if (!$util.isString(message.receiverJid)) + return "receiverJid: string expected"; + if (message.status != null && message.hasOwnProperty("status")) + switch (message.status) { + default: + return "status: 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: + break; + } + if (message.transactionTimestamp != null && message.hasOwnProperty("transactionTimestamp")) + if (!$util.isInteger(message.transactionTimestamp) && !(message.transactionTimestamp && $util.isInteger(message.transactionTimestamp.low) && $util.isInteger(message.transactionTimestamp.high))) + return "transactionTimestamp: integer|Long expected"; + if (message.requestMessageKey != null && message.hasOwnProperty("requestMessageKey")) { + var error = $root.proto.MessageKey.verify(message.requestMessageKey); + if (error) + return "requestMessageKey." + error; + } + if (message.expiryTimestamp != null && message.hasOwnProperty("expiryTimestamp")) + if (!$util.isInteger(message.expiryTimestamp) && !(message.expiryTimestamp && $util.isInteger(message.expiryTimestamp.low) && $util.isInteger(message.expiryTimestamp.high))) + return "expiryTimestamp: integer|Long expected"; + if (message.futureproofed != null && message.hasOwnProperty("futureproofed")) + if (typeof message.futureproofed !== "boolean") + return "futureproofed: boolean expected"; + if (message.currency != null && message.hasOwnProperty("currency")) + if (!$util.isString(message.currency)) + return "currency: string expected"; + if (message.txnStatus != null && message.hasOwnProperty("txnStatus")) + switch (message.txnStatus) { + default: + return "txnStatus: 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: + break; + } + if (message.useNoviFiatFormat != null && message.hasOwnProperty("useNoviFiatFormat")) + if (typeof message.useNoviFiatFormat !== "boolean") + return "useNoviFiatFormat: boolean expected"; + if (message.primaryAmount != null && message.hasOwnProperty("primaryAmount")) { + var error = $root.proto.Money.verify(message.primaryAmount); + if (error) + return "primaryAmount." + error; + } + if (message.exchangeAmount != null && message.hasOwnProperty("exchangeAmount")) { + var error = $root.proto.Money.verify(message.exchangeAmount); + if (error) + return "exchangeAmount." + error; + } + return null; + }; + + /** + * Creates a PaymentInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.PaymentInfo + * @static + * @param {Object.} object Plain object + * @returns {proto.PaymentInfo} PaymentInfo + */ + PaymentInfo.fromObject = function fromObject(object) { + if (object instanceof $root.proto.PaymentInfo) + return object; + var message = new $root.proto.PaymentInfo(); + switch (object.currencyDeprecated) { + case "UNKNOWN_CURRENCY": + case 0: + message.currencyDeprecated = 0; + break; + case "INR": + case 1: + message.currencyDeprecated = 1; + break; + } + if (object.amount1000 != null) + if ($util.Long) + (message.amount1000 = $util.Long.fromValue(object.amount1000)).unsigned = true; + else if (typeof object.amount1000 === "string") + message.amount1000 = parseInt(object.amount1000, 10); + else if (typeof object.amount1000 === "number") + message.amount1000 = object.amount1000; + else if (typeof object.amount1000 === "object") + message.amount1000 = new $util.LongBits(object.amount1000.low >>> 0, object.amount1000.high >>> 0).toNumber(true); + if (object.receiverJid != null) + message.receiverJid = String(object.receiverJid); + switch (object.status) { + case "UNKNOWN_STATUS": + case 0: + message.status = 0; + break; + case "PROCESSING": + case 1: + message.status = 1; + break; + case "SENT": + case 2: + message.status = 2; + break; + case "NEED_TO_ACCEPT": + case 3: + message.status = 3; + break; + case "COMPLETE": + case 4: + message.status = 4; + break; + case "COULD_NOT_COMPLETE": + case 5: + message.status = 5; + break; + case "REFUNDED": + case 6: + message.status = 6; + break; + case "EXPIRED": + case 7: + message.status = 7; + break; + case "REJECTED": + case 8: + message.status = 8; + break; + case "CANCELLED": + case 9: + message.status = 9; + break; + case "WAITING_FOR_PAYER": + case 10: + message.status = 10; + break; + case "WAITING": + case 11: + message.status = 11; + break; + } + if (object.transactionTimestamp != null) + if ($util.Long) + (message.transactionTimestamp = $util.Long.fromValue(object.transactionTimestamp)).unsigned = true; + else if (typeof object.transactionTimestamp === "string") + message.transactionTimestamp = parseInt(object.transactionTimestamp, 10); + else if (typeof object.transactionTimestamp === "number") + message.transactionTimestamp = object.transactionTimestamp; + else if (typeof object.transactionTimestamp === "object") + message.transactionTimestamp = new $util.LongBits(object.transactionTimestamp.low >>> 0, object.transactionTimestamp.high >>> 0).toNumber(true); + if (object.requestMessageKey != null) { + if (typeof object.requestMessageKey !== "object") + throw TypeError(".proto.PaymentInfo.requestMessageKey: object expected"); + message.requestMessageKey = $root.proto.MessageKey.fromObject(object.requestMessageKey); + } + if (object.expiryTimestamp != null) + if ($util.Long) + (message.expiryTimestamp = $util.Long.fromValue(object.expiryTimestamp)).unsigned = true; + else if (typeof object.expiryTimestamp === "string") + message.expiryTimestamp = parseInt(object.expiryTimestamp, 10); + else if (typeof object.expiryTimestamp === "number") + message.expiryTimestamp = object.expiryTimestamp; + else if (typeof object.expiryTimestamp === "object") + message.expiryTimestamp = new $util.LongBits(object.expiryTimestamp.low >>> 0, object.expiryTimestamp.high >>> 0).toNumber(true); + if (object.futureproofed != null) + message.futureproofed = Boolean(object.futureproofed); + if (object.currency != null) + message.currency = String(object.currency); + switch (object.txnStatus) { + case "UNKNOWN": + case 0: + message.txnStatus = 0; + break; + case "PENDING_SETUP": + case 1: + message.txnStatus = 1; + break; + case "PENDING_RECEIVER_SETUP": + case 2: + message.txnStatus = 2; + break; + case "INIT": + case 3: + message.txnStatus = 3; + break; + case "SUCCESS": + case 4: + message.txnStatus = 4; + break; + case "COMPLETED": + case 5: + message.txnStatus = 5; + break; + case "FAILED": + case 6: + message.txnStatus = 6; + break; + case "FAILED_RISK": + case 7: + message.txnStatus = 7; + break; + case "FAILED_PROCESSING": + case 8: + message.txnStatus = 8; + break; + case "FAILED_RECEIVER_PROCESSING": + case 9: + message.txnStatus = 9; + break; + case "FAILED_DA": + case 10: + message.txnStatus = 10; + break; + case "FAILED_DA_FINAL": + case 11: + message.txnStatus = 11; + break; + case "REFUNDED_TXN": + case 12: + message.txnStatus = 12; + break; + case "REFUND_FAILED": + case 13: + message.txnStatus = 13; + break; + case "REFUND_FAILED_PROCESSING": + case 14: + message.txnStatus = 14; + break; + case "REFUND_FAILED_DA": + case 15: + message.txnStatus = 15; + break; + case "EXPIRED_TXN": + case 16: + message.txnStatus = 16; + break; + case "AUTH_CANCELED": + case 17: + message.txnStatus = 17; + break; + case "AUTH_CANCEL_FAILED_PROCESSING": + case 18: + message.txnStatus = 18; + break; + case "AUTH_CANCEL_FAILED": + case 19: + message.txnStatus = 19; + break; + case "COLLECT_INIT": + case 20: + message.txnStatus = 20; + break; + case "COLLECT_SUCCESS": + case 21: + message.txnStatus = 21; + break; + case "COLLECT_FAILED": + case 22: + message.txnStatus = 22; + break; + case "COLLECT_FAILED_RISK": + case 23: + message.txnStatus = 23; + break; + case "COLLECT_REJECTED": + case 24: + message.txnStatus = 24; + break; + case "COLLECT_EXPIRED": + case 25: + message.txnStatus = 25; + break; + case "COLLECT_CANCELED": + case 26: + message.txnStatus = 26; + break; + case "COLLECT_CANCELLING": + case 27: + message.txnStatus = 27; + break; + case "IN_REVIEW": + case 28: + message.txnStatus = 28; + break; + } + if (object.useNoviFiatFormat != null) + message.useNoviFiatFormat = Boolean(object.useNoviFiatFormat); + if (object.primaryAmount != null) { + if (typeof object.primaryAmount !== "object") + throw TypeError(".proto.PaymentInfo.primaryAmount: object expected"); + message.primaryAmount = $root.proto.Money.fromObject(object.primaryAmount); + } + if (object.exchangeAmount != null) { + if (typeof object.exchangeAmount !== "object") + throw TypeError(".proto.PaymentInfo.exchangeAmount: object expected"); + message.exchangeAmount = $root.proto.Money.fromObject(object.exchangeAmount); + } + return message; + }; + + /** + * Creates a plain object from a PaymentInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.PaymentInfo + * @static + * @param {proto.PaymentInfo} message PaymentInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PaymentInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.currencyDeprecated = options.enums === String ? "UNKNOWN_CURRENCY" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.amount1000 = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.amount1000 = options.longs === String ? "0" : 0; + object.receiverJid = ""; + object.status = options.enums === String ? "UNKNOWN_STATUS" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.transactionTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.transactionTimestamp = options.longs === String ? "0" : 0; + object.requestMessageKey = null; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.expiryTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.expiryTimestamp = options.longs === String ? "0" : 0; + object.futureproofed = false; + object.currency = ""; + object.txnStatus = options.enums === String ? "UNKNOWN" : 0; + object.useNoviFiatFormat = false; + object.primaryAmount = null; + object.exchangeAmount = null; + } + if (message.currencyDeprecated != null && message.hasOwnProperty("currencyDeprecated")) + object.currencyDeprecated = options.enums === String ? $root.proto.PaymentInfo.PaymentInfoCurrency[message.currencyDeprecated] : message.currencyDeprecated; + if (message.amount1000 != null && message.hasOwnProperty("amount1000")) + if (typeof message.amount1000 === "number") + object.amount1000 = options.longs === String ? String(message.amount1000) : message.amount1000; + else + object.amount1000 = options.longs === String ? $util.Long.prototype.toString.call(message.amount1000) : options.longs === Number ? new $util.LongBits(message.amount1000.low >>> 0, message.amount1000.high >>> 0).toNumber(true) : message.amount1000; + if (message.receiverJid != null && message.hasOwnProperty("receiverJid")) + object.receiverJid = message.receiverJid; + if (message.status != null && message.hasOwnProperty("status")) + object.status = options.enums === String ? $root.proto.PaymentInfo.PaymentInfoStatus[message.status] : message.status; + if (message.transactionTimestamp != null && message.hasOwnProperty("transactionTimestamp")) + if (typeof message.transactionTimestamp === "number") + object.transactionTimestamp = options.longs === String ? String(message.transactionTimestamp) : message.transactionTimestamp; + else + object.transactionTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.transactionTimestamp) : options.longs === Number ? new $util.LongBits(message.transactionTimestamp.low >>> 0, message.transactionTimestamp.high >>> 0).toNumber(true) : message.transactionTimestamp; + if (message.requestMessageKey != null && message.hasOwnProperty("requestMessageKey")) + object.requestMessageKey = $root.proto.MessageKey.toObject(message.requestMessageKey, options); + if (message.expiryTimestamp != null && message.hasOwnProperty("expiryTimestamp")) + if (typeof message.expiryTimestamp === "number") + object.expiryTimestamp = options.longs === String ? String(message.expiryTimestamp) : message.expiryTimestamp; + else + object.expiryTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.expiryTimestamp) : options.longs === Number ? new $util.LongBits(message.expiryTimestamp.low >>> 0, message.expiryTimestamp.high >>> 0).toNumber(true) : message.expiryTimestamp; + if (message.futureproofed != null && message.hasOwnProperty("futureproofed")) + object.futureproofed = message.futureproofed; + if (message.currency != null && message.hasOwnProperty("currency")) + object.currency = message.currency; + if (message.txnStatus != null && message.hasOwnProperty("txnStatus")) + object.txnStatus = options.enums === String ? $root.proto.PaymentInfo.PaymentInfoTxnStatus[message.txnStatus] : message.txnStatus; + if (message.useNoviFiatFormat != null && message.hasOwnProperty("useNoviFiatFormat")) + object.useNoviFiatFormat = message.useNoviFiatFormat; + if (message.primaryAmount != null && message.hasOwnProperty("primaryAmount")) + object.primaryAmount = $root.proto.Money.toObject(message.primaryAmount, options); + if (message.exchangeAmount != null && message.hasOwnProperty("exchangeAmount")) + object.exchangeAmount = $root.proto.Money.toObject(message.exchangeAmount, options); + return object; + }; + + /** + * Converts this PaymentInfo to JSON. + * @function toJSON + * @memberof proto.PaymentInfo + * @instance + * @returns {Object.} JSON object + */ + PaymentInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * PaymentInfoCurrency enum. + * @name proto.PaymentInfo.PaymentInfoCurrency + * @enum {number} + * @property {number} UNKNOWN_CURRENCY=0 UNKNOWN_CURRENCY value + * @property {number} INR=1 INR value + */ + PaymentInfo.PaymentInfoCurrency = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN_CURRENCY"] = 0; + values[valuesById[1] = "INR"] = 1; + return values; + })(); + + /** + * PaymentInfoStatus enum. + * @name proto.PaymentInfo.PaymentInfoStatus + * @enum {number} + * @property {number} UNKNOWN_STATUS=0 UNKNOWN_STATUS value + * @property {number} PROCESSING=1 PROCESSING value + * @property {number} SENT=2 SENT value + * @property {number} NEED_TO_ACCEPT=3 NEED_TO_ACCEPT value + * @property {number} COMPLETE=4 COMPLETE value + * @property {number} COULD_NOT_COMPLETE=5 COULD_NOT_COMPLETE value + * @property {number} REFUNDED=6 REFUNDED value + * @property {number} EXPIRED=7 EXPIRED value + * @property {number} REJECTED=8 REJECTED value + * @property {number} CANCELLED=9 CANCELLED value + * @property {number} WAITING_FOR_PAYER=10 WAITING_FOR_PAYER value + * @property {number} WAITING=11 WAITING value + */ + PaymentInfo.PaymentInfoStatus = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN_STATUS"] = 0; + values[valuesById[1] = "PROCESSING"] = 1; + values[valuesById[2] = "SENT"] = 2; + values[valuesById[3] = "NEED_TO_ACCEPT"] = 3; + values[valuesById[4] = "COMPLETE"] = 4; + values[valuesById[5] = "COULD_NOT_COMPLETE"] = 5; + values[valuesById[6] = "REFUNDED"] = 6; + values[valuesById[7] = "EXPIRED"] = 7; + values[valuesById[8] = "REJECTED"] = 8; + values[valuesById[9] = "CANCELLED"] = 9; + values[valuesById[10] = "WAITING_FOR_PAYER"] = 10; + values[valuesById[11] = "WAITING"] = 11; + return values; + })(); + + /** + * PaymentInfoTxnStatus enum. + * @name proto.PaymentInfo.PaymentInfoTxnStatus + * @enum {number} + * @property {number} UNKNOWN=0 UNKNOWN value + * @property {number} PENDING_SETUP=1 PENDING_SETUP value + * @property {number} PENDING_RECEIVER_SETUP=2 PENDING_RECEIVER_SETUP value + * @property {number} INIT=3 INIT value + * @property {number} SUCCESS=4 SUCCESS value + * @property {number} COMPLETED=5 COMPLETED value + * @property {number} FAILED=6 FAILED value + * @property {number} FAILED_RISK=7 FAILED_RISK value + * @property {number} FAILED_PROCESSING=8 FAILED_PROCESSING value + * @property {number} FAILED_RECEIVER_PROCESSING=9 FAILED_RECEIVER_PROCESSING value + * @property {number} FAILED_DA=10 FAILED_DA value + * @property {number} FAILED_DA_FINAL=11 FAILED_DA_FINAL value + * @property {number} REFUNDED_TXN=12 REFUNDED_TXN value + * @property {number} REFUND_FAILED=13 REFUND_FAILED value + * @property {number} REFUND_FAILED_PROCESSING=14 REFUND_FAILED_PROCESSING value + * @property {number} REFUND_FAILED_DA=15 REFUND_FAILED_DA value + * @property {number} EXPIRED_TXN=16 EXPIRED_TXN value + * @property {number} AUTH_CANCELED=17 AUTH_CANCELED value + * @property {number} AUTH_CANCEL_FAILED_PROCESSING=18 AUTH_CANCEL_FAILED_PROCESSING value + * @property {number} AUTH_CANCEL_FAILED=19 AUTH_CANCEL_FAILED value + * @property {number} COLLECT_INIT=20 COLLECT_INIT value + * @property {number} COLLECT_SUCCESS=21 COLLECT_SUCCESS value + * @property {number} COLLECT_FAILED=22 COLLECT_FAILED value + * @property {number} COLLECT_FAILED_RISK=23 COLLECT_FAILED_RISK value + * @property {number} COLLECT_REJECTED=24 COLLECT_REJECTED value + * @property {number} COLLECT_EXPIRED=25 COLLECT_EXPIRED value + * @property {number} COLLECT_CANCELED=26 COLLECT_CANCELED value + * @property {number} COLLECT_CANCELLING=27 COLLECT_CANCELLING value + * @property {number} IN_REVIEW=28 IN_REVIEW value + */ + PaymentInfo.PaymentInfoTxnStatus = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN"] = 0; + values[valuesById[1] = "PENDING_SETUP"] = 1; + values[valuesById[2] = "PENDING_RECEIVER_SETUP"] = 2; + values[valuesById[3] = "INIT"] = 3; + values[valuesById[4] = "SUCCESS"] = 4; + values[valuesById[5] = "COMPLETED"] = 5; + values[valuesById[6] = "FAILED"] = 6; + values[valuesById[7] = "FAILED_RISK"] = 7; + values[valuesById[8] = "FAILED_PROCESSING"] = 8; + values[valuesById[9] = "FAILED_RECEIVER_PROCESSING"] = 9; + values[valuesById[10] = "FAILED_DA"] = 10; + values[valuesById[11] = "FAILED_DA_FINAL"] = 11; + values[valuesById[12] = "REFUNDED_TXN"] = 12; + values[valuesById[13] = "REFUND_FAILED"] = 13; + values[valuesById[14] = "REFUND_FAILED_PROCESSING"] = 14; + values[valuesById[15] = "REFUND_FAILED_DA"] = 15; + values[valuesById[16] = "EXPIRED_TXN"] = 16; + values[valuesById[17] = "AUTH_CANCELED"] = 17; + values[valuesById[18] = "AUTH_CANCEL_FAILED_PROCESSING"] = 18; + values[valuesById[19] = "AUTH_CANCEL_FAILED"] = 19; + values[valuesById[20] = "COLLECT_INIT"] = 20; + values[valuesById[21] = "COLLECT_SUCCESS"] = 21; + values[valuesById[22] = "COLLECT_FAILED"] = 22; + values[valuesById[23] = "COLLECT_FAILED_RISK"] = 23; + values[valuesById[24] = "COLLECT_REJECTED"] = 24; + values[valuesById[25] = "COLLECT_EXPIRED"] = 25; + values[valuesById[26] = "COLLECT_CANCELED"] = 26; + values[valuesById[27] = "COLLECT_CANCELLING"] = 27; + values[valuesById[28] = "IN_REVIEW"] = 28; + return values; + })(); + + return PaymentInfo; + })(); + + proto.WebMessageInfo = (function() { + + /** + * Properties of a WebMessageInfo. + * @memberof proto + * @interface IWebMessageInfo + * @property {proto.IMessageKey} key WebMessageInfo key + * @property {proto.IMessage|null} [message] WebMessageInfo message + * @property {number|Long|null} [messageTimestamp] WebMessageInfo messageTimestamp + * @property {proto.WebMessageInfo.WebMessageInfoStatus|null} [status] WebMessageInfo status + * @property {string|null} [participant] WebMessageInfo participant + * @property {number|Long|null} [messageC2STimestamp] WebMessageInfo messageC2STimestamp + * @property {boolean|null} [ignore] WebMessageInfo ignore + * @property {boolean|null} [starred] WebMessageInfo starred + * @property {boolean|null} [broadcast] WebMessageInfo broadcast + * @property {string|null} [pushName] WebMessageInfo pushName + * @property {Uint8Array|null} [mediaCiphertextSha256] WebMessageInfo mediaCiphertextSha256 + * @property {boolean|null} [multicast] WebMessageInfo multicast + * @property {boolean|null} [urlText] WebMessageInfo urlText + * @property {boolean|null} [urlNumber] WebMessageInfo urlNumber + * @property {proto.WebMessageInfo.WebMessageInfoStubType|null} [messageStubType] WebMessageInfo messageStubType + * @property {boolean|null} [clearMedia] WebMessageInfo clearMedia + * @property {Array.|null} [messageStubParameters] WebMessageInfo messageStubParameters + * @property {number|null} [duration] WebMessageInfo duration + * @property {Array.|null} [labels] WebMessageInfo labels + * @property {proto.IPaymentInfo|null} [paymentInfo] WebMessageInfo paymentInfo + * @property {proto.ILiveLocationMessage|null} [finalLiveLocation] WebMessageInfo finalLiveLocation + * @property {proto.IPaymentInfo|null} [quotedPaymentInfo] WebMessageInfo quotedPaymentInfo + * @property {number|Long|null} [ephemeralStartTimestamp] WebMessageInfo ephemeralStartTimestamp + * @property {number|null} [ephemeralDuration] WebMessageInfo ephemeralDuration + * @property {boolean|null} [ephemeralOffToOn] WebMessageInfo ephemeralOffToOn + * @property {boolean|null} [ephemeralOutOfSync] WebMessageInfo ephemeralOutOfSync + * @property {proto.WebMessageInfo.WebMessageInfoBizPrivacyStatus|null} [bizPrivacyStatus] WebMessageInfo bizPrivacyStatus + * @property {string|null} [verifiedBizName] WebMessageInfo verifiedBizName + * @property {proto.IMediaData|null} [mediaData] WebMessageInfo mediaData + * @property {proto.IPhotoChange|null} [photoChange] WebMessageInfo photoChange + */ + + /** + * Constructs a new WebMessageInfo. + * @memberof proto + * @classdesc Represents a WebMessageInfo. + * @implements IWebMessageInfo + * @constructor + * @param {proto.IWebMessageInfo=} [properties] Properties to set + */ + function WebMessageInfo(properties) { + this.messageStubParameters = []; + this.labels = []; + 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]]; + } + + /** + * WebMessageInfo key. + * @member {proto.IMessageKey} key + * @memberof proto.WebMessageInfo + * @instance + */ + WebMessageInfo.prototype.key = null; + + /** + * WebMessageInfo message. + * @member {proto.IMessage|null|undefined} message + * @memberof proto.WebMessageInfo + * @instance + */ + WebMessageInfo.prototype.message = null; + + /** + * WebMessageInfo messageTimestamp. + * @member {number|Long} messageTimestamp + * @memberof proto.WebMessageInfo + * @instance + */ + WebMessageInfo.prototype.messageTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * WebMessageInfo status. + * @member {proto.WebMessageInfo.WebMessageInfoStatus} status + * @memberof proto.WebMessageInfo + * @instance + */ + WebMessageInfo.prototype.status = 0; + + /** + * WebMessageInfo participant. + * @member {string} participant + * @memberof proto.WebMessageInfo + * @instance + */ + WebMessageInfo.prototype.participant = ""; + + /** + * WebMessageInfo messageC2STimestamp. + * @member {number|Long} messageC2STimestamp + * @memberof proto.WebMessageInfo + * @instance + */ + WebMessageInfo.prototype.messageC2STimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * WebMessageInfo ignore. + * @member {boolean} ignore + * @memberof proto.WebMessageInfo + * @instance + */ + WebMessageInfo.prototype.ignore = false; + + /** + * WebMessageInfo starred. + * @member {boolean} starred + * @memberof proto.WebMessageInfo + * @instance + */ + WebMessageInfo.prototype.starred = false; + + /** + * WebMessageInfo broadcast. + * @member {boolean} broadcast + * @memberof proto.WebMessageInfo + * @instance + */ + WebMessageInfo.prototype.broadcast = false; + + /** + * WebMessageInfo pushName. + * @member {string} pushName + * @memberof proto.WebMessageInfo + * @instance + */ + WebMessageInfo.prototype.pushName = ""; + + /** + * WebMessageInfo mediaCiphertextSha256. + * @member {Uint8Array} mediaCiphertextSha256 + * @memberof proto.WebMessageInfo + * @instance + */ + WebMessageInfo.prototype.mediaCiphertextSha256 = $util.newBuffer([]); + + /** + * WebMessageInfo multicast. + * @member {boolean} multicast + * @memberof proto.WebMessageInfo + * @instance + */ + WebMessageInfo.prototype.multicast = false; + + /** + * WebMessageInfo urlText. + * @member {boolean} urlText + * @memberof proto.WebMessageInfo + * @instance + */ + WebMessageInfo.prototype.urlText = false; + + /** + * WebMessageInfo urlNumber. + * @member {boolean} urlNumber + * @memberof proto.WebMessageInfo + * @instance + */ + WebMessageInfo.prototype.urlNumber = false; + + /** + * WebMessageInfo messageStubType. + * @member {proto.WebMessageInfo.WebMessageInfoStubType} messageStubType + * @memberof proto.WebMessageInfo + * @instance + */ + WebMessageInfo.prototype.messageStubType = 0; + + /** + * WebMessageInfo clearMedia. + * @member {boolean} clearMedia + * @memberof proto.WebMessageInfo + * @instance + */ + WebMessageInfo.prototype.clearMedia = false; + + /** + * WebMessageInfo messageStubParameters. + * @member {Array.} messageStubParameters + * @memberof proto.WebMessageInfo + * @instance + */ + WebMessageInfo.prototype.messageStubParameters = $util.emptyArray; + + /** + * WebMessageInfo duration. + * @member {number} duration + * @memberof proto.WebMessageInfo + * @instance + */ + WebMessageInfo.prototype.duration = 0; + + /** + * WebMessageInfo labels. + * @member {Array.} labels + * @memberof proto.WebMessageInfo + * @instance + */ + WebMessageInfo.prototype.labels = $util.emptyArray; + + /** + * WebMessageInfo paymentInfo. + * @member {proto.IPaymentInfo|null|undefined} paymentInfo + * @memberof proto.WebMessageInfo + * @instance + */ + WebMessageInfo.prototype.paymentInfo = null; + + /** + * WebMessageInfo finalLiveLocation. + * @member {proto.ILiveLocationMessage|null|undefined} finalLiveLocation + * @memberof proto.WebMessageInfo + * @instance + */ + WebMessageInfo.prototype.finalLiveLocation = null; + + /** + * WebMessageInfo quotedPaymentInfo. + * @member {proto.IPaymentInfo|null|undefined} quotedPaymentInfo + * @memberof proto.WebMessageInfo + * @instance + */ + WebMessageInfo.prototype.quotedPaymentInfo = null; + + /** + * WebMessageInfo ephemeralStartTimestamp. + * @member {number|Long} ephemeralStartTimestamp + * @memberof proto.WebMessageInfo + * @instance + */ + WebMessageInfo.prototype.ephemeralStartTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * WebMessageInfo ephemeralDuration. + * @member {number} ephemeralDuration + * @memberof proto.WebMessageInfo + * @instance + */ + WebMessageInfo.prototype.ephemeralDuration = 0; + + /** + * WebMessageInfo ephemeralOffToOn. + * @member {boolean} ephemeralOffToOn + * @memberof proto.WebMessageInfo + * @instance + */ + WebMessageInfo.prototype.ephemeralOffToOn = false; + + /** + * WebMessageInfo ephemeralOutOfSync. + * @member {boolean} ephemeralOutOfSync + * @memberof proto.WebMessageInfo + * @instance + */ + WebMessageInfo.prototype.ephemeralOutOfSync = false; + + /** + * WebMessageInfo bizPrivacyStatus. + * @member {proto.WebMessageInfo.WebMessageInfoBizPrivacyStatus} bizPrivacyStatus + * @memberof proto.WebMessageInfo + * @instance + */ + WebMessageInfo.prototype.bizPrivacyStatus = 0; + + /** + * WebMessageInfo verifiedBizName. + * @member {string} verifiedBizName + * @memberof proto.WebMessageInfo + * @instance + */ + WebMessageInfo.prototype.verifiedBizName = ""; + + /** + * WebMessageInfo mediaData. + * @member {proto.IMediaData|null|undefined} mediaData + * @memberof proto.WebMessageInfo + * @instance + */ + WebMessageInfo.prototype.mediaData = null; + + /** + * WebMessageInfo photoChange. + * @member {proto.IPhotoChange|null|undefined} photoChange + * @memberof proto.WebMessageInfo + * @instance + */ + WebMessageInfo.prototype.photoChange = null; + + /** + * Creates a new WebMessageInfo instance using the specified properties. + * @function create + * @memberof proto.WebMessageInfo + * @static + * @param {proto.IWebMessageInfo=} [properties] Properties to set + * @returns {proto.WebMessageInfo} WebMessageInfo instance + */ + WebMessageInfo.create = function create(properties) { + return new WebMessageInfo(properties); + }; + + /** + * Encodes the specified WebMessageInfo message. Does not implicitly {@link proto.WebMessageInfo.verify|verify} messages. + * @function encode + * @memberof proto.WebMessageInfo + * @static + * @param {proto.IWebMessageInfo} message WebMessageInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WebMessageInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + $root.proto.MessageKey.encode(message.key, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + 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.messageTimestamp != null && Object.hasOwnProperty.call(message, "messageTimestamp")) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.messageTimestamp); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.status); + if (message.participant != null && Object.hasOwnProperty.call(message, "participant")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.participant); + if (message.messageC2STimestamp != null && Object.hasOwnProperty.call(message, "messageC2STimestamp")) + writer.uint32(/* id 6, wireType 0 =*/48).uint64(message.messageC2STimestamp); + if (message.ignore != null && Object.hasOwnProperty.call(message, "ignore")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ignore); + if (message.starred != null && Object.hasOwnProperty.call(message, "starred")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.starred); + if (message.broadcast != null && Object.hasOwnProperty.call(message, "broadcast")) + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.broadcast); + if (message.pushName != null && Object.hasOwnProperty.call(message, "pushName")) + writer.uint32(/* id 19, wireType 2 =*/154).string(message.pushName); + if (message.mediaCiphertextSha256 != null && Object.hasOwnProperty.call(message, "mediaCiphertextSha256")) + writer.uint32(/* id 20, wireType 2 =*/162).bytes(message.mediaCiphertextSha256); + if (message.multicast != null && Object.hasOwnProperty.call(message, "multicast")) + writer.uint32(/* id 21, wireType 0 =*/168).bool(message.multicast); + if (message.urlText != null && Object.hasOwnProperty.call(message, "urlText")) + writer.uint32(/* id 22, wireType 0 =*/176).bool(message.urlText); + if (message.urlNumber != null && Object.hasOwnProperty.call(message, "urlNumber")) + writer.uint32(/* id 23, wireType 0 =*/184).bool(message.urlNumber); + if (message.messageStubType != null && Object.hasOwnProperty.call(message, "messageStubType")) + writer.uint32(/* id 24, wireType 0 =*/192).int32(message.messageStubType); + if (message.clearMedia != null && Object.hasOwnProperty.call(message, "clearMedia")) + writer.uint32(/* id 25, wireType 0 =*/200).bool(message.clearMedia); + if (message.messageStubParameters != null && message.messageStubParameters.length) + for (var i = 0; i < message.messageStubParameters.length; ++i) + writer.uint32(/* id 26, wireType 2 =*/210).string(message.messageStubParameters[i]); + if (message.duration != null && Object.hasOwnProperty.call(message, "duration")) + writer.uint32(/* id 27, wireType 0 =*/216).uint32(message.duration); + if (message.labels != null && message.labels.length) + for (var i = 0; i < message.labels.length; ++i) + writer.uint32(/* id 28, wireType 2 =*/226).string(message.labels[i]); + if (message.paymentInfo != null && Object.hasOwnProperty.call(message, "paymentInfo")) + $root.proto.PaymentInfo.encode(message.paymentInfo, writer.uint32(/* id 29, wireType 2 =*/234).fork()).ldelim(); + if (message.finalLiveLocation != null && Object.hasOwnProperty.call(message, "finalLiveLocation")) + $root.proto.LiveLocationMessage.encode(message.finalLiveLocation, writer.uint32(/* id 30, wireType 2 =*/242).fork()).ldelim(); + if (message.quotedPaymentInfo != null && Object.hasOwnProperty.call(message, "quotedPaymentInfo")) + $root.proto.PaymentInfo.encode(message.quotedPaymentInfo, writer.uint32(/* id 31, wireType 2 =*/250).fork()).ldelim(); + if (message.ephemeralStartTimestamp != null && Object.hasOwnProperty.call(message, "ephemeralStartTimestamp")) + writer.uint32(/* id 32, wireType 0 =*/256).uint64(message.ephemeralStartTimestamp); + if (message.ephemeralDuration != null && Object.hasOwnProperty.call(message, "ephemeralDuration")) + writer.uint32(/* id 33, wireType 0 =*/264).uint32(message.ephemeralDuration); + if (message.ephemeralOffToOn != null && Object.hasOwnProperty.call(message, "ephemeralOffToOn")) + writer.uint32(/* id 34, wireType 0 =*/272).bool(message.ephemeralOffToOn); + if (message.ephemeralOutOfSync != null && Object.hasOwnProperty.call(message, "ephemeralOutOfSync")) + writer.uint32(/* id 35, wireType 0 =*/280).bool(message.ephemeralOutOfSync); + if (message.bizPrivacyStatus != null && Object.hasOwnProperty.call(message, "bizPrivacyStatus")) + writer.uint32(/* id 36, wireType 0 =*/288).int32(message.bizPrivacyStatus); + if (message.verifiedBizName != null && Object.hasOwnProperty.call(message, "verifiedBizName")) + writer.uint32(/* id 37, wireType 2 =*/298).string(message.verifiedBizName); + if (message.mediaData != null && Object.hasOwnProperty.call(message, "mediaData")) + $root.proto.MediaData.encode(message.mediaData, writer.uint32(/* id 38, wireType 2 =*/306).fork()).ldelim(); + if (message.photoChange != null && Object.hasOwnProperty.call(message, "photoChange")) + $root.proto.PhotoChange.encode(message.photoChange, writer.uint32(/* id 39, wireType 2 =*/314).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified WebMessageInfo message, length delimited. Does not implicitly {@link proto.WebMessageInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.WebMessageInfo + * @static + * @param {proto.IWebMessageInfo} message WebMessageInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WebMessageInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WebMessageInfo message from the specified reader or buffer. + * @function decode + * @memberof proto.WebMessageInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.WebMessageInfo} WebMessageInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WebMessageInfo.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.WebMessageInfo(); + 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.message = $root.proto.Message.decode(reader, reader.uint32()); + break; + case 3: + message.messageTimestamp = reader.uint64(); + break; + case 4: + message.status = reader.int32(); + break; + case 5: + message.participant = reader.string(); + break; + case 6: + message.messageC2STimestamp = reader.uint64(); + break; + case 16: + message.ignore = reader.bool(); + break; + case 17: + message.starred = reader.bool(); + break; + case 18: + message.broadcast = reader.bool(); + break; + case 19: + message.pushName = reader.string(); + break; + case 20: + message.mediaCiphertextSha256 = reader.bytes(); + break; + case 21: + message.multicast = reader.bool(); + break; + case 22: + message.urlText = reader.bool(); + break; + case 23: + message.urlNumber = reader.bool(); + break; + case 24: + message.messageStubType = reader.int32(); + break; + case 25: + message.clearMedia = reader.bool(); + break; + case 26: + if (!(message.messageStubParameters && message.messageStubParameters.length)) + message.messageStubParameters = []; + message.messageStubParameters.push(reader.string()); + break; + case 27: + message.duration = reader.uint32(); + break; + case 28: + if (!(message.labels && message.labels.length)) + message.labels = []; + message.labels.push(reader.string()); + break; + case 29: + message.paymentInfo = $root.proto.PaymentInfo.decode(reader, reader.uint32()); + break; + case 30: + message.finalLiveLocation = $root.proto.LiveLocationMessage.decode(reader, reader.uint32()); + break; + case 31: + message.quotedPaymentInfo = $root.proto.PaymentInfo.decode(reader, reader.uint32()); + break; + case 32: + message.ephemeralStartTimestamp = reader.uint64(); + break; + case 33: + message.ephemeralDuration = reader.uint32(); + break; + case 34: + message.ephemeralOffToOn = reader.bool(); + break; + case 35: + message.ephemeralOutOfSync = reader.bool(); + break; + case 36: + message.bizPrivacyStatus = reader.int32(); + break; + case 37: + message.verifiedBizName = reader.string(); + break; + case 38: + message.mediaData = $root.proto.MediaData.decode(reader, reader.uint32()); + break; + case 39: + message.photoChange = $root.proto.PhotoChange.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("key")) + throw $util.ProtocolError("missing required 'key'", { instance: message }); + return message; + }; + + /** + * Decodes a WebMessageInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.WebMessageInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.WebMessageInfo} WebMessageInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WebMessageInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WebMessageInfo message. + * @function verify + * @memberof proto.WebMessageInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WebMessageInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + { + var error = $root.proto.MessageKey.verify(message.key); + if (error) + return "key." + error; + } + if (message.message != null && message.hasOwnProperty("message")) { + var error = $root.proto.Message.verify(message.message); + if (error) + return "message." + error; + } + if (message.messageTimestamp != null && message.hasOwnProperty("messageTimestamp")) + if (!$util.isInteger(message.messageTimestamp) && !(message.messageTimestamp && $util.isInteger(message.messageTimestamp.low) && $util.isInteger(message.messageTimestamp.high))) + return "messageTimestamp: integer|Long expected"; + if (message.status != null && message.hasOwnProperty("status")) + switch (message.status) { + default: + return "status: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.participant != null && message.hasOwnProperty("participant")) + if (!$util.isString(message.participant)) + return "participant: string expected"; + if (message.messageC2STimestamp != null && message.hasOwnProperty("messageC2STimestamp")) + if (!$util.isInteger(message.messageC2STimestamp) && !(message.messageC2STimestamp && $util.isInteger(message.messageC2STimestamp.low) && $util.isInteger(message.messageC2STimestamp.high))) + return "messageC2STimestamp: integer|Long expected"; + if (message.ignore != null && message.hasOwnProperty("ignore")) + if (typeof message.ignore !== "boolean") + return "ignore: boolean expected"; + if (message.starred != null && message.hasOwnProperty("starred")) + if (typeof message.starred !== "boolean") + return "starred: boolean expected"; + if (message.broadcast != null && message.hasOwnProperty("broadcast")) + if (typeof message.broadcast !== "boolean") + return "broadcast: boolean expected"; + if (message.pushName != null && message.hasOwnProperty("pushName")) + if (!$util.isString(message.pushName)) + return "pushName: string expected"; + if (message.mediaCiphertextSha256 != null && message.hasOwnProperty("mediaCiphertextSha256")) + if (!(message.mediaCiphertextSha256 && typeof message.mediaCiphertextSha256.length === "number" || $util.isString(message.mediaCiphertextSha256))) + return "mediaCiphertextSha256: buffer expected"; + if (message.multicast != null && message.hasOwnProperty("multicast")) + if (typeof message.multicast !== "boolean") + return "multicast: boolean expected"; + if (message.urlText != null && message.hasOwnProperty("urlText")) + if (typeof message.urlText !== "boolean") + return "urlText: boolean expected"; + if (message.urlNumber != null && message.hasOwnProperty("urlNumber")) + if (typeof message.urlNumber !== "boolean") + return "urlNumber: boolean expected"; + if (message.messageStubType != null && message.hasOwnProperty("messageStubType")) + switch (message.messageStubType) { + default: + return "messageStubType: 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: + case 36: + case 37: + case 38: + case 39: + case 40: + case 41: + case 42: + case 43: + case 44: + case 45: + case 46: + case 47: + case 48: + case 49: + case 50: + case 51: + case 52: + case 53: + case 54: + case 55: + case 56: + case 57: + case 58: + case 59: + case 60: + case 61: + case 62: + case 63: + case 64: + case 65: + case 66: + case 67: + case 68: + case 69: + case 70: + case 71: + case 72: + case 73: + case 74: + case 75: + case 76: + case 77: + case 78: + case 79: + case 80: + case 81: + case 82: + case 83: + case 84: + case 85: + case 86: + case 87: + case 88: + case 89: + case 90: + case 91: + case 92: + case 93: + case 94: + case 95: + case 96: + case 97: + case 98: + case 99: + 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: + case 113: + case 114: + case 115: + case 116: + case 117: + case 118: + case 119: + case 120: + case 121: + case 122: + case 123: + case 124: + case 125: + case 126: + case 127: + case 128: + case 129: + break; + } + if (message.clearMedia != null && message.hasOwnProperty("clearMedia")) + if (typeof message.clearMedia !== "boolean") + return "clearMedia: boolean expected"; + if (message.messageStubParameters != null && message.hasOwnProperty("messageStubParameters")) { + if (!Array.isArray(message.messageStubParameters)) + return "messageStubParameters: array expected"; + for (var i = 0; i < message.messageStubParameters.length; ++i) + if (!$util.isString(message.messageStubParameters[i])) + return "messageStubParameters: string[] expected"; + } + if (message.duration != null && message.hasOwnProperty("duration")) + if (!$util.isInteger(message.duration)) + return "duration: integer expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!Array.isArray(message.labels)) + return "labels: array expected"; + for (var i = 0; i < message.labels.length; ++i) + if (!$util.isString(message.labels[i])) + return "labels: string[] expected"; + } + if (message.paymentInfo != null && message.hasOwnProperty("paymentInfo")) { + var error = $root.proto.PaymentInfo.verify(message.paymentInfo); + if (error) + return "paymentInfo." + error; + } + if (message.finalLiveLocation != null && message.hasOwnProperty("finalLiveLocation")) { + var error = $root.proto.LiveLocationMessage.verify(message.finalLiveLocation); + if (error) + return "finalLiveLocation." + error; + } + if (message.quotedPaymentInfo != null && message.hasOwnProperty("quotedPaymentInfo")) { + var error = $root.proto.PaymentInfo.verify(message.quotedPaymentInfo); + if (error) + return "quotedPaymentInfo." + error; + } + if (message.ephemeralStartTimestamp != null && message.hasOwnProperty("ephemeralStartTimestamp")) + if (!$util.isInteger(message.ephemeralStartTimestamp) && !(message.ephemeralStartTimestamp && $util.isInteger(message.ephemeralStartTimestamp.low) && $util.isInteger(message.ephemeralStartTimestamp.high))) + return "ephemeralStartTimestamp: integer|Long expected"; + if (message.ephemeralDuration != null && message.hasOwnProperty("ephemeralDuration")) + if (!$util.isInteger(message.ephemeralDuration)) + return "ephemeralDuration: integer expected"; + if (message.ephemeralOffToOn != null && message.hasOwnProperty("ephemeralOffToOn")) + if (typeof message.ephemeralOffToOn !== "boolean") + return "ephemeralOffToOn: boolean expected"; + if (message.ephemeralOutOfSync != null && message.hasOwnProperty("ephemeralOutOfSync")) + if (typeof message.ephemeralOutOfSync !== "boolean") + return "ephemeralOutOfSync: boolean expected"; + if (message.bizPrivacyStatus != null && message.hasOwnProperty("bizPrivacyStatus")) + switch (message.bizPrivacyStatus) { + default: + return "bizPrivacyStatus: enum value expected"; + case 0: + case 2: + case 1: + case 3: + break; + } + if (message.verifiedBizName != null && message.hasOwnProperty("verifiedBizName")) + if (!$util.isString(message.verifiedBizName)) + return "verifiedBizName: string expected"; + if (message.mediaData != null && message.hasOwnProperty("mediaData")) { + var error = $root.proto.MediaData.verify(message.mediaData); + if (error) + return "mediaData." + error; + } + if (message.photoChange != null && message.hasOwnProperty("photoChange")) { + var error = $root.proto.PhotoChange.verify(message.photoChange); + if (error) + return "photoChange." + error; + } + return null; + }; + + /** + * Creates a WebMessageInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.WebMessageInfo + * @static + * @param {Object.} object Plain object + * @returns {proto.WebMessageInfo} WebMessageInfo + */ + WebMessageInfo.fromObject = function fromObject(object) { + if (object instanceof $root.proto.WebMessageInfo) + return object; + var message = new $root.proto.WebMessageInfo(); + if (object.key != null) { + if (typeof object.key !== "object") + throw TypeError(".proto.WebMessageInfo.key: object expected"); + message.key = $root.proto.MessageKey.fromObject(object.key); + } + if (object.message != null) { + if (typeof object.message !== "object") + throw TypeError(".proto.WebMessageInfo.message: object expected"); + message.message = $root.proto.Message.fromObject(object.message); + } + if (object.messageTimestamp != null) + if ($util.Long) + (message.messageTimestamp = $util.Long.fromValue(object.messageTimestamp)).unsigned = true; + else if (typeof object.messageTimestamp === "string") + message.messageTimestamp = parseInt(object.messageTimestamp, 10); + else if (typeof object.messageTimestamp === "number") + message.messageTimestamp = object.messageTimestamp; + else if (typeof object.messageTimestamp === "object") + message.messageTimestamp = new $util.LongBits(object.messageTimestamp.low >>> 0, object.messageTimestamp.high >>> 0).toNumber(true); + switch (object.status) { + case "ERROR": + case 0: + message.status = 0; + break; + case "PENDING": + case 1: + message.status = 1; + break; + case "SERVER_ACK": + case 2: + message.status = 2; + break; + case "DELIVERY_ACK": + case 3: + message.status = 3; + break; + case "READ": + case 4: + message.status = 4; + break; + case "PLAYED": + case 5: + message.status = 5; + break; + } + if (object.participant != null) + message.participant = String(object.participant); + if (object.messageC2STimestamp != null) + if ($util.Long) + (message.messageC2STimestamp = $util.Long.fromValue(object.messageC2STimestamp)).unsigned = true; + else if (typeof object.messageC2STimestamp === "string") + message.messageC2STimestamp = parseInt(object.messageC2STimestamp, 10); + else if (typeof object.messageC2STimestamp === "number") + message.messageC2STimestamp = object.messageC2STimestamp; + else if (typeof object.messageC2STimestamp === "object") + message.messageC2STimestamp = new $util.LongBits(object.messageC2STimestamp.low >>> 0, object.messageC2STimestamp.high >>> 0).toNumber(true); + if (object.ignore != null) + message.ignore = Boolean(object.ignore); + if (object.starred != null) + message.starred = Boolean(object.starred); + if (object.broadcast != null) + message.broadcast = Boolean(object.broadcast); + if (object.pushName != null) + message.pushName = String(object.pushName); + if (object.mediaCiphertextSha256 != null) + if (typeof object.mediaCiphertextSha256 === "string") + $util.base64.decode(object.mediaCiphertextSha256, message.mediaCiphertextSha256 = $util.newBuffer($util.base64.length(object.mediaCiphertextSha256)), 0); + else if (object.mediaCiphertextSha256.length) + message.mediaCiphertextSha256 = object.mediaCiphertextSha256; + if (object.multicast != null) + message.multicast = Boolean(object.multicast); + if (object.urlText != null) + message.urlText = Boolean(object.urlText); + if (object.urlNumber != null) + message.urlNumber = Boolean(object.urlNumber); + switch (object.messageStubType) { + case "UNKNOWN": + case 0: + message.messageStubType = 0; + break; + case "REVOKE": + case 1: + message.messageStubType = 1; + break; + case "CIPHERTEXT": + case 2: + message.messageStubType = 2; + break; + case "FUTUREPROOF": + case 3: + message.messageStubType = 3; + break; + case "NON_VERIFIED_TRANSITION": + case 4: + message.messageStubType = 4; + break; + case "UNVERIFIED_TRANSITION": + case 5: + message.messageStubType = 5; + break; + case "VERIFIED_TRANSITION": + case 6: + message.messageStubType = 6; + break; + case "VERIFIED_LOW_UNKNOWN": + case 7: + message.messageStubType = 7; + break; + case "VERIFIED_HIGH": + case 8: + message.messageStubType = 8; + break; + case "VERIFIED_INITIAL_UNKNOWN": + case 9: + message.messageStubType = 9; + break; + case "VERIFIED_INITIAL_LOW": + case 10: + message.messageStubType = 10; + break; + case "VERIFIED_INITIAL_HIGH": + case 11: + message.messageStubType = 11; + break; + case "VERIFIED_TRANSITION_ANY_TO_NONE": + case 12: + message.messageStubType = 12; + break; + case "VERIFIED_TRANSITION_ANY_TO_HIGH": + case 13: + message.messageStubType = 13; + break; + case "VERIFIED_TRANSITION_HIGH_TO_LOW": + case 14: + message.messageStubType = 14; + break; + case "VERIFIED_TRANSITION_HIGH_TO_UNKNOWN": + case 15: + message.messageStubType = 15; + break; + case "VERIFIED_TRANSITION_UNKNOWN_TO_LOW": + case 16: + message.messageStubType = 16; + break; + case "VERIFIED_TRANSITION_LOW_TO_UNKNOWN": + case 17: + message.messageStubType = 17; + break; + case "VERIFIED_TRANSITION_NONE_TO_LOW": + case 18: + message.messageStubType = 18; + break; + case "VERIFIED_TRANSITION_NONE_TO_UNKNOWN": + case 19: + message.messageStubType = 19; + break; + case "GROUP_CREATE": + case 20: + message.messageStubType = 20; + break; + case "GROUP_CHANGE_SUBJECT": + case 21: + message.messageStubType = 21; + break; + case "GROUP_CHANGE_ICON": + case 22: + message.messageStubType = 22; + break; + case "GROUP_CHANGE_INVITE_LINK": + case 23: + message.messageStubType = 23; + break; + case "GROUP_CHANGE_DESCRIPTION": + case 24: + message.messageStubType = 24; + break; + case "GROUP_CHANGE_RESTRICT": + case 25: + message.messageStubType = 25; + break; + case "GROUP_CHANGE_ANNOUNCE": + case 26: + message.messageStubType = 26; + break; + case "GROUP_PARTICIPANT_ADD": + case 27: + message.messageStubType = 27; + break; + case "GROUP_PARTICIPANT_REMOVE": + case 28: + message.messageStubType = 28; + break; + case "GROUP_PARTICIPANT_PROMOTE": + case 29: + message.messageStubType = 29; + break; + case "GROUP_PARTICIPANT_DEMOTE": + case 30: + message.messageStubType = 30; + break; + case "GROUP_PARTICIPANT_INVITE": + case 31: + message.messageStubType = 31; + break; + case "GROUP_PARTICIPANT_LEAVE": + case 32: + message.messageStubType = 32; + break; + case "GROUP_PARTICIPANT_CHANGE_NUMBER": + case 33: + message.messageStubType = 33; + break; + case "BROADCAST_CREATE": + case 34: + message.messageStubType = 34; + break; + case "BROADCAST_ADD": + case 35: + message.messageStubType = 35; + break; + case "BROADCAST_REMOVE": + case 36: + message.messageStubType = 36; + break; + case "GENERIC_NOTIFICATION": + case 37: + message.messageStubType = 37; + break; + case "E2E_IDENTITY_CHANGED": + case 38: + message.messageStubType = 38; + break; + case "E2E_ENCRYPTED": + case 39: + message.messageStubType = 39; + break; + case "CALL_MISSED_VOICE": + case 40: + message.messageStubType = 40; + break; + case "CALL_MISSED_VIDEO": + case 41: + message.messageStubType = 41; + break; + case "INDIVIDUAL_CHANGE_NUMBER": + case 42: + message.messageStubType = 42; + break; + case "GROUP_DELETE": + case 43: + message.messageStubType = 43; + break; + case "GROUP_ANNOUNCE_MODE_MESSAGE_BOUNCE": + case 44: + message.messageStubType = 44; + break; + case "CALL_MISSED_GROUP_VOICE": + case 45: + message.messageStubType = 45; + break; + case "CALL_MISSED_GROUP_VIDEO": + case 46: + message.messageStubType = 46; + break; + case "PAYMENT_CIPHERTEXT": + case 47: + message.messageStubType = 47; + break; + case "PAYMENT_FUTUREPROOF": + case 48: + message.messageStubType = 48; + break; + case "PAYMENT_TRANSACTION_STATUS_UPDATE_FAILED": + case 49: + message.messageStubType = 49; + break; + case "PAYMENT_TRANSACTION_STATUS_UPDATE_REFUNDED": + case 50: + message.messageStubType = 50; + break; + case "PAYMENT_TRANSACTION_STATUS_UPDATE_REFUND_FAILED": + case 51: + message.messageStubType = 51; + break; + case "PAYMENT_TRANSACTION_STATUS_RECEIVER_PENDING_SETUP": + case 52: + message.messageStubType = 52; + break; + case "PAYMENT_TRANSACTION_STATUS_RECEIVER_SUCCESS_AFTER_HICCUP": + case 53: + message.messageStubType = 53; + break; + case "PAYMENT_ACTION_ACCOUNT_SETUP_REMINDER": + case 54: + message.messageStubType = 54; + break; + case "PAYMENT_ACTION_SEND_PAYMENT_REMINDER": + case 55: + message.messageStubType = 55; + break; + case "PAYMENT_ACTION_SEND_PAYMENT_INVITATION": + case 56: + message.messageStubType = 56; + break; + case "PAYMENT_ACTION_REQUEST_DECLINED": + case 57: + message.messageStubType = 57; + break; + case "PAYMENT_ACTION_REQUEST_EXPIRED": + case 58: + message.messageStubType = 58; + break; + case "PAYMENT_ACTION_REQUEST_CANCELLED": + case 59: + message.messageStubType = 59; + break; + case "BIZ_VERIFIED_TRANSITION_TOP_TO_BOTTOM": + case 60: + message.messageStubType = 60; + break; + case "BIZ_VERIFIED_TRANSITION_BOTTOM_TO_TOP": + case 61: + message.messageStubType = 61; + break; + case "BIZ_INTRO_TOP": + case 62: + message.messageStubType = 62; + break; + case "BIZ_INTRO_BOTTOM": + case 63: + message.messageStubType = 63; + break; + case "BIZ_NAME_CHANGE": + case 64: + message.messageStubType = 64; + break; + case "BIZ_MOVE_TO_CONSUMER_APP": + case 65: + message.messageStubType = 65; + break; + case "BIZ_TWO_TIER_MIGRATION_TOP": + case 66: + message.messageStubType = 66; + break; + case "BIZ_TWO_TIER_MIGRATION_BOTTOM": + case 67: + message.messageStubType = 67; + break; + case "OVERSIZED": + case 68: + message.messageStubType = 68; + break; + case "GROUP_CHANGE_NO_FREQUENTLY_FORWARDED": + case 69: + message.messageStubType = 69; + break; + case "GROUP_V4_ADD_INVITE_SENT": + case 70: + message.messageStubType = 70; + break; + case "GROUP_PARTICIPANT_ADD_REQUEST_JOIN": + case 71: + message.messageStubType = 71; + break; + case "CHANGE_EPHEMERAL_SETTING": + case 72: + message.messageStubType = 72; + break; + case "E2E_DEVICE_CHANGED": + case 73: + message.messageStubType = 73; + break; + case "VIEWED_ONCE": + case 74: + message.messageStubType = 74; + break; + case "E2E_ENCRYPTED_NOW": + case 75: + message.messageStubType = 75; + break; + case "BLUE_MSG_BSP_FB_TO_BSP_PREMISE": + case 76: + message.messageStubType = 76; + break; + case "BLUE_MSG_BSP_FB_TO_SELF_FB": + case 77: + message.messageStubType = 77; + break; + case "BLUE_MSG_BSP_FB_TO_SELF_PREMISE": + case 78: + message.messageStubType = 78; + break; + case "BLUE_MSG_BSP_FB_UNVERIFIED": + case 79: + message.messageStubType = 79; + break; + case "BLUE_MSG_BSP_FB_UNVERIFIED_TO_SELF_PREMISE_VERIFIED": + case 80: + message.messageStubType = 80; + break; + case "BLUE_MSG_BSP_FB_VERIFIED": + case 81: + message.messageStubType = 81; + break; + case "BLUE_MSG_BSP_FB_VERIFIED_TO_SELF_PREMISE_UNVERIFIED": + case 82: + message.messageStubType = 82; + break; + case "BLUE_MSG_BSP_PREMISE_TO_SELF_PREMISE": + case 83: + message.messageStubType = 83; + break; + case "BLUE_MSG_BSP_PREMISE_UNVERIFIED": + case 84: + message.messageStubType = 84; + break; + case "BLUE_MSG_BSP_PREMISE_UNVERIFIED_TO_SELF_PREMISE_VERIFIED": + case 85: + message.messageStubType = 85; + break; + case "BLUE_MSG_BSP_PREMISE_VERIFIED": + case 86: + message.messageStubType = 86; + break; + case "BLUE_MSG_BSP_PREMISE_VERIFIED_TO_SELF_PREMISE_UNVERIFIED": + case 87: + message.messageStubType = 87; + break; + case "BLUE_MSG_CONSUMER_TO_BSP_FB_UNVERIFIED": + case 88: + message.messageStubType = 88; + break; + case "BLUE_MSG_CONSUMER_TO_BSP_PREMISE_UNVERIFIED": + case 89: + message.messageStubType = 89; + break; + case "BLUE_MSG_CONSUMER_TO_SELF_FB_UNVERIFIED": + case 90: + message.messageStubType = 90; + break; + case "BLUE_MSG_CONSUMER_TO_SELF_PREMISE_UNVERIFIED": + case 91: + message.messageStubType = 91; + break; + case "BLUE_MSG_SELF_FB_TO_BSP_PREMISE": + case 92: + message.messageStubType = 92; + break; + case "BLUE_MSG_SELF_FB_TO_SELF_PREMISE": + case 93: + message.messageStubType = 93; + break; + case "BLUE_MSG_SELF_FB_UNVERIFIED": + case 94: + message.messageStubType = 94; + break; + case "BLUE_MSG_SELF_FB_UNVERIFIED_TO_SELF_PREMISE_VERIFIED": + case 95: + message.messageStubType = 95; + break; + case "BLUE_MSG_SELF_FB_VERIFIED": + case 96: + message.messageStubType = 96; + break; + case "BLUE_MSG_SELF_FB_VERIFIED_TO_SELF_PREMISE_UNVERIFIED": + case 97: + message.messageStubType = 97; + break; + case "BLUE_MSG_SELF_PREMISE_TO_BSP_PREMISE": + case 98: + message.messageStubType = 98; + break; + case "BLUE_MSG_SELF_PREMISE_UNVERIFIED": + case 99: + message.messageStubType = 99; + break; + case "BLUE_MSG_SELF_PREMISE_VERIFIED": + case 100: + message.messageStubType = 100; + break; + case "BLUE_MSG_TO_BSP_FB": + case 101: + message.messageStubType = 101; + break; + case "BLUE_MSG_TO_CONSUMER": + case 102: + message.messageStubType = 102; + break; + case "BLUE_MSG_TO_SELF_FB": + case 103: + message.messageStubType = 103; + break; + case "BLUE_MSG_UNVERIFIED_TO_BSP_FB_VERIFIED": + case 104: + message.messageStubType = 104; + break; + case "BLUE_MSG_UNVERIFIED_TO_BSP_PREMISE_VERIFIED": + case 105: + message.messageStubType = 105; + break; + case "BLUE_MSG_UNVERIFIED_TO_SELF_FB_VERIFIED": + case 106: + message.messageStubType = 106; + break; + case "BLUE_MSG_UNVERIFIED_TO_VERIFIED": + case 107: + message.messageStubType = 107; + break; + case "BLUE_MSG_VERIFIED_TO_BSP_FB_UNVERIFIED": + case 108: + message.messageStubType = 108; + break; + case "BLUE_MSG_VERIFIED_TO_BSP_PREMISE_UNVERIFIED": + case 109: + message.messageStubType = 109; + break; + case "BLUE_MSG_VERIFIED_TO_SELF_FB_UNVERIFIED": + case 110: + message.messageStubType = 110; + break; + case "BLUE_MSG_VERIFIED_TO_UNVERIFIED": + case 111: + message.messageStubType = 111; + break; + case "BLUE_MSG_BSP_FB_UNVERIFIED_TO_BSP_PREMISE_VERIFIED": + case 112: + message.messageStubType = 112; + break; + case "BLUE_MSG_BSP_FB_UNVERIFIED_TO_SELF_FB_VERIFIED": + case 113: + message.messageStubType = 113; + break; + case "BLUE_MSG_BSP_FB_VERIFIED_TO_BSP_PREMISE_UNVERIFIED": + case 114: + message.messageStubType = 114; + break; + case "BLUE_MSG_BSP_FB_VERIFIED_TO_SELF_FB_UNVERIFIED": + case 115: + message.messageStubType = 115; + break; + case "BLUE_MSG_SELF_FB_UNVERIFIED_TO_BSP_PREMISE_VERIFIED": + case 116: + message.messageStubType = 116; + break; + case "BLUE_MSG_SELF_FB_VERIFIED_TO_BSP_PREMISE_UNVERIFIED": + case 117: + message.messageStubType = 117; + break; + case "E2E_IDENTITY_UNAVAILABLE": + case 118: + message.messageStubType = 118; + break; + case "GROUP_CREATING": + case 119: + message.messageStubType = 119; + break; + case "GROUP_CREATE_FAILED": + case 120: + message.messageStubType = 120; + break; + case "GROUP_BOUNCED": + case 121: + message.messageStubType = 121; + break; + case "BLOCK_CONTACT": + case 122: + message.messageStubType = 122; + break; + case "EPHEMERAL_SETTING_NOT_APPLIED": + case 123: + message.messageStubType = 123; + break; + case "SYNC_FAILED": + case 124: + message.messageStubType = 124; + break; + case "SYNCING": + case 125: + message.messageStubType = 125; + break; + case "BIZ_PRIVACY_MODE_INIT_FB": + case 126: + message.messageStubType = 126; + break; + case "BIZ_PRIVACY_MODE_INIT_BSP": + case 127: + message.messageStubType = 127; + break; + case "BIZ_PRIVACY_MODE_TO_FB": + case 128: + message.messageStubType = 128; + break; + case "BIZ_PRIVACY_MODE_TO_BSP": + case 129: + message.messageStubType = 129; + break; + } + if (object.clearMedia != null) + message.clearMedia = Boolean(object.clearMedia); + if (object.messageStubParameters) { + if (!Array.isArray(object.messageStubParameters)) + throw TypeError(".proto.WebMessageInfo.messageStubParameters: array expected"); + message.messageStubParameters = []; + for (var i = 0; i < object.messageStubParameters.length; ++i) + message.messageStubParameters[i] = String(object.messageStubParameters[i]); + } + if (object.duration != null) + message.duration = object.duration >>> 0; + if (object.labels) { + if (!Array.isArray(object.labels)) + throw TypeError(".proto.WebMessageInfo.labels: array expected"); + message.labels = []; + for (var i = 0; i < object.labels.length; ++i) + message.labels[i] = String(object.labels[i]); + } + if (object.paymentInfo != null) { + if (typeof object.paymentInfo !== "object") + throw TypeError(".proto.WebMessageInfo.paymentInfo: object expected"); + message.paymentInfo = $root.proto.PaymentInfo.fromObject(object.paymentInfo); + } + if (object.finalLiveLocation != null) { + if (typeof object.finalLiveLocation !== "object") + throw TypeError(".proto.WebMessageInfo.finalLiveLocation: object expected"); + message.finalLiveLocation = $root.proto.LiveLocationMessage.fromObject(object.finalLiveLocation); + } + if (object.quotedPaymentInfo != null) { + if (typeof object.quotedPaymentInfo !== "object") + throw TypeError(".proto.WebMessageInfo.quotedPaymentInfo: object expected"); + message.quotedPaymentInfo = $root.proto.PaymentInfo.fromObject(object.quotedPaymentInfo); + } + if (object.ephemeralStartTimestamp != null) + if ($util.Long) + (message.ephemeralStartTimestamp = $util.Long.fromValue(object.ephemeralStartTimestamp)).unsigned = true; + else if (typeof object.ephemeralStartTimestamp === "string") + message.ephemeralStartTimestamp = parseInt(object.ephemeralStartTimestamp, 10); + else if (typeof object.ephemeralStartTimestamp === "number") + message.ephemeralStartTimestamp = object.ephemeralStartTimestamp; + else if (typeof object.ephemeralStartTimestamp === "object") + message.ephemeralStartTimestamp = new $util.LongBits(object.ephemeralStartTimestamp.low >>> 0, object.ephemeralStartTimestamp.high >>> 0).toNumber(true); + if (object.ephemeralDuration != null) + message.ephemeralDuration = object.ephemeralDuration >>> 0; + if (object.ephemeralOffToOn != null) + message.ephemeralOffToOn = Boolean(object.ephemeralOffToOn); + if (object.ephemeralOutOfSync != null) + message.ephemeralOutOfSync = Boolean(object.ephemeralOutOfSync); + switch (object.bizPrivacyStatus) { + case "E2EE": + case 0: + message.bizPrivacyStatus = 0; + break; + case "FB": + case 2: + message.bizPrivacyStatus = 2; + break; + case "BSP": + case 1: + message.bizPrivacyStatus = 1; + break; + case "BSP_AND_FB": + case 3: + message.bizPrivacyStatus = 3; + break; + } + if (object.verifiedBizName != null) + message.verifiedBizName = String(object.verifiedBizName); + if (object.mediaData != null) { + if (typeof object.mediaData !== "object") + throw TypeError(".proto.WebMessageInfo.mediaData: object expected"); + message.mediaData = $root.proto.MediaData.fromObject(object.mediaData); + } + if (object.photoChange != null) { + if (typeof object.photoChange !== "object") + throw TypeError(".proto.WebMessageInfo.photoChange: object expected"); + message.photoChange = $root.proto.PhotoChange.fromObject(object.photoChange); + } + return message; + }; + + /** + * Creates a plain object from a WebMessageInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.WebMessageInfo + * @static + * @param {proto.WebMessageInfo} message WebMessageInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WebMessageInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.messageStubParameters = []; + object.labels = []; + } + if (options.defaults) { + object.key = null; + object.message = null; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.messageTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.messageTimestamp = options.longs === String ? "0" : 0; + object.status = options.enums === String ? "ERROR" : 0; + object.participant = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.messageC2STimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.messageC2STimestamp = options.longs === String ? "0" : 0; + object.ignore = false; + object.starred = false; + object.broadcast = false; + object.pushName = ""; + if (options.bytes === String) + object.mediaCiphertextSha256 = ""; + else { + object.mediaCiphertextSha256 = []; + if (options.bytes !== Array) + object.mediaCiphertextSha256 = $util.newBuffer(object.mediaCiphertextSha256); + } + object.multicast = false; + object.urlText = false; + object.urlNumber = false; + object.messageStubType = options.enums === String ? "UNKNOWN" : 0; + object.clearMedia = false; + object.duration = 0; + object.paymentInfo = null; + object.finalLiveLocation = null; + object.quotedPaymentInfo = null; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.ephemeralStartTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.ephemeralStartTimestamp = options.longs === String ? "0" : 0; + object.ephemeralDuration = 0; + object.ephemeralOffToOn = false; + object.ephemeralOutOfSync = false; + object.bizPrivacyStatus = options.enums === String ? "E2EE" : 0; + object.verifiedBizName = ""; + object.mediaData = null; + object.photoChange = null; + } + if (message.key != null && message.hasOwnProperty("key")) + object.key = $root.proto.MessageKey.toObject(message.key, options); + if (message.message != null && message.hasOwnProperty("message")) + object.message = $root.proto.Message.toObject(message.message, options); + if (message.messageTimestamp != null && message.hasOwnProperty("messageTimestamp")) + if (typeof message.messageTimestamp === "number") + object.messageTimestamp = options.longs === String ? String(message.messageTimestamp) : message.messageTimestamp; + else + object.messageTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.messageTimestamp) : options.longs === Number ? new $util.LongBits(message.messageTimestamp.low >>> 0, message.messageTimestamp.high >>> 0).toNumber(true) : message.messageTimestamp; + if (message.status != null && message.hasOwnProperty("status")) + object.status = options.enums === String ? $root.proto.WebMessageInfo.WebMessageInfoStatus[message.status] : message.status; + if (message.participant != null && message.hasOwnProperty("participant")) + object.participant = message.participant; + if (message.messageC2STimestamp != null && message.hasOwnProperty("messageC2STimestamp")) + if (typeof message.messageC2STimestamp === "number") + object.messageC2STimestamp = options.longs === String ? String(message.messageC2STimestamp) : message.messageC2STimestamp; + else + object.messageC2STimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.messageC2STimestamp) : options.longs === Number ? new $util.LongBits(message.messageC2STimestamp.low >>> 0, message.messageC2STimestamp.high >>> 0).toNumber(true) : message.messageC2STimestamp; + if (message.ignore != null && message.hasOwnProperty("ignore")) + object.ignore = message.ignore; + if (message.starred != null && message.hasOwnProperty("starred")) + object.starred = message.starred; + if (message.broadcast != null && message.hasOwnProperty("broadcast")) + object.broadcast = message.broadcast; + if (message.pushName != null && message.hasOwnProperty("pushName")) + object.pushName = message.pushName; + if (message.mediaCiphertextSha256 != null && message.hasOwnProperty("mediaCiphertextSha256")) + object.mediaCiphertextSha256 = options.bytes === String ? $util.base64.encode(message.mediaCiphertextSha256, 0, message.mediaCiphertextSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.mediaCiphertextSha256) : message.mediaCiphertextSha256; + if (message.multicast != null && message.hasOwnProperty("multicast")) + object.multicast = message.multicast; + if (message.urlText != null && message.hasOwnProperty("urlText")) + object.urlText = message.urlText; + if (message.urlNumber != null && message.hasOwnProperty("urlNumber")) + object.urlNumber = message.urlNumber; + if (message.messageStubType != null && message.hasOwnProperty("messageStubType")) + object.messageStubType = options.enums === String ? $root.proto.WebMessageInfo.WebMessageInfoStubType[message.messageStubType] : message.messageStubType; + if (message.clearMedia != null && message.hasOwnProperty("clearMedia")) + object.clearMedia = message.clearMedia; + if (message.messageStubParameters && message.messageStubParameters.length) { + object.messageStubParameters = []; + for (var j = 0; j < message.messageStubParameters.length; ++j) + object.messageStubParameters[j] = message.messageStubParameters[j]; + } + if (message.duration != null && message.hasOwnProperty("duration")) + object.duration = message.duration; + if (message.labels && message.labels.length) { + object.labels = []; + for (var j = 0; j < message.labels.length; ++j) + object.labels[j] = message.labels[j]; + } + if (message.paymentInfo != null && message.hasOwnProperty("paymentInfo")) + object.paymentInfo = $root.proto.PaymentInfo.toObject(message.paymentInfo, options); + if (message.finalLiveLocation != null && message.hasOwnProperty("finalLiveLocation")) + object.finalLiveLocation = $root.proto.LiveLocationMessage.toObject(message.finalLiveLocation, options); + if (message.quotedPaymentInfo != null && message.hasOwnProperty("quotedPaymentInfo")) + object.quotedPaymentInfo = $root.proto.PaymentInfo.toObject(message.quotedPaymentInfo, options); + if (message.ephemeralStartTimestamp != null && message.hasOwnProperty("ephemeralStartTimestamp")) + if (typeof message.ephemeralStartTimestamp === "number") + object.ephemeralStartTimestamp = options.longs === String ? String(message.ephemeralStartTimestamp) : message.ephemeralStartTimestamp; + else + object.ephemeralStartTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.ephemeralStartTimestamp) : options.longs === Number ? new $util.LongBits(message.ephemeralStartTimestamp.low >>> 0, message.ephemeralStartTimestamp.high >>> 0).toNumber(true) : message.ephemeralStartTimestamp; + if (message.ephemeralDuration != null && message.hasOwnProperty("ephemeralDuration")) + object.ephemeralDuration = message.ephemeralDuration; + if (message.ephemeralOffToOn != null && message.hasOwnProperty("ephemeralOffToOn")) + object.ephemeralOffToOn = message.ephemeralOffToOn; + if (message.ephemeralOutOfSync != null && message.hasOwnProperty("ephemeralOutOfSync")) + object.ephemeralOutOfSync = message.ephemeralOutOfSync; + if (message.bizPrivacyStatus != null && message.hasOwnProperty("bizPrivacyStatus")) + object.bizPrivacyStatus = options.enums === String ? $root.proto.WebMessageInfo.WebMessageInfoBizPrivacyStatus[message.bizPrivacyStatus] : message.bizPrivacyStatus; + if (message.verifiedBizName != null && message.hasOwnProperty("verifiedBizName")) + object.verifiedBizName = message.verifiedBizName; + if (message.mediaData != null && message.hasOwnProperty("mediaData")) + object.mediaData = $root.proto.MediaData.toObject(message.mediaData, options); + if (message.photoChange != null && message.hasOwnProperty("photoChange")) + object.photoChange = $root.proto.PhotoChange.toObject(message.photoChange, options); + return object; + }; + + /** + * Converts this WebMessageInfo to JSON. + * @function toJSON + * @memberof proto.WebMessageInfo + * @instance + * @returns {Object.} JSON object + */ + WebMessageInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * WebMessageInfoStatus enum. + * @name proto.WebMessageInfo.WebMessageInfoStatus + * @enum {number} + * @property {number} ERROR=0 ERROR value + * @property {number} PENDING=1 PENDING value + * @property {number} SERVER_ACK=2 SERVER_ACK value + * @property {number} DELIVERY_ACK=3 DELIVERY_ACK value + * @property {number} READ=4 READ value + * @property {number} PLAYED=5 PLAYED value + */ + WebMessageInfo.WebMessageInfoStatus = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ERROR"] = 0; + values[valuesById[1] = "PENDING"] = 1; + values[valuesById[2] = "SERVER_ACK"] = 2; + values[valuesById[3] = "DELIVERY_ACK"] = 3; + values[valuesById[4] = "READ"] = 4; + values[valuesById[5] = "PLAYED"] = 5; + return values; + })(); + + /** + * WebMessageInfoStubType enum. + * @name proto.WebMessageInfo.WebMessageInfoStubType + * @enum {number} + * @property {number} UNKNOWN=0 UNKNOWN value + * @property {number} REVOKE=1 REVOKE value + * @property {number} CIPHERTEXT=2 CIPHERTEXT value + * @property {number} FUTUREPROOF=3 FUTUREPROOF value + * @property {number} NON_VERIFIED_TRANSITION=4 NON_VERIFIED_TRANSITION value + * @property {number} UNVERIFIED_TRANSITION=5 UNVERIFIED_TRANSITION value + * @property {number} VERIFIED_TRANSITION=6 VERIFIED_TRANSITION value + * @property {number} VERIFIED_LOW_UNKNOWN=7 VERIFIED_LOW_UNKNOWN value + * @property {number} VERIFIED_HIGH=8 VERIFIED_HIGH value + * @property {number} VERIFIED_INITIAL_UNKNOWN=9 VERIFIED_INITIAL_UNKNOWN value + * @property {number} VERIFIED_INITIAL_LOW=10 VERIFIED_INITIAL_LOW value + * @property {number} VERIFIED_INITIAL_HIGH=11 VERIFIED_INITIAL_HIGH value + * @property {number} VERIFIED_TRANSITION_ANY_TO_NONE=12 VERIFIED_TRANSITION_ANY_TO_NONE value + * @property {number} VERIFIED_TRANSITION_ANY_TO_HIGH=13 VERIFIED_TRANSITION_ANY_TO_HIGH value + * @property {number} VERIFIED_TRANSITION_HIGH_TO_LOW=14 VERIFIED_TRANSITION_HIGH_TO_LOW value + * @property {number} VERIFIED_TRANSITION_HIGH_TO_UNKNOWN=15 VERIFIED_TRANSITION_HIGH_TO_UNKNOWN value + * @property {number} VERIFIED_TRANSITION_UNKNOWN_TO_LOW=16 VERIFIED_TRANSITION_UNKNOWN_TO_LOW value + * @property {number} VERIFIED_TRANSITION_LOW_TO_UNKNOWN=17 VERIFIED_TRANSITION_LOW_TO_UNKNOWN value + * @property {number} VERIFIED_TRANSITION_NONE_TO_LOW=18 VERIFIED_TRANSITION_NONE_TO_LOW value + * @property {number} VERIFIED_TRANSITION_NONE_TO_UNKNOWN=19 VERIFIED_TRANSITION_NONE_TO_UNKNOWN value + * @property {number} GROUP_CREATE=20 GROUP_CREATE value + * @property {number} GROUP_CHANGE_SUBJECT=21 GROUP_CHANGE_SUBJECT value + * @property {number} GROUP_CHANGE_ICON=22 GROUP_CHANGE_ICON value + * @property {number} GROUP_CHANGE_INVITE_LINK=23 GROUP_CHANGE_INVITE_LINK value + * @property {number} GROUP_CHANGE_DESCRIPTION=24 GROUP_CHANGE_DESCRIPTION value + * @property {number} GROUP_CHANGE_RESTRICT=25 GROUP_CHANGE_RESTRICT value + * @property {number} GROUP_CHANGE_ANNOUNCE=26 GROUP_CHANGE_ANNOUNCE value + * @property {number} GROUP_PARTICIPANT_ADD=27 GROUP_PARTICIPANT_ADD value + * @property {number} GROUP_PARTICIPANT_REMOVE=28 GROUP_PARTICIPANT_REMOVE value + * @property {number} GROUP_PARTICIPANT_PROMOTE=29 GROUP_PARTICIPANT_PROMOTE value + * @property {number} GROUP_PARTICIPANT_DEMOTE=30 GROUP_PARTICIPANT_DEMOTE value + * @property {number} GROUP_PARTICIPANT_INVITE=31 GROUP_PARTICIPANT_INVITE value + * @property {number} GROUP_PARTICIPANT_LEAVE=32 GROUP_PARTICIPANT_LEAVE value + * @property {number} GROUP_PARTICIPANT_CHANGE_NUMBER=33 GROUP_PARTICIPANT_CHANGE_NUMBER value + * @property {number} BROADCAST_CREATE=34 BROADCAST_CREATE value + * @property {number} BROADCAST_ADD=35 BROADCAST_ADD value + * @property {number} BROADCAST_REMOVE=36 BROADCAST_REMOVE value + * @property {number} GENERIC_NOTIFICATION=37 GENERIC_NOTIFICATION value + * @property {number} E2E_IDENTITY_CHANGED=38 E2E_IDENTITY_CHANGED value + * @property {number} E2E_ENCRYPTED=39 E2E_ENCRYPTED value + * @property {number} CALL_MISSED_VOICE=40 CALL_MISSED_VOICE value + * @property {number} CALL_MISSED_VIDEO=41 CALL_MISSED_VIDEO value + * @property {number} INDIVIDUAL_CHANGE_NUMBER=42 INDIVIDUAL_CHANGE_NUMBER value + * @property {number} GROUP_DELETE=43 GROUP_DELETE value + * @property {number} GROUP_ANNOUNCE_MODE_MESSAGE_BOUNCE=44 GROUP_ANNOUNCE_MODE_MESSAGE_BOUNCE value + * @property {number} CALL_MISSED_GROUP_VOICE=45 CALL_MISSED_GROUP_VOICE value + * @property {number} CALL_MISSED_GROUP_VIDEO=46 CALL_MISSED_GROUP_VIDEO value + * @property {number} PAYMENT_CIPHERTEXT=47 PAYMENT_CIPHERTEXT value + * @property {number} PAYMENT_FUTUREPROOF=48 PAYMENT_FUTUREPROOF value + * @property {number} PAYMENT_TRANSACTION_STATUS_UPDATE_FAILED=49 PAYMENT_TRANSACTION_STATUS_UPDATE_FAILED value + * @property {number} PAYMENT_TRANSACTION_STATUS_UPDATE_REFUNDED=50 PAYMENT_TRANSACTION_STATUS_UPDATE_REFUNDED value + * @property {number} PAYMENT_TRANSACTION_STATUS_UPDATE_REFUND_FAILED=51 PAYMENT_TRANSACTION_STATUS_UPDATE_REFUND_FAILED value + * @property {number} PAYMENT_TRANSACTION_STATUS_RECEIVER_PENDING_SETUP=52 PAYMENT_TRANSACTION_STATUS_RECEIVER_PENDING_SETUP value + * @property {number} PAYMENT_TRANSACTION_STATUS_RECEIVER_SUCCESS_AFTER_HICCUP=53 PAYMENT_TRANSACTION_STATUS_RECEIVER_SUCCESS_AFTER_HICCUP value + * @property {number} PAYMENT_ACTION_ACCOUNT_SETUP_REMINDER=54 PAYMENT_ACTION_ACCOUNT_SETUP_REMINDER value + * @property {number} PAYMENT_ACTION_SEND_PAYMENT_REMINDER=55 PAYMENT_ACTION_SEND_PAYMENT_REMINDER value + * @property {number} PAYMENT_ACTION_SEND_PAYMENT_INVITATION=56 PAYMENT_ACTION_SEND_PAYMENT_INVITATION value + * @property {number} PAYMENT_ACTION_REQUEST_DECLINED=57 PAYMENT_ACTION_REQUEST_DECLINED value + * @property {number} PAYMENT_ACTION_REQUEST_EXPIRED=58 PAYMENT_ACTION_REQUEST_EXPIRED value + * @property {number} PAYMENT_ACTION_REQUEST_CANCELLED=59 PAYMENT_ACTION_REQUEST_CANCELLED value + * @property {number} BIZ_VERIFIED_TRANSITION_TOP_TO_BOTTOM=60 BIZ_VERIFIED_TRANSITION_TOP_TO_BOTTOM value + * @property {number} BIZ_VERIFIED_TRANSITION_BOTTOM_TO_TOP=61 BIZ_VERIFIED_TRANSITION_BOTTOM_TO_TOP value + * @property {number} BIZ_INTRO_TOP=62 BIZ_INTRO_TOP value + * @property {number} BIZ_INTRO_BOTTOM=63 BIZ_INTRO_BOTTOM value + * @property {number} BIZ_NAME_CHANGE=64 BIZ_NAME_CHANGE value + * @property {number} BIZ_MOVE_TO_CONSUMER_APP=65 BIZ_MOVE_TO_CONSUMER_APP value + * @property {number} BIZ_TWO_TIER_MIGRATION_TOP=66 BIZ_TWO_TIER_MIGRATION_TOP value + * @property {number} BIZ_TWO_TIER_MIGRATION_BOTTOM=67 BIZ_TWO_TIER_MIGRATION_BOTTOM value + * @property {number} OVERSIZED=68 OVERSIZED value + * @property {number} GROUP_CHANGE_NO_FREQUENTLY_FORWARDED=69 GROUP_CHANGE_NO_FREQUENTLY_FORWARDED value + * @property {number} GROUP_V4_ADD_INVITE_SENT=70 GROUP_V4_ADD_INVITE_SENT value + * @property {number} GROUP_PARTICIPANT_ADD_REQUEST_JOIN=71 GROUP_PARTICIPANT_ADD_REQUEST_JOIN value + * @property {number} CHANGE_EPHEMERAL_SETTING=72 CHANGE_EPHEMERAL_SETTING value + * @property {number} E2E_DEVICE_CHANGED=73 E2E_DEVICE_CHANGED value + * @property {number} VIEWED_ONCE=74 VIEWED_ONCE value + * @property {number} E2E_ENCRYPTED_NOW=75 E2E_ENCRYPTED_NOW value + * @property {number} BLUE_MSG_BSP_FB_TO_BSP_PREMISE=76 BLUE_MSG_BSP_FB_TO_BSP_PREMISE value + * @property {number} BLUE_MSG_BSP_FB_TO_SELF_FB=77 BLUE_MSG_BSP_FB_TO_SELF_FB value + * @property {number} BLUE_MSG_BSP_FB_TO_SELF_PREMISE=78 BLUE_MSG_BSP_FB_TO_SELF_PREMISE value + * @property {number} BLUE_MSG_BSP_FB_UNVERIFIED=79 BLUE_MSG_BSP_FB_UNVERIFIED value + * @property {number} BLUE_MSG_BSP_FB_UNVERIFIED_TO_SELF_PREMISE_VERIFIED=80 BLUE_MSG_BSP_FB_UNVERIFIED_TO_SELF_PREMISE_VERIFIED value + * @property {number} BLUE_MSG_BSP_FB_VERIFIED=81 BLUE_MSG_BSP_FB_VERIFIED value + * @property {number} BLUE_MSG_BSP_FB_VERIFIED_TO_SELF_PREMISE_UNVERIFIED=82 BLUE_MSG_BSP_FB_VERIFIED_TO_SELF_PREMISE_UNVERIFIED value + * @property {number} BLUE_MSG_BSP_PREMISE_TO_SELF_PREMISE=83 BLUE_MSG_BSP_PREMISE_TO_SELF_PREMISE value + * @property {number} BLUE_MSG_BSP_PREMISE_UNVERIFIED=84 BLUE_MSG_BSP_PREMISE_UNVERIFIED value + * @property {number} BLUE_MSG_BSP_PREMISE_UNVERIFIED_TO_SELF_PREMISE_VERIFIED=85 BLUE_MSG_BSP_PREMISE_UNVERIFIED_TO_SELF_PREMISE_VERIFIED value + * @property {number} BLUE_MSG_BSP_PREMISE_VERIFIED=86 BLUE_MSG_BSP_PREMISE_VERIFIED value + * @property {number} BLUE_MSG_BSP_PREMISE_VERIFIED_TO_SELF_PREMISE_UNVERIFIED=87 BLUE_MSG_BSP_PREMISE_VERIFIED_TO_SELF_PREMISE_UNVERIFIED value + * @property {number} BLUE_MSG_CONSUMER_TO_BSP_FB_UNVERIFIED=88 BLUE_MSG_CONSUMER_TO_BSP_FB_UNVERIFIED value + * @property {number} BLUE_MSG_CONSUMER_TO_BSP_PREMISE_UNVERIFIED=89 BLUE_MSG_CONSUMER_TO_BSP_PREMISE_UNVERIFIED value + * @property {number} BLUE_MSG_CONSUMER_TO_SELF_FB_UNVERIFIED=90 BLUE_MSG_CONSUMER_TO_SELF_FB_UNVERIFIED value + * @property {number} BLUE_MSG_CONSUMER_TO_SELF_PREMISE_UNVERIFIED=91 BLUE_MSG_CONSUMER_TO_SELF_PREMISE_UNVERIFIED value + * @property {number} BLUE_MSG_SELF_FB_TO_BSP_PREMISE=92 BLUE_MSG_SELF_FB_TO_BSP_PREMISE value + * @property {number} BLUE_MSG_SELF_FB_TO_SELF_PREMISE=93 BLUE_MSG_SELF_FB_TO_SELF_PREMISE value + * @property {number} BLUE_MSG_SELF_FB_UNVERIFIED=94 BLUE_MSG_SELF_FB_UNVERIFIED value + * @property {number} BLUE_MSG_SELF_FB_UNVERIFIED_TO_SELF_PREMISE_VERIFIED=95 BLUE_MSG_SELF_FB_UNVERIFIED_TO_SELF_PREMISE_VERIFIED value + * @property {number} BLUE_MSG_SELF_FB_VERIFIED=96 BLUE_MSG_SELF_FB_VERIFIED value + * @property {number} BLUE_MSG_SELF_FB_VERIFIED_TO_SELF_PREMISE_UNVERIFIED=97 BLUE_MSG_SELF_FB_VERIFIED_TO_SELF_PREMISE_UNVERIFIED value + * @property {number} BLUE_MSG_SELF_PREMISE_TO_BSP_PREMISE=98 BLUE_MSG_SELF_PREMISE_TO_BSP_PREMISE value + * @property {number} BLUE_MSG_SELF_PREMISE_UNVERIFIED=99 BLUE_MSG_SELF_PREMISE_UNVERIFIED value + * @property {number} BLUE_MSG_SELF_PREMISE_VERIFIED=100 BLUE_MSG_SELF_PREMISE_VERIFIED value + * @property {number} BLUE_MSG_TO_BSP_FB=101 BLUE_MSG_TO_BSP_FB value + * @property {number} BLUE_MSG_TO_CONSUMER=102 BLUE_MSG_TO_CONSUMER value + * @property {number} BLUE_MSG_TO_SELF_FB=103 BLUE_MSG_TO_SELF_FB value + * @property {number} BLUE_MSG_UNVERIFIED_TO_BSP_FB_VERIFIED=104 BLUE_MSG_UNVERIFIED_TO_BSP_FB_VERIFIED value + * @property {number} BLUE_MSG_UNVERIFIED_TO_BSP_PREMISE_VERIFIED=105 BLUE_MSG_UNVERIFIED_TO_BSP_PREMISE_VERIFIED value + * @property {number} BLUE_MSG_UNVERIFIED_TO_SELF_FB_VERIFIED=106 BLUE_MSG_UNVERIFIED_TO_SELF_FB_VERIFIED value + * @property {number} BLUE_MSG_UNVERIFIED_TO_VERIFIED=107 BLUE_MSG_UNVERIFIED_TO_VERIFIED value + * @property {number} BLUE_MSG_VERIFIED_TO_BSP_FB_UNVERIFIED=108 BLUE_MSG_VERIFIED_TO_BSP_FB_UNVERIFIED value + * @property {number} BLUE_MSG_VERIFIED_TO_BSP_PREMISE_UNVERIFIED=109 BLUE_MSG_VERIFIED_TO_BSP_PREMISE_UNVERIFIED value + * @property {number} BLUE_MSG_VERIFIED_TO_SELF_FB_UNVERIFIED=110 BLUE_MSG_VERIFIED_TO_SELF_FB_UNVERIFIED value + * @property {number} BLUE_MSG_VERIFIED_TO_UNVERIFIED=111 BLUE_MSG_VERIFIED_TO_UNVERIFIED value + * @property {number} BLUE_MSG_BSP_FB_UNVERIFIED_TO_BSP_PREMISE_VERIFIED=112 BLUE_MSG_BSP_FB_UNVERIFIED_TO_BSP_PREMISE_VERIFIED value + * @property {number} BLUE_MSG_BSP_FB_UNVERIFIED_TO_SELF_FB_VERIFIED=113 BLUE_MSG_BSP_FB_UNVERIFIED_TO_SELF_FB_VERIFIED value + * @property {number} BLUE_MSG_BSP_FB_VERIFIED_TO_BSP_PREMISE_UNVERIFIED=114 BLUE_MSG_BSP_FB_VERIFIED_TO_BSP_PREMISE_UNVERIFIED value + * @property {number} BLUE_MSG_BSP_FB_VERIFIED_TO_SELF_FB_UNVERIFIED=115 BLUE_MSG_BSP_FB_VERIFIED_TO_SELF_FB_UNVERIFIED value + * @property {number} BLUE_MSG_SELF_FB_UNVERIFIED_TO_BSP_PREMISE_VERIFIED=116 BLUE_MSG_SELF_FB_UNVERIFIED_TO_BSP_PREMISE_VERIFIED value + * @property {number} BLUE_MSG_SELF_FB_VERIFIED_TO_BSP_PREMISE_UNVERIFIED=117 BLUE_MSG_SELF_FB_VERIFIED_TO_BSP_PREMISE_UNVERIFIED value + * @property {number} E2E_IDENTITY_UNAVAILABLE=118 E2E_IDENTITY_UNAVAILABLE value + * @property {number} GROUP_CREATING=119 GROUP_CREATING value + * @property {number} GROUP_CREATE_FAILED=120 GROUP_CREATE_FAILED value + * @property {number} GROUP_BOUNCED=121 GROUP_BOUNCED value + * @property {number} BLOCK_CONTACT=122 BLOCK_CONTACT value + * @property {number} EPHEMERAL_SETTING_NOT_APPLIED=123 EPHEMERAL_SETTING_NOT_APPLIED value + * @property {number} SYNC_FAILED=124 SYNC_FAILED value + * @property {number} SYNCING=125 SYNCING value + * @property {number} BIZ_PRIVACY_MODE_INIT_FB=126 BIZ_PRIVACY_MODE_INIT_FB value + * @property {number} BIZ_PRIVACY_MODE_INIT_BSP=127 BIZ_PRIVACY_MODE_INIT_BSP value + * @property {number} BIZ_PRIVACY_MODE_TO_FB=128 BIZ_PRIVACY_MODE_TO_FB value + * @property {number} BIZ_PRIVACY_MODE_TO_BSP=129 BIZ_PRIVACY_MODE_TO_BSP value + */ + WebMessageInfo.WebMessageInfoStubType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN"] = 0; + values[valuesById[1] = "REVOKE"] = 1; + values[valuesById[2] = "CIPHERTEXT"] = 2; + values[valuesById[3] = "FUTUREPROOF"] = 3; + values[valuesById[4] = "NON_VERIFIED_TRANSITION"] = 4; + values[valuesById[5] = "UNVERIFIED_TRANSITION"] = 5; + values[valuesById[6] = "VERIFIED_TRANSITION"] = 6; + values[valuesById[7] = "VERIFIED_LOW_UNKNOWN"] = 7; + values[valuesById[8] = "VERIFIED_HIGH"] = 8; + values[valuesById[9] = "VERIFIED_INITIAL_UNKNOWN"] = 9; + values[valuesById[10] = "VERIFIED_INITIAL_LOW"] = 10; + values[valuesById[11] = "VERIFIED_INITIAL_HIGH"] = 11; + values[valuesById[12] = "VERIFIED_TRANSITION_ANY_TO_NONE"] = 12; + values[valuesById[13] = "VERIFIED_TRANSITION_ANY_TO_HIGH"] = 13; + values[valuesById[14] = "VERIFIED_TRANSITION_HIGH_TO_LOW"] = 14; + values[valuesById[15] = "VERIFIED_TRANSITION_HIGH_TO_UNKNOWN"] = 15; + values[valuesById[16] = "VERIFIED_TRANSITION_UNKNOWN_TO_LOW"] = 16; + values[valuesById[17] = "VERIFIED_TRANSITION_LOW_TO_UNKNOWN"] = 17; + values[valuesById[18] = "VERIFIED_TRANSITION_NONE_TO_LOW"] = 18; + values[valuesById[19] = "VERIFIED_TRANSITION_NONE_TO_UNKNOWN"] = 19; + values[valuesById[20] = "GROUP_CREATE"] = 20; + values[valuesById[21] = "GROUP_CHANGE_SUBJECT"] = 21; + values[valuesById[22] = "GROUP_CHANGE_ICON"] = 22; + values[valuesById[23] = "GROUP_CHANGE_INVITE_LINK"] = 23; + values[valuesById[24] = "GROUP_CHANGE_DESCRIPTION"] = 24; + values[valuesById[25] = "GROUP_CHANGE_RESTRICT"] = 25; + values[valuesById[26] = "GROUP_CHANGE_ANNOUNCE"] = 26; + values[valuesById[27] = "GROUP_PARTICIPANT_ADD"] = 27; + values[valuesById[28] = "GROUP_PARTICIPANT_REMOVE"] = 28; + values[valuesById[29] = "GROUP_PARTICIPANT_PROMOTE"] = 29; + values[valuesById[30] = "GROUP_PARTICIPANT_DEMOTE"] = 30; + values[valuesById[31] = "GROUP_PARTICIPANT_INVITE"] = 31; + values[valuesById[32] = "GROUP_PARTICIPANT_LEAVE"] = 32; + values[valuesById[33] = "GROUP_PARTICIPANT_CHANGE_NUMBER"] = 33; + values[valuesById[34] = "BROADCAST_CREATE"] = 34; + values[valuesById[35] = "BROADCAST_ADD"] = 35; + values[valuesById[36] = "BROADCAST_REMOVE"] = 36; + values[valuesById[37] = "GENERIC_NOTIFICATION"] = 37; + values[valuesById[38] = "E2E_IDENTITY_CHANGED"] = 38; + values[valuesById[39] = "E2E_ENCRYPTED"] = 39; + values[valuesById[40] = "CALL_MISSED_VOICE"] = 40; + values[valuesById[41] = "CALL_MISSED_VIDEO"] = 41; + values[valuesById[42] = "INDIVIDUAL_CHANGE_NUMBER"] = 42; + values[valuesById[43] = "GROUP_DELETE"] = 43; + values[valuesById[44] = "GROUP_ANNOUNCE_MODE_MESSAGE_BOUNCE"] = 44; + values[valuesById[45] = "CALL_MISSED_GROUP_VOICE"] = 45; + values[valuesById[46] = "CALL_MISSED_GROUP_VIDEO"] = 46; + values[valuesById[47] = "PAYMENT_CIPHERTEXT"] = 47; + values[valuesById[48] = "PAYMENT_FUTUREPROOF"] = 48; + values[valuesById[49] = "PAYMENT_TRANSACTION_STATUS_UPDATE_FAILED"] = 49; + values[valuesById[50] = "PAYMENT_TRANSACTION_STATUS_UPDATE_REFUNDED"] = 50; + values[valuesById[51] = "PAYMENT_TRANSACTION_STATUS_UPDATE_REFUND_FAILED"] = 51; + values[valuesById[52] = "PAYMENT_TRANSACTION_STATUS_RECEIVER_PENDING_SETUP"] = 52; + values[valuesById[53] = "PAYMENT_TRANSACTION_STATUS_RECEIVER_SUCCESS_AFTER_HICCUP"] = 53; + values[valuesById[54] = "PAYMENT_ACTION_ACCOUNT_SETUP_REMINDER"] = 54; + values[valuesById[55] = "PAYMENT_ACTION_SEND_PAYMENT_REMINDER"] = 55; + values[valuesById[56] = "PAYMENT_ACTION_SEND_PAYMENT_INVITATION"] = 56; + values[valuesById[57] = "PAYMENT_ACTION_REQUEST_DECLINED"] = 57; + values[valuesById[58] = "PAYMENT_ACTION_REQUEST_EXPIRED"] = 58; + values[valuesById[59] = "PAYMENT_ACTION_REQUEST_CANCELLED"] = 59; + values[valuesById[60] = "BIZ_VERIFIED_TRANSITION_TOP_TO_BOTTOM"] = 60; + values[valuesById[61] = "BIZ_VERIFIED_TRANSITION_BOTTOM_TO_TOP"] = 61; + values[valuesById[62] = "BIZ_INTRO_TOP"] = 62; + values[valuesById[63] = "BIZ_INTRO_BOTTOM"] = 63; + values[valuesById[64] = "BIZ_NAME_CHANGE"] = 64; + values[valuesById[65] = "BIZ_MOVE_TO_CONSUMER_APP"] = 65; + values[valuesById[66] = "BIZ_TWO_TIER_MIGRATION_TOP"] = 66; + values[valuesById[67] = "BIZ_TWO_TIER_MIGRATION_BOTTOM"] = 67; + values[valuesById[68] = "OVERSIZED"] = 68; + values[valuesById[69] = "GROUP_CHANGE_NO_FREQUENTLY_FORWARDED"] = 69; + values[valuesById[70] = "GROUP_V4_ADD_INVITE_SENT"] = 70; + values[valuesById[71] = "GROUP_PARTICIPANT_ADD_REQUEST_JOIN"] = 71; + values[valuesById[72] = "CHANGE_EPHEMERAL_SETTING"] = 72; + values[valuesById[73] = "E2E_DEVICE_CHANGED"] = 73; + values[valuesById[74] = "VIEWED_ONCE"] = 74; + values[valuesById[75] = "E2E_ENCRYPTED_NOW"] = 75; + values[valuesById[76] = "BLUE_MSG_BSP_FB_TO_BSP_PREMISE"] = 76; + values[valuesById[77] = "BLUE_MSG_BSP_FB_TO_SELF_FB"] = 77; + values[valuesById[78] = "BLUE_MSG_BSP_FB_TO_SELF_PREMISE"] = 78; + values[valuesById[79] = "BLUE_MSG_BSP_FB_UNVERIFIED"] = 79; + values[valuesById[80] = "BLUE_MSG_BSP_FB_UNVERIFIED_TO_SELF_PREMISE_VERIFIED"] = 80; + values[valuesById[81] = "BLUE_MSG_BSP_FB_VERIFIED"] = 81; + values[valuesById[82] = "BLUE_MSG_BSP_FB_VERIFIED_TO_SELF_PREMISE_UNVERIFIED"] = 82; + values[valuesById[83] = "BLUE_MSG_BSP_PREMISE_TO_SELF_PREMISE"] = 83; + values[valuesById[84] = "BLUE_MSG_BSP_PREMISE_UNVERIFIED"] = 84; + values[valuesById[85] = "BLUE_MSG_BSP_PREMISE_UNVERIFIED_TO_SELF_PREMISE_VERIFIED"] = 85; + values[valuesById[86] = "BLUE_MSG_BSP_PREMISE_VERIFIED"] = 86; + values[valuesById[87] = "BLUE_MSG_BSP_PREMISE_VERIFIED_TO_SELF_PREMISE_UNVERIFIED"] = 87; + values[valuesById[88] = "BLUE_MSG_CONSUMER_TO_BSP_FB_UNVERIFIED"] = 88; + values[valuesById[89] = "BLUE_MSG_CONSUMER_TO_BSP_PREMISE_UNVERIFIED"] = 89; + values[valuesById[90] = "BLUE_MSG_CONSUMER_TO_SELF_FB_UNVERIFIED"] = 90; + values[valuesById[91] = "BLUE_MSG_CONSUMER_TO_SELF_PREMISE_UNVERIFIED"] = 91; + values[valuesById[92] = "BLUE_MSG_SELF_FB_TO_BSP_PREMISE"] = 92; + values[valuesById[93] = "BLUE_MSG_SELF_FB_TO_SELF_PREMISE"] = 93; + values[valuesById[94] = "BLUE_MSG_SELF_FB_UNVERIFIED"] = 94; + values[valuesById[95] = "BLUE_MSG_SELF_FB_UNVERIFIED_TO_SELF_PREMISE_VERIFIED"] = 95; + values[valuesById[96] = "BLUE_MSG_SELF_FB_VERIFIED"] = 96; + values[valuesById[97] = "BLUE_MSG_SELF_FB_VERIFIED_TO_SELF_PREMISE_UNVERIFIED"] = 97; + values[valuesById[98] = "BLUE_MSG_SELF_PREMISE_TO_BSP_PREMISE"] = 98; + values[valuesById[99] = "BLUE_MSG_SELF_PREMISE_UNVERIFIED"] = 99; + values[valuesById[100] = "BLUE_MSG_SELF_PREMISE_VERIFIED"] = 100; + values[valuesById[101] = "BLUE_MSG_TO_BSP_FB"] = 101; + values[valuesById[102] = "BLUE_MSG_TO_CONSUMER"] = 102; + values[valuesById[103] = "BLUE_MSG_TO_SELF_FB"] = 103; + values[valuesById[104] = "BLUE_MSG_UNVERIFIED_TO_BSP_FB_VERIFIED"] = 104; + values[valuesById[105] = "BLUE_MSG_UNVERIFIED_TO_BSP_PREMISE_VERIFIED"] = 105; + values[valuesById[106] = "BLUE_MSG_UNVERIFIED_TO_SELF_FB_VERIFIED"] = 106; + values[valuesById[107] = "BLUE_MSG_UNVERIFIED_TO_VERIFIED"] = 107; + values[valuesById[108] = "BLUE_MSG_VERIFIED_TO_BSP_FB_UNVERIFIED"] = 108; + values[valuesById[109] = "BLUE_MSG_VERIFIED_TO_BSP_PREMISE_UNVERIFIED"] = 109; + values[valuesById[110] = "BLUE_MSG_VERIFIED_TO_SELF_FB_UNVERIFIED"] = 110; + values[valuesById[111] = "BLUE_MSG_VERIFIED_TO_UNVERIFIED"] = 111; + values[valuesById[112] = "BLUE_MSG_BSP_FB_UNVERIFIED_TO_BSP_PREMISE_VERIFIED"] = 112; + values[valuesById[113] = "BLUE_MSG_BSP_FB_UNVERIFIED_TO_SELF_FB_VERIFIED"] = 113; + values[valuesById[114] = "BLUE_MSG_BSP_FB_VERIFIED_TO_BSP_PREMISE_UNVERIFIED"] = 114; + values[valuesById[115] = "BLUE_MSG_BSP_FB_VERIFIED_TO_SELF_FB_UNVERIFIED"] = 115; + values[valuesById[116] = "BLUE_MSG_SELF_FB_UNVERIFIED_TO_BSP_PREMISE_VERIFIED"] = 116; + values[valuesById[117] = "BLUE_MSG_SELF_FB_VERIFIED_TO_BSP_PREMISE_UNVERIFIED"] = 117; + values[valuesById[118] = "E2E_IDENTITY_UNAVAILABLE"] = 118; + values[valuesById[119] = "GROUP_CREATING"] = 119; + values[valuesById[120] = "GROUP_CREATE_FAILED"] = 120; + values[valuesById[121] = "GROUP_BOUNCED"] = 121; + values[valuesById[122] = "BLOCK_CONTACT"] = 122; + values[valuesById[123] = "EPHEMERAL_SETTING_NOT_APPLIED"] = 123; + values[valuesById[124] = "SYNC_FAILED"] = 124; + values[valuesById[125] = "SYNCING"] = 125; + values[valuesById[126] = "BIZ_PRIVACY_MODE_INIT_FB"] = 126; + values[valuesById[127] = "BIZ_PRIVACY_MODE_INIT_BSP"] = 127; + values[valuesById[128] = "BIZ_PRIVACY_MODE_TO_FB"] = 128; + values[valuesById[129] = "BIZ_PRIVACY_MODE_TO_BSP"] = 129; + return values; + })(); + + /** + * WebMessageInfoBizPrivacyStatus enum. + * @name proto.WebMessageInfo.WebMessageInfoBizPrivacyStatus + * @enum {number} + * @property {number} E2EE=0 E2EE value + * @property {number} FB=2 FB value + * @property {number} BSP=1 BSP value + * @property {number} BSP_AND_FB=3 BSP_AND_FB value + */ + WebMessageInfo.WebMessageInfoBizPrivacyStatus = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "E2EE"] = 0; + values[valuesById[2] = "FB"] = 2; + values[valuesById[1] = "BSP"] = 1; + values[valuesById[3] = "BSP_AND_FB"] = 3; + return values; + })(); + + return WebMessageInfo; + })(); + return proto; })(); -module.exports = $root; +module.exports = $root; \ No newline at end of file diff --git a/src/Binary/WAMessage.proto b/src/Binary/WAMessage.proto index e5313bd..e7fa38c 100644 --- a/src/Binary/WAMessage.proto +++ b/src/Binary/WAMessage.proto @@ -1,6 +1,1466 @@ syntax = "proto2"; package proto; +message AppVersion { + optional uint32 primary = 1; + optional uint32 secondary = 2; + optional uint32 tertiary = 3; + optional uint32 quaternary = 4; + optional uint32 quinary = 5; +} + +message UserAgent { + enum UserAgentPlatform { + ANDROID = 0; + IOS = 1; + WINDOWS_PHONE = 2; + BLACKBERRY = 3; + BLACKBERRYX = 4; + S40 = 5; + S60 = 6; + PYTHON_CLIENT = 7; + TIZEN = 8; + ENTERPRISE = 9; + SMB_ANDROID = 10; + KAIOS = 11; + SMB_IOS = 12; + WINDOWS = 13; + WEB = 14; + PORTAL = 15; + GREEN_ANDROID = 16; + GREEN_IPHONE = 17; + BLUE_ANDROID = 18; + BLUE_IPHONE = 19; + FBLITE_ANDROID = 20; + MLITE_ANDROID = 21; + IGLITE_ANDROID = 22; + PAGE = 23; + MACOS = 24; + VR = 25; + } + optional UserAgentPlatform platform = 1; + optional AppVersion appVersion = 2; + optional string mcc = 3; + optional string mnc = 4; + optional string osVersion = 5; + optional string manufacturer = 6; + optional string device = 7; + optional string osBuildNumber = 8; + optional string phoneId = 9; + enum UserAgentReleaseChannel { + RELEASE = 0; + BETA = 1; + ALPHA = 2; + DEBUG = 3; + } + optional UserAgentReleaseChannel releaseChannel = 10; + optional string localeLanguageIso6391 = 11; + optional string localeCountryIso31661Alpha2 = 12; + optional string deviceBoard = 13; +} + +message WebdPayload { + optional bool usesParticipantInKey = 1; + optional bool supportsStarredMessages = 2; + optional bool supportsDocumentMessages = 3; + optional bool supportsUrlMessages = 4; + optional bool supportsMediaRetry = 5; + optional bool supportsE2EImage = 6; + optional bool supportsE2EVideo = 7; + optional bool supportsE2EAudio = 8; + optional bool supportsE2EDocument = 9; + optional string documentTypes = 10; + optional bytes features = 11; +} + +message WebInfo { + optional string refToken = 1; + optional string version = 2; + optional WebdPayload webdPayload = 3; + enum WebInfoWebSubPlatform { + WEB_BROWSER = 0; + APP_STORE = 1; + WIN_STORE = 2; + DARWIN = 3; + WIN32 = 4; + } + optional WebInfoWebSubPlatform webSubPlatform = 4; +} + +message DNSSource { + enum DNSSourceDNSResolutionMethod { + SYSTEM = 0; + GOOGLE = 1; + HARDCODED = 2; + OVERRIDE = 3; + FALLBACK = 4; + } + optional DNSSourceDNSResolutionMethod dnsMethod = 15; + optional bool appCached = 16; +} + +message CompanionRegData { + optional bytes eRegid = 1; + optional bytes eKeytype = 2; + optional bytes eIdent = 3; + optional bytes eSkeyId = 4; + optional bytes eSkeyVal = 5; + optional bytes eSkeySig = 6; + optional bytes buildHash = 7; + optional bytes companionProps = 8; +} + +message ClientPayload { + optional uint64 username = 1; + optional bool passive = 3; + enum ClientPayloadClientFeature { + NONE = 0; + } + repeated ClientPayloadClientFeature clientFeatures = 4; + optional UserAgent userAgent = 5; + optional WebInfo webInfo = 6; + optional string pushName = 7; + optional sfixed32 sessionId = 9; + optional bool shortConnect = 10; + enum ClientPayloadIOSAppExtension { + SHARE_EXTENSION = 0; + SERVICE_EXTENSION = 1; + INTENTS_EXTENSION = 2; + } + optional ClientPayloadIOSAppExtension iosAppExtension = 30; + enum ClientPayloadConnectType { + CELLULAR_UNKNOWN = 0; + WIFI_UNKNOWN = 1; + CELLULAR_EDGE = 100; + CELLULAR_IDEN = 101; + CELLULAR_UMTS = 102; + CELLULAR_EVDO = 103; + CELLULAR_GPRS = 104; + CELLULAR_HSDPA = 105; + CELLULAR_HSUPA = 106; + CELLULAR_HSPA = 107; + CELLULAR_CDMA = 108; + CELLULAR_1XRTT = 109; + CELLULAR_EHRPD = 110; + CELLULAR_LTE = 111; + CELLULAR_HSPAP = 112; + } + optional ClientPayloadConnectType connectType = 12; + enum ClientPayloadConnectReason { + PUSH = 0; + USER_ACTIVATED = 1; + SCHEDULED = 2; + ERROR_RECONNECT = 3; + NETWORK_SWITCH = 4; + PING_RECONNECT = 5; + } + optional ClientPayloadConnectReason connectReason = 13; + repeated int32 shards = 14; + optional DNSSource dnsSource = 15; + optional uint32 connectAttemptCount = 16; + optional uint32 agent = 17; + optional uint32 device = 18; + optional CompanionRegData regData = 19; + enum ClientPayloadProduct { + WHATSAPP = 0; + MESSENGER = 1; + } + optional ClientPayloadProduct product = 20; + optional bytes fbCat = 21; + optional bytes fbUserAgent = 22; + optional bool oc = 23; +} + +//message Details { +// optional uint32 serial = 1; +// optional string issuer = 2; +// optional uint64 expires = 3; +// optional string subject = 4; +// optional bytes key = 5; +//} + +message NoiseCertificate { + optional bytes details = 1; + optional bytes signature = 2; +} + +message ClientHello { + optional bytes ephemeral = 1; + optional bytes static = 2; + optional bytes payload = 3; +} + +message ServerHello { + optional bytes ephemeral = 1; + optional bytes static = 2; + optional bytes payload = 3; +} + +message ClientFinish { + optional bytes static = 1; + optional bytes payload = 2; +} + +message HandshakeMessage { + optional ClientHello clientHello = 2; + optional ServerHello serverHello = 3; + optional ClientFinish clientFinish = 4; +} + +message BizIdentityInfo { + enum BizIdentityInfoVerifiedLevelValue { + UNKNOWN = 0; + LOW = 1; + HIGH = 2; + } + optional BizIdentityInfoVerifiedLevelValue vlevel = 1; + optional VerifiedNameCertificate vnameCert = 2; + optional bool signed = 3; + optional bool revoked = 4; + enum BizIdentityInfoHostStorageType { + ON_PREMISE = 0; + FACEBOOK = 1; + } + optional BizIdentityInfoHostStorageType hostStorage = 5; + enum BizIdentityInfoActualActorsType { + SELF = 0; + BSP = 1; + } + optional BizIdentityInfoActualActorsType actualActors = 6; + optional uint64 privacyModeTs = 7; +} + +message BizAccountLinkInfo { + optional uint64 whatsappBizAcctFbid = 1; + optional string whatsappAcctNumber = 2; + optional uint64 issueTime = 3; + enum BizAccountLinkInfoHostStorageType { + ON_PREMISE = 0; + FACEBOOK = 1; + } + optional BizAccountLinkInfoHostStorageType hostStorage = 4; + enum BizAccountLinkInfoAccountType { + ENTERPRISE = 0; + PAGE = 1; + } + optional BizAccountLinkInfoAccountType accountType = 5; +} + +message BizAccountPayload { + optional VerifiedNameCertificate vnameCert = 1; + optional bytes bizAcctLinkInfo = 2; +} + +//message Details { +// optional uint64 serial = 1; +// optional string issuer = 2; +// optional string verifiedName = 4; +// repeated LocalizedName localizedNames = 8; +// optional uint64 issueTime = 10; +//} + +message VerifiedNameCertificate { + optional bytes details = 1; + optional bytes signature = 2; + optional bytes serverSignature = 3; +} + +message LocalizedName { + optional string lg = 1; + optional string lc = 2; + optional string verifiedName = 3; +} + +message SyncActionData { + optional bytes index = 1; + optional SyncActionValue value = 2; + optional bytes padding = 3; + optional int32 version = 4; +} + +message StarAction { + optional bool starred = 1; +} + +message ContactAction { + optional string fullName = 1; + optional string firstName = 2; +} + +message MuteAction { + optional bool muted = 1; + optional int64 muteEndTimestamp = 2; +} + +message PinAction { + optional bool pinned = 1; +} + +message SecurityNotificationSetting { + optional bool showNotification = 1; +} + +message PushNameSetting { + optional string name = 1; +} + +message LocaleSetting { + optional string locale = 1; +} + +message QuickReplyAction { + optional string shortcut = 1; + optional string message = 2; + repeated string keywords = 3; + optional int32 count = 4; + optional bool deleted = 5; +} + +message LabelAssociationAction { + optional bool labeled = 1; +} + +message LabelEditAction { + optional string name = 1; + optional int32 color = 2; + optional int32 predefinedId = 3; + optional bool deleted = 4; +} + +message RecentStickerWeightsAction { + repeated RecentStickerWeight weights = 1; +} + +message RecentStickerMetadata { + optional string directPath = 1; + optional string encFilehash = 2; + optional string mediaKey = 3; + optional string stanzaId = 4; + optional string chatJid = 5; + optional string participant = 6; + optional bool isSentByMe = 7; +} + +message RecentEmojiWeightsAction { + repeated RecentEmojiWeight weights = 1; +} + +message ArchiveChatAction { + optional bool archived = 1; + optional SyncActionMessageRange messageRange = 2; +} + +message DeleteMessageForMeAction { + optional bool deleteMedia = 1; + optional int64 messageTimestamp = 2; +} + +message MarkChatAsReadAction { + optional bool read = 1; + optional SyncActionMessageRange messageRange = 2; +} + +message ClearChatAction { + optional SyncActionMessageRange messageRange = 1; +} + +message DeleteChatAction { + optional SyncActionMessageRange messageRange = 1; +} + +message UnarchiveChatsSetting { + optional bool unarchiveChats = 1; +} + +message SyncActionMessageRange { + optional int64 lastMessageTimestamp = 1; + optional int64 lastSystemMessageTimestamp = 2; + repeated SyncActionMessage messages = 3; +} + +message SyncActionMessage { + optional MessageKey key = 1; + optional int64 timestamp = 2; +} + +message KeyExpiration { + optional int32 expiredKeyEpoch = 1; +} + +message SyncActionValue { + optional int64 timestamp = 1; + optional StarAction starAction = 2; + optional ContactAction contactAction = 3; + optional MuteAction muteAction = 4; + optional PinAction pinAction = 5; + optional SecurityNotificationSetting securityNotificationSetting = 6; + optional PushNameSetting pushNameSetting = 7; + optional QuickReplyAction quickReplyAction = 8; + optional RecentStickerWeightsAction recentStickerWeightsAction = 9; + optional RecentStickerMetadata recentStickerMetadata = 10; + optional RecentEmojiWeightsAction recentEmojiWeightsAction = 11; + optional LabelEditAction labelEditAction = 14; + optional LabelAssociationAction labelAssociationAction = 15; + optional LocaleSetting localeSetting = 16; + optional ArchiveChatAction archiveChatAction = 17; + optional DeleteMessageForMeAction deleteMessageForMeAction = 18; + optional KeyExpiration keyExpiration = 19; + optional MarkChatAsReadAction markChatAsReadAction = 20; + optional ClearChatAction clearChatAction = 21; + optional DeleteChatAction deleteChatAction = 22; + optional UnarchiveChatsSetting unarchiveChatsSetting = 23; +} + +message RecentEmojiWeight { + optional string emoji = 1; + optional float weight = 2; +} + +message RecentStickerWeight { + optional string filehash = 1; + optional float weight = 2; +} + +message SyncdPatch { + optional SyncdVersion version = 1; + repeated SyncdMutation mutations = 2; + optional ExternalBlobReference externalMutations = 3; + optional bytes snapshotMac = 4; + optional bytes patchMac = 5; + optional KeyId keyId = 6; + optional ExitCode exitCode = 7; + optional uint32 deviceIndex = 8; +} + +message SyncdMutation { + enum SyncdMutationSyncdOperation { + SET = 0; + REMOVE = 1; + } + optional SyncdMutationSyncdOperation operation = 1; + optional SyncdRecord record = 2; +} + +message SyncdMutations { + repeated SyncdMutation mutations = 1; +} + +message SyncdSnapshot { + optional SyncdVersion version = 1; + repeated SyncdRecord records = 2; + optional bytes mac = 3; + optional KeyId keyId = 4; +} + +message ExternalBlobReference { + optional bytes mediaKey = 1; + optional string directPath = 2; + optional string handle = 3; + optional uint64 fileSizeBytes = 4; + optional bytes fileSha256 = 5; + optional bytes fileEncSha256 = 6; +} + +message SyncdRecord { + optional SyncdIndex index = 1; + optional SyncdValue value = 2; + optional KeyId keyId = 3; +} + +message KeyId { + optional bytes id = 1; +} + +message SyncdValue { + optional bytes blob = 1; +} + +message SyncdIndex { + optional bytes blob = 1; +} + +message ExitCode { + optional uint64 code = 1; + optional string text = 2; +} + +message SyncdVersion { + optional uint64 version = 1; +} + +message ServerErrorReceipt { + optional string stanzaId = 1; +} + +message MediaRetryNotification { + optional string stanzaId = 1; + optional string directPath = 2; + enum MediaRetryNotificationResultType { + GENERAL_ERROR = 0; + SUCCESS = 1; + NOT_FOUND = 2; + DECRYPTION_ERROR = 3; + } + optional MediaRetryNotificationResultType result = 3; +} + +message MsgOpaqueData { + optional string body = 1; + optional string caption = 3; + optional string clientUrl = 4; +// optional string loc = 4; + optional double lng = 5; + optional double lat = 7; + optional int32 paymentAmount1000 = 8; + optional string paymentNoteMsgBody = 9; + optional string canonicalUrl = 10; + optional string matchedText = 11; + optional string title = 12; + optional string description = 13; +} + +message MsgRowOpaqueData { + optional MsgOpaqueData currentMsg = 1; + optional MsgOpaqueData quotedMsg = 2; +} + +message Pushname { + optional string id = 1; + optional string pushname = 2; +} + +message HistorySyncMsg { + optional WebMessageInfo message = 1; + optional uint64 msgOrderId = 2; +} + +message Conversation { + required string id = 1; + repeated HistorySyncMsg messages = 2; + optional string newJid = 3; + optional string oldJid = 4; + optional uint64 lastMsgTimestamp = 5; + optional uint32 unreadCount = 6; + optional bool readOnly = 7; + optional bool endOfHistoryTransfer = 8; + optional uint32 ephemeralExpiration = 9; + optional int64 ephemeralSettingTimestamp = 10; + enum ConversationEndOfHistoryTransferType { + COMPLETE_BUT_MORE_MESSAGES_REMAIN_ON_PRIMARY = 0; + COMPLETE_AND_NO_MORE_MESSAGE_REMAIN_ON_PRIMARY = 1; + } + optional ConversationEndOfHistoryTransferType endOfHistoryTransferType = 11; + optional uint64 conversationTimestamp = 12; + optional string name = 13; + optional string pHash = 14; + optional bool notSpam = 15; +} + +message HistorySync { + enum HistorySyncHistorySyncType { + INITIAL_BOOTSTRAP = 0; + INITIAL_STATUS_V3 = 1; + FULL = 2; + RECENT = 3; + PUSH_NAME = 4; + } + required HistorySyncHistorySyncType syncType = 1; + repeated Conversation conversations = 2; + repeated WebMessageInfo statusV3Messages = 3; + optional uint32 chunkOrder = 5; + optional uint32 progress = 6; + repeated Pushname pushnames = 7; +} + +message EphemeralSetting { + optional sfixed32 duration = 1; + optional sfixed64 timestamp = 2; +} + +message PaymentBackground { + optional string id = 1; + optional string fileLength = 2; + optional uint32 width = 3; + optional uint32 height = 4; + optional string mimetype = 5; + optional fixed32 placeholderArgb = 6; + optional fixed32 textArgb = 7; + optional fixed32 subtextArgb = 8; +} + +message Money { + optional int64 value = 1; + optional uint32 offset = 2; + optional string currencyCode = 3; +} + +message HydratedQuickReplyButton { + optional string displayText = 1; + optional string id = 2; +} + +message HydratedURLButton { + optional string displayText = 1; + optional string url = 2; +} + +message HydratedCallButton { + optional string displayText = 1; + optional string phoneNumber = 2; +} + +message HydratedTemplateButton { + optional uint32 index = 4; + oneof hydratedButton { + HydratedQuickReplyButton quickReplyButton = 1; + HydratedURLButton urlButton = 2; + HydratedCallButton callButton = 3; + } +} + +message QuickReplyButton { + optional HighlyStructuredMessage displayText = 1; + optional string id = 2; +} + +message URLButton { + optional HighlyStructuredMessage displayText = 1; + optional HighlyStructuredMessage url = 2; +} + +message CallButton { + optional HighlyStructuredMessage displayText = 1; + optional HighlyStructuredMessage phoneNumber = 2; +} + +message TemplateButton { + optional uint32 index = 4; + oneof button { + QuickReplyButton quickReplyButton = 1; + URLButton urlButton = 2; + CallButton callButton = 3; + } +} + +message Location { + optional double degreesLatitude = 1; + optional double degreesLongitude = 2; + optional string name = 3; +} + +message Point { + optional int32 xDeprecated = 1; + optional int32 yDeprecated = 2; + optional double x = 3; + optional double y = 4; +} + +message InteractiveAnnotation { + repeated Point polygonVertices = 1; + oneof action { + Location location = 2; + } +} + +message DeviceListMetadata { + optional bytes senderKeyHash = 1; + optional uint64 senderTimestamp = 2; + repeated uint32 senderKeyIndexes = 3 [packed=true]; + optional bytes recipientKeyHash = 8; + optional uint64 recipientTimestamp = 9; + repeated uint32 recipientKeyIndexes = 10 [packed=true]; +} + +message MessageContextInfo { + optional DeviceListMetadata deviceListMetadata = 1; + optional int32 deviceListMetadataVersion = 2; +} + +message AdReplyInfo { + optional string advertiserName = 1; + enum AdReplyInfoMediaType { + NONE = 0; + IMAGE = 1; + VIDEO = 2; + } + optional AdReplyInfoMediaType mediaType = 2; + optional bytes jpegThumbnail = 16; + optional string caption = 17; +} + +message ExternalAdReplyInfo { + optional string title = 1; + optional string body = 2; + enum ExternalAdReplyInfoMediaType { + NONE = 0; + IMAGE = 1; + VIDEO = 2; + } + optional ExternalAdReplyInfoMediaType mediaType = 3; + optional string thumbnailUrl = 4; + optional string mediaUrl = 5; + optional bytes thumbnail = 6; + optional string sourceType = 7; + optional string sourceId = 8; + optional string sourceUrl = 9; +} + +message ContextInfo { + optional string stanzaId = 1; + optional string participant = 2; + optional Message quotedMessage = 3; + optional string remoteJid = 4; + repeated string mentionedJid = 15; + optional string conversionSource = 18; + optional bytes conversionData = 19; + optional uint32 conversionDelaySeconds = 20; + optional uint32 forwardingScore = 21; + optional bool isForwarded = 22; + optional AdReplyInfo quotedAd = 23; + optional MessageKey placeholderKey = 24; + optional uint32 expiration = 25; + optional int64 ephemeralSettingTimestamp = 26; + optional bytes ephemeralSharedSecret = 27; + optional ExternalAdReplyInfo externalAdReply = 28; + optional string entryPointConversionSource = 29; + optional string entryPointConversionApp = 30; + optional uint32 entryPointConversionDelaySeconds = 31; +} + +message SenderKeyDistributionMessage { + optional string groupId = 1; + optional bytes axolotlSenderKeyDistributionMessage = 2; +} + +message ImageMessage { + optional string url = 1; + optional string mimetype = 2; + optional string caption = 3; + optional bytes fileSha256 = 4; + optional uint64 fileLength = 5; + optional uint32 height = 6; + optional uint32 width = 7; + optional bytes mediaKey = 8; + optional bytes fileEncSha256 = 9; + repeated InteractiveAnnotation interactiveAnnotations = 10; + optional string directPath = 11; + optional int64 mediaKeyTimestamp = 12; + optional bytes jpegThumbnail = 16; + optional ContextInfo contextInfo = 17; + optional bytes firstScanSidecar = 18; + optional uint32 firstScanLength = 19; + optional uint32 experimentGroupId = 20; + optional bytes scansSidecar = 21; + repeated uint32 scanLengths = 22; + optional bytes midQualityFileSha256 = 23; + optional bytes midQualityFileEncSha256 = 24; + optional bool viewOnce = 25; + optional string thumbnailDirectPath = 26; + optional bytes thumbnailSha256 = 27; + optional bytes thumbnailEncSha256 = 28; +} + +message InvoiceMessage { + optional string note = 1; + optional string token = 2; + enum InvoiceMessageAttachmentType { + IMAGE = 0; + PDF = 1; + } + optional InvoiceMessageAttachmentType attachmentType = 3; + optional string attachmentMimetype = 4; + optional bytes attachmentMediaKey = 5; + optional int64 attachmentMediaKeyTimestamp = 6; + optional bytes attachmentFileSha256 = 7; + optional bytes attachmentFileEncSha256 = 8; + optional string attachmentDirectPath = 9; + optional bytes attachmentJpegThumbnail = 10; +} + +message ContactMessage { + optional string displayName = 1; + optional string vcard = 16; + optional ContextInfo contextInfo = 17; +} + +message LocationMessage { + optional double degreesLatitude = 1; + optional double degreesLongitude = 2; + optional string name = 3; + optional string address = 4; + optional string url = 5; + optional bool isLive = 6; + optional uint32 accuracyInMeters = 7; + optional float speedInMps = 8; + optional uint32 degreesClockwiseFromMagneticNorth = 9; + optional string comment = 11; + optional bytes jpegThumbnail = 16; + optional ContextInfo contextInfo = 17; +} + +message ExtendedTextMessage { + optional string text = 1; + optional string matchedText = 2; + optional string canonicalUrl = 4; + optional string description = 5; + optional string title = 6; + optional fixed32 textArgb = 7; + optional fixed32 backgroundArgb = 8; + enum ExtendedTextMessageFontType { + SANS_SERIF = 0; + SERIF = 1; + NORICAN_REGULAR = 2; + BRYNDAN_WRITE = 3; + BEBASNEUE_REGULAR = 4; + OSWALD_HEAVY = 5; + } + optional ExtendedTextMessageFontType font = 9; + enum ExtendedTextMessagePreviewType { + NONE = 0; + VIDEO = 1; + } + optional ExtendedTextMessagePreviewType previewType = 10; + optional bytes jpegThumbnail = 16; + optional ContextInfo contextInfo = 17; + optional bool doNotPlayInline = 18; + optional string thumbnailDirectPath = 19; + optional bytes thumbnailSha256 = 20; + optional bytes thumbnailEncSha256 = 21; + optional bytes mediaKey = 22; + optional int64 mediaKeyTimestamp = 23; + optional uint32 thumbnailHeight = 24; + optional uint32 thumbnailWidth = 25; +} + +message DocumentMessage { + optional string url = 1; + optional string mimetype = 2; + optional string title = 3; + optional bytes fileSha256 = 4; + optional uint64 fileLength = 5; + optional uint32 pageCount = 6; + optional bytes mediaKey = 7; + optional string fileName = 8; + optional bytes fileEncSha256 = 9; + optional string directPath = 10; + optional int64 mediaKeyTimestamp = 11; + optional bool contactVcard = 12; + optional string thumbnailDirectPath = 13; + optional bytes thumbnailSha256 = 14; + optional bytes thumbnailEncSha256 = 15; + optional bytes jpegThumbnail = 16; + optional ContextInfo contextInfo = 17; + optional uint32 thumbnailHeight = 18; + optional uint32 thumbnailWidth = 19; +} + +message AudioMessage { + optional string url = 1; + optional string mimetype = 2; + optional bytes fileSha256 = 3; + optional uint64 fileLength = 4; + optional uint32 seconds = 5; + optional bool ptt = 6; + optional bytes mediaKey = 7; + optional bytes fileEncSha256 = 8; + optional string directPath = 9; + optional int64 mediaKeyTimestamp = 10; + optional ContextInfo contextInfo = 17; + optional bytes streamingSidecar = 18; +} + +message VideoMessage { + optional string url = 1; + optional string mimetype = 2; + optional bytes fileSha256 = 3; + optional uint64 fileLength = 4; + optional uint32 seconds = 5; + optional bytes mediaKey = 6; + optional string caption = 7; + optional bool gifPlayback = 8; + optional uint32 height = 9; + optional uint32 width = 10; + optional bytes fileEncSha256 = 11; + repeated InteractiveAnnotation interactiveAnnotations = 12; + optional string directPath = 13; + optional int64 mediaKeyTimestamp = 14; + optional bytes jpegThumbnail = 16; + optional ContextInfo contextInfo = 17; + optional bytes streamingSidecar = 18; + enum VideoMessageAttribution { + NONE = 0; + GIPHY = 1; + TENOR = 2; + } + optional VideoMessageAttribution gifAttribution = 19; + optional bool viewOnce = 20; + optional string thumbnailDirectPath = 21; + optional bytes thumbnailSha256 = 22; + optional bytes thumbnailEncSha256 = 23; +} + +message Call { + optional bytes callKey = 1; + optional string conversionSource = 2; + optional bytes conversionData = 3; + optional uint32 conversionDelaySeconds = 4; +} + +message Chat { + optional string displayName = 1; + optional string id = 2; +} + +message ProtocolMessage { + optional MessageKey key = 1; + enum ProtocolMessageType { + REVOKE = 0; + EPHEMERAL_SETTING = 3; + EPHEMERAL_SYNC_RESPONSE = 4; + HISTORY_SYNC_NOTIFICATION = 5; + APP_STATE_SYNC_KEY_SHARE = 6; + APP_STATE_SYNC_KEY_REQUEST = 7; + MSG_FANOUT_BACKFILL_REQUEST = 8; + INITIAL_SECURITY_NOTIFICATION_SETTING_SYNC = 9; + APP_STATE_FATAL_EXCEPTION_NOTIFICATION = 10; + } + optional ProtocolMessageType type = 2; + optional uint32 ephemeralExpiration = 4; + optional int64 ephemeralSettingTimestamp = 5; + optional HistorySyncNotification historySyncNotification = 6; + optional AppStateSyncKeyShare appStateSyncKeyShare = 7; + optional AppStateSyncKeyRequest appStateSyncKeyRequest = 8; + optional InitialSecurityNotificationSettingSync initialSecurityNotificationSettingSync = 9; + optional AppStateFatalExceptionNotification appStateFatalExceptionNotification = 10; +} + +message HistorySyncNotification { + optional bytes fileSha256 = 1; + optional uint64 fileLength = 2; + optional bytes mediaKey = 3; + optional bytes fileEncSha256 = 4; + optional string directPath = 5; + enum HistorySyncNotificationHistorySyncType { + INITIAL_BOOTSTRAP = 0; + INITIAL_STATUS_V3 = 1; + FULL = 2; + RECENT = 3; + PUSH_NAME = 4; + } + optional HistorySyncNotificationHistorySyncType syncType = 6; + optional uint32 chunkOrder = 7; + optional string originalMessageId = 8; +} + +message AppStateSyncKey { + optional AppStateSyncKeyId keyId = 1; + optional AppStateSyncKeyData keyData = 2; +} + +message AppStateSyncKeyId { + optional bytes keyId = 1; +} + +message AppStateSyncKeyFingerprint { + optional uint32 rawId = 1; + optional uint32 currentIndex = 2; + repeated uint32 deviceIndexes = 3 [packed=true]; +} + +message AppStateSyncKeyData { + optional bytes keyData = 1; + optional AppStateSyncKeyFingerprint fingerprint = 2; + optional int64 timestamp = 3; +} + +message AppStateSyncKeyShare { + repeated AppStateSyncKey keys = 1; +} + +message AppStateSyncKeyRequest { + repeated AppStateSyncKeyId keyIds = 1; +} + +message AppStateFatalExceptionNotification { + repeated string collectionNames = 1; + optional int64 timestamp = 2; +} + +message InitialSecurityNotificationSettingSync { + optional bool securityNotificationEnabled = 1; +} + +message ContactsArrayMessage { + optional string displayName = 1; + repeated ContactMessage contacts = 2; + optional ContextInfo contextInfo = 17; +} + +message HSMCurrency { + optional string currencyCode = 1; + optional int64 amount1000 = 2; +} + +message HSMDateTimeComponent { + enum HSMDateTimeComponentDayOfWeekType { + MONDAY = 1; + TUESDAY = 2; + WEDNESDAY = 3; + THURSDAY = 4; + FRIDAY = 5; + SATURDAY = 6; + SUNDAY = 7; + } + optional HSMDateTimeComponentDayOfWeekType dayOfWeek = 1; + optional uint32 year = 2; + optional uint32 month = 3; + optional uint32 dayOfMonth = 4; + optional uint32 hour = 5; + optional uint32 minute = 6; + enum HSMDateTimeComponentCalendarType { + GREGORIAN = 1; + SOLAR_HIJRI = 2; + } + optional HSMDateTimeComponentCalendarType calendar = 7; +} + +message HSMDateTimeUnixEpoch { + optional int64 timestamp = 1; +} + +message HSMDateTime { + oneof datetimeOneof { + HSMDateTimeComponent component = 1; + HSMDateTimeUnixEpoch unixEpoch = 2; + } +} + +message HSMLocalizableParameter { + optional string default = 1; + oneof paramOneof { + HSMCurrency currency = 2; + HSMDateTime dateTime = 3; + } +} + +message HighlyStructuredMessage { + optional string namespace = 1; + optional string elementName = 2; + repeated string params = 3; + optional string fallbackLg = 4; + optional string fallbackLc = 5; + repeated HSMLocalizableParameter localizableParams = 6; + optional string deterministicLg = 7; + optional string deterministicLc = 8; + optional TemplateMessage hydratedHsm = 9; +} + +message SendPaymentMessage { + optional Message noteMessage = 2; + optional MessageKey requestMessageKey = 3; + optional PaymentBackground background = 4; +} + +message RequestPaymentMessage { + optional Message noteMessage = 4; + optional string currencyCodeIso4217 = 1; + optional uint64 amount1000 = 2; + optional string requestFrom = 3; + optional int64 expiryTimestamp = 5; + optional Money amount = 6; + optional PaymentBackground background = 7; +} + +message DeclinePaymentRequestMessage { + optional MessageKey key = 1; +} + +message CancelPaymentRequestMessage { + optional MessageKey key = 1; +} + +message PaymentInviteMessage { + enum PaymentInviteMessageServiceType { + UNKNOWN = 0; + FBPAY = 1; + NOVI = 2; + UPI = 3; + } + optional PaymentInviteMessageServiceType serviceType = 1; + optional int64 expiryTimestamp = 2; +} + +message LiveLocationMessage { + optional double degreesLatitude = 1; + optional double degreesLongitude = 2; + optional uint32 accuracyInMeters = 3; + optional float speedInMps = 4; + optional uint32 degreesClockwiseFromMagneticNorth = 5; + optional string caption = 6; + optional int64 sequenceNumber = 7; + optional uint32 timeOffset = 8; + optional bytes jpegThumbnail = 16; + optional ContextInfo contextInfo = 17; +} + +message StickerMessage { + optional string url = 1; + optional bytes fileSha256 = 2; + optional bytes fileEncSha256 = 3; + optional bytes mediaKey = 4; + optional string mimetype = 5; + optional uint32 height = 6; + optional uint32 width = 7; + optional string directPath = 8; + optional uint64 fileLength = 9; + optional int64 mediaKeyTimestamp = 10; + optional uint32 firstFrameLength = 11; + optional bytes firstFrameSidecar = 12; + optional bool isAnimated = 13; + optional bytes pngThumbnail = 16; + optional ContextInfo contextInfo = 17; +} + +message FourRowTemplate { + optional HighlyStructuredMessage content = 6; + optional HighlyStructuredMessage footer = 7; + repeated TemplateButton buttons = 8; + oneof title { + DocumentMessage documentMessage = 1; + HighlyStructuredMessage highlyStructuredMessage = 2; + ImageMessage imageMessage = 3; + VideoMessage videoMessage = 4; + LocationMessage locationMessage = 5; + } +} + +message HydratedFourRowTemplate { + optional string hydratedContentText = 6; + optional string hydratedFooterText = 7; + repeated HydratedTemplateButton hydratedButtons = 8; + optional string templateId = 9; + oneof title { + DocumentMessage documentMessage = 1; + string hydratedTitleText = 2; + ImageMessage imageMessage = 3; + VideoMessage videoMessage = 4; + LocationMessage locationMessage = 5; + } +} + +message TemplateMessage { + optional ContextInfo contextInfo = 3; + optional HydratedFourRowTemplate hydratedTemplate = 4; + oneof format { + FourRowTemplate fourRowTemplate = 1; + HydratedFourRowTemplate hydratedFourRowTemplate = 2; + } +} + +message TemplateButtonReplyMessage { + optional string selectedId = 1; + optional string selectedDisplayText = 2; + optional ContextInfo contextInfo = 3; + optional uint32 selectedIndex = 4; +} + +message CatalogSnapshot { + optional ImageMessage catalogImage = 1; + optional string title = 2; + optional string description = 3; +} + +message ProductSnapshot { + optional ImageMessage productImage = 1; + optional string productId = 2; + optional string title = 3; + optional string description = 4; + optional string currencyCode = 5; + optional int64 priceAmount1000 = 6; + optional string retailerId = 7; + optional string url = 8; + optional uint32 productImageCount = 9; + optional string firstImageId = 11; + optional int64 salePriceAmount1000 = 12; +} + +message ProductMessage { + optional ProductSnapshot product = 1; + optional string businessOwnerJid = 2; + optional CatalogSnapshot catalog = 4; + optional ContextInfo contextInfo = 17; +} + +message OrderMessage { + optional string orderId = 1; + optional bytes thumbnail = 2; + optional int32 itemCount = 3; + enum OrderMessageOrderStatus { + INQUIRY = 1; + } + optional OrderMessageOrderStatus status = 4; + enum OrderMessageOrderSurface { + CATALOG = 1; + } + optional OrderMessageOrderSurface surface = 5; + optional string message = 6; + optional string orderTitle = 7; + optional string sellerJid = 8; + optional string token = 9; + optional int64 totalAmount1000 = 10; + optional string totalCurrencyCode = 11; + optional ContextInfo contextInfo = 17; +} + +message Row { + optional string title = 1; + optional string description = 2; + optional string rowId = 3; +} + +message Section { + optional string title = 1; + repeated Row rows = 2; +} + +message Product { + optional string productId = 1; +} + +message ProductSection { + optional string title = 1; + repeated Product products = 2; +} + +message ProductListHeaderImage { + optional string productId = 1; + optional bytes jpegThumbnail = 2; +} + +message ProductListInfo { + repeated ProductSection productSections = 1; + optional ProductListHeaderImage headerImage = 2; + optional string businessOwnerJid = 3; +} + +message ListMessage { + optional string title = 1; + optional string description = 2; + optional string buttonText = 3; + enum ListMessageListType { + UNKNOWN = 0; + SINGLE_SELECT = 1; + PRODUCT_LIST = 2; + } + optional ListMessageListType listType = 4; + repeated Section sections = 5; + optional ProductListInfo productListInfo = 6; + optional string footerText = 7; + optional ContextInfo contextInfo = 8; +} + +message SingleSelectReply { + optional string selectedRowId = 1; +} + +message ListResponseMessage { + optional string title = 1; + enum ListResponseMessageListType { + UNKNOWN = 0; + SINGLE_SELECT = 1; + } + optional ListResponseMessageListType listType = 2; + optional SingleSelectReply singleSelectReply = 3; + optional ContextInfo contextInfo = 4; + optional string description = 5; +} + +message GroupInviteMessage { + optional string groupJid = 1; + optional string inviteCode = 2; + optional int64 inviteExpiration = 3; + optional string groupName = 4; + optional bytes jpegThumbnail = 5; + optional string caption = 6; + optional ContextInfo contextInfo = 7; +} + +message DeviceSentMessage { + optional string destinationJid = 1; + optional Message message = 2; + optional string phash = 3; +} + +message FutureProofMessage { + optional Message message = 1; +} + +message ButtonText { + optional string displayText = 1; +} + +message NativeFlowInfo { + optional string name = 1; + optional string paramsJson = 2; +} + +message Button { + optional string buttonId = 1; + optional ButtonText buttonText = 2; + enum ButtonType { + UNKNOWN = 0; + RESPONSE = 1; + NATIVE_FLOW = 2; + } + optional ButtonType type = 3; + optional NativeFlowInfo nativeFlowInfo = 4; +} + +message ButtonsMessage { + optional string contentText = 6; + optional string footerText = 7; + optional ContextInfo contextInfo = 8; + repeated Button buttons = 9; + enum ButtonsMessageHeaderType { + UNKNOWN = 0; + EMPTY = 1; + TEXT = 2; + DOCUMENT = 3; + IMAGE = 4; + VIDEO = 5; + LOCATION = 6; + } + optional ButtonsMessageHeaderType headerType = 10; + oneof header { + string text = 1; + DocumentMessage documentMessage = 2; + ImageMessage imageMessage = 3; + VideoMessage videoMessage = 4; + LocationMessage locationMessage = 5; + } +} + +message ButtonsResponseMessage { + optional string selectedButtonId = 1; + optional ContextInfo contextInfo = 3; + enum ButtonsResponseMessageType { + UNKNOWN = 0; + DISPLAY_TEXT = 1; + } + optional ButtonsResponseMessageType type = 4; + oneof response { + string selectedDisplayText = 2; + } +} + +message Message { + optional string conversation = 1; + optional SenderKeyDistributionMessage senderKeyDistributionMessage = 2; + optional ImageMessage imageMessage = 3; + optional ContactMessage contactMessage = 4; + optional LocationMessage locationMessage = 5; + optional ExtendedTextMessage extendedTextMessage = 6; + optional DocumentMessage documentMessage = 7; + optional AudioMessage audioMessage = 8; + optional VideoMessage videoMessage = 9; + optional Call call = 10; + optional Chat chat = 11; + optional ProtocolMessage protocolMessage = 12; + optional ContactsArrayMessage contactsArrayMessage = 13; + optional HighlyStructuredMessage highlyStructuredMessage = 14; + optional SenderKeyDistributionMessage fastRatchetKeySenderKeyDistributionMessage = 15; + optional SendPaymentMessage sendPaymentMessage = 16; + optional LiveLocationMessage liveLocationMessage = 18; + optional RequestPaymentMessage requestPaymentMessage = 22; + optional DeclinePaymentRequestMessage declinePaymentRequestMessage = 23; + optional CancelPaymentRequestMessage cancelPaymentRequestMessage = 24; + optional TemplateMessage templateMessage = 25; + optional StickerMessage stickerMessage = 26; + optional GroupInviteMessage groupInviteMessage = 28; + optional TemplateButtonReplyMessage templateButtonReplyMessage = 29; + optional ProductMessage productMessage = 30; + optional DeviceSentMessage deviceSentMessage = 31; + optional MessageContextInfo messageContextInfo = 35; + optional ListMessage listMessage = 36; + optional FutureProofMessage viewOnceMessage = 37; + optional OrderMessage orderMessage = 38; + optional ListResponseMessage listResponseMessage = 39; + optional FutureProofMessage ephemeralMessage = 40; + optional InvoiceMessage invoiceMessage = 41; + optional ButtonsMessage buttonsMessage = 42; + optional ButtonsResponseMessage buttonsResponseMessage = 43; + optional PaymentInviteMessage paymentInviteMessage = 44; +} + +message CompanionProps { + optional string os = 1; + optional AppVersion version = 2; + enum CompanionPropsPlatformType { + UNKNOWN = 0; + CHROME = 1; + FIREFOX = 2; + IE = 3; + OPERA = 4; + SAFARI = 5; + EDGE = 6; + DESKTOP = 7; + IPAD = 8; + ANDROID_TABLET = 9; + OHANA = 10; + ALOHA = 11; + CATALINA = 12; + } + optional CompanionPropsPlatformType platformType = 3; + optional bool requireFullSync = 4; +} + +message ADVSignedDeviceIdentityHMAC { + optional bytes details = 1; + optional bytes hmac = 2; +} + +message ADVSignedDeviceIdentity { + optional bytes details = 1; + optional bytes accountSignatureKey = 2; + optional bytes accountSignature = 3; + optional bytes deviceSignature = 4; +} + +message ADVDeviceIdentity { + optional uint32 rawId = 1; + optional uint64 timestamp = 2; + optional uint32 keyIndex = 3; +} + +message ADVSignedKeyIndexList { + optional bytes details = 1; + optional bytes accountSignature = 2; +} + +message ADVKeyIndexList { + optional uint32 rawId = 1; + optional uint64 timestamp = 2; + optional uint32 currentIndex = 3; + repeated uint32 validIndexes = 4 [packed=true]; +} + +message MessageKey { + optional string remoteJid = 1; + optional bool fromMe = 2; + optional string id = 3; + optional string participant = 4; +} + +message PhotoChange { + optional bytes oldPhoto = 1; + optional bytes newPhoto = 2; + optional uint32 newPhotoId = 3; +} + +message MediaData { + optional string localPath = 1; +} + message WebFeatures { enum WebFeaturesFlag { NOT_STARTED = 0; @@ -40,11 +1500,16 @@ message WebFeatures { optional WebFeaturesFlag ephemeralMessages = 32; optional WebFeaturesFlag e2ENotificationSync = 33; optional WebFeaturesFlag recentStickersV2 = 34; - optional WebFeaturesFlag syncdRelease1 = 35; optional WebFeaturesFlag recentStickersV3 = 36; optional WebFeaturesFlag userNotice = 37; - optional WebFeaturesFlag syncdRelease11 = 38; optional WebFeaturesFlag support = 39; + optional WebFeaturesFlag groupUiiCleanup = 40; + optional WebFeaturesFlag groupDogfoodingInternalOnly = 41; + optional WebFeaturesFlag settingsSync = 42; + optional WebFeaturesFlag archiveV2 = 43; + optional WebFeaturesFlag ephemeralAllowGroupMembers = 44; + optional WebFeaturesFlag ephemeral24HDuration = 45; + optional WebFeaturesFlag mdForceUpgrade = 46; } message NotificationMessageInfo { @@ -118,8 +1583,12 @@ message PaymentInfo { COLLECT_EXPIRED = 25; COLLECT_CANCELED = 26; COLLECT_CANCELLING = 27; + IN_REVIEW = 28; } optional PaymentInfoTxnStatus txnStatus = 10; + optional bool useNoviFiatFormat = 11; + optional Money primaryAmount = 12; + optional Money exchangeAmount = 13; } message WebMessageInfo { @@ -136,6 +1605,7 @@ message WebMessageInfo { } optional WebMessageInfoStatus status = 4; optional string participant = 5; + optional uint64 messageC2STimestamp = 6; optional bool ignore = 16; optional bool starred = 17; optional bool broadcast = 18; @@ -264,6 +1734,17 @@ message WebMessageInfo { BLUE_MSG_SELF_FB_UNVERIFIED_TO_BSP_PREMISE_VERIFIED = 116; BLUE_MSG_SELF_FB_VERIFIED_TO_BSP_PREMISE_UNVERIFIED = 117; E2E_IDENTITY_UNAVAILABLE = 118; + GROUP_CREATING = 119; + GROUP_CREATE_FAILED = 120; + GROUP_BOUNCED = 121; + BLOCK_CONTACT = 122; + EPHEMERAL_SETTING_NOT_APPLIED = 123; + SYNC_FAILED = 124; + SYNCING = 125; + BIZ_PRIVACY_MODE_INIT_FB = 126; + BIZ_PRIVACY_MODE_INIT_BSP = 127; + BIZ_PRIVACY_MODE_TO_FB = 128; + BIZ_PRIVACY_MODE_TO_BSP = 129; } optional WebMessageInfoStubType messageStubType = 24; optional bool clearMedia = 25; @@ -285,651 +1766,6 @@ message WebMessageInfo { } optional WebMessageInfoBizPrivacyStatus bizPrivacyStatus = 36; optional string verifiedBizName = 37; -} - -message HydratedQuickReplyButton { - optional string displayText = 1; - optional string id = 2; -} - -message HydratedURLButton { - optional string displayText = 1; - optional string url = 2; -} - -message HydratedCallButton { - optional string displayText = 1; - optional string phoneNumber = 2; -} - -message HydratedTemplateButton { - optional uint32 index = 4; - oneof hydratedButton { - HydratedQuickReplyButton quickReplyButton = 1; - HydratedURLButton urlButton = 2; - HydratedCallButton callButton = 3; - } -} - -message QuickReplyButton { - optional HighlyStructuredMessage displayText = 1; - optional string id = 2; -} - -message URLButton { - optional HighlyStructuredMessage displayText = 1; - optional HighlyStructuredMessage url = 2; -} - -message CallButton { - optional HighlyStructuredMessage displayText = 1; - optional HighlyStructuredMessage phoneNumber = 2; -} - -message TemplateButton { - optional uint32 index = 4; - oneof button { - QuickReplyButton quickReplyButton = 1; - URLButton urlButton = 2; - CallButton callButton = 3; - } -} - -message Location { - optional double degreesLatitude = 1; - optional double degreesLongitude = 2; - optional string name = 3; -} - -message Point { - optional int32 xDeprecated = 1; - optional int32 yDeprecated = 2; - optional double x = 3; - optional double y = 4; -} - -message InteractiveAnnotation { - repeated Point polygonVertices = 1; - oneof action { - Location location = 2; - } -} -message AdReplyInfo { - optional string advertiserName = 1; - enum AdReplyInfoMediaType { - NONE = 0; - IMAGE = 1; - VIDEO = 2; - } - optional AdReplyInfoMediaType mediaType = 2; - optional bytes jpegThumbnail = 16; - optional string caption = 17; -} - -message ExternalAdReplyInfo { - optional string title = 1; - optional string body = 2; - enum ExternalAdReplyInfoMediaType { - NONE = 0; - IMAGE = 1; - VIDEO = 2; - } - optional ExternalAdReplyInfoMediaType mediaType = 3; - optional string thumbnailUrl = 4; - optional string mediaUrl = 5; - optional bytes thumbnail = 6; - optional string sourceType = 7; - optional string sourceId = 8; - optional string sourceUrl = 9; -} - -message ContextInfo { - optional string stanzaId = 1; - optional string participant = 2; - optional Message quotedMessage = 3; - optional string remoteJid = 4; - repeated string mentionedJid = 15; - optional string conversionSource = 18; - optional bytes conversionData = 19; - optional uint32 conversionDelaySeconds = 20; - optional uint32 forwardingScore = 21; - optional bool isForwarded = 22; - optional AdReplyInfo quotedAd = 23; - optional MessageKey placeholderKey = 24; - optional uint32 expiration = 25; - optional int64 ephemeralSettingTimestamp = 26; - optional bytes ephemeralSharedSecret = 27; - optional ExternalAdReplyInfo externalAdReply = 28; -} - -message SenderKeyDistributionMessage { - optional string groupId = 1; - optional bytes axolotlSenderKeyDistributionMessage = 2; -} - -message ImageMessage { - optional string url = 1; - optional string mimetype = 2; - optional string caption = 3; - optional bytes fileSha256 = 4; - optional uint64 fileLength = 5; - optional uint32 height = 6; - optional uint32 width = 7; - optional bytes mediaKey = 8; - optional bytes fileEncSha256 = 9; - repeated InteractiveAnnotation interactiveAnnotations = 10; - optional string directPath = 11; - optional int64 mediaKeyTimestamp = 12; - optional bytes jpegThumbnail = 16; - optional ContextInfo contextInfo = 17; - optional bytes firstScanSidecar = 18; - optional uint32 firstScanLength = 19; - optional uint32 experimentGroupId = 20; - optional bytes scansSidecar = 21; - repeated uint32 scanLengths = 22; - optional bytes midQualityFileSha256 = 23; - optional bytes midQualityFileEncSha256 = 24; - optional bool viewOnce = 25; -} - -message ContactMessage { - optional string displayName = 1; - optional string vcard = 16; - optional ContextInfo contextInfo = 17; -} - -message LocationMessage { - optional double degreesLatitude = 1; - optional double degreesLongitude = 2; - optional string name = 3; - optional string address = 4; - optional string url = 5; - optional bool isLive = 6; - optional uint32 accuracyInMeters = 7; - optional float speedInMps = 8; - optional uint32 degreesClockwiseFromMagneticNorth = 9; - optional string comment = 11; - optional bytes jpegThumbnail = 16; - optional ContextInfo contextInfo = 17; -} - -message ExtendedTextMessage { - optional string text = 1; - optional string matchedText = 2; - optional string canonicalUrl = 4; - optional string description = 5; - optional string title = 6; - optional fixed32 textArgb = 7; - optional fixed32 backgroundArgb = 8; - enum ExtendedTextMessageFontType { - SANS_SERIF = 0; - SERIF = 1; - NORICAN_REGULAR = 2; - BRYNDAN_WRITE = 3; - BEBASNEUE_REGULAR = 4; - OSWALD_HEAVY = 5; - } - optional ExtendedTextMessageFontType font = 9; - enum ExtendedTextMessagePreviewType { - NONE = 0; - VIDEO = 1; - } - optional ExtendedTextMessagePreviewType previewType = 10; - optional bytes jpegThumbnail = 16; - optional ContextInfo contextInfo = 17; - optional bool doNotPlayInline = 18; -} - -message DocumentMessage { - optional string url = 1; - optional string mimetype = 2; - optional string title = 3; - optional bytes fileSha256 = 4; - optional uint64 fileLength = 5; - optional uint32 pageCount = 6; - optional bytes mediaKey = 7; - optional string fileName = 8; - optional bytes fileEncSha256 = 9; - optional string directPath = 10; - optional int64 mediaKeyTimestamp = 11; - optional bool contactVcard = 12; - optional string thumbnailDirectPath = 13; - optional bytes thumbnailSha256 = 14; - optional bytes thumbnailEncSha256 = 15; - optional bytes jpegThumbnail = 16; - optional ContextInfo contextInfo = 17; - optional uint32 thumbnailHeight = 18; - optional uint32 thumbnailWidth = 19; -} - -message AudioMessage { - optional string url = 1; - optional string mimetype = 2; - optional bytes fileSha256 = 3; - optional uint64 fileLength = 4; - optional uint32 seconds = 5; - optional bool ptt = 6; - optional bytes mediaKey = 7; - optional bytes fileEncSha256 = 8; - optional string directPath = 9; - optional int64 mediaKeyTimestamp = 10; - optional ContextInfo contextInfo = 17; - optional bytes streamingSidecar = 18; -} - -message VideoMessage { - optional string url = 1; - optional string mimetype = 2; - optional bytes fileSha256 = 3; - optional uint64 fileLength = 4; - optional uint32 seconds = 5; - optional bytes mediaKey = 6; - optional string caption = 7; - optional bool gifPlayback = 8; - optional uint32 height = 9; - optional uint32 width = 10; - optional bytes fileEncSha256 = 11; - repeated InteractiveAnnotation interactiveAnnotations = 12; - optional string directPath = 13; - optional int64 mediaKeyTimestamp = 14; - optional bytes jpegThumbnail = 16; - optional ContextInfo contextInfo = 17; - optional bytes streamingSidecar = 18; - enum VideoMessageAttribution { - NONE = 0; - GIPHY = 1; - TENOR = 2; - } - optional VideoMessageAttribution gifAttribution = 19; - optional bool viewOnce = 20; -} - -message Call { - optional bytes callKey = 1; -} - -message Chat { - optional string displayName = 1; - optional string id = 2; -} - -message ProtocolMessage { - optional MessageKey key = 1; - enum ProtocolMessageType { - REVOKE = 0; - EPHEMERAL_SETTING = 3; - EPHEMERAL_SYNC_RESPONSE = 4; - HISTORY_SYNC_NOTIFICATION = 5; - APP_STATE_SYNC_KEY_SHARE = 6; - APP_STATE_SYNC_KEY_REQUEST = 7; - MSG_FANOUT_BACKFILL_REQUEST = 8; - INITIAL_SECURITY_NOTIFICATION_SETTING_SYNC = 9; - } - optional ProtocolMessageType type = 2; - optional uint32 ephemeralExpiration = 4; - optional int64 ephemeralSettingTimestamp = 5; - optional HistorySyncNotification historySyncNotification = 6; - optional AppStateSyncKeyShare appStateSyncKeyShare = 7; - optional AppStateSyncKeyRequest appStateSyncKeyRequest = 8; - optional InitialSecurityNotificationSettingSync initialSecurityNotificationSettingSync = 9; -} - -message HistorySyncNotification { - optional bytes fileSha256 = 1; - optional uint64 fileLength = 2; - optional bytes mediaKey = 3; - optional bytes fileEncSha256 = 4; - optional string directPath = 5; - enum HistorySyncNotificationHistorySyncType { - INITIAL_BOOTSTRAP = 0; - INITIAL_STATUS_V3 = 1; - FULL = 2; - RECENT = 3; - } - optional HistorySyncNotificationHistorySyncType syncType = 6; - optional uint32 chunkOrder = 7; - optional string originalMessageId = 8; -} - -message AppStateSyncKey { - optional AppStateSyncKeyId keyId = 1; - optional AppStateSyncKeyData keyData = 2; -} - -message AppStateSyncKeyId { - optional bytes keyId = 1; -} - -message AppStateSyncKeyFingerprint { - optional uint32 rawId = 1; - optional uint32 currentIndex = 2; -} - -message AppStateSyncKeyData { - optional bytes keyData = 1; - optional AppStateSyncKeyFingerprint fingerprint = 2; - optional int64 timestamp = 3; -} - -message AppStateSyncKeyShare { - repeated AppStateSyncKey keys = 1; -} - -message AppStateSyncKeyRequest { - repeated AppStateSyncKeyId keyIds = 1; -} - -message InitialSecurityNotificationSettingSync { - optional bool securityNotificationEnabled = 1; -} - -message ContactsArrayMessage { - optional string displayName = 1; - repeated ContactMessage contacts = 2; - optional ContextInfo contextInfo = 17; -} - -message HSMCurrency { - optional string currencyCode = 1; - optional int64 amount1000 = 2; -} - -message HSMDateTimeComponent { - enum HSMDateTimeComponentDayOfWeekType { - MONDAY = 1; - TUESDAY = 2; - WEDNESDAY = 3; - THURSDAY = 4; - FRIDAY = 5; - SATURDAY = 6; - SUNDAY = 7; - } - optional HSMDateTimeComponentDayOfWeekType dayOfWeek = 1; - optional uint32 year = 2; - optional uint32 month = 3; - optional uint32 dayOfMonth = 4; - optional uint32 hour = 5; - optional uint32 minute = 6; - enum HSMDateTimeComponentCalendarType { - GREGORIAN = 1; - SOLAR_HIJRI = 2; - } - optional HSMDateTimeComponentCalendarType calendar = 7; -} - -message HSMDateTimeUnixEpoch { - optional int64 timestamp = 1; -} - -message HSMDateTime { - oneof datetimeOneof { - HSMDateTimeComponent component = 1; - HSMDateTimeUnixEpoch unixEpoch = 2; - } -} - -message HSMLocalizableParameter { - optional string default = 1; - oneof paramOneof { - HSMCurrency currency = 2; - HSMDateTime dateTime = 3; - } -} - -message HighlyStructuredMessage { - optional string namespace = 1; - optional string elementName = 2; - repeated string params = 3; - optional string fallbackLg = 4; - optional string fallbackLc = 5; - repeated HSMLocalizableParameter localizableParams = 6; - optional string deterministicLg = 7; - optional string deterministicLc = 8; - optional TemplateMessage hydratedHsm = 9; -} - -message SendPaymentMessage { - optional Message noteMessage = 2; - optional MessageKey requestMessageKey = 3; -} - -message RequestPaymentMessage { - optional Message noteMessage = 4; - optional string currencyCodeIso4217 = 1; - optional uint64 amount1000 = 2; - optional string requestFrom = 3; - optional int64 expiryTimestamp = 5; -} - -message DeclinePaymentRequestMessage { - optional MessageKey key = 1; -} - -message CancelPaymentRequestMessage { - optional MessageKey key = 1; -} - -message LiveLocationMessage { - optional double degreesLatitude = 1; - optional double degreesLongitude = 2; - optional uint32 accuracyInMeters = 3; - optional float speedInMps = 4; - optional uint32 degreesClockwiseFromMagneticNorth = 5; - optional string caption = 6; - optional int64 sequenceNumber = 7; - optional uint32 timeOffset = 8; - optional bytes jpegThumbnail = 16; - optional ContextInfo contextInfo = 17; -} - -message StickerMessage { - optional string url = 1; - optional bytes fileSha256 = 2; - optional bytes fileEncSha256 = 3; - optional bytes mediaKey = 4; - optional string mimetype = 5; - optional uint32 height = 6; - optional uint32 width = 7; - optional string directPath = 8; - optional uint64 fileLength = 9; - optional int64 mediaKeyTimestamp = 10; - optional uint32 firstFrameLength = 11; - optional bytes firstFrameSidecar = 12; - optional bool isAnimated = 13; - optional bytes pngThumbnail = 16; - optional ContextInfo contextInfo = 17; -} - -message FourRowTemplate { - optional HighlyStructuredMessage content = 6; - optional HighlyStructuredMessage footer = 7; - repeated TemplateButton buttons = 8; - oneof title { - DocumentMessage documentMessage = 1; - HighlyStructuredMessage highlyStructuredMessage = 2; - ImageMessage imageMessage = 3; - VideoMessage videoMessage = 4; - LocationMessage locationMessage = 5; - } -} - -message HydratedFourRowTemplate { - optional string hydratedContentText = 6; - optional string hydratedFooterText = 7; - repeated HydratedTemplateButton hydratedButtons = 8; - optional string templateId = 9; - oneof title { - DocumentMessage documentMessage = 1; - string hydratedTitleText = 2; - ImageMessage imageMessage = 3; - VideoMessage videoMessage = 4; - LocationMessage locationMessage = 5; - } -} - -message TemplateMessage { - optional ContextInfo contextInfo = 3; - optional HydratedFourRowTemplate hydratedTemplate = 4; - oneof format { - FourRowTemplate fourRowTemplate = 1; - HydratedFourRowTemplate hydratedFourRowTemplate = 2; - } -} - -message TemplateButtonReplyMessage { - optional string selectedId = 1; - optional string selectedDisplayText = 2; - optional ContextInfo contextInfo = 3; - optional uint32 selectedIndex = 4; -} - -message CatalogSnapshot { - optional ImageMessage catalogImage = 1; - optional string title = 2; - optional string description = 3; -} - -message ProductSnapshot { - optional ImageMessage productImage = 1; - optional string productId = 2; - optional string title = 3; - optional string description = 4; - optional string currencyCode = 5; - optional int64 priceAmount1000 = 6; - optional string retailerId = 7; - optional string url = 8; - optional uint32 productImageCount = 9; - optional string firstImageId = 11; -} - -message ProductMessage { - optional ProductSnapshot product = 1; - optional string businessOwnerJid = 2; - optional CatalogSnapshot catalog = 4; - optional ContextInfo contextInfo = 17; -} - -message OrderMessage { - optional string orderId = 1; - optional bytes thumbnail = 2; - optional int32 itemCount = 3; - enum OrderMessageOrderStatus { - INQUIRY = 1; - } - optional OrderMessageOrderStatus status = 4; - enum OrderMessageOrderSurface { - CATALOG = 1; - } - optional OrderMessageOrderSurface surface = 5; - optional string message = 6; - optional string orderTitle = 7; - optional string sellerJid = 8; - optional string token = 9; - optional ContextInfo contextInfo = 17; -} - -message Row { - optional string title = 1; - optional string description = 2; - optional string rowId = 3; -} - -message Section { - optional string title = 1; - repeated Row rows = 2; -} - -message ListMessage { - optional string title = 1; - optional string description = 2; - optional string buttonText = 3; - enum ListMessageListType { - UNKNOWN = 0; - SINGLE_SELECT = 1; - } - optional ListMessageListType listType = 4; - repeated Section sections = 5; -} - -message SingleSelectReply { - optional string selectedRowId = 1; -} - -message ListResponseMessage { - optional string selectedDisplayText = 1; - enum ListResponseMessageListType { - UNKNOWN = 0; - SINGLE_SELECT = 1; - } - optional ListResponseMessageListType listType = 2; - optional SingleSelectReply singleSelectReply = 3; - optional ContextInfo contextInfo = 4; -} - -message GroupInviteMessage { - optional string groupJid = 1; - optional string inviteCode = 2; - optional int64 inviteExpiration = 3; - optional string groupName = 4; - optional bytes jpegThumbnail = 5; - optional string caption = 6; - optional ContextInfo contextInfo = 7; -} - -message EphemeralSetting { - optional string chatJid = 1; - optional uint32 ephemeralExpiration = 2; - optional int64 ephemeralSettingTimestamp = 3; -} - -message DeviceSentMessage { - optional string destinationJid = 1; - optional Message message = 2; - optional string phash = 3; - repeated EphemeralSetting broadcastEphemeralSettings = 4; -} - -message FutureProofMessage { - optional Message message = 1; -} - -message Message { - optional string conversation = 1; - optional SenderKeyDistributionMessage senderKeyDistributionMessage = 2; - optional ImageMessage imageMessage = 3; - optional ContactMessage contactMessage = 4; - optional LocationMessage locationMessage = 5; - optional ExtendedTextMessage extendedTextMessage = 6; - optional DocumentMessage documentMessage = 7; - optional AudioMessage audioMessage = 8; - optional VideoMessage videoMessage = 9; - optional Call call = 10; - optional Chat chat = 11; - optional ProtocolMessage protocolMessage = 12; - optional ContactsArrayMessage contactsArrayMessage = 13; - optional HighlyStructuredMessage highlyStructuredMessage = 14; - optional SenderKeyDistributionMessage fastRatchetKeySenderKeyDistributionMessage = 15; - optional SendPaymentMessage sendPaymentMessage = 16; - optional LiveLocationMessage liveLocationMessage = 18; - optional RequestPaymentMessage requestPaymentMessage = 22; - optional DeclinePaymentRequestMessage declinePaymentRequestMessage = 23; - optional CancelPaymentRequestMessage cancelPaymentRequestMessage = 24; - optional TemplateMessage templateMessage = 25; - optional StickerMessage stickerMessage = 26; - optional GroupInviteMessage groupInviteMessage = 28; - optional TemplateButtonReplyMessage templateButtonReplyMessage = 29; - optional ProductMessage productMessage = 30; - optional DeviceSentMessage deviceSentMessage = 31; - optional ListMessage listMessage = 36; - optional FutureProofMessage viewOnceMessage = 37; - optional OrderMessage orderMessage = 38; - optional ListResponseMessage listResponseMessage = 39; - optional FutureProofMessage ephemeralMessage = 40; -} - -message MessageKey { - optional string remoteJid = 1; - optional bool fromMe = 2; - optional string id = 3; - optional string participant = 4; + optional MediaData mediaData = 38; + optional PhotoChange photoChange = 39; } \ No newline at end of file diff --git a/src/WAConnection/6.MessagesSend.ts b/src/WAConnection/6.MessagesSend.ts index 4f6c9db..721e561 100644 --- a/src/WAConnection/6.MessagesSend.ts +++ b/src/WAConnection/6.MessagesSend.ts @@ -11,6 +11,7 @@ import { WAContactsArrayMessage, WAGroupInviteMessage, WAListMessage, + WAButtonsMessage, WATextMessage, WAMessageContent, WAMetric, WAFlag, WAMessage, BaileysError, WA_MESSAGE_STATUS_TYPE, WAMessageProto, MediaConnInfo, MessageTypeProto, URL_REGEX, WAUrlInfo, WA_DEFAULT_EPHEMERAL, WAMediaUpload } from './Constants' @@ -28,7 +29,7 @@ export class WAConnection extends Base { */ async sendMessage( id: string, - message: string | WATextMessage | WALocationMessage | WAContactMessage | WAContactsArrayMessage | WAGroupInviteMessage | WAMediaUpload | WAListMessage, + message: string | WATextMessage | WALocationMessage | WAContactMessage | WAContactsArrayMessage | WAGroupInviteMessage | WAMediaUpload | WAListMessage | WAButtonsMessage, type: MessageType, options: MessageOptions = {}, ) { @@ -67,7 +68,7 @@ export class WAConnection extends Base { /** Prepares a message for sending via sendWAMessage () */ async prepareMessage( id: string, - message: string | WATextMessage | WALocationMessage | WAContactMessage | WAContactsArrayMessage | WAGroupInviteMessage | WAMediaUpload | WAListMessage, + message: string | WATextMessage | WALocationMessage | WAContactMessage | WAContactsArrayMessage | WAGroupInviteMessage | WAMediaUpload | WAListMessage | WAButtonsMessage, type: MessageType, options: MessageOptions = {}, ) { @@ -106,7 +107,7 @@ export class WAConnection extends Base { } } /** Prepares the message content */ - async prepareMessageContent (message: string | WATextMessage | WALocationMessage | WAContactMessage | WAContactsArrayMessage | WAGroupInviteMessage | WAMediaUpload | WAListMessage, type: MessageType, options: MessageOptions) { + async prepareMessageContent (message: string | WATextMessage | WALocationMessage | WAContactMessage | WAContactsArrayMessage | WAGroupInviteMessage | WAMediaUpload | WAListMessage | WAButtonsMessage, type: MessageType, options: MessageOptions) { let m: WAMessageContent = {} switch (type) { case MessageType.text: @@ -142,6 +143,9 @@ export class WAConnection extends Base { case MessageType.listMessage: m.listMessage = WAMessageProto.ListMessage.fromObject(message as any) break + case MessageType.buttonsMessage: + m.buttonsMessage = WAMessageProto.ButtonsMessage.fromObject(message as any) + break case MessageType.image: case MessageType.sticker: case MessageType.document: diff --git a/src/WAConnection/Constants.ts b/src/WAConnection/Constants.ts index 1829cad..8005327 100644 --- a/src/WAConnection/Constants.ts +++ b/src/WAConnection/Constants.ts @@ -19,6 +19,7 @@ export type WAContactMessage = proto.ContactMessage export type WAContactsArrayMessage = proto.ContactsArrayMessage export type WAGroupInviteMessage = proto.GroupInviteMessage export type WAListMessage = proto.ListMessage +export type WAButtonsMessage = proto.ButtonsMessage export type WAMessageKey = proto.IMessageKey export type WATextMessage = proto.ExtendedTextMessage export type WAContextInfo = proto.IContextInfo @@ -333,6 +334,7 @@ export enum MessageType { contactsArray = 'contactsArrayMessage', groupInviteMessage = 'groupInviteMessage', listMessage = 'listMessage', + buttonsMessage = 'buttonsMessage', location = 'locationMessage', liveLocation = 'liveLocationMessage', From 46fdab76ee8bdef71249d0c4d46d266a2e8a1404 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=83=95=E3=82=A1=E3=82=A4=E3=82=BA?= <64179402+FaizBastomi@users.noreply.github.com> Date: Wed, 14 Jul 2021 23:51:59 +0700 Subject: [PATCH 05/23] added support for sending viewOnceMessage and updated README (#596) * add support to send viewOnceMessage * Update README.md * add support send viewOnceMessage and update README * remove something irrelevant from PR Co-authored-by: LoL-Human <> --- README.md | 3 ++- src/WAConnection/6.MessagesSend.ts | 7 ++++++- src/WAConnection/Constants.ts | 2 ++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 86985a9..0359da7 100644 --- a/README.md +++ b/README.md @@ -242,7 +242,8 @@ const sections = [{title: "Section 1", rows: rows}] const button = { buttonText: 'Click Me!', description: "Hello it's list message", - sections: sections + sections: sections, + listType: 1 } const sendMsg = await conn.sendMessage(id, button, MessageType.listMessage) diff --git a/src/WAConnection/6.MessagesSend.ts b/src/WAConnection/6.MessagesSend.ts index 721e561..3490ad2 100644 --- a/src/WAConnection/6.MessagesSend.ts +++ b/src/WAConnection/6.MessagesSend.ts @@ -178,6 +178,9 @@ export class WAConnection extends Base { if (mediaType === MessageType.sticker && options.caption) { throw new Error('cannot send a caption with a sticker') } + if (!(mediaType === MessageType.image || mediaType === MessageType.video) && options.viewOnce) { + throw new Error(`cannot send a ${mediaType} as a viewOnceMessage`) + } if (!options.mimetype) { options.mimetype = MimetypeMap[mediaType] } @@ -267,7 +270,8 @@ export class WAConnection extends Base { fileName: options.filename || 'file', gifPlayback: isGIF || undefined, caption: options.caption, - ptt: options.ptt + ptt: options.ptt, + viewOnce: options.viewOnce } ) } @@ -277,6 +281,7 @@ export class WAConnection extends Base { prepareMessageFromContent(id: string, message: WAMessageContent, options: MessageOptions) { if (!options.timestamp) options.timestamp = new Date() // set timestamp to now if (typeof options.sendEphemeral === 'undefined') options.sendEphemeral = 'chat' + if (options.viewOnce) message = { viewOnceMessage: { message } } // prevent an annoying bug (WA doesn't accept sending messages with '@c.us') id = whatsappID (id) diff --git a/src/WAConnection/Constants.ts b/src/WAConnection/Constants.ts index 8005327..acbe6c4 100644 --- a/src/WAConnection/Constants.ts +++ b/src/WAConnection/Constants.ts @@ -402,6 +402,8 @@ export interface MessageOptions { filename?: string /** For audio messages, if set to true, will send as a `voice note` */ ptt?: boolean + /** For image or video messages, if set to true, will send as a `viewOnceMessage` */ + viewOnce?: boolean /** Optional agent for media uploads */ uploadAgent?: Agent /** If set to true (default), automatically detects if you're sending a link & attaches the preview*/ From 0dd9e1d7e40933d6f1ec6fc0bcba0b8ad0525999 Mon Sep 17 00:00:00 2001 From: bhavya32 <55047586+bhavya32@users.noreply.github.com> Date: Sun, 18 Jul 2021 13:26:17 +0530 Subject: [PATCH 06/23] Fixed: loadMessages And isOnWhatsApp and Updated Readme (#573) * LoadMessages And isOnWhatsApp fixed * Corrected Number Format Readme This error in readme caused android app to crash. * Updated Readme * Removed a Change for LoadMessages --- README.md | 2 +- src/WAConnection/5.User.ts | 24 ------------------------ 2 files changed, 1 insertion(+), 25 deletions(-) diff --git a/README.md b/README.md index 0359da7..5aea93f 100644 --- a/README.md +++ b/README.md @@ -306,7 +306,7 @@ await conn.sendMessage( ### Notes - `id` is the WhatsApp ID of the person or group you're sending the message to. - - It must be in the format ```[country code][phone number]@s.whatsapp.net```, for example ```+19999999999@s.whatsapp.net``` for people. For groups, it must be in the format ``` 123456789-123345@g.us ```. + - It must be in the format ```[country code without +][phone number]@s.whatsapp.net```, for example ```19999999999@s.whatsapp.net``` for people. For groups, it must be in the format ``` 123456789-123345@g.us ```. - For broadcast lists it's `[timestamp of creation]@broadcast`. - For stories, the ID is `status@broadcast`. - For media messages, the thumbnail can be generated automatically for images & stickers. Thumbnails for videos can also be generated automatically, though, you need to have `ffmpeg` installed on your system. diff --git a/src/WAConnection/5.User.ts b/src/WAConnection/5.User.ts index 9d04c4f..5509ac2 100644 --- a/src/WAConnection/5.User.ts +++ b/src/WAConnection/5.User.ts @@ -19,33 +19,9 @@ export class WAConnection extends Base { * @returns undefined if the number doesn't exists, otherwise the correctly formatted jid */ isOnWhatsApp = async (str: string) => { - if (this.state !== 'open') { - return this.isOnWhatsAppNoConn(str) - } const { status, jid, biz } = await this.query({json: ['query', 'exist', str], requiresPhoneConnection: false}) if (status === 200) return { exists: true, jid: whatsappID(jid), isBusiness: biz as boolean} } - /** - * Query whether a given number is registered on WhatsApp, without needing to open a WS connection - * @param str phone number/jid you want to check for - * @returns undefined if the number doesn't exists, otherwise the correctly formatted jid - */ - isOnWhatsAppNoConn = async (str: string) => { - let phone = str.split('@')[0] - const url = `https://wa.me/${phone}` - const response = await this.fetchRequest(url, 'GET', undefined, undefined, undefined, false) - const loc = response.headers.location as string - if (!loc) { - this.logger.warn({ url, status: response.statusCode }, 'did not get location from request') - return - } - const locUrl = new URL('', loc) - if (!locUrl.pathname.endsWith('send/')) { - return - } - phone = locUrl.searchParams.get('phone') - return { exists: true, jid: `${phone}@s.whatsapp.net` } - } /** * Tell someone about your presence -- online, typing, offline etc. * @param jid the ID of the person/group who you are updating From fa73a6cf4c7fbf422a8ec3032f0f75accdc5aaac Mon Sep 17 00:00:00 2001 From: Aliyss Snow <33941859+Aliyss@users.noreply.github.com> Date: Sun, 18 Jul 2021 09:57:02 +0200 Subject: [PATCH 07/23] Update README.md (#598) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5aea93f..65c3c6b 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Thank you to [@Sigalor](https://github.com/sigalor/whatsapp-web-reveng) for writing his observations on the workings of WhatsApp Web and thanks to [@Rhymen](https://github.com/Rhymen/go-whatsapp/) for the __go__ implementation. - Baileys is type-safe, extensible and simple to use. If you require more functionality than provided, it'll super easy for you to write an extension. More on this [here](#WritingCustomFunctionality). + Baileys is type-safe, extensible and simple to use. If you require more functionality than provided, it'll super easy for you to write an extension. More on this [here](#writing-custom-functionality). If you're interested in building a WhatsApp bot, you may wanna check out [WhatsAppInfoBot](https://github.com/adiwajshing/WhatsappInfoBot) and an actual bot built with it, [Messcat](https://github.com/ashokatechmin/Messcat). From f7b781af4130bb14651135188cad184a826a0cb4 Mon Sep 17 00:00:00 2001 From: Adhiraj Singh Date: Mon, 9 Aug 2021 21:37:17 +0530 Subject: [PATCH 08/23] update version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index fdd2621..9defcfa 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@adiwajshing/baileys", - "version": "3.5.1", + "version": "3.5.2", "description": "WhatsApp Web API", "homepage": "https://github.com/adiwajshing/Baileys", "main": "lib/index.js", From 76c929208a36d1741409174eb6537c18fd8debe2 Mon Sep 17 00:00:00 2001 From: Volker Lieber <42102008+VolkerLieber@users.noreply.github.com> Date: Tue, 10 Aug 2021 14:58:46 +0200 Subject: [PATCH 09/23] Switched to latest supported version (#637) --- src/WAConnection/0.Base.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/WAConnection/0.Base.ts b/src/WAConnection/0.Base.ts index 1a3865f..19079d2 100644 --- a/src/WAConnection/0.Base.ts +++ b/src/WAConnection/0.Base.ts @@ -32,7 +32,7 @@ const logger = pino({ prettyPrint: { levelFirst: true, ignore: 'hostname', trans export class WAConnection extends EventEmitter { /** The version of WhatsApp Web we're telling the servers we are */ - version: [number, number, number] = [2, 2123, 8] + version: [number, number, number] = [2, 2126, 14] /** The Browser we're telling the WhatsApp Web servers we are */ browserDescription: [string, string, string] = Utils.Browsers.baileys ('Chrome') /** Metadata like WhatsApp id, name set on WhatsApp etc. */ From e3e521b3850979f3bf081082bc8a80a05694070c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1vio?= <25729991+saviosg@users.noreply.github.com> Date: Thu, 12 Aug 2021 03:35:27 -0300 Subject: [PATCH 10/23] Wait for drain event before calling Writable.write() (#639) --- src/WAConnection/Utils.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/WAConnection/Utils.ts b/src/WAConnection/Utils.ts index cd7bac8..6f101c0 100644 --- a/src/WAConnection/Utils.ts +++ b/src/WAConnection/Utils.ts @@ -14,6 +14,7 @@ import KeyedDB from '@adiwajshing/keyed-db' import got, { Options, Response } from 'got' import { join } from 'path' import { IAudioMetadata } from 'music-metadata' +import { once } from 'events' const platformMap = { 'aix': 'AIX', @@ -359,7 +360,7 @@ export const encryptedStream = async(media: WAMediaUpload, mediaType: MessageTyp for await(const data of stream) { fileLength += data.length sha256Plain = sha256Plain.update(data) - writeStream && writeStream.write(data) + if (writeStream && !writeStream.write(data)) await once(writeStream, 'drain') onChunk(aes.update(data)) } onChunk(aes.final()) @@ -371,9 +372,9 @@ export const encryptedStream = async(media: WAMediaUpload, mediaType: MessageTyp const fileEncSha256 = sha256Enc.digest() encWriteStream.write(mac) - encWriteStream.close() + encWriteStream.end() - writeStream && writeStream.close() + writeStream && writeStream.end() return { mediaKey, @@ -466,4 +467,4 @@ export function extensionForMediaMessage(message: WAMessageContent) { extension = getExtension (messageContent.mimetype) } return extension -} \ No newline at end of file +} From 8ce486d2a50d6aafc728728ead5b8dfe1d3b4ac3 Mon Sep 17 00:00:00 2001 From: lyfe00011 <76509367+lyfe00011@users.noreply.github.com> Date: Thu, 26 Aug 2021 22:19:34 +0530 Subject: [PATCH 11/23] StickerMessage isAnimated Option (#668) --- src/WAConnection/6.MessagesSend.ts | 3 ++- src/WAConnection/Constants.ts | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/WAConnection/6.MessagesSend.ts b/src/WAConnection/6.MessagesSend.ts index 3490ad2..9c53f6a 100644 --- a/src/WAConnection/6.MessagesSend.ts +++ b/src/WAConnection/6.MessagesSend.ts @@ -271,7 +271,8 @@ export class WAConnection extends Base { gifPlayback: isGIF || undefined, caption: options.caption, ptt: options.ptt, - viewOnce: options.viewOnce + viewOnce: options.viewOnce, + isAnimated: options.isAnimated } ) } diff --git a/src/WAConnection/Constants.ts b/src/WAConnection/Constants.ts index acbe6c4..e1af32a 100644 --- a/src/WAConnection/Constants.ts +++ b/src/WAConnection/Constants.ts @@ -419,6 +419,8 @@ export interface MessageOptions { sendEphemeral?: 'chat' | boolean /** Force message id */ messageId?: string + /** For sticker messages, if set to true, will considered as animated sticker */ + isAnimated?: boolean } export interface WABroadcastListInfo { status: number From 13c0b7f664882182fec7fefd4d455239073b997a Mon Sep 17 00:00:00 2001 From: Adhiraj Singh Date: Wed, 29 Sep 2021 20:51:34 +0530 Subject: [PATCH 12/23] Update README.md --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 65c3c6b..d545ba9 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,12 @@ **Read the docs [here](https://adiwajshing.github.io/Baileys)** **Join the Discord [here](https://discord.gg/7FYURJyqng)** +## Multi-Device Support + +Baileys now supports the latest multi-device beta. However, as it's a completely different implementation from WA Web, it's on its own branch which will be merged into master once mutli-device hits production. You may find the MD repo [here](https://github.com/adiwajshing/baileys#multi-device). + +The master branch only supports WA Web at the moment. + ## Example Do check out & run [example.ts](Example/example.ts) to see example usage of the library. The script covers most common use cases. From 3507f8f436e74bc3e25367622fd09af78dc4e78a Mon Sep 17 00:00:00 2001 From: Adhiraj Singh Date: Wed, 29 Sep 2021 20:52:43 +0530 Subject: [PATCH 13/23] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d545ba9..ca0d523 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ ## Multi-Device Support -Baileys now supports the latest multi-device beta. However, as it's a completely different implementation from WA Web, it's on its own branch which will be merged into master once mutli-device hits production. You may find the MD repo [here](https://github.com/adiwajshing/baileys#multi-device). +Baileys now supports the latest multi-device beta. However, as it's a completely different implementation from WA Web & will break a lot of things, it's on its own branch which will be merged into master once mutli-device hits production. You may find the MD repo [here](https://github.com/adiwajshing/baileys/tree/multi-device). The master branch only supports WA Web at the moment. From 981203c13315d68a42a6e28703ae7fd924c0e3d7 Mon Sep 17 00:00:00 2001 From: Adhiraj Singh Date: Wed, 27 Oct 2021 12:35:31 +0530 Subject: [PATCH 14/23] update version --- src/WAConnection/0.Base.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/WAConnection/0.Base.ts b/src/WAConnection/0.Base.ts index 19079d2..a042fb9 100644 --- a/src/WAConnection/0.Base.ts +++ b/src/WAConnection/0.Base.ts @@ -32,7 +32,7 @@ const logger = pino({ prettyPrint: { levelFirst: true, ignore: 'hostname', trans export class WAConnection extends EventEmitter { /** The version of WhatsApp Web we're telling the servers we are */ - version: [number, number, number] = [2, 2126, 14] + version: [number, number, number] = [2, 2140, 12] /** The Browser we're telling the WhatsApp Web servers we are */ browserDescription: [string, string, string] = Utils.Browsers.baileys ('Chrome') /** Metadata like WhatsApp id, name set on WhatsApp etc. */ From e6e8a8e97303146e5602c5a94f709676b210a646 Mon Sep 17 00:00:00 2001 From: Adhiraj Singh Date: Fri, 5 Nov 2021 00:19:37 +0530 Subject: [PATCH 15/23] update version --- src/WAConnection/0.Base.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/WAConnection/0.Base.ts b/src/WAConnection/0.Base.ts index a042fb9..1c7b3c5 100644 --- a/src/WAConnection/0.Base.ts +++ b/src/WAConnection/0.Base.ts @@ -32,7 +32,7 @@ const logger = pino({ prettyPrint: { levelFirst: true, ignore: 'hostname', trans export class WAConnection extends EventEmitter { /** The version of WhatsApp Web we're telling the servers we are */ - version: [number, number, number] = [2, 2140, 12] + version: [number, number, number] = [2, 2142, 12] /** The Browser we're telling the WhatsApp Web servers we are */ browserDescription: [string, string, string] = Utils.Browsers.baileys ('Chrome') /** Metadata like WhatsApp id, name set on WhatsApp etc. */ From 24b249430d5f2124aa8ad283021168434f094508 Mon Sep 17 00:00:00 2001 From: P Date: Sun, 7 Nov 2021 14:59:12 -0300 Subject: [PATCH 16/23] bufix: sometimes 'this.chats.get(jid)' return null (#803) --- src/WAConnection/4.Events.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/WAConnection/4.Events.ts b/src/WAConnection/4.Events.ts index 994d600..8e2033a 100644 --- a/src/WAConnection/4.Events.ts +++ b/src/WAConnection/4.Events.ts @@ -664,7 +664,7 @@ export class WAConnection extends Base { } protected emitGroupUpdate = (jid: string, update: Partial) => { const chat = this.chats.get(jid) - if (chat.metadata) Object.assign(chat.metadata, update) + if (chat && chat.metadata) Object.assign(chat.metadata, update) this.emit ('group-update', { jid, ...update }) } protected chatUpdateTime = (chat, stamp: number) => this.chats.update (chat.jid, c => c.t = stamp) From b616cf5aca487ec80d068beedbe3e4d14f0eafca Mon Sep 17 00:00:00 2001 From: Vinicius Silva <79378773+viniciusgdr@users.noreply.github.com> Date: Wed, 10 Nov 2021 18:41:08 +0000 Subject: [PATCH 17/23] Fixed: Update for new Chat Groups (#804) * Update for new Chat Groups * Update for new Chat Groups WhatsApp changed the ID form of new groups * Fixed: Update for new Chat Groups --- src/WAConnection/4.Events.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/WAConnection/4.Events.ts b/src/WAConnection/4.Events.ts index 8e2033a..03ec04e 100644 --- a/src/WAConnection/4.Events.ts +++ b/src/WAConnection/4.Events.ts @@ -494,10 +494,6 @@ export class WAConnection extends Base { /** Adds the given message to the appropriate chat, if the chat doesn't exist, it is created */ protected async chatAddMessageAppropriate (message: WAMessage) { const jid = whatsappID(message.key.remoteJid) - if(isGroupID(jid) && !jid.includes('-')) { - this.logger.warn({ gid: jid }, 'recieved odd group ID') - return - } const chat = this.chats.get(jid) || await this.chatAdd (jid) this.chatAddMessage (message, chat) } From 3af06e0b8c703562ec53e45880e5b14998a45f71 Mon Sep 17 00:00:00 2001 From: Adhiraj Singh Date: Mon, 15 Nov 2021 16:01:57 +0530 Subject: [PATCH 18/23] chore: update version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9defcfa..45a9f77 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@adiwajshing/baileys", - "version": "3.5.2", + "version": "3.5.3", "description": "WhatsApp Web API", "homepage": "https://github.com/adiwajshing/Baileys", "main": "lib/index.js", From 90fe0c0d3bfcb4840febceaf24484d14f1e0f146 Mon Sep 17 00:00:00 2001 From: Alen Yohannan <66544823+AlenSaito1@users.noreply.github.com> Date: Mon, 6 Dec 2021 18:21:30 +0530 Subject: [PATCH 19/23] [FIX] Use `prepack` instead of prepare (#976) * Fix errors with Compilation There were some erros which prevented the code to compile. This commit fixes that * chore(): use `prepack` instead of `prepare` --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 45a9f77..db772af 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ ], "scripts": { "test": "mocha --timeout 240000 -r ts-node/register src/Tests/Tests.*.ts", - "prepare": "tsc", + "prepack": "tsc", "lint": "eslint '*/*.ts' --quiet --fix", "build:all": "tsc && typedoc", "build:docs": "typedoc", From 93e272f9bf0a4c8b7b484d80bc8857612446f349 Mon Sep 17 00:00:00 2001 From: Adhiraj Singh Date: Wed, 8 Dec 2021 13:06:52 +0530 Subject: [PATCH 20/23] chore: update version --- src/WAConnection/0.Base.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/WAConnection/0.Base.ts b/src/WAConnection/0.Base.ts index 1c7b3c5..bb5b4aa 100644 --- a/src/WAConnection/0.Base.ts +++ b/src/WAConnection/0.Base.ts @@ -32,7 +32,7 @@ const logger = pino({ prettyPrint: { levelFirst: true, ignore: 'hostname', trans export class WAConnection extends EventEmitter { /** The version of WhatsApp Web we're telling the servers we are */ - version: [number, number, number] = [2, 2142, 12] + version: [number, number, number] = [2, 2147, 14] /** The Browser we're telling the WhatsApp Web servers we are */ browserDescription: [string, string, string] = Utils.Browsers.baileys ('Chrome') /** Metadata like WhatsApp id, name set on WhatsApp etc. */ From b8f33405bf5da1f3cafa128d0bde839806d496a9 Mon Sep 17 00:00:00 2001 From: AkirahX <82380880+AkirahX@users.noreply.github.com> Date: Wed, 22 Dec 2021 11:07:42 -0300 Subject: [PATCH 21/23] Update version (#1058) --- src/WAConnection/0.Base.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/WAConnection/0.Base.ts b/src/WAConnection/0.Base.ts index bb5b4aa..208b7ff 100644 --- a/src/WAConnection/0.Base.ts +++ b/src/WAConnection/0.Base.ts @@ -32,7 +32,7 @@ const logger = pino({ prettyPrint: { levelFirst: true, ignore: 'hostname', trans export class WAConnection extends EventEmitter { /** The version of WhatsApp Web we're telling the servers we are */ - version: [number, number, number] = [2, 2147, 14] + version: [number, number, number] = [2, 2147, 16] /** The Browser we're telling the WhatsApp Web servers we are */ browserDescription: [string, string, string] = Utils.Browsers.baileys ('Chrome') /** Metadata like WhatsApp id, name set on WhatsApp etc. */ From 19f870bfa7276a1d69ca50256bcc1f97c593692c Mon Sep 17 00:00:00 2001 From: RavinduManoj <97670119+RavinduManoj@users.noreply.github.com> Date: Fri, 14 Jan 2022 22:49:49 +0530 Subject: [PATCH 22/23] Update Version (#1147) --- src/WAConnection/0.Base.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/WAConnection/0.Base.ts b/src/WAConnection/0.Base.ts index 208b7ff..d320304 100644 --- a/src/WAConnection/0.Base.ts +++ b/src/WAConnection/0.Base.ts @@ -32,7 +32,7 @@ const logger = pino({ prettyPrint: { levelFirst: true, ignore: 'hostname', trans export class WAConnection extends EventEmitter { /** The version of WhatsApp Web we're telling the servers we are */ - version: [number, number, number] = [2, 2147, 16] + version: [number, number, number] = [2, 2149, 4] /** The Browser we're telling the WhatsApp Web servers we are */ browserDescription: [string, string, string] = Utils.Browsers.baileys ('Chrome') /** Metadata like WhatsApp id, name set on WhatsApp etc. */ From 7ca6ae61161179f98b9282d8acf3e3689e227028 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Jan 2022 00:17:39 +0530 Subject: [PATCH 23/23] Bump shelljs from 0.8.4 to 0.8.5 (#1151) Bumps [shelljs](https://github.com/shelljs/shelljs) from 0.8.4 to 0.8.5. - [Release notes](https://github.com/shelljs/shelljs/releases) - [Changelog](https://github.com/shelljs/shelljs/blob/master/CHANGELOG.md) - [Commits](https://github.com/shelljs/shelljs/compare/v0.8.4...v0.8.5) --- updated-dependencies: - dependency-name: shelljs dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 48 +++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 43 insertions(+), 5 deletions(-) diff --git a/yarn.lock b/yarn.lock index 81412e6..75e928c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1136,7 +1136,7 @@ glob-parent@~5.1.0: dependencies: is-glob "^4.0.1" -glob@7.1.6, glob@^7.0.0, glob@^7.1.3: +glob@7.1.6: version "7.1.6" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== @@ -1148,6 +1148,18 @@ glob@7.1.6, glob@^7.0.0, glob@^7.1.3: once "^1.3.0" path-is-absolute "^1.0.0" +glob@^7.0.0, glob@^7.1.3: + version "7.2.0" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" + integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + global@~4.4.0: version "4.4.0" resolved "https://registry.yarnpkg.com/global/-/global-4.4.0.tgz#3e7b105179006a323ed71aafca3e9c57a5cc6406" @@ -1331,6 +1343,13 @@ is-core-module@^2.2.0: dependencies: has "^1.0.3" +is-core-module@^2.8.0: + version "2.8.1" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.8.1.tgz#f59fdfca701d5879d0a6b100a40aa1560ce27211" + integrity sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA== + dependencies: + has "^1.0.3" + is-date-object@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.2.tgz#bda736f2cd8fd06d32844e7743bfa7494c3bfd7e" @@ -1890,6 +1909,11 @@ path-parse@^1.0.6: resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== +path-parse@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" + integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== + path-type@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" @@ -2114,7 +2138,7 @@ resolve-alpn@^1.0.0: resolved "https://registry.yarnpkg.com/resolve-alpn/-/resolve-alpn-1.1.1.tgz#4a006a7d533c81a5dd04681612090fde227cd6e1" integrity sha512-0KbFjFPR2bnJhNx1t8Ad6RqVc8+QPJC4y561FYyC/Q/6OzB3fhUzB5PEgitYhPK6aifwR5gXBSnDMllaDWixGQ== -resolve@^1.0.0, resolve@^1.1.6, resolve@^1.10.0: +resolve@^1.0.0, resolve@^1.10.0: version "1.20.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.20.0.tgz#629a013fb3f70755d6f0b7935cc1c2c5378b1975" integrity sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A== @@ -2122,6 +2146,15 @@ resolve@^1.0.0, resolve@^1.1.6, resolve@^1.10.0: is-core-module "^2.2.0" path-parse "^1.0.6" +resolve@^1.1.6: + version "1.21.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.21.0.tgz#b51adc97f3472e6a5cf4444d34bc9d6b9037591f" + integrity sha512-3wCbTpk5WJlyE4mSOtDLhqQmGFi0/TD9VPwmiolnk8U0wRgMEktqCXd3vy5buTO3tljvalNvKrjHEfrd2WpEKA== + dependencies: + is-core-module "^2.8.0" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" + responselike@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/responselike/-/responselike-2.0.0.tgz#26391bcc3174f750f9a79eacc40a12a5c42d7723" @@ -2159,9 +2192,9 @@ serialize-javascript@5.0.1: randombytes "^2.1.0" shelljs@^0.8.4: - version "0.8.4" - resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.4.tgz#de7684feeb767f8716b326078a8a00875890e3c2" - integrity sha512-7gk3UZ9kOfPLIAbslLzyWeGiEqx9e3rxwZM0KE6EL8GlGwjym9Mrlx5/p33bWTu9YG6vcS4MBxYZDHYr5lr8BQ== + version "0.8.5" + resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.5.tgz#de055408d8361bed66c669d2f000538ced8ee20c" + integrity sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow== dependencies: glob "^7.0.0" interpret "^1.0.0" @@ -2347,6 +2380,11 @@ supports-color@^7.1.0: dependencies: has-flag "^4.0.0" +supports-preserve-symlinks-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" + integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== + timm@^1.6.1: version "1.7.1" resolved "https://registry.yarnpkg.com/timm/-/timm-1.7.1.tgz#96bab60c7d45b5a10a8a4d0f0117c6b7e5aff76f"