UNPKG

@vreden/meta

Version:

Baileys is a lightweight JavaScript library for interacting with the WhatsApp Web API using WebSocket.

1,222 lines (1,005 loc) 1.77 MB
import * as $protobuf from "protobufjs"; import Long = require("long"); /** Namespace Web. */ export namespace Web { /** Properties of a GroupHistoryBundleMessage. */ interface IGroupHistoryBundleMessage { /** GroupHistoryBundleMessage messageHistoryBundle */ messageHistoryBundle?: (E2E.Message.IMessageHistoryBundle|null); /** GroupHistoryBundleMessage processState */ processState?: (Web.GroupHistoryBundleMessage.ProcessState|null); } /** Represents a GroupHistoryBundleMessage. */ class GroupHistoryBundleMessage implements IGroupHistoryBundleMessage { /** * Constructs a new GroupHistoryBundleMessage. * @param [properties] Properties to set */ constructor(properties?: Web.IGroupHistoryBundleMessage); /** GroupHistoryBundleMessage messageHistoryBundle. */ public messageHistoryBundle?: (E2E.Message.IMessageHistoryBundle|null); /** GroupHistoryBundleMessage processState. */ public processState: Web.GroupHistoryBundleMessage.ProcessState; /** * Creates a new GroupHistoryBundleMessage instance using the specified properties. * @param [properties] Properties to set * @returns GroupHistoryBundleMessage instance */ public static create(properties?: Web.IGroupHistoryBundleMessage): Web.GroupHistoryBundleMessage; /** * Encodes the specified GroupHistoryBundleMessage message. Does not implicitly {@link Web.GroupHistoryBundleMessage.verify|verify} messages. * @param message GroupHistoryBundleMessage message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ public static encode(message: Web.IGroupHistoryBundleMessage, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified GroupHistoryBundleMessage message, length delimited. Does not implicitly {@link Web.GroupHistoryBundleMessage.verify|verify} messages. * @param message GroupHistoryBundleMessage message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ public static encodeDelimited(message: Web.IGroupHistoryBundleMessage, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a GroupHistoryBundleMessage message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand * @returns GroupHistoryBundleMessage * @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): Web.GroupHistoryBundleMessage; /** * Decodes a GroupHistoryBundleMessage message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from * @returns GroupHistoryBundleMessage * @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)): Web.GroupHistoryBundleMessage; /** * Verifies a GroupHistoryBundleMessage 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 GroupHistoryBundleMessage message from a plain object. Also converts values to their respective internal types. * @param object Plain object * @returns GroupHistoryBundleMessage */ public static fromObject(object: { [k: string]: any }): Web.GroupHistoryBundleMessage; /** * Creates a plain object from a GroupHistoryBundleMessage message. Also converts values to other types if specified. * @param message GroupHistoryBundleMessage * @param [options] Conversion options * @returns Plain object */ public static toObject(message: Web.GroupHistoryBundleMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this GroupHistoryBundleMessage to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** * Gets the default type url for GroupHistoryBundleMessage * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } namespace GroupHistoryBundleMessage { /** ProcessState enum. */ enum ProcessState { NOT_DOWNLOADED = 0, DOWNLOADED = 1, DOWNLOAD_FAILED = 2 } } /** Properties of a GroupHistoryIndividualMessageInfo. */ interface IGroupHistoryIndividualMessageInfo { /** GroupHistoryIndividualMessageInfo bundleMessageKey */ bundleMessageKey?: (Protocol.IMessageKey|null); } /** Represents a GroupHistoryIndividualMessageInfo. */ class GroupHistoryIndividualMessageInfo implements IGroupHistoryIndividualMessageInfo { /** * Constructs a new GroupHistoryIndividualMessageInfo. * @param [properties] Properties to set */ constructor(properties?: Web.IGroupHistoryIndividualMessageInfo); /** GroupHistoryIndividualMessageInfo bundleMessageKey. */ public bundleMessageKey?: (Protocol.IMessageKey|null); /** * Creates a new GroupHistoryIndividualMessageInfo instance using the specified properties. * @param [properties] Properties to set * @returns GroupHistoryIndividualMessageInfo instance */ public static create(properties?: Web.IGroupHistoryIndividualMessageInfo): Web.GroupHistoryIndividualMessageInfo; /** * Encodes the specified GroupHistoryIndividualMessageInfo message. Does not implicitly {@link Web.GroupHistoryIndividualMessageInfo.verify|verify} messages. * @param message GroupHistoryIndividualMessageInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ public static encode(message: Web.IGroupHistoryIndividualMessageInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified GroupHistoryIndividualMessageInfo message, length delimited. Does not implicitly {@link Web.GroupHistoryIndividualMessageInfo.verify|verify} messages. * @param message GroupHistoryIndividualMessageInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ public static encodeDelimited(message: Web.IGroupHistoryIndividualMessageInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a GroupHistoryIndividualMessageInfo message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand * @returns GroupHistoryIndividualMessageInfo * @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): Web.GroupHistoryIndividualMessageInfo; /** * Decodes a GroupHistoryIndividualMessageInfo message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from * @returns GroupHistoryIndividualMessageInfo * @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)): Web.GroupHistoryIndividualMessageInfo; /** * Verifies a GroupHistoryIndividualMessageInfo 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 GroupHistoryIndividualMessageInfo message from a plain object. Also converts values to their respective internal types. * @param object Plain object * @returns GroupHistoryIndividualMessageInfo */ public static fromObject(object: { [k: string]: any }): Web.GroupHistoryIndividualMessageInfo; /** * Creates a plain object from a GroupHistoryIndividualMessageInfo message. Also converts values to other types if specified. * @param message GroupHistoryIndividualMessageInfo * @param [options] Conversion options * @returns Plain object */ public static toObject(message: Web.GroupHistoryIndividualMessageInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this GroupHistoryIndividualMessageInfo to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** * Gets the default type url for GroupHistoryIndividualMessageInfo * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Citation. */ interface ICitation { /** Citation title */ title: string; /** Citation subtitle */ subtitle: string; /** Citation cmsId */ cmsId: string; /** Citation imageUrl */ imageUrl: string; } /** Represents a Citation. */ class Citation implements ICitation { /** * Constructs a new Citation. * @param [properties] Properties to set */ constructor(properties?: Web.ICitation); /** Citation title. */ public title: string; /** Citation subtitle. */ public subtitle: string; /** Citation cmsId. */ public cmsId: string; /** Citation imageUrl. */ public imageUrl: string; /** * Creates a new Citation instance using the specified properties. * @param [properties] Properties to set * @returns Citation instance */ public static create(properties?: Web.ICitation): Web.Citation; /** * Encodes the specified Citation message. Does not implicitly {@link Web.Citation.verify|verify} messages. * @param message Citation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ public static encode(message: Web.ICitation, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified Citation message, length delimited. Does not implicitly {@link Web.Citation.verify|verify} messages. * @param message Citation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ public static encodeDelimited(message: Web.ICitation, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a Citation message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand * @returns Citation * @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): Web.Citation; /** * Decodes a Citation message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from * @returns Citation * @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)): Web.Citation; /** * Verifies a Citation 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 Citation message from a plain object. Also converts values to their respective internal types. * @param object Plain object * @returns Citation */ public static fromObject(object: { [k: string]: any }): Web.Citation; /** * Creates a plain object from a Citation message. Also converts values to other types if specified. * @param message Citation * @param [options] Conversion options * @returns Plain object */ public static toObject(message: Web.Citation, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this Citation to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** * Gets the default type url for Citation * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a StatusMentionMessage. */ interface IStatusMentionMessage { /** StatusMentionMessage quotedStatus */ quotedStatus?: (E2E.IMessage|null); } /** Represents a StatusMentionMessage. */ class StatusMentionMessage implements IStatusMentionMessage { /** * Constructs a new StatusMentionMessage. * @param [properties] Properties to set */ constructor(properties?: Web.IStatusMentionMessage); /** StatusMentionMessage quotedStatus. */ public quotedStatus?: (E2E.IMessage|null); /** * Creates a new StatusMentionMessage instance using the specified properties. * @param [properties] Properties to set * @returns StatusMentionMessage instance */ public static create(properties?: Web.IStatusMentionMessage): Web.StatusMentionMessage; /** * Encodes the specified StatusMentionMessage message. Does not implicitly {@link Web.StatusMentionMessage.verify|verify} messages. * @param message StatusMentionMessage message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ public static encode(message: Web.IStatusMentionMessage, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified StatusMentionMessage message, length delimited. Does not implicitly {@link Web.StatusMentionMessage.verify|verify} messages. * @param message StatusMentionMessage message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ public static encodeDelimited(message: Web.IStatusMentionMessage, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a StatusMentionMessage message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand * @returns StatusMentionMessage * @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): Web.StatusMentionMessage; /** * Decodes a StatusMentionMessage message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from * @returns StatusMentionMessage * @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)): Web.StatusMentionMessage; /** * Verifies a StatusMentionMessage 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 StatusMentionMessage message from a plain object. Also converts values to their respective internal types. * @param object Plain object * @returns StatusMentionMessage */ public static fromObject(object: { [k: string]: any }): Web.StatusMentionMessage; /** * Creates a plain object from a StatusMentionMessage message. Also converts values to other types if specified. * @param message StatusMentionMessage * @param [options] Conversion options * @returns Plain object */ public static toObject(message: Web.StatusMentionMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this StatusMentionMessage to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** * Gets the default type url for StatusMentionMessage * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a MessageAddOn. */ interface IMessageAddOn { /** MessageAddOn messageAddOnType */ messageAddOnType?: (Web.MessageAddOn.MessageAddOnType|null); /** MessageAddOn messageAddOn */ messageAddOn?: (E2E.IMessage|null); /** MessageAddOn senderTimestampMs */ senderTimestampMs?: (number|Long|null); /** MessageAddOn serverTimestampMs */ serverTimestampMs?: (number|Long|null); /** MessageAddOn status */ status?: (Web.WebMessageInfo.Status|null); /** MessageAddOn addOnContextInfo */ addOnContextInfo?: (Web.IMessageAddOnContextInfo|null); /** MessageAddOn messageAddOnKey */ messageAddOnKey?: (Protocol.IMessageKey|null); /** MessageAddOn legacyMessage */ legacyMessage?: (Web.ILegacyMessage|null); } /** Represents a MessageAddOn. */ class MessageAddOn implements IMessageAddOn { /** * Constructs a new MessageAddOn. * @param [properties] Properties to set */ constructor(properties?: Web.IMessageAddOn); /** MessageAddOn messageAddOnType. */ public messageAddOnType: Web.MessageAddOn.MessageAddOnType; /** MessageAddOn messageAddOn. */ public messageAddOn?: (E2E.IMessage|null); /** MessageAddOn senderTimestampMs. */ public senderTimestampMs: (number|Long); /** MessageAddOn serverTimestampMs. */ public serverTimestampMs: (number|Long); /** MessageAddOn status. */ public status: Web.WebMessageInfo.Status; /** MessageAddOn addOnContextInfo. */ public addOnContextInfo?: (Web.IMessageAddOnContextInfo|null); /** MessageAddOn messageAddOnKey. */ public messageAddOnKey?: (Protocol.IMessageKey|null); /** MessageAddOn legacyMessage. */ public legacyMessage?: (Web.ILegacyMessage|null); /** * Creates a new MessageAddOn instance using the specified properties. * @param [properties] Properties to set * @returns MessageAddOn instance */ public static create(properties?: Web.IMessageAddOn): Web.MessageAddOn; /** * Encodes the specified MessageAddOn message. Does not implicitly {@link Web.MessageAddOn.verify|verify} messages. * @param message MessageAddOn message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ public static encode(message: Web.IMessageAddOn, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified MessageAddOn message, length delimited. Does not implicitly {@link Web.MessageAddOn.verify|verify} messages. * @param message MessageAddOn message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ public static encodeDelimited(message: Web.IMessageAddOn, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a MessageAddOn message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand * @returns MessageAddOn * @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): Web.MessageAddOn; /** * Decodes a MessageAddOn message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from * @returns MessageAddOn * @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)): Web.MessageAddOn; /** * Verifies a MessageAddOn 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 MessageAddOn message from a plain object. Also converts values to their respective internal types. * @param object Plain object * @returns MessageAddOn */ public static fromObject(object: { [k: string]: any }): Web.MessageAddOn; /** * Creates a plain object from a MessageAddOn message. Also converts values to other types if specified. * @param message MessageAddOn * @param [options] Conversion options * @returns Plain object */ public static toObject(message: Web.MessageAddOn, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this MessageAddOn to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** * Gets the default type url for MessageAddOn * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } namespace MessageAddOn { /** MessageAddOnType enum. */ enum MessageAddOnType { UNDEFINED = 0, REACTION = 1, EVENT_RESPONSE = 2, POLL_UPDATE = 3, PIN_IN_CHAT = 4 } } /** Properties of a LegacyMessage. */ interface ILegacyMessage { /** LegacyMessage eventResponseMessage */ eventResponseMessage?: (E2E.Message.IEventResponseMessage|null); /** LegacyMessage pollVote */ pollVote?: (E2E.Message.IPollVoteMessage|null); } /** Represents a LegacyMessage. */ class LegacyMessage implements ILegacyMessage { /** * Constructs a new LegacyMessage. * @param [properties] Properties to set */ constructor(properties?: Web.ILegacyMessage); /** LegacyMessage eventResponseMessage. */ public eventResponseMessage?: (E2E.Message.IEventResponseMessage|null); /** LegacyMessage pollVote. */ public pollVote?: (E2E.Message.IPollVoteMessage|null); /** * Creates a new LegacyMessage instance using the specified properties. * @param [properties] Properties to set * @returns LegacyMessage instance */ public static create(properties?: Web.ILegacyMessage): Web.LegacyMessage; /** * Encodes the specified LegacyMessage message. Does not implicitly {@link Web.LegacyMessage.verify|verify} messages. * @param message LegacyMessage message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ public static encode(message: Web.ILegacyMessage, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified LegacyMessage message, length delimited. Does not implicitly {@link Web.LegacyMessage.verify|verify} messages. * @param message LegacyMessage message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ public static encodeDelimited(message: Web.ILegacyMessage, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a LegacyMessage message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand * @returns LegacyMessage * @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): Web.LegacyMessage; /** * Decodes a LegacyMessage message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from * @returns LegacyMessage * @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)): Web.LegacyMessage; /** * Verifies a LegacyMessage 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 LegacyMessage message from a plain object. Also converts values to their respective internal types. * @param object Plain object * @returns LegacyMessage */ public static fromObject(object: { [k: string]: any }): Web.LegacyMessage; /** * Creates a plain object from a LegacyMessage message. Also converts values to other types if specified. * @param message LegacyMessage * @param [options] Conversion options * @returns Plain object */ public static toObject(message: Web.LegacyMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this LegacyMessage to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** * Gets the default type url for LegacyMessage * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an EventResponse. */ interface IEventResponse { /** EventResponse eventResponseMessageKey */ eventResponseMessageKey?: (Protocol.IMessageKey|null); /** EventResponse timestampMs */ timestampMs?: (number|Long|null); /** EventResponse eventResponseMessage */ eventResponseMessage?: (E2E.Message.IEventResponseMessage|null); /** EventResponse unread */ unread?: (boolean|null); } /** Represents an EventResponse. */ class EventResponse implements IEventResponse { /** * Constructs a new EventResponse. * @param [properties] Properties to set */ constructor(properties?: Web.IEventResponse); /** EventResponse eventResponseMessageKey. */ public eventResponseMessageKey?: (Protocol.IMessageKey|null); /** EventResponse timestampMs. */ public timestampMs: (number|Long); /** EventResponse eventResponseMessage. */ public eventResponseMessage?: (E2E.Message.IEventResponseMessage|null); /** EventResponse unread. */ public unread: boolean; /** * Creates a new EventResponse instance using the specified properties. * @param [properties] Properties to set * @returns EventResponse instance */ public static create(properties?: Web.IEventResponse): Web.EventResponse; /** * Encodes the specified EventResponse message. Does not implicitly {@link Web.EventResponse.verify|verify} messages. * @param message EventResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ public static encode(message: Web.IEventResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified EventResponse message, length delimited. Does not implicitly {@link Web.EventResponse.verify|verify} messages. * @param message EventResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ public static encodeDelimited(message: Web.IEventResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes an EventResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand * @returns EventResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): Web.EventResponse; /** * Decodes an EventResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from * @returns EventResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): Web.EventResponse; /** * Verifies an EventResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** * Creates an EventResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object * @returns EventResponse */ public static fromObject(object: { [k: string]: any }): Web.EventResponse; /** * Creates a plain object from an EventResponse message. Also converts values to other types if specified. * @param message EventResponse * @param [options] Conversion options * @returns Plain object */ public static toObject(message: Web.EventResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this EventResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** * Gets the default type url for EventResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a PremiumMessageInfo. */ interface IPremiumMessageInfo { /** PremiumMessageInfo serverCampaignId */ serverCampaignId?: (string|null); } /** Represents a PremiumMessageInfo. */ class PremiumMessageInfo implements IPremiumMessageInfo { /** * Constructs a new PremiumMessageInfo. * @param [properties] Properties to set */ constructor(properties?: Web.IPremiumMessageInfo); /** PremiumMessageInfo serverCampaignId. */ public serverCampaignId: string; /** * Creates a new PremiumMessageInfo instance using the specified properties. * @param [properties] Properties to set * @returns PremiumMessageInfo instance */ public static create(properties?: Web.IPremiumMessageInfo): Web.PremiumMessageInfo; /** * Encodes the specified PremiumMessageInfo message. Does not implicitly {@link Web.PremiumMessageInfo.verify|verify} messages. * @param message PremiumMessageInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ public static encode(message: Web.IPremiumMessageInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified PremiumMessageInfo message, length delimited. Does not implicitly {@link Web.PremiumMessageInfo.verify|verify} messages. * @param message PremiumMessageInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ public static encodeDelimited(message: Web.IPremiumMessageInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a PremiumMessageInfo message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand * @returns PremiumMessageInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): Web.PremiumMessageInfo; /** * Decodes a PremiumMessageInfo message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from * @returns PremiumMessageInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): Web.PremiumMessageInfo; /** * Verifies a PremiumMessageInfo message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** * Creates a PremiumMessageInfo message from a plain object. Also converts values to their respective internal types. * @param object Plain object * @returns PremiumMessageInfo */ public static fromObject(object: { [k: string]: any }): Web.PremiumMessageInfo; /** * Creates a plain object from a PremiumMessageInfo message. Also converts values to other types if specified. * @param message PremiumMessageInfo * @param [options] Conversion options * @returns Plain object */ public static toObject(message: Web.PremiumMessageInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this PremiumMessageInfo to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** * Gets the default type url for PremiumMessageInfo * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a MessageAddOnContextInfo. */ interface IMessageAddOnContextInfo { /** MessageAddOnContextInfo messageAddOnDurationInSecs */ messageAddOnDurationInSecs?: (number|null); /** MessageAddOnContextInfo messageAddOnExpiryType */ messageAddOnExpiryType?: (E2E.MessageContextInfo.MessageAddonExpiryType|null); } /** Represents a MessageAddOnContextInfo. */ class MessageAddOnContextInfo implements IMessageAddOnContextInfo { /** * Constructs a new MessageAddOnContextInfo. * @param [properties] Properties to set */ constructor(properties?: Web.IMessageAddOnContextInfo); /** MessageAddOnContextInfo messageAddOnDurationInSecs. */ public messageAddOnDurationInSecs: number; /** MessageAddOnContextInfo messageAddOnExpiryType. */ public messageAddOnExpiryType: E2E.MessageContextInfo.MessageAddonExpiryType; /** * Creates a new MessageAddOnContextInfo instance using the specified properties. * @param [properties] Properties to set * @returns MessageAddOnContextInfo instance */ public static create(properties?: Web.IMessageAddOnContextInfo): Web.MessageAddOnContextInfo; /** * Encodes the specified MessageAddOnContextInfo message. Does not implicitly {@link Web.MessageAddOnContextInfo.verify|verify} messages. * @param message MessageAddOnContextInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ public static encode(message: Web.IMessageAddOnContextInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified MessageAddOnContextInfo message, length delimited. Does not implicitly {@link Web.MessageAddOnContextInfo.verify|verify} messages. * @param message MessageAddOnContextInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ public static encodeDelimited(message: Web.IMessageAddOnContextInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a MessageAddOnContextInfo message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand * @returns MessageAddOnContextInfo * @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): Web.MessageAddOnContextInfo; /** * Decodes a MessageAddOnContextInfo message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from * @returns MessageAddOnContextInfo * @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)): Web.MessageAddOnContextInfo; /** * Verifies a MessageAddOnContextInfo 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 MessageAddOnContextInfo message from a plain object. Also converts values to their respective internal types. * @param object Plain object * @returns MessageAddOnContextInfo */ public static fromObject(object: { [k: string]: any }): Web.MessageAddOnContextInfo; /** * Creates a plain object from a MessageAddOnContextInfo message. Also converts values to other types if specified. * @param message MessageAddOnContextInfo * @param [options] Conversion options * @returns Plain object */ public static toObject(message: Web.MessageAddOnContextInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this MessageAddOnContextInfo to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** * Gets the default type url for MessageAddOnContextInfo * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a PinInChat. */ interface IPinInChat { /** PinInChat type */ type?: (Web.PinInChat.Type|null); /** PinInChat key */ key?: (Protocol.IMessageKey|null); /** PinInChat senderTimestampMs */ senderTimestampMs?: (number|Long|null); /** PinInChat serverTimestampMs */ serverTimestampMs?: (number|Long|null); /** PinInChat messageAddOnContextInfo */ messageAddOnContextInfo?: (Web.IMessageAddOnContextInfo|null); } /** Represents a PinInChat. */ class PinInChat implements IPinInChat { /** * Constructs a new PinInChat. * @param [properties] Properties to set */ constructor(properties?: Web.IPinInChat); /** PinInChat type. */ public type: Web.PinInChat.Type; /** PinInChat key. */ public key?: (Protocol.IMessageKey|null); /** PinInChat senderTimestampMs. */ public senderTimestampMs: (number|Long); /** PinInChat serverTimestampMs. */ public serverTimestampMs: (number|Long); /** PinInChat messageAddOnContextInfo. */ public messageAddOnContextInfo?: (Web.IMessageAddOnContextInfo|null); /** * Creates a new PinInChat instance using the specified properties. * @param [properties] Properties to set * @returns PinInChat instance */ public static create(properties?: Web.IPinInChat): Web.PinInChat; /** * Encodes the specified PinInChat message. Does not implicitly {@link Web.PinInChat.verify|verify} messages. * @param message PinInChat message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ public static encode(message: Web.IPinInChat, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified PinInChat message, length delimited. Does not implicitly {@link Web.PinInChat.verify|verify} messages. * @param message PinInChat message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ public static encodeDelimited(message: Web.IPinInChat, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a PinInChat message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand * @returns PinInChat * @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): Web.PinInChat; /** * Decodes a PinInChat message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from * @returns PinInChat * @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)): Web.PinInChat; /** * Verifies a PinInChat 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 PinInChat message from a plain object. Also converts values to their respective internal types. * @param object Plain object * @returns PinInChat */ public static fromObject(object: { [k: string]: any }): Web.PinInChat; /** * Creates a plain object from a PinInChat message. Also converts values to other types if specified. * @param message PinInChat * @param [options] Conversion options * @returns Plain object */ public static toObject(message: Web.PinInChat, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this PinInChat to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** * Gets the default type url for PinInChat * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } namespace PinInChat { /** Type enum. */ enum Type { UNKNOWN_TYPE = 0, PIN_FOR_ALL = 1, UNPIN_FOR_ALL = 2 } } /** Properties of a KeepInChat. */ interface IKeepInChat { /** KeepInChat keepType */ keepType?: (E2E.KeepType|null); /** KeepInChat serverTimestamp */ serverTimestamp?: (number|Long|null); /** KeepInChat key */ key?: (Protocol.IMessageKey|null); /** KeepInChat deviceJid */ deviceJid?: (string|null); /** KeepInChat clientTimestampMs */ clientTimestampMs?: (number|Long|null); /** KeepInChat serverTimestampMs */ serverTimestampMs?: (number|Long|null); } /** Represents a KeepInChat. */ class KeepInChat implements IKeepInChat { /** * Constructs a new KeepInChat. * @param [properties] Properties to set */ constructor(properties?: Web.IKeepInChat); /** KeepInChat keepType. */ public keepType: E2E.KeepType; /** KeepInChat serverTimestamp. */ public serverTimestamp: (number|Long); /** KeepInChat key. */ public key?: (Protocol.IMessageKey|null); /** KeepInChat deviceJid. */ public deviceJid: string; /** KeepInChat clientTimestampMs. */ public clientTimestampMs: (number|Long); /** KeepInChat serverTimestampMs. */ public serverTimestampMs: (number|Long); /** * Creates a new KeepInChat instance using the specified properties. * @param [properties] Properties to set * @returns KeepInChat instance */ public static create(properties?: Web.IKeepInChat): Web.KeepInChat; /** * Encodes the specified KeepInChat message. Does not implicitly {@link Web.KeepInChat.verify|verify} messages. * @param message KeepInChat message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ public static encode(message: Web.IKeepInChat, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified KeepInChat message, length delimited. Does not implicitly {@link Web.KeepInChat.verify|verify} messages. * @param message KeepInChat message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ public static encodeDelimited(message: Web.IKeepInChat, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a KeepInChat message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand * @returns KeepInChat * @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): Web.KeepInChat; /** * Decodes a KeepInChat message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from * @returns KeepInChat * @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)): Web.KeepInChat; /** * Verifies a KeepInChat message. * @param message Plain object to verify * @returns `null`