diff --git a/WAProto/WAProto.proto b/WAProto/WAProto.proto index 8477da1..5d6eac5 100644 --- a/WAProto/WAProto.proto +++ b/WAProto/WAProto.proto @@ -251,6 +251,7 @@ message ContextInfo { optional ActionLink actionLink = 33; optional string groupSubject = 34; optional string parentGroupJid = 35; + optional bytes messageSecret = 36; } message DeclinePaymentRequestMessage { @@ -340,6 +341,9 @@ message ExtendedTextMessage { PARENT = 1; } optional ExtendedTextMessageInviteLinkGroupType inviteLinkGroupType = 26; + optional string inviteLinkParentGroupSubjectV2 = 27; + optional bytes inviteLinkParentGroupThumbnailV2 = 28; + optional ExtendedTextMessageInviteLinkGroupType inviteLinkGroupTypeV2 = 29; } message ExternalAdReplyInfo { @@ -829,16 +833,14 @@ message PollCreationMessage { optional ContextInfo contextInfo = 5; } -message PollUpdateMessage { - optional MessageKey pollCreationMessageKey = 1; - optional bytes encPayload = 2; - optional bytes encIv = 3; +message PollEncValue { + optional bytes encPayload = 1; + optional bytes encIv = 2; } -message PollUpdateMessageContent { - oneof update { - PollVoteMessage voteMessage = 1; - } +message PollUpdateMessage { + optional MessageKey pollCreationMessageKey = 1; + optional PollEncValue vote = 2; } message PollVoteMessage { @@ -1475,6 +1477,11 @@ message SyncActionValue { optional AgentAction agentAction = 27; optional SubscriptionAction subscriptionAction = 28; optional UserStatusMuteAction userStatusMuteAction = 29; + optional TimeFormatAction timeFormatAction = 30; +} + +message TimeFormatAction { + optional bool isTwentyFourHourFormatEnabled = 1; } message UnarchiveChatsSetting { @@ -1559,6 +1566,11 @@ message VerifiedNameDetails { // optional uint32 quinary = 5; //} +message CertChain { + optional NoiseCertificate leaf = 1; + optional NoiseCertificate intermediate = 2; +} + message ClientFinish { optional bytes static = 1; optional bytes payload = 2; @@ -1641,6 +1653,14 @@ message CompanionRegData { optional bytes companionProps = 8; } +message Details { + optional uint32 serial = 1; + optional uint32 issuerSerial = 2; + optional bytes key = 3; + optional uint64 notBefore = 4; + optional uint64 notAfter = 5; +} + message DNSSource { enum DNSSourceDNSResolutionMethod { SYSTEM = 0; @@ -1664,15 +1684,6 @@ message NoiseCertificate { optional bytes signature = 2; } -// Renamed from NoiseCertificate$Details -message NoiseCertificateDetails { - optional uint32 serial = 1; - optional string issuer = 2; - optional uint64 expires = 3; - optional string subject = 4; - optional bytes key = 5; -} - message ServerHello { optional bytes ephemeral = 1; optional bytes static = 2; @@ -1851,7 +1862,7 @@ message PollAdditionalMetadata { message PollUpdate { optional MessageKey pollUpdateMessageKey = 1; - optional PollUpdateMessageContent pollUpdateMessage = 2; + optional PollVoteMessage vote = 2; } message Reaction { @@ -2091,6 +2102,12 @@ message WebMessageInfo { COMMUNITY_LINK_PARENT_GROUP = 134; COMMUNITY_LINK_SIBLING_GROUP = 135; COMMUNITY_LINK_SUB_GROUP = 136; + COMMUNITY_UNLINK_PARENT_GROUP = 137; + COMMUNITY_UNLINK_SIBLING_GROUP = 138; + COMMUNITY_UNLINK_SUB_GROUP = 139; + GROUP_PARTICIPANT_ACCEPT = 140; + GROUP_PARTICIPANT_LINKED_GROUP_JOIN = 141; + COMMUNITY_CREATE = 142; } optional WebMessageInfoStubType messageStubType = 24; optional bool clearMedia = 25; @@ -2122,6 +2139,8 @@ message WebMessageInfo { repeated PollUpdate pollUpdates = 45; optional PollAdditionalMetadata pollAdditionalMetadata = 46; optional string agentId = 47; + optional bool statusAlreadyViewed = 48; + optional bytes messageSecret = 49; } message WebNotificationsInfo { diff --git a/WAProto/index.d.ts b/WAProto/index.d.ts index 14604ad..50d7b88 100644 --- a/WAProto/index.d.ts +++ b/WAProto/index.d.ts @@ -3155,6 +3155,9 @@ export namespace proto { /** ContextInfo parentGroupJid */ parentGroupJid?: (string|null); + + /** ContextInfo messageSecret */ + messageSecret?: (Uint8Array|null); } /** Represents a ContextInfo. */ @@ -3235,6 +3238,9 @@ export namespace proto { /** ContextInfo parentGroupJid. */ public parentGroupJid: string; + /** ContextInfo messageSecret. */ + public messageSecret: Uint8Array; + /** * Creates a new ContextInfo instance using the specified properties. * @param [properties] Properties to set @@ -3978,6 +3984,15 @@ export namespace proto { /** ExtendedTextMessage inviteLinkGroupType */ inviteLinkGroupType?: (proto.ExtendedTextMessage.ExtendedTextMessageInviteLinkGroupType|null); + + /** ExtendedTextMessage inviteLinkParentGroupSubjectV2 */ + inviteLinkParentGroupSubjectV2?: (string|null); + + /** ExtendedTextMessage inviteLinkParentGroupThumbnailV2 */ + inviteLinkParentGroupThumbnailV2?: (Uint8Array|null); + + /** ExtendedTextMessage inviteLinkGroupTypeV2 */ + inviteLinkGroupTypeV2?: (proto.ExtendedTextMessage.ExtendedTextMessageInviteLinkGroupType|null); } /** Represents an ExtendedTextMessage. */ @@ -4049,6 +4064,15 @@ export namespace proto { /** ExtendedTextMessage inviteLinkGroupType. */ public inviteLinkGroupType: proto.ExtendedTextMessage.ExtendedTextMessageInviteLinkGroupType; + /** ExtendedTextMessage inviteLinkParentGroupSubjectV2. */ + public inviteLinkParentGroupSubjectV2: string; + + /** ExtendedTextMessage inviteLinkParentGroupThumbnailV2. */ + public inviteLinkParentGroupThumbnailV2: Uint8Array; + + /** ExtendedTextMessage inviteLinkGroupTypeV2. */ + public inviteLinkGroupTypeV2: proto.ExtendedTextMessage.ExtendedTextMessageInviteLinkGroupType; + /** * Creates a new ExtendedTextMessage instance using the specified properties. * @param [properties] Properties to set @@ -9702,17 +9726,110 @@ export namespace proto { public toJSON(): { [k: string]: any }; } + /** Properties of a PollEncValue. */ + interface IPollEncValue { + + /** PollEncValue encPayload */ + encPayload?: (Uint8Array|null); + + /** PollEncValue encIv */ + encIv?: (Uint8Array|null); + } + + /** Represents a PollEncValue. */ + class PollEncValue implements IPollEncValue { + + /** + * Constructs a new PollEncValue. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IPollEncValue); + + /** PollEncValue encPayload. */ + public encPayload: Uint8Array; + + /** PollEncValue encIv. */ + public encIv: Uint8Array; + + /** + * Creates a new PollEncValue instance using the specified properties. + * @param [properties] Properties to set + * @returns PollEncValue instance + */ + public static create(properties?: proto.IPollEncValue): proto.PollEncValue; + + /** + * Encodes the specified PollEncValue message. Does not implicitly {@link proto.PollEncValue.verify|verify} messages. + * @param message PollEncValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IPollEncValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PollEncValue message, length delimited. Does not implicitly {@link proto.PollEncValue.verify|verify} messages. + * @param message PollEncValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IPollEncValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PollEncValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PollEncValue + * @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.PollEncValue; + + /** + * Decodes a PollEncValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PollEncValue + * @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.PollEncValue; + + /** + * Verifies a PollEncValue 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 PollEncValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PollEncValue + */ + public static fromObject(object: { [k: string]: any }): proto.PollEncValue; + + /** + * Creates a plain object from a PollEncValue message. Also converts values to other types if specified. + * @param message PollEncValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.PollEncValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PollEncValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of a PollUpdateMessage. */ interface IPollUpdateMessage { /** PollUpdateMessage pollCreationMessageKey */ pollCreationMessageKey?: (proto.IMessageKey|null); - /** PollUpdateMessage encPayload */ - encPayload?: (Uint8Array|null); - - /** PollUpdateMessage encIv */ - encIv?: (Uint8Array|null); + /** PollUpdateMessage vote */ + vote?: (proto.IPollEncValue|null); } /** Represents a PollUpdateMessage. */ @@ -9727,11 +9844,8 @@ export namespace proto { /** PollUpdateMessage pollCreationMessageKey. */ public pollCreationMessageKey?: (proto.IMessageKey|null); - /** PollUpdateMessage encPayload. */ - public encPayload: Uint8Array; - - /** PollUpdateMessage encIv. */ - public encIv: Uint8Array; + /** PollUpdateMessage vote. */ + public vote?: (proto.IPollEncValue|null); /** * Creates a new PollUpdateMessage instance using the specified properties. @@ -9804,99 +9918,6 @@ export namespace proto { public toJSON(): { [k: string]: any }; } - /** Properties of a PollUpdateMessageContent. */ - interface IPollUpdateMessageContent { - - /** PollUpdateMessageContent voteMessage */ - voteMessage?: (proto.IPollVoteMessage|null); - } - - /** Represents a PollUpdateMessageContent. */ - class PollUpdateMessageContent implements IPollUpdateMessageContent { - - /** - * Constructs a new PollUpdateMessageContent. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IPollUpdateMessageContent); - - /** PollUpdateMessageContent voteMessage. */ - public voteMessage?: (proto.IPollVoteMessage|null); - - /** PollUpdateMessageContent update. */ - public update?: "voteMessage"; - - /** - * Creates a new PollUpdateMessageContent instance using the specified properties. - * @param [properties] Properties to set - * @returns PollUpdateMessageContent instance - */ - public static create(properties?: proto.IPollUpdateMessageContent): proto.PollUpdateMessageContent; - - /** - * Encodes the specified PollUpdateMessageContent message. Does not implicitly {@link proto.PollUpdateMessageContent.verify|verify} messages. - * @param message PollUpdateMessageContent message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IPollUpdateMessageContent, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PollUpdateMessageContent message, length delimited. Does not implicitly {@link proto.PollUpdateMessageContent.verify|verify} messages. - * @param message PollUpdateMessageContent message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IPollUpdateMessageContent, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PollUpdateMessageContent message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PollUpdateMessageContent - * @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.PollUpdateMessageContent; - - /** - * Decodes a PollUpdateMessageContent message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PollUpdateMessageContent - * @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.PollUpdateMessageContent; - - /** - * Verifies a PollUpdateMessageContent 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 PollUpdateMessageContent message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PollUpdateMessageContent - */ - public static fromObject(object: { [k: string]: any }): proto.PollUpdateMessageContent; - - /** - * Creates a plain object from a PollUpdateMessageContent message. Also converts values to other types if specified. - * @param message PollUpdateMessageContent - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.PollUpdateMessageContent, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PollUpdateMessageContent to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - /** Properties of a PollVoteMessage. */ interface IPollVoteMessage { @@ -18541,6 +18562,9 @@ export namespace proto { /** SyncActionValue userStatusMuteAction */ userStatusMuteAction?: (proto.IUserStatusMuteAction|null); + + /** SyncActionValue timeFormatAction */ + timeFormatAction?: (proto.ITimeFormatAction|null); } /** Represents a SyncActionValue. */ @@ -18633,6 +18657,9 @@ export namespace proto { /** SyncActionValue userStatusMuteAction. */ public userStatusMuteAction?: (proto.IUserStatusMuteAction|null); + /** SyncActionValue timeFormatAction. */ + public timeFormatAction?: (proto.ITimeFormatAction|null); + /** * Creates a new SyncActionValue instance using the specified properties. * @param [properties] Properties to set @@ -18704,6 +18731,96 @@ export namespace proto { public toJSON(): { [k: string]: any }; } + /** Properties of a TimeFormatAction. */ + interface ITimeFormatAction { + + /** TimeFormatAction isTwentyFourHourFormatEnabled */ + isTwentyFourHourFormatEnabled?: (boolean|null); + } + + /** Represents a TimeFormatAction. */ + class TimeFormatAction implements ITimeFormatAction { + + /** + * Constructs a new TimeFormatAction. + * @param [properties] Properties to set + */ + constructor(properties?: proto.ITimeFormatAction); + + /** TimeFormatAction isTwentyFourHourFormatEnabled. */ + public isTwentyFourHourFormatEnabled: boolean; + + /** + * Creates a new TimeFormatAction instance using the specified properties. + * @param [properties] Properties to set + * @returns TimeFormatAction instance + */ + public static create(properties?: proto.ITimeFormatAction): proto.TimeFormatAction; + + /** + * Encodes the specified TimeFormatAction message. Does not implicitly {@link proto.TimeFormatAction.verify|verify} messages. + * @param message TimeFormatAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.ITimeFormatAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TimeFormatAction message, length delimited. Does not implicitly {@link proto.TimeFormatAction.verify|verify} messages. + * @param message TimeFormatAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.ITimeFormatAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TimeFormatAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TimeFormatAction + * @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.TimeFormatAction; + + /** + * Decodes a TimeFormatAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TimeFormatAction + * @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.TimeFormatAction; + + /** + * Verifies a TimeFormatAction 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 TimeFormatAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TimeFormatAction + */ + public static fromObject(object: { [k: string]: any }): proto.TimeFormatAction; + + /** + * Creates a plain object from a TimeFormatAction message. Also converts values to other types if specified. + * @param message TimeFormatAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.TimeFormatAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TimeFormatAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of an UnarchiveChatsSetting. */ interface IUnarchiveChatsSetting { @@ -19580,6 +19697,102 @@ export namespace proto { public toJSON(): { [k: string]: any }; } + /** Properties of a CertChain. */ + interface ICertChain { + + /** CertChain leaf */ + leaf?: (proto.INoiseCertificate|null); + + /** CertChain intermediate */ + intermediate?: (proto.INoiseCertificate|null); + } + + /** Represents a CertChain. */ + class CertChain implements ICertChain { + + /** + * Constructs a new CertChain. + * @param [properties] Properties to set + */ + constructor(properties?: proto.ICertChain); + + /** CertChain leaf. */ + public leaf?: (proto.INoiseCertificate|null); + + /** CertChain intermediate. */ + public intermediate?: (proto.INoiseCertificate|null); + + /** + * Creates a new CertChain instance using the specified properties. + * @param [properties] Properties to set + * @returns CertChain instance + */ + public static create(properties?: proto.ICertChain): proto.CertChain; + + /** + * Encodes the specified CertChain message. Does not implicitly {@link proto.CertChain.verify|verify} messages. + * @param message CertChain message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.ICertChain, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CertChain message, length delimited. Does not implicitly {@link proto.CertChain.verify|verify} messages. + * @param message CertChain message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.ICertChain, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CertChain message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CertChain + * @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.CertChain; + + /** + * Decodes a CertChain message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CertChain + * @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.CertChain; + + /** + * Verifies a CertChain 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 CertChain message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CertChain + */ + public static fromObject(object: { [k: string]: any }): proto.CertChain; + + /** + * Creates a plain object from a CertChain message. Also converts values to other types if specified. + * @param message CertChain + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.CertChain, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CertChain to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of a ClientFinish. */ interface IClientFinish { @@ -20177,6 +20390,120 @@ export namespace proto { public toJSON(): { [k: string]: any }; } + /** Properties of a Details. */ + interface IDetails { + + /** Details serial */ + serial?: (number|null); + + /** Details issuerSerial */ + issuerSerial?: (number|null); + + /** Details key */ + key?: (Uint8Array|null); + + /** Details notBefore */ + notBefore?: (number|Long|null); + + /** Details notAfter */ + notAfter?: (number|Long|null); + } + + /** Represents a Details. */ + class Details implements IDetails { + + /** + * Constructs a new Details. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IDetails); + + /** Details serial. */ + public serial: number; + + /** Details issuerSerial. */ + public issuerSerial: number; + + /** Details key. */ + public key: Uint8Array; + + /** Details notBefore. */ + public notBefore: (number|Long); + + /** Details notAfter. */ + public notAfter: (number|Long); + + /** + * Creates a new Details instance using the specified properties. + * @param [properties] Properties to set + * @returns Details instance + */ + public static create(properties?: proto.IDetails): proto.Details; + + /** + * Encodes the specified Details message. Does not implicitly {@link proto.Details.verify|verify} messages. + * @param message Details message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Details message, length delimited. Does not implicitly {@link proto.Details.verify|verify} messages. + * @param message Details message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Details message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Details + * @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.Details; + + /** + * Decodes a Details message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Details + * @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.Details; + + /** + * Verifies a Details 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 Details message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Details + */ + public static fromObject(object: { [k: string]: any }): proto.Details; + + /** + * Creates a plain object from a Details message. Also converts values to other types if specified. + * @param message Details + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Details, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Details to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of a DNSSource. */ interface IDNSSource { @@ -20483,120 +20810,6 @@ export namespace proto { public toJSON(): { [k: string]: any }; } - /** Properties of a NoiseCertificateDetails. */ - interface INoiseCertificateDetails { - - /** NoiseCertificateDetails serial */ - serial?: (number|null); - - /** NoiseCertificateDetails issuer */ - issuer?: (string|null); - - /** NoiseCertificateDetails expires */ - expires?: (number|Long|null); - - /** NoiseCertificateDetails subject */ - subject?: (string|null); - - /** NoiseCertificateDetails key */ - key?: (Uint8Array|null); - } - - /** Represents a NoiseCertificateDetails. */ - class NoiseCertificateDetails implements INoiseCertificateDetails { - - /** - * Constructs a new NoiseCertificateDetails. - * @param [properties] Properties to set - */ - constructor(properties?: proto.INoiseCertificateDetails); - - /** NoiseCertificateDetails serial. */ - public serial: number; - - /** NoiseCertificateDetails issuer. */ - public issuer: string; - - /** NoiseCertificateDetails expires. */ - public expires: (number|Long); - - /** NoiseCertificateDetails subject. */ - public subject: string; - - /** NoiseCertificateDetails key. */ - public key: Uint8Array; - - /** - * Creates a new NoiseCertificateDetails instance using the specified properties. - * @param [properties] Properties to set - * @returns NoiseCertificateDetails instance - */ - public static create(properties?: proto.INoiseCertificateDetails): proto.NoiseCertificateDetails; - - /** - * Encodes the specified NoiseCertificateDetails message. Does not implicitly {@link proto.NoiseCertificateDetails.verify|verify} messages. - * @param message NoiseCertificateDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.INoiseCertificateDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NoiseCertificateDetails message, length delimited. Does not implicitly {@link proto.NoiseCertificateDetails.verify|verify} messages. - * @param message NoiseCertificateDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.INoiseCertificateDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NoiseCertificateDetails message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NoiseCertificateDetails - * @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.NoiseCertificateDetails; - - /** - * Decodes a NoiseCertificateDetails message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NoiseCertificateDetails - * @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.NoiseCertificateDetails; - - /** - * Verifies a NoiseCertificateDetails 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 NoiseCertificateDetails message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NoiseCertificateDetails - */ - public static fromObject(object: { [k: string]: any }): proto.NoiseCertificateDetails; - - /** - * Creates a plain object from a NoiseCertificateDetails message. Also converts values to other types if specified. - * @param message NoiseCertificateDetails - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.NoiseCertificateDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NoiseCertificateDetails to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - /** Properties of a ServerHello. */ interface IServerHello { @@ -21794,8 +22007,8 @@ export namespace proto { /** PollUpdate pollUpdateMessageKey */ pollUpdateMessageKey?: (proto.IMessageKey|null); - /** PollUpdate pollUpdateMessage */ - pollUpdateMessage?: (proto.IPollUpdateMessageContent|null); + /** PollUpdate vote */ + vote?: (proto.IPollVoteMessage|null); } /** Represents a PollUpdate. */ @@ -21810,8 +22023,8 @@ export namespace proto { /** PollUpdate pollUpdateMessageKey. */ public pollUpdateMessageKey?: (proto.IMessageKey|null); - /** PollUpdate pollUpdateMessage. */ - public pollUpdateMessage?: (proto.IPollUpdateMessageContent|null); + /** PollUpdate vote. */ + public vote?: (proto.IPollVoteMessage|null); /** * Creates a new PollUpdate instance using the specified properties. @@ -22695,6 +22908,12 @@ export namespace proto { /** WebMessageInfo agentId */ agentId?: (string|null); + + /** WebMessageInfo statusAlreadyViewed */ + statusAlreadyViewed?: (boolean|null); + + /** WebMessageInfo messageSecret */ + messageSecret?: (Uint8Array|null); } /** Represents a WebMessageInfo. */ @@ -22820,6 +23039,12 @@ export namespace proto { /** WebMessageInfo agentId. */ public agentId: string; + /** WebMessageInfo statusAlreadyViewed. */ + public statusAlreadyViewed: boolean; + + /** WebMessageInfo messageSecret. */ + public messageSecret: Uint8Array; + /** * Creates a new WebMessageInfo instance using the specified properties. * @param [properties] Properties to set @@ -23041,7 +23266,13 @@ export namespace proto { GROUP_INVITE_LINK_GROWTH_LOCKED = 133, COMMUNITY_LINK_PARENT_GROUP = 134, COMMUNITY_LINK_SIBLING_GROUP = 135, - COMMUNITY_LINK_SUB_GROUP = 136 + COMMUNITY_LINK_SUB_GROUP = 136, + COMMUNITY_UNLINK_PARENT_GROUP = 137, + COMMUNITY_UNLINK_SIBLING_GROUP = 138, + COMMUNITY_UNLINK_SUB_GROUP = 139, + GROUP_PARTICIPANT_ACCEPT = 140, + GROUP_PARTICIPANT_LINKED_GROUP_JOIN = 141, + COMMUNITY_CREATE = 142 } /** WebMessageInfoBizPrivacyStatus enum. */ diff --git a/WAProto/index.js b/WAProto/index.js index c7c8552..843b87a 100644 --- a/WAProto/index.js +++ b/WAProto/index.js @@ -7795,6 +7795,7 @@ $root.proto = (function() { * @property {proto.IActionLink|null} [actionLink] ContextInfo actionLink * @property {string|null} [groupSubject] ContextInfo groupSubject * @property {string|null} [parentGroupJid] ContextInfo parentGroupJid + * @property {Uint8Array|null} [messageSecret] ContextInfo messageSecret */ /** @@ -7997,6 +7998,14 @@ $root.proto = (function() { */ ContextInfo.prototype.parentGroupJid = ""; + /** + * ContextInfo messageSecret. + * @member {Uint8Array} messageSecret + * @memberof proto.ContextInfo + * @instance + */ + ContextInfo.prototype.messageSecret = $util.newBuffer([]); + /** * Creates a new ContextInfo instance using the specified properties. * @function create @@ -8068,6 +8077,8 @@ $root.proto = (function() { writer.uint32(/* id 34, wireType 2 =*/274).string(message.groupSubject); if (message.parentGroupJid != null && Object.hasOwnProperty.call(message, "parentGroupJid")) writer.uint32(/* id 35, wireType 2 =*/282).string(message.parentGroupJid); + if (message.messageSecret != null && Object.hasOwnProperty.call(message, "messageSecret")) + writer.uint32(/* id 36, wireType 2 =*/290).bytes(message.messageSecret); return writer; }; @@ -8173,6 +8184,9 @@ $root.proto = (function() { case 35: message.parentGroupJid = reader.string(); break; + case 36: + message.messageSecret = reader.bytes(); + break; default: reader.skipType(tag & 7); break; @@ -8293,6 +8307,9 @@ $root.proto = (function() { if (message.parentGroupJid != null && message.hasOwnProperty("parentGroupJid")) if (!$util.isString(message.parentGroupJid)) return "parentGroupJid: string expected"; + if (message.messageSecret != null && message.hasOwnProperty("messageSecret")) + if (!(message.messageSecret && typeof message.messageSecret.length === "number" || $util.isString(message.messageSecret))) + return "messageSecret: buffer expected"; return null; }; @@ -8390,6 +8407,11 @@ $root.proto = (function() { message.groupSubject = String(object.groupSubject); if (object.parentGroupJid != null) message.parentGroupJid = String(object.parentGroupJid); + if (object.messageSecret != null) + if (typeof object.messageSecret === "string") + $util.base64.decode(object.messageSecret, message.messageSecret = $util.newBuffer($util.base64.length(object.messageSecret)), 0); + else if (object.messageSecret.length) + message.messageSecret = object.messageSecret; return message; }; @@ -8447,6 +8469,13 @@ $root.proto = (function() { object.actionLink = null; object.groupSubject = ""; object.parentGroupJid = ""; + if (options.bytes === String) + object.messageSecret = ""; + else { + object.messageSecret = []; + if (options.bytes !== Array) + object.messageSecret = $util.newBuffer(object.messageSecret); + } } if (message.stanzaId != null && message.hasOwnProperty("stanzaId")) object.stanzaId = message.stanzaId; @@ -8500,6 +8529,8 @@ $root.proto = (function() { object.groupSubject = message.groupSubject; if (message.parentGroupJid != null && message.hasOwnProperty("parentGroupJid")) object.parentGroupJid = message.parentGroupJid; + if (message.messageSecret != null && message.hasOwnProperty("messageSecret")) + object.messageSecret = options.bytes === String ? $util.base64.encode(message.messageSecret, 0, message.messageSecret.length) : options.bytes === Array ? Array.prototype.slice.call(message.messageSecret) : message.messageSecret; return object; }; @@ -10258,6 +10289,9 @@ $root.proto = (function() { * @property {number|null} [thumbnailHeight] ExtendedTextMessage thumbnailHeight * @property {number|null} [thumbnailWidth] ExtendedTextMessage thumbnailWidth * @property {proto.ExtendedTextMessage.ExtendedTextMessageInviteLinkGroupType|null} [inviteLinkGroupType] ExtendedTextMessage inviteLinkGroupType + * @property {string|null} [inviteLinkParentGroupSubjectV2] ExtendedTextMessage inviteLinkParentGroupSubjectV2 + * @property {Uint8Array|null} [inviteLinkParentGroupThumbnailV2] ExtendedTextMessage inviteLinkParentGroupThumbnailV2 + * @property {proto.ExtendedTextMessage.ExtendedTextMessageInviteLinkGroupType|null} [inviteLinkGroupTypeV2] ExtendedTextMessage inviteLinkGroupTypeV2 */ /** @@ -10435,6 +10469,30 @@ $root.proto = (function() { */ ExtendedTextMessage.prototype.inviteLinkGroupType = 0; + /** + * ExtendedTextMessage inviteLinkParentGroupSubjectV2. + * @member {string} inviteLinkParentGroupSubjectV2 + * @memberof proto.ExtendedTextMessage + * @instance + */ + ExtendedTextMessage.prototype.inviteLinkParentGroupSubjectV2 = ""; + + /** + * ExtendedTextMessage inviteLinkParentGroupThumbnailV2. + * @member {Uint8Array} inviteLinkParentGroupThumbnailV2 + * @memberof proto.ExtendedTextMessage + * @instance + */ + ExtendedTextMessage.prototype.inviteLinkParentGroupThumbnailV2 = $util.newBuffer([]); + + /** + * ExtendedTextMessage inviteLinkGroupTypeV2. + * @member {proto.ExtendedTextMessage.ExtendedTextMessageInviteLinkGroupType} inviteLinkGroupTypeV2 + * @memberof proto.ExtendedTextMessage + * @instance + */ + ExtendedTextMessage.prototype.inviteLinkGroupTypeV2 = 0; + /** * Creates a new ExtendedTextMessage instance using the specified properties. * @function create @@ -10499,6 +10557,12 @@ $root.proto = (function() { writer.uint32(/* id 25, wireType 0 =*/200).uint32(message.thumbnailWidth); if (message.inviteLinkGroupType != null && Object.hasOwnProperty.call(message, "inviteLinkGroupType")) writer.uint32(/* id 26, wireType 0 =*/208).int32(message.inviteLinkGroupType); + if (message.inviteLinkParentGroupSubjectV2 != null && Object.hasOwnProperty.call(message, "inviteLinkParentGroupSubjectV2")) + writer.uint32(/* id 27, wireType 2 =*/218).string(message.inviteLinkParentGroupSubjectV2); + if (message.inviteLinkParentGroupThumbnailV2 != null && Object.hasOwnProperty.call(message, "inviteLinkParentGroupThumbnailV2")) + writer.uint32(/* id 28, wireType 2 =*/226).bytes(message.inviteLinkParentGroupThumbnailV2); + if (message.inviteLinkGroupTypeV2 != null && Object.hasOwnProperty.call(message, "inviteLinkGroupTypeV2")) + writer.uint32(/* id 29, wireType 0 =*/232).int32(message.inviteLinkGroupTypeV2); return writer; }; @@ -10593,6 +10657,15 @@ $root.proto = (function() { case 26: message.inviteLinkGroupType = reader.int32(); break; + case 27: + message.inviteLinkParentGroupSubjectV2 = reader.string(); + break; + case 28: + message.inviteLinkParentGroupThumbnailV2 = reader.bytes(); + break; + case 29: + message.inviteLinkGroupTypeV2 = reader.int32(); + break; default: reader.skipType(tag & 7); break; @@ -10709,6 +10782,20 @@ $root.proto = (function() { case 1: break; } + if (message.inviteLinkParentGroupSubjectV2 != null && message.hasOwnProperty("inviteLinkParentGroupSubjectV2")) + if (!$util.isString(message.inviteLinkParentGroupSubjectV2)) + return "inviteLinkParentGroupSubjectV2: string expected"; + if (message.inviteLinkParentGroupThumbnailV2 != null && message.hasOwnProperty("inviteLinkParentGroupThumbnailV2")) + if (!(message.inviteLinkParentGroupThumbnailV2 && typeof message.inviteLinkParentGroupThumbnailV2.length === "number" || $util.isString(message.inviteLinkParentGroupThumbnailV2))) + return "inviteLinkParentGroupThumbnailV2: buffer expected"; + if (message.inviteLinkGroupTypeV2 != null && message.hasOwnProperty("inviteLinkGroupTypeV2")) + switch (message.inviteLinkGroupTypeV2) { + default: + return "inviteLinkGroupTypeV2: enum value expected"; + case 0: + case 1: + break; + } return null; }; @@ -10826,6 +10913,23 @@ $root.proto = (function() { message.inviteLinkGroupType = 1; break; } + if (object.inviteLinkParentGroupSubjectV2 != null) + message.inviteLinkParentGroupSubjectV2 = String(object.inviteLinkParentGroupSubjectV2); + if (object.inviteLinkParentGroupThumbnailV2 != null) + if (typeof object.inviteLinkParentGroupThumbnailV2 === "string") + $util.base64.decode(object.inviteLinkParentGroupThumbnailV2, message.inviteLinkParentGroupThumbnailV2 = $util.newBuffer($util.base64.length(object.inviteLinkParentGroupThumbnailV2)), 0); + else if (object.inviteLinkParentGroupThumbnailV2.length) + message.inviteLinkParentGroupThumbnailV2 = object.inviteLinkParentGroupThumbnailV2; + switch (object.inviteLinkGroupTypeV2) { + case "DEFAULT": + case 0: + message.inviteLinkGroupTypeV2 = 0; + break; + case "PARENT": + case 1: + message.inviteLinkGroupTypeV2 = 1; + break; + } return message; }; @@ -10891,6 +10995,15 @@ $root.proto = (function() { object.thumbnailHeight = 0; object.thumbnailWidth = 0; object.inviteLinkGroupType = options.enums === String ? "DEFAULT" : 0; + object.inviteLinkParentGroupSubjectV2 = ""; + if (options.bytes === String) + object.inviteLinkParentGroupThumbnailV2 = ""; + else { + object.inviteLinkParentGroupThumbnailV2 = []; + if (options.bytes !== Array) + object.inviteLinkParentGroupThumbnailV2 = $util.newBuffer(object.inviteLinkParentGroupThumbnailV2); + } + object.inviteLinkGroupTypeV2 = options.enums === String ? "DEFAULT" : 0; } if (message.text != null && message.hasOwnProperty("text")) object.text = message.text; @@ -10935,6 +11048,12 @@ $root.proto = (function() { object.thumbnailWidth = message.thumbnailWidth; if (message.inviteLinkGroupType != null && message.hasOwnProperty("inviteLinkGroupType")) object.inviteLinkGroupType = options.enums === String ? $root.proto.ExtendedTextMessage.ExtendedTextMessageInviteLinkGroupType[message.inviteLinkGroupType] : message.inviteLinkGroupType; + if (message.inviteLinkParentGroupSubjectV2 != null && message.hasOwnProperty("inviteLinkParentGroupSubjectV2")) + object.inviteLinkParentGroupSubjectV2 = message.inviteLinkParentGroupSubjectV2; + if (message.inviteLinkParentGroupThumbnailV2 != null && message.hasOwnProperty("inviteLinkParentGroupThumbnailV2")) + object.inviteLinkParentGroupThumbnailV2 = options.bytes === String ? $util.base64.encode(message.inviteLinkParentGroupThumbnailV2, 0, message.inviteLinkParentGroupThumbnailV2.length) : options.bytes === Array ? Array.prototype.slice.call(message.inviteLinkParentGroupThumbnailV2) : message.inviteLinkParentGroupThumbnailV2; + if (message.inviteLinkGroupTypeV2 != null && message.hasOwnProperty("inviteLinkGroupTypeV2")) + object.inviteLinkGroupTypeV2 = options.enums === String ? $root.proto.ExtendedTextMessage.ExtendedTextMessageInviteLinkGroupType[message.inviteLinkGroupTypeV2] : message.inviteLinkGroupTypeV2; return object; }; @@ -26225,6 +26344,234 @@ $root.proto = (function() { return PollCreationMessage; })(); + proto.PollEncValue = (function() { + + /** + * Properties of a PollEncValue. + * @memberof proto + * @interface IPollEncValue + * @property {Uint8Array|null} [encPayload] PollEncValue encPayload + * @property {Uint8Array|null} [encIv] PollEncValue encIv + */ + + /** + * Constructs a new PollEncValue. + * @memberof proto + * @classdesc Represents a PollEncValue. + * @implements IPollEncValue + * @constructor + * @param {proto.IPollEncValue=} [properties] Properties to set + */ + function PollEncValue(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]]; + } + + /** + * PollEncValue encPayload. + * @member {Uint8Array} encPayload + * @memberof proto.PollEncValue + * @instance + */ + PollEncValue.prototype.encPayload = $util.newBuffer([]); + + /** + * PollEncValue encIv. + * @member {Uint8Array} encIv + * @memberof proto.PollEncValue + * @instance + */ + PollEncValue.prototype.encIv = $util.newBuffer([]); + + /** + * Creates a new PollEncValue instance using the specified properties. + * @function create + * @memberof proto.PollEncValue + * @static + * @param {proto.IPollEncValue=} [properties] Properties to set + * @returns {proto.PollEncValue} PollEncValue instance + */ + PollEncValue.create = function create(properties) { + return new PollEncValue(properties); + }; + + /** + * Encodes the specified PollEncValue message. Does not implicitly {@link proto.PollEncValue.verify|verify} messages. + * @function encode + * @memberof proto.PollEncValue + * @static + * @param {proto.IPollEncValue} message PollEncValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PollEncValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.encPayload != null && Object.hasOwnProperty.call(message, "encPayload")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.encPayload); + if (message.encIv != null && Object.hasOwnProperty.call(message, "encIv")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.encIv); + return writer; + }; + + /** + * Encodes the specified PollEncValue message, length delimited. Does not implicitly {@link proto.PollEncValue.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.PollEncValue + * @static + * @param {proto.IPollEncValue} message PollEncValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PollEncValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PollEncValue message from the specified reader or buffer. + * @function decode + * @memberof proto.PollEncValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.PollEncValue} PollEncValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PollEncValue.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.PollEncValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.encPayload = reader.bytes(); + break; + case 2: + message.encIv = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PollEncValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.PollEncValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.PollEncValue} PollEncValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PollEncValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PollEncValue message. + * @function verify + * @memberof proto.PollEncValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PollEncValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.encPayload != null && message.hasOwnProperty("encPayload")) + if (!(message.encPayload && typeof message.encPayload.length === "number" || $util.isString(message.encPayload))) + return "encPayload: buffer expected"; + if (message.encIv != null && message.hasOwnProperty("encIv")) + if (!(message.encIv && typeof message.encIv.length === "number" || $util.isString(message.encIv))) + return "encIv: buffer expected"; + return null; + }; + + /** + * Creates a PollEncValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.PollEncValue + * @static + * @param {Object.} object Plain object + * @returns {proto.PollEncValue} PollEncValue + */ + PollEncValue.fromObject = function fromObject(object) { + if (object instanceof $root.proto.PollEncValue) + return object; + var message = new $root.proto.PollEncValue(); + if (object.encPayload != null) + if (typeof object.encPayload === "string") + $util.base64.decode(object.encPayload, message.encPayload = $util.newBuffer($util.base64.length(object.encPayload)), 0); + else if (object.encPayload.length) + message.encPayload = object.encPayload; + if (object.encIv != null) + if (typeof object.encIv === "string") + $util.base64.decode(object.encIv, message.encIv = $util.newBuffer($util.base64.length(object.encIv)), 0); + else if (object.encIv.length) + message.encIv = object.encIv; + return message; + }; + + /** + * Creates a plain object from a PollEncValue message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.PollEncValue + * @static + * @param {proto.PollEncValue} message PollEncValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PollEncValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.encPayload = ""; + else { + object.encPayload = []; + if (options.bytes !== Array) + object.encPayload = $util.newBuffer(object.encPayload); + } + if (options.bytes === String) + object.encIv = ""; + else { + object.encIv = []; + if (options.bytes !== Array) + object.encIv = $util.newBuffer(object.encIv); + } + } + if (message.encPayload != null && message.hasOwnProperty("encPayload")) + object.encPayload = options.bytes === String ? $util.base64.encode(message.encPayload, 0, message.encPayload.length) : options.bytes === Array ? Array.prototype.slice.call(message.encPayload) : message.encPayload; + if (message.encIv != null && message.hasOwnProperty("encIv")) + object.encIv = options.bytes === String ? $util.base64.encode(message.encIv, 0, message.encIv.length) : options.bytes === Array ? Array.prototype.slice.call(message.encIv) : message.encIv; + return object; + }; + + /** + * Converts this PollEncValue to JSON. + * @function toJSON + * @memberof proto.PollEncValue + * @instance + * @returns {Object.} JSON object + */ + PollEncValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PollEncValue; + })(); + proto.PollUpdateMessage = (function() { /** @@ -26232,8 +26579,7 @@ $root.proto = (function() { * @memberof proto * @interface IPollUpdateMessage * @property {proto.IMessageKey|null} [pollCreationMessageKey] PollUpdateMessage pollCreationMessageKey - * @property {Uint8Array|null} [encPayload] PollUpdateMessage encPayload - * @property {Uint8Array|null} [encIv] PollUpdateMessage encIv + * @property {proto.IPollEncValue|null} [vote] PollUpdateMessage vote */ /** @@ -26260,20 +26606,12 @@ $root.proto = (function() { PollUpdateMessage.prototype.pollCreationMessageKey = null; /** - * PollUpdateMessage encPayload. - * @member {Uint8Array} encPayload + * PollUpdateMessage vote. + * @member {proto.IPollEncValue|null|undefined} vote * @memberof proto.PollUpdateMessage * @instance */ - PollUpdateMessage.prototype.encPayload = $util.newBuffer([]); - - /** - * PollUpdateMessage encIv. - * @member {Uint8Array} encIv - * @memberof proto.PollUpdateMessage - * @instance - */ - PollUpdateMessage.prototype.encIv = $util.newBuffer([]); + PollUpdateMessage.prototype.vote = null; /** * Creates a new PollUpdateMessage instance using the specified properties. @@ -26301,10 +26639,8 @@ $root.proto = (function() { writer = $Writer.create(); if (message.pollCreationMessageKey != null && Object.hasOwnProperty.call(message, "pollCreationMessageKey")) $root.proto.MessageKey.encode(message.pollCreationMessageKey, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.encPayload != null && Object.hasOwnProperty.call(message, "encPayload")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.encPayload); - if (message.encIv != null && Object.hasOwnProperty.call(message, "encIv")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.encIv); + if (message.vote != null && Object.hasOwnProperty.call(message, "vote")) + $root.proto.PollEncValue.encode(message.vote, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -26343,10 +26679,7 @@ $root.proto = (function() { message.pollCreationMessageKey = $root.proto.MessageKey.decode(reader, reader.uint32()); break; case 2: - message.encPayload = reader.bytes(); - break; - case 3: - message.encIv = reader.bytes(); + message.vote = $root.proto.PollEncValue.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -26388,12 +26721,11 @@ $root.proto = (function() { if (error) return "pollCreationMessageKey." + error; } - if (message.encPayload != null && message.hasOwnProperty("encPayload")) - if (!(message.encPayload && typeof message.encPayload.length === "number" || $util.isString(message.encPayload))) - return "encPayload: buffer expected"; - if (message.encIv != null && message.hasOwnProperty("encIv")) - if (!(message.encIv && typeof message.encIv.length === "number" || $util.isString(message.encIv))) - return "encIv: buffer expected"; + if (message.vote != null && message.hasOwnProperty("vote")) { + var error = $root.proto.PollEncValue.verify(message.vote); + if (error) + return "vote." + error; + } return null; }; @@ -26414,16 +26746,11 @@ $root.proto = (function() { throw TypeError(".proto.PollUpdateMessage.pollCreationMessageKey: object expected"); message.pollCreationMessageKey = $root.proto.MessageKey.fromObject(object.pollCreationMessageKey); } - if (object.encPayload != null) - if (typeof object.encPayload === "string") - $util.base64.decode(object.encPayload, message.encPayload = $util.newBuffer($util.base64.length(object.encPayload)), 0); - else if (object.encPayload.length) - message.encPayload = object.encPayload; - if (object.encIv != null) - if (typeof object.encIv === "string") - $util.base64.decode(object.encIv, message.encIv = $util.newBuffer($util.base64.length(object.encIv)), 0); - else if (object.encIv.length) - message.encIv = object.encIv; + if (object.vote != null) { + if (typeof object.vote !== "object") + throw TypeError(".proto.PollUpdateMessage.vote: object expected"); + message.vote = $root.proto.PollEncValue.fromObject(object.vote); + } return message; }; @@ -26442,27 +26769,12 @@ $root.proto = (function() { var object = {}; if (options.defaults) { object.pollCreationMessageKey = null; - if (options.bytes === String) - object.encPayload = ""; - else { - object.encPayload = []; - if (options.bytes !== Array) - object.encPayload = $util.newBuffer(object.encPayload); - } - if (options.bytes === String) - object.encIv = ""; - else { - object.encIv = []; - if (options.bytes !== Array) - object.encIv = $util.newBuffer(object.encIv); - } + object.vote = null; } if (message.pollCreationMessageKey != null && message.hasOwnProperty("pollCreationMessageKey")) object.pollCreationMessageKey = $root.proto.MessageKey.toObject(message.pollCreationMessageKey, options); - if (message.encPayload != null && message.hasOwnProperty("encPayload")) - object.encPayload = options.bytes === String ? $util.base64.encode(message.encPayload, 0, message.encPayload.length) : options.bytes === Array ? Array.prototype.slice.call(message.encPayload) : message.encPayload; - if (message.encIv != null && message.hasOwnProperty("encIv")) - object.encIv = options.bytes === String ? $util.base64.encode(message.encIv, 0, message.encIv.length) : options.bytes === Array ? Array.prototype.slice.call(message.encIv) : message.encIv; + if (message.vote != null && message.hasOwnProperty("vote")) + object.vote = $root.proto.PollEncValue.toObject(message.vote, options); return object; }; @@ -26480,217 +26792,6 @@ $root.proto = (function() { return PollUpdateMessage; })(); - proto.PollUpdateMessageContent = (function() { - - /** - * Properties of a PollUpdateMessageContent. - * @memberof proto - * @interface IPollUpdateMessageContent - * @property {proto.IPollVoteMessage|null} [voteMessage] PollUpdateMessageContent voteMessage - */ - - /** - * Constructs a new PollUpdateMessageContent. - * @memberof proto - * @classdesc Represents a PollUpdateMessageContent. - * @implements IPollUpdateMessageContent - * @constructor - * @param {proto.IPollUpdateMessageContent=} [properties] Properties to set - */ - function PollUpdateMessageContent(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]]; - } - - /** - * PollUpdateMessageContent voteMessage. - * @member {proto.IPollVoteMessage|null|undefined} voteMessage - * @memberof proto.PollUpdateMessageContent - * @instance - */ - PollUpdateMessageContent.prototype.voteMessage = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * PollUpdateMessageContent update. - * @member {"voteMessage"|undefined} update - * @memberof proto.PollUpdateMessageContent - * @instance - */ - Object.defineProperty(PollUpdateMessageContent.prototype, "update", { - get: $util.oneOfGetter($oneOfFields = ["voteMessage"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new PollUpdateMessageContent instance using the specified properties. - * @function create - * @memberof proto.PollUpdateMessageContent - * @static - * @param {proto.IPollUpdateMessageContent=} [properties] Properties to set - * @returns {proto.PollUpdateMessageContent} PollUpdateMessageContent instance - */ - PollUpdateMessageContent.create = function create(properties) { - return new PollUpdateMessageContent(properties); - }; - - /** - * Encodes the specified PollUpdateMessageContent message. Does not implicitly {@link proto.PollUpdateMessageContent.verify|verify} messages. - * @function encode - * @memberof proto.PollUpdateMessageContent - * @static - * @param {proto.IPollUpdateMessageContent} message PollUpdateMessageContent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PollUpdateMessageContent.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.voteMessage != null && Object.hasOwnProperty.call(message, "voteMessage")) - $root.proto.PollVoteMessage.encode(message.voteMessage, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PollUpdateMessageContent message, length delimited. Does not implicitly {@link proto.PollUpdateMessageContent.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.PollUpdateMessageContent - * @static - * @param {proto.IPollUpdateMessageContent} message PollUpdateMessageContent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PollUpdateMessageContent.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PollUpdateMessageContent message from the specified reader or buffer. - * @function decode - * @memberof proto.PollUpdateMessageContent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.PollUpdateMessageContent} PollUpdateMessageContent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PollUpdateMessageContent.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.PollUpdateMessageContent(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.voteMessage = $root.proto.PollVoteMessage.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PollUpdateMessageContent message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.PollUpdateMessageContent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.PollUpdateMessageContent} PollUpdateMessageContent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PollUpdateMessageContent.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PollUpdateMessageContent message. - * @function verify - * @memberof proto.PollUpdateMessageContent - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PollUpdateMessageContent.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.voteMessage != null && message.hasOwnProperty("voteMessage")) { - properties.update = 1; - { - var error = $root.proto.PollVoteMessage.verify(message.voteMessage); - if (error) - return "voteMessage." + error; - } - } - return null; - }; - - /** - * Creates a PollUpdateMessageContent message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.PollUpdateMessageContent - * @static - * @param {Object.} object Plain object - * @returns {proto.PollUpdateMessageContent} PollUpdateMessageContent - */ - PollUpdateMessageContent.fromObject = function fromObject(object) { - if (object instanceof $root.proto.PollUpdateMessageContent) - return object; - var message = new $root.proto.PollUpdateMessageContent(); - if (object.voteMessage != null) { - if (typeof object.voteMessage !== "object") - throw TypeError(".proto.PollUpdateMessageContent.voteMessage: object expected"); - message.voteMessage = $root.proto.PollVoteMessage.fromObject(object.voteMessage); - } - return message; - }; - - /** - * Creates a plain object from a PollUpdateMessageContent message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.PollUpdateMessageContent - * @static - * @param {proto.PollUpdateMessageContent} message PollUpdateMessageContent - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PollUpdateMessageContent.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.voteMessage != null && message.hasOwnProperty("voteMessage")) { - object.voteMessage = $root.proto.PollVoteMessage.toObject(message.voteMessage, options); - if (options.oneofs) - object.update = "voteMessage"; - } - return object; - }; - - /** - * Converts this PollUpdateMessageContent to JSON. - * @function toJSON - * @memberof proto.PollUpdateMessageContent - * @instance - * @returns {Object.} JSON object - */ - PollUpdateMessageContent.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return PollUpdateMessageContent; - })(); - proto.PollVoteMessage = (function() { /** @@ -48344,6 +48445,7 @@ $root.proto = (function() { * @property {proto.IAgentAction|null} [agentAction] SyncActionValue agentAction * @property {proto.ISubscriptionAction|null} [subscriptionAction] SyncActionValue subscriptionAction * @property {proto.IUserStatusMuteAction|null} [userStatusMuteAction] SyncActionValue userStatusMuteAction + * @property {proto.ITimeFormatAction|null} [timeFormatAction] SyncActionValue timeFormatAction */ /** @@ -48577,6 +48679,14 @@ $root.proto = (function() { */ SyncActionValue.prototype.userStatusMuteAction = null; + /** + * SyncActionValue timeFormatAction. + * @member {proto.ITimeFormatAction|null|undefined} timeFormatAction + * @memberof proto.SyncActionValue + * @instance + */ + SyncActionValue.prototype.timeFormatAction = null; + /** * Creates a new SyncActionValue instance using the specified properties. * @function create @@ -48655,6 +48765,8 @@ $root.proto = (function() { $root.proto.SubscriptionAction.encode(message.subscriptionAction, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); if (message.userStatusMuteAction != null && Object.hasOwnProperty.call(message, "userStatusMuteAction")) $root.proto.UserStatusMuteAction.encode(message.userStatusMuteAction, writer.uint32(/* id 29, wireType 2 =*/234).fork()).ldelim(); + if (message.timeFormatAction != null && Object.hasOwnProperty.call(message, "timeFormatAction")) + $root.proto.TimeFormatAction.encode(message.timeFormatAction, writer.uint32(/* id 30, wireType 2 =*/242).fork()).ldelim(); return writer; }; @@ -48770,6 +48882,9 @@ $root.proto = (function() { case 29: message.userStatusMuteAction = $root.proto.UserStatusMuteAction.decode(reader, reader.uint32()); break; + case 30: + message.timeFormatAction = $root.proto.TimeFormatAction.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -48938,6 +49053,11 @@ $root.proto = (function() { if (error) return "userStatusMuteAction." + error; } + if (message.timeFormatAction != null && message.hasOwnProperty("timeFormatAction")) { + var error = $root.proto.TimeFormatAction.verify(message.timeFormatAction); + if (error) + return "timeFormatAction." + error; + } return null; }; @@ -49092,6 +49212,11 @@ $root.proto = (function() { throw TypeError(".proto.SyncActionValue.userStatusMuteAction: object expected"); message.userStatusMuteAction = $root.proto.UserStatusMuteAction.fromObject(object.userStatusMuteAction); } + if (object.timeFormatAction != null) { + if (typeof object.timeFormatAction !== "object") + throw TypeError(".proto.SyncActionValue.timeFormatAction: object expected"); + message.timeFormatAction = $root.proto.TimeFormatAction.fromObject(object.timeFormatAction); + } return message; }; @@ -49140,6 +49265,7 @@ $root.proto = (function() { object.agentAction = null; object.subscriptionAction = null; object.userStatusMuteAction = null; + object.timeFormatAction = null; } if (message.timestamp != null && message.hasOwnProperty("timestamp")) if (typeof message.timestamp === "number") @@ -49198,6 +49324,8 @@ $root.proto = (function() { object.subscriptionAction = $root.proto.SubscriptionAction.toObject(message.subscriptionAction, options); if (message.userStatusMuteAction != null && message.hasOwnProperty("userStatusMuteAction")) object.userStatusMuteAction = $root.proto.UserStatusMuteAction.toObject(message.userStatusMuteAction, options); + if (message.timeFormatAction != null && message.hasOwnProperty("timeFormatAction")) + object.timeFormatAction = $root.proto.TimeFormatAction.toObject(message.timeFormatAction, options); return object; }; @@ -49215,6 +49343,193 @@ $root.proto = (function() { return SyncActionValue; })(); + proto.TimeFormatAction = (function() { + + /** + * Properties of a TimeFormatAction. + * @memberof proto + * @interface ITimeFormatAction + * @property {boolean|null} [isTwentyFourHourFormatEnabled] TimeFormatAction isTwentyFourHourFormatEnabled + */ + + /** + * Constructs a new TimeFormatAction. + * @memberof proto + * @classdesc Represents a TimeFormatAction. + * @implements ITimeFormatAction + * @constructor + * @param {proto.ITimeFormatAction=} [properties] Properties to set + */ + function TimeFormatAction(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]]; + } + + /** + * TimeFormatAction isTwentyFourHourFormatEnabled. + * @member {boolean} isTwentyFourHourFormatEnabled + * @memberof proto.TimeFormatAction + * @instance + */ + TimeFormatAction.prototype.isTwentyFourHourFormatEnabled = false; + + /** + * Creates a new TimeFormatAction instance using the specified properties. + * @function create + * @memberof proto.TimeFormatAction + * @static + * @param {proto.ITimeFormatAction=} [properties] Properties to set + * @returns {proto.TimeFormatAction} TimeFormatAction instance + */ + TimeFormatAction.create = function create(properties) { + return new TimeFormatAction(properties); + }; + + /** + * Encodes the specified TimeFormatAction message. Does not implicitly {@link proto.TimeFormatAction.verify|verify} messages. + * @function encode + * @memberof proto.TimeFormatAction + * @static + * @param {proto.ITimeFormatAction} message TimeFormatAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeFormatAction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.isTwentyFourHourFormatEnabled != null && Object.hasOwnProperty.call(message, "isTwentyFourHourFormatEnabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.isTwentyFourHourFormatEnabled); + return writer; + }; + + /** + * Encodes the specified TimeFormatAction message, length delimited. Does not implicitly {@link proto.TimeFormatAction.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.TimeFormatAction + * @static + * @param {proto.ITimeFormatAction} message TimeFormatAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeFormatAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TimeFormatAction message from the specified reader or buffer. + * @function decode + * @memberof proto.TimeFormatAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.TimeFormatAction} TimeFormatAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeFormatAction.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.TimeFormatAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.isTwentyFourHourFormatEnabled = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TimeFormatAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.TimeFormatAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.TimeFormatAction} TimeFormatAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeFormatAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TimeFormatAction message. + * @function verify + * @memberof proto.TimeFormatAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TimeFormatAction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.isTwentyFourHourFormatEnabled != null && message.hasOwnProperty("isTwentyFourHourFormatEnabled")) + if (typeof message.isTwentyFourHourFormatEnabled !== "boolean") + return "isTwentyFourHourFormatEnabled: boolean expected"; + return null; + }; + + /** + * Creates a TimeFormatAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.TimeFormatAction + * @static + * @param {Object.} object Plain object + * @returns {proto.TimeFormatAction} TimeFormatAction + */ + TimeFormatAction.fromObject = function fromObject(object) { + if (object instanceof $root.proto.TimeFormatAction) + return object; + var message = new $root.proto.TimeFormatAction(); + if (object.isTwentyFourHourFormatEnabled != null) + message.isTwentyFourHourFormatEnabled = Boolean(object.isTwentyFourHourFormatEnabled); + return message; + }; + + /** + * Creates a plain object from a TimeFormatAction message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.TimeFormatAction + * @static + * @param {proto.TimeFormatAction} message TimeFormatAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TimeFormatAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.isTwentyFourHourFormatEnabled = false; + if (message.isTwentyFourHourFormatEnabled != null && message.hasOwnProperty("isTwentyFourHourFormatEnabled")) + object.isTwentyFourHourFormatEnabled = message.isTwentyFourHourFormatEnabled; + return object; + }; + + /** + * Converts this TimeFormatAction to JSON. + * @function toJSON + * @memberof proto.TimeFormatAction + * @instance + * @returns {Object.} JSON object + */ + TimeFormatAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TimeFormatAction; + })(); + proto.UnarchiveChatsSetting = (function() { /** @@ -51444,6 +51759,226 @@ $root.proto = (function() { return VerifiedNameDetails; })(); + proto.CertChain = (function() { + + /** + * Properties of a CertChain. + * @memberof proto + * @interface ICertChain + * @property {proto.INoiseCertificate|null} [leaf] CertChain leaf + * @property {proto.INoiseCertificate|null} [intermediate] CertChain intermediate + */ + + /** + * Constructs a new CertChain. + * @memberof proto + * @classdesc Represents a CertChain. + * @implements ICertChain + * @constructor + * @param {proto.ICertChain=} [properties] Properties to set + */ + function CertChain(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CertChain leaf. + * @member {proto.INoiseCertificate|null|undefined} leaf + * @memberof proto.CertChain + * @instance + */ + CertChain.prototype.leaf = null; + + /** + * CertChain intermediate. + * @member {proto.INoiseCertificate|null|undefined} intermediate + * @memberof proto.CertChain + * @instance + */ + CertChain.prototype.intermediate = null; + + /** + * Creates a new CertChain instance using the specified properties. + * @function create + * @memberof proto.CertChain + * @static + * @param {proto.ICertChain=} [properties] Properties to set + * @returns {proto.CertChain} CertChain instance + */ + CertChain.create = function create(properties) { + return new CertChain(properties); + }; + + /** + * Encodes the specified CertChain message. Does not implicitly {@link proto.CertChain.verify|verify} messages. + * @function encode + * @memberof proto.CertChain + * @static + * @param {proto.ICertChain} message CertChain message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CertChain.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.leaf != null && Object.hasOwnProperty.call(message, "leaf")) + $root.proto.NoiseCertificate.encode(message.leaf, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.intermediate != null && Object.hasOwnProperty.call(message, "intermediate")) + $root.proto.NoiseCertificate.encode(message.intermediate, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CertChain message, length delimited. Does not implicitly {@link proto.CertChain.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.CertChain + * @static + * @param {proto.ICertChain} message CertChain message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CertChain.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CertChain message from the specified reader or buffer. + * @function decode + * @memberof proto.CertChain + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.CertChain} CertChain + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CertChain.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.CertChain(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.leaf = $root.proto.NoiseCertificate.decode(reader, reader.uint32()); + break; + case 2: + message.intermediate = $root.proto.NoiseCertificate.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CertChain message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.CertChain + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.CertChain} CertChain + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CertChain.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CertChain message. + * @function verify + * @memberof proto.CertChain + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CertChain.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.leaf != null && message.hasOwnProperty("leaf")) { + var error = $root.proto.NoiseCertificate.verify(message.leaf); + if (error) + return "leaf." + error; + } + if (message.intermediate != null && message.hasOwnProperty("intermediate")) { + var error = $root.proto.NoiseCertificate.verify(message.intermediate); + if (error) + return "intermediate." + error; + } + return null; + }; + + /** + * Creates a CertChain message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.CertChain + * @static + * @param {Object.} object Plain object + * @returns {proto.CertChain} CertChain + */ + CertChain.fromObject = function fromObject(object) { + if (object instanceof $root.proto.CertChain) + return object; + var message = new $root.proto.CertChain(); + if (object.leaf != null) { + if (typeof object.leaf !== "object") + throw TypeError(".proto.CertChain.leaf: object expected"); + message.leaf = $root.proto.NoiseCertificate.fromObject(object.leaf); + } + if (object.intermediate != null) { + if (typeof object.intermediate !== "object") + throw TypeError(".proto.CertChain.intermediate: object expected"); + message.intermediate = $root.proto.NoiseCertificate.fromObject(object.intermediate); + } + return message; + }; + + /** + * Creates a plain object from a CertChain message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.CertChain + * @static + * @param {proto.CertChain} message CertChain + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CertChain.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.leaf = null; + object.intermediate = null; + } + if (message.leaf != null && message.hasOwnProperty("leaf")) + object.leaf = $root.proto.NoiseCertificate.toObject(message.leaf, options); + if (message.intermediate != null && message.hasOwnProperty("intermediate")) + object.intermediate = $root.proto.NoiseCertificate.toObject(message.intermediate, options); + return object; + }; + + /** + * Converts this CertChain to JSON. + * @function toJSON + * @memberof proto.CertChain + * @instance + * @returns {Object.} JSON object + */ + CertChain.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CertChain; + })(); + proto.ClientFinish = (function() { /** @@ -53348,6 +53883,319 @@ $root.proto = (function() { return CompanionRegData; })(); + proto.Details = (function() { + + /** + * Properties of a Details. + * @memberof proto + * @interface IDetails + * @property {number|null} [serial] Details serial + * @property {number|null} [issuerSerial] Details issuerSerial + * @property {Uint8Array|null} [key] Details key + * @property {number|Long|null} [notBefore] Details notBefore + * @property {number|Long|null} [notAfter] Details notAfter + */ + + /** + * Constructs a new Details. + * @memberof proto + * @classdesc Represents a Details. + * @implements IDetails + * @constructor + * @param {proto.IDetails=} [properties] Properties to set + */ + function Details(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Details serial. + * @member {number} serial + * @memberof proto.Details + * @instance + */ + Details.prototype.serial = 0; + + /** + * Details issuerSerial. + * @member {number} issuerSerial + * @memberof proto.Details + * @instance + */ + Details.prototype.issuerSerial = 0; + + /** + * Details key. + * @member {Uint8Array} key + * @memberof proto.Details + * @instance + */ + Details.prototype.key = $util.newBuffer([]); + + /** + * Details notBefore. + * @member {number|Long} notBefore + * @memberof proto.Details + * @instance + */ + Details.prototype.notBefore = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Details notAfter. + * @member {number|Long} notAfter + * @memberof proto.Details + * @instance + */ + Details.prototype.notAfter = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new Details instance using the specified properties. + * @function create + * @memberof proto.Details + * @static + * @param {proto.IDetails=} [properties] Properties to set + * @returns {proto.Details} Details instance + */ + Details.create = function create(properties) { + return new Details(properties); + }; + + /** + * Encodes the specified Details message. Does not implicitly {@link proto.Details.verify|verify} messages. + * @function encode + * @memberof proto.Details + * @static + * @param {proto.IDetails} message Details message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Details.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.serial != null && Object.hasOwnProperty.call(message, "serial")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.serial); + if (message.issuerSerial != null && Object.hasOwnProperty.call(message, "issuerSerial")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.issuerSerial); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.key); + if (message.notBefore != null && Object.hasOwnProperty.call(message, "notBefore")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.notBefore); + if (message.notAfter != null && Object.hasOwnProperty.call(message, "notAfter")) + writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.notAfter); + return writer; + }; + + /** + * Encodes the specified Details message, length delimited. Does not implicitly {@link proto.Details.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Details + * @static + * @param {proto.IDetails} message Details message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Details.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Details message from the specified reader or buffer. + * @function decode + * @memberof proto.Details + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Details} Details + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Details.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Details(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.serial = reader.uint32(); + break; + case 2: + message.issuerSerial = reader.uint32(); + break; + case 3: + message.key = reader.bytes(); + break; + case 4: + message.notBefore = reader.uint64(); + break; + case 5: + message.notAfter = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Details message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Details + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Details} Details + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Details.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Details message. + * @function verify + * @memberof proto.Details + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Details.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.serial != null && message.hasOwnProperty("serial")) + if (!$util.isInteger(message.serial)) + return "serial: integer expected"; + if (message.issuerSerial != null && message.hasOwnProperty("issuerSerial")) + if (!$util.isInteger(message.issuerSerial)) + return "issuerSerial: integer expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) + return "key: buffer expected"; + if (message.notBefore != null && message.hasOwnProperty("notBefore")) + if (!$util.isInteger(message.notBefore) && !(message.notBefore && $util.isInteger(message.notBefore.low) && $util.isInteger(message.notBefore.high))) + return "notBefore: integer|Long expected"; + if (message.notAfter != null && message.hasOwnProperty("notAfter")) + if (!$util.isInteger(message.notAfter) && !(message.notAfter && $util.isInteger(message.notAfter.low) && $util.isInteger(message.notAfter.high))) + return "notAfter: integer|Long expected"; + return null; + }; + + /** + * Creates a Details message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Details + * @static + * @param {Object.} object Plain object + * @returns {proto.Details} Details + */ + Details.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Details) + return object; + var message = new $root.proto.Details(); + if (object.serial != null) + message.serial = object.serial >>> 0; + if (object.issuerSerial != null) + message.issuerSerial = object.issuerSerial >>> 0; + if (object.key != null) + if (typeof object.key === "string") + $util.base64.decode(object.key, message.key = $util.newBuffer($util.base64.length(object.key)), 0); + else if (object.key.length) + message.key = object.key; + if (object.notBefore != null) + if ($util.Long) + (message.notBefore = $util.Long.fromValue(object.notBefore)).unsigned = true; + else if (typeof object.notBefore === "string") + message.notBefore = parseInt(object.notBefore, 10); + else if (typeof object.notBefore === "number") + message.notBefore = object.notBefore; + else if (typeof object.notBefore === "object") + message.notBefore = new $util.LongBits(object.notBefore.low >>> 0, object.notBefore.high >>> 0).toNumber(true); + if (object.notAfter != null) + if ($util.Long) + (message.notAfter = $util.Long.fromValue(object.notAfter)).unsigned = true; + else if (typeof object.notAfter === "string") + message.notAfter = parseInt(object.notAfter, 10); + else if (typeof object.notAfter === "number") + message.notAfter = object.notAfter; + else if (typeof object.notAfter === "object") + message.notAfter = new $util.LongBits(object.notAfter.low >>> 0, object.notAfter.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a Details message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Details + * @static + * @param {proto.Details} message Details + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Details.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.serial = 0; + object.issuerSerial = 0; + if (options.bytes === String) + object.key = ""; + else { + object.key = []; + if (options.bytes !== Array) + object.key = $util.newBuffer(object.key); + } + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.notBefore = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.notBefore = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.notAfter = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.notAfter = options.longs === String ? "0" : 0; + } + if (message.serial != null && message.hasOwnProperty("serial")) + object.serial = message.serial; + if (message.issuerSerial != null && message.hasOwnProperty("issuerSerial")) + object.issuerSerial = message.issuerSerial; + if (message.key != null && message.hasOwnProperty("key")) + object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; + if (message.notBefore != null && message.hasOwnProperty("notBefore")) + if (typeof message.notBefore === "number") + object.notBefore = options.longs === String ? String(message.notBefore) : message.notBefore; + else + object.notBefore = options.longs === String ? $util.Long.prototype.toString.call(message.notBefore) : options.longs === Number ? new $util.LongBits(message.notBefore.low >>> 0, message.notBefore.high >>> 0).toNumber(true) : message.notBefore; + if (message.notAfter != null && message.hasOwnProperty("notAfter")) + if (typeof message.notAfter === "number") + object.notAfter = options.longs === String ? String(message.notAfter) : message.notAfter; + else + object.notAfter = options.longs === String ? $util.Long.prototype.toString.call(message.notAfter) : options.longs === Number ? new $util.LongBits(message.notAfter.low >>> 0, message.notAfter.high >>> 0).toNumber(true) : message.notAfter; + return object; + }; + + /** + * Converts this Details to JSON. + * @function toJSON + * @memberof proto.Details + * @instance + * @returns {Object.} JSON object + */ + Details.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Details; + })(); + proto.DNSSource = (function() { /** @@ -54081,305 +54929,6 @@ $root.proto = (function() { return NoiseCertificate; })(); - proto.NoiseCertificateDetails = (function() { - - /** - * Properties of a NoiseCertificateDetails. - * @memberof proto - * @interface INoiseCertificateDetails - * @property {number|null} [serial] NoiseCertificateDetails serial - * @property {string|null} [issuer] NoiseCertificateDetails issuer - * @property {number|Long|null} [expires] NoiseCertificateDetails expires - * @property {string|null} [subject] NoiseCertificateDetails subject - * @property {Uint8Array|null} [key] NoiseCertificateDetails key - */ - - /** - * Constructs a new NoiseCertificateDetails. - * @memberof proto - * @classdesc Represents a NoiseCertificateDetails. - * @implements INoiseCertificateDetails - * @constructor - * @param {proto.INoiseCertificateDetails=} [properties] Properties to set - */ - function NoiseCertificateDetails(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]]; - } - - /** - * NoiseCertificateDetails serial. - * @member {number} serial - * @memberof proto.NoiseCertificateDetails - * @instance - */ - NoiseCertificateDetails.prototype.serial = 0; - - /** - * NoiseCertificateDetails issuer. - * @member {string} issuer - * @memberof proto.NoiseCertificateDetails - * @instance - */ - NoiseCertificateDetails.prototype.issuer = ""; - - /** - * NoiseCertificateDetails expires. - * @member {number|Long} expires - * @memberof proto.NoiseCertificateDetails - * @instance - */ - NoiseCertificateDetails.prototype.expires = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * NoiseCertificateDetails subject. - * @member {string} subject - * @memberof proto.NoiseCertificateDetails - * @instance - */ - NoiseCertificateDetails.prototype.subject = ""; - - /** - * NoiseCertificateDetails key. - * @member {Uint8Array} key - * @memberof proto.NoiseCertificateDetails - * @instance - */ - NoiseCertificateDetails.prototype.key = $util.newBuffer([]); - - /** - * Creates a new NoiseCertificateDetails instance using the specified properties. - * @function create - * @memberof proto.NoiseCertificateDetails - * @static - * @param {proto.INoiseCertificateDetails=} [properties] Properties to set - * @returns {proto.NoiseCertificateDetails} NoiseCertificateDetails instance - */ - NoiseCertificateDetails.create = function create(properties) { - return new NoiseCertificateDetails(properties); - }; - - /** - * Encodes the specified NoiseCertificateDetails message. Does not implicitly {@link proto.NoiseCertificateDetails.verify|verify} messages. - * @function encode - * @memberof proto.NoiseCertificateDetails - * @static - * @param {proto.INoiseCertificateDetails} message NoiseCertificateDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NoiseCertificateDetails.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.serial != null && Object.hasOwnProperty.call(message, "serial")) - writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.serial); - if (message.issuer != null && Object.hasOwnProperty.call(message, "issuer")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.issuer); - if (message.expires != null && Object.hasOwnProperty.call(message, "expires")) - writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.expires); - if (message.subject != null && Object.hasOwnProperty.call(message, "subject")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.subject); - if (message.key != null && Object.hasOwnProperty.call(message, "key")) - writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.key); - return writer; - }; - - /** - * Encodes the specified NoiseCertificateDetails message, length delimited. Does not implicitly {@link proto.NoiseCertificateDetails.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.NoiseCertificateDetails - * @static - * @param {proto.INoiseCertificateDetails} message NoiseCertificateDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NoiseCertificateDetails.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NoiseCertificateDetails message from the specified reader or buffer. - * @function decode - * @memberof proto.NoiseCertificateDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.NoiseCertificateDetails} NoiseCertificateDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NoiseCertificateDetails.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.NoiseCertificateDetails(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.serial = reader.uint32(); - break; - case 2: - message.issuer = reader.string(); - break; - case 3: - message.expires = reader.uint64(); - break; - case 4: - message.subject = reader.string(); - break; - case 5: - message.key = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NoiseCertificateDetails message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.NoiseCertificateDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.NoiseCertificateDetails} NoiseCertificateDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NoiseCertificateDetails.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NoiseCertificateDetails message. - * @function verify - * @memberof proto.NoiseCertificateDetails - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NoiseCertificateDetails.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.serial != null && message.hasOwnProperty("serial")) - if (!$util.isInteger(message.serial)) - return "serial: integer expected"; - if (message.issuer != null && message.hasOwnProperty("issuer")) - if (!$util.isString(message.issuer)) - return "issuer: string expected"; - if (message.expires != null && message.hasOwnProperty("expires")) - if (!$util.isInteger(message.expires) && !(message.expires && $util.isInteger(message.expires.low) && $util.isInteger(message.expires.high))) - return "expires: integer|Long expected"; - if (message.subject != null && message.hasOwnProperty("subject")) - if (!$util.isString(message.subject)) - return "subject: string expected"; - if (message.key != null && message.hasOwnProperty("key")) - if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) - return "key: buffer expected"; - return null; - }; - - /** - * Creates a NoiseCertificateDetails message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.NoiseCertificateDetails - * @static - * @param {Object.} object Plain object - * @returns {proto.NoiseCertificateDetails} NoiseCertificateDetails - */ - NoiseCertificateDetails.fromObject = function fromObject(object) { - if (object instanceof $root.proto.NoiseCertificateDetails) - return object; - var message = new $root.proto.NoiseCertificateDetails(); - if (object.serial != null) - message.serial = object.serial >>> 0; - if (object.issuer != null) - message.issuer = String(object.issuer); - if (object.expires != null) - if ($util.Long) - (message.expires = $util.Long.fromValue(object.expires)).unsigned = true; - else if (typeof object.expires === "string") - message.expires = parseInt(object.expires, 10); - else if (typeof object.expires === "number") - message.expires = object.expires; - else if (typeof object.expires === "object") - message.expires = new $util.LongBits(object.expires.low >>> 0, object.expires.high >>> 0).toNumber(true); - if (object.subject != null) - message.subject = String(object.subject); - if (object.key != null) - if (typeof object.key === "string") - $util.base64.decode(object.key, message.key = $util.newBuffer($util.base64.length(object.key)), 0); - else if (object.key.length) - message.key = object.key; - return message; - }; - - /** - * Creates a plain object from a NoiseCertificateDetails message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.NoiseCertificateDetails - * @static - * @param {proto.NoiseCertificateDetails} message NoiseCertificateDetails - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NoiseCertificateDetails.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.serial = 0; - object.issuer = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.expires = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.expires = options.longs === String ? "0" : 0; - object.subject = ""; - if (options.bytes === String) - object.key = ""; - else { - object.key = []; - if (options.bytes !== Array) - object.key = $util.newBuffer(object.key); - } - } - if (message.serial != null && message.hasOwnProperty("serial")) - object.serial = message.serial; - if (message.issuer != null && message.hasOwnProperty("issuer")) - object.issuer = message.issuer; - if (message.expires != null && message.hasOwnProperty("expires")) - if (typeof message.expires === "number") - object.expires = options.longs === String ? String(message.expires) : message.expires; - else - object.expires = options.longs === String ? $util.Long.prototype.toString.call(message.expires) : options.longs === Number ? new $util.LongBits(message.expires.low >>> 0, message.expires.high >>> 0).toNumber(true) : message.expires; - if (message.subject != null && message.hasOwnProperty("subject")) - object.subject = message.subject; - if (message.key != null && message.hasOwnProperty("key")) - object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; - return object; - }; - - /** - * Converts this NoiseCertificateDetails to JSON. - * @function toJSON - * @memberof proto.NoiseCertificateDetails - * @instance - * @returns {Object.} JSON object - */ - NoiseCertificateDetails.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return NoiseCertificateDetails; - })(); - proto.ServerHello = (function() { /** @@ -57856,7 +58405,7 @@ $root.proto = (function() { * @memberof proto * @interface IPollUpdate * @property {proto.IMessageKey|null} [pollUpdateMessageKey] PollUpdate pollUpdateMessageKey - * @property {proto.IPollUpdateMessageContent|null} [pollUpdateMessage] PollUpdate pollUpdateMessage + * @property {proto.IPollVoteMessage|null} [vote] PollUpdate vote */ /** @@ -57883,12 +58432,12 @@ $root.proto = (function() { PollUpdate.prototype.pollUpdateMessageKey = null; /** - * PollUpdate pollUpdateMessage. - * @member {proto.IPollUpdateMessageContent|null|undefined} pollUpdateMessage + * PollUpdate vote. + * @member {proto.IPollVoteMessage|null|undefined} vote * @memberof proto.PollUpdate * @instance */ - PollUpdate.prototype.pollUpdateMessage = null; + PollUpdate.prototype.vote = null; /** * Creates a new PollUpdate instance using the specified properties. @@ -57916,8 +58465,8 @@ $root.proto = (function() { writer = $Writer.create(); if (message.pollUpdateMessageKey != null && Object.hasOwnProperty.call(message, "pollUpdateMessageKey")) $root.proto.MessageKey.encode(message.pollUpdateMessageKey, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.pollUpdateMessage != null && Object.hasOwnProperty.call(message, "pollUpdateMessage")) - $root.proto.PollUpdateMessageContent.encode(message.pollUpdateMessage, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.vote != null && Object.hasOwnProperty.call(message, "vote")) + $root.proto.PollVoteMessage.encode(message.vote, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -57956,7 +58505,7 @@ $root.proto = (function() { message.pollUpdateMessageKey = $root.proto.MessageKey.decode(reader, reader.uint32()); break; case 2: - message.pollUpdateMessage = $root.proto.PollUpdateMessageContent.decode(reader, reader.uint32()); + message.vote = $root.proto.PollVoteMessage.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -57998,10 +58547,10 @@ $root.proto = (function() { if (error) return "pollUpdateMessageKey." + error; } - if (message.pollUpdateMessage != null && message.hasOwnProperty("pollUpdateMessage")) { - var error = $root.proto.PollUpdateMessageContent.verify(message.pollUpdateMessage); + if (message.vote != null && message.hasOwnProperty("vote")) { + var error = $root.proto.PollVoteMessage.verify(message.vote); if (error) - return "pollUpdateMessage." + error; + return "vote." + error; } return null; }; @@ -58023,10 +58572,10 @@ $root.proto = (function() { throw TypeError(".proto.PollUpdate.pollUpdateMessageKey: object expected"); message.pollUpdateMessageKey = $root.proto.MessageKey.fromObject(object.pollUpdateMessageKey); } - if (object.pollUpdateMessage != null) { - if (typeof object.pollUpdateMessage !== "object") - throw TypeError(".proto.PollUpdate.pollUpdateMessage: object expected"); - message.pollUpdateMessage = $root.proto.PollUpdateMessageContent.fromObject(object.pollUpdateMessage); + if (object.vote != null) { + if (typeof object.vote !== "object") + throw TypeError(".proto.PollUpdate.vote: object expected"); + message.vote = $root.proto.PollVoteMessage.fromObject(object.vote); } return message; }; @@ -58046,12 +58595,12 @@ $root.proto = (function() { var object = {}; if (options.defaults) { object.pollUpdateMessageKey = null; - object.pollUpdateMessage = null; + object.vote = null; } if (message.pollUpdateMessageKey != null && message.hasOwnProperty("pollUpdateMessageKey")) object.pollUpdateMessageKey = $root.proto.MessageKey.toObject(message.pollUpdateMessageKey, options); - if (message.pollUpdateMessage != null && message.hasOwnProperty("pollUpdateMessage")) - object.pollUpdateMessage = $root.proto.PollUpdateMessageContent.toObject(message.pollUpdateMessage, options); + if (message.vote != null && message.hasOwnProperty("vote")) + object.vote = $root.proto.PollVoteMessage.toObject(message.vote, options); return object; }; @@ -61229,6 +61778,8 @@ $root.proto = (function() { * @property {Array.|null} [pollUpdates] WebMessageInfo pollUpdates * @property {proto.IPollAdditionalMetadata|null} [pollAdditionalMetadata] WebMessageInfo pollAdditionalMetadata * @property {string|null} [agentId] WebMessageInfo agentId + * @property {boolean|null} [statusAlreadyViewed] WebMessageInfo statusAlreadyViewed + * @property {Uint8Array|null} [messageSecret] WebMessageInfo messageSecret */ /** @@ -61555,6 +62106,22 @@ $root.proto = (function() { */ WebMessageInfo.prototype.agentId = ""; + /** + * WebMessageInfo statusAlreadyViewed. + * @member {boolean} statusAlreadyViewed + * @memberof proto.WebMessageInfo + * @instance + */ + WebMessageInfo.prototype.statusAlreadyViewed = false; + + /** + * WebMessageInfo messageSecret. + * @member {Uint8Array} messageSecret + * @memberof proto.WebMessageInfo + * @instance + */ + WebMessageInfo.prototype.messageSecret = $util.newBuffer([]); + /** * Creates a new WebMessageInfo instance using the specified properties. * @function create @@ -61659,6 +62226,10 @@ $root.proto = (function() { $root.proto.PollAdditionalMetadata.encode(message.pollAdditionalMetadata, writer.uint32(/* id 46, wireType 2 =*/370).fork()).ldelim(); if (message.agentId != null && Object.hasOwnProperty.call(message, "agentId")) writer.uint32(/* id 47, wireType 2 =*/378).string(message.agentId); + if (message.statusAlreadyViewed != null && Object.hasOwnProperty.call(message, "statusAlreadyViewed")) + writer.uint32(/* id 48, wireType 0 =*/384).bool(message.statusAlreadyViewed); + if (message.messageSecret != null && Object.hasOwnProperty.call(message, "messageSecret")) + writer.uint32(/* id 49, wireType 2 =*/394).bytes(message.messageSecret); return writer; }; @@ -61817,6 +62388,12 @@ $root.proto = (function() { case 47: message.agentId = reader.string(); break; + case 48: + message.statusAlreadyViewed = reader.bool(); + break; + case 49: + message.messageSecret = reader.bytes(); + break; default: reader.skipType(tag & 7); break; @@ -62050,6 +62627,12 @@ $root.proto = (function() { case 134: case 135: case 136: + case 137: + case 138: + case 139: + case 140: + case 141: + case 142: break; } if (message.clearMedia != null && message.hasOwnProperty("clearMedia")) @@ -62170,6 +62753,12 @@ $root.proto = (function() { if (message.agentId != null && message.hasOwnProperty("agentId")) if (!$util.isString(message.agentId)) return "agentId: string expected"; + if (message.statusAlreadyViewed != null && message.hasOwnProperty("statusAlreadyViewed")) + if (typeof message.statusAlreadyViewed !== "boolean") + return "statusAlreadyViewed: boolean expected"; + if (message.messageSecret != null && message.hasOwnProperty("messageSecret")) + if (!(message.messageSecret && typeof message.messageSecret.length === "number" || $util.isString(message.messageSecret))) + return "messageSecret: buffer expected"; return null; }; @@ -62809,6 +63398,30 @@ $root.proto = (function() { case 136: message.messageStubType = 136; break; + case "COMMUNITY_UNLINK_PARENT_GROUP": + case 137: + message.messageStubType = 137; + break; + case "COMMUNITY_UNLINK_SIBLING_GROUP": + case 138: + message.messageStubType = 138; + break; + case "COMMUNITY_UNLINK_SUB_GROUP": + case 139: + message.messageStubType = 139; + break; + case "GROUP_PARTICIPANT_ACCEPT": + case 140: + message.messageStubType = 140; + break; + case "GROUP_PARTICIPANT_LINKED_GROUP_JOIN": + case 141: + message.messageStubType = 141; + break; + case "COMMUNITY_CREATE": + case 142: + message.messageStubType = 142; + break; } if (object.clearMedia != null) message.clearMedia = Boolean(object.clearMedia); @@ -62940,6 +63553,13 @@ $root.proto = (function() { } if (object.agentId != null) message.agentId = String(object.agentId); + if (object.statusAlreadyViewed != null) + message.statusAlreadyViewed = Boolean(object.statusAlreadyViewed); + if (object.messageSecret != null) + if (typeof object.messageSecret === "string") + $util.base64.decode(object.messageSecret, message.messageSecret = $util.newBuffer($util.base64.length(object.messageSecret)), 0); + else if (object.messageSecret.length) + message.messageSecret = object.messageSecret; return message; }; @@ -63021,6 +63641,14 @@ $root.proto = (function() { object.statusPsa = null; object.pollAdditionalMetadata = null; object.agentId = ""; + object.statusAlreadyViewed = false; + if (options.bytes === String) + object.messageSecret = ""; + else { + object.messageSecret = []; + if (options.bytes !== Array) + object.messageSecret = $util.newBuffer(object.messageSecret); + } } if (message.key != null && message.hasOwnProperty("key")) object.key = $root.proto.MessageKey.toObject(message.key, options); @@ -63122,6 +63750,10 @@ $root.proto = (function() { object.pollAdditionalMetadata = $root.proto.PollAdditionalMetadata.toObject(message.pollAdditionalMetadata, options); if (message.agentId != null && message.hasOwnProperty("agentId")) object.agentId = message.agentId; + if (message.statusAlreadyViewed != null && message.hasOwnProperty("statusAlreadyViewed")) + object.statusAlreadyViewed = message.statusAlreadyViewed; + if (message.messageSecret != null && message.hasOwnProperty("messageSecret")) + object.messageSecret = options.bytes === String ? $util.base64.encode(message.messageSecret, 0, message.messageSecret.length) : options.bytes === Array ? Array.prototype.slice.call(message.messageSecret) : message.messageSecret; return object; }; @@ -63299,6 +63931,12 @@ $root.proto = (function() { * @property {number} COMMUNITY_LINK_PARENT_GROUP=134 COMMUNITY_LINK_PARENT_GROUP value * @property {number} COMMUNITY_LINK_SIBLING_GROUP=135 COMMUNITY_LINK_SIBLING_GROUP value * @property {number} COMMUNITY_LINK_SUB_GROUP=136 COMMUNITY_LINK_SUB_GROUP value + * @property {number} COMMUNITY_UNLINK_PARENT_GROUP=137 COMMUNITY_UNLINK_PARENT_GROUP value + * @property {number} COMMUNITY_UNLINK_SIBLING_GROUP=138 COMMUNITY_UNLINK_SIBLING_GROUP value + * @property {number} COMMUNITY_UNLINK_SUB_GROUP=139 COMMUNITY_UNLINK_SUB_GROUP value + * @property {number} GROUP_PARTICIPANT_ACCEPT=140 GROUP_PARTICIPANT_ACCEPT value + * @property {number} GROUP_PARTICIPANT_LINKED_GROUP_JOIN=141 GROUP_PARTICIPANT_LINKED_GROUP_JOIN value + * @property {number} COMMUNITY_CREATE=142 COMMUNITY_CREATE value */ WebMessageInfo.WebMessageInfoStubType = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -63439,6 +64077,12 @@ $root.proto = (function() { values[valuesById[134] = "COMMUNITY_LINK_PARENT_GROUP"] = 134; values[valuesById[135] = "COMMUNITY_LINK_SIBLING_GROUP"] = 135; values[valuesById[136] = "COMMUNITY_LINK_SUB_GROUP"] = 136; + values[valuesById[137] = "COMMUNITY_UNLINK_PARENT_GROUP"] = 137; + values[valuesById[138] = "COMMUNITY_UNLINK_SIBLING_GROUP"] = 138; + values[valuesById[139] = "COMMUNITY_UNLINK_SUB_GROUP"] = 139; + values[valuesById[140] = "GROUP_PARTICIPANT_ACCEPT"] = 140; + values[valuesById[141] = "GROUP_PARTICIPANT_LINKED_GROUP_JOIN"] = 141; + values[valuesById[142] = "COMMUNITY_CREATE"] = 142; return values; })();