From adac3ad25e65d680b0b12fd5ecd5800f9d3fcf6e Mon Sep 17 00:00:00 2001 From: Felicio Mununga Date: Mon, 17 Apr 2023 12:17:23 +0200 Subject: [PATCH] format files --- .../protos/application-metadata-message_pb.ts | 149 +- .../status-js/src/protos/chat-identity_pb.ts | 245 ++-- .../status-js/src/protos/chat-message_pb.ts | 517 ++++--- .../status-js/src/protos/communities_pb.ts | 1237 +++++++++++------ .../status-js/src/protos/emoji-reaction_pb.ts | 108 +- packages/status-js/src/protos/enums_pb.ts | 35 +- .../protos/membership-update-message_pb.ts | 208 ++- .../status-js/src/protos/pin-message_pb.ts | 77 +- .../src/protos/protocol-message_pb.ts | 597 +++++--- .../src/protos/push-notifications_pb.ts | 830 +++++++---- .../status-js/src/protos/status-update_pb.ts | 88 +- packages/status-js/src/protos/url-data_pb.ts | 321 +++-- .../src/utils/deserialize-public-key.ts | 4 +- 13 files changed, 2944 insertions(+), 1472 deletions(-) diff --git a/packages/status-js/src/protos/application-metadata-message_pb.ts b/packages/status-js/src/protos/application-metadata-message_pb.ts index f3f0c485..a93a8205 100644 --- a/packages/status-js/src/protos/application-metadata-message_pb.ts +++ b/packages/status-js/src/protos/application-metadata-message_pb.ts @@ -3,8 +3,15 @@ /* eslint-disable */ // @ts-nocheck -import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; -import { Message, proto3 } from "@bufbuild/protobuf"; +import type { + BinaryReadOptions, + FieldList, + JsonReadOptions, + JsonValue, + PartialMessage, + PlainMessage, +} from '@bufbuild/protobuf' +import { Message, proto3 } from '@bufbuild/protobuf' /** * @generated from message ApplicationMetadataMessage @@ -15,49 +22,72 @@ export class ApplicationMetadataMessage extends Message) { - super(); - proto3.util.initPartial(data, this); + super() + proto3.util.initPartial(data, this) } - static readonly runtime = proto3; - static readonly typeName = "ApplicationMetadataMessage"; + static readonly runtime = proto3 + static readonly typeName = 'ApplicationMetadataMessage' static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "signature", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - { no: 2, name: "payload", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - { no: 3, name: "type", kind: "enum", T: proto3.getEnumType(ApplicationMetadataMessage_Type) }, - ]); + { no: 1, name: 'signature', kind: 'scalar', T: 12 /* ScalarType.BYTES */ }, + { no: 2, name: 'payload', kind: 'scalar', T: 12 /* ScalarType.BYTES */ }, + { + no: 3, + name: 'type', + kind: 'enum', + T: proto3.getEnumType(ApplicationMetadataMessage_Type), + }, + ]) - static fromBinary(bytes: Uint8Array, options?: Partial): ApplicationMetadataMessage { - return new ApplicationMetadataMessage().fromBinary(bytes, options); + static fromBinary( + bytes: Uint8Array, + options?: Partial + ): ApplicationMetadataMessage { + return new ApplicationMetadataMessage().fromBinary(bytes, options) } - static fromJson(jsonValue: JsonValue, options?: Partial): ApplicationMetadataMessage { - return new ApplicationMetadataMessage().fromJson(jsonValue, options); + static fromJson( + jsonValue: JsonValue, + options?: Partial + ): ApplicationMetadataMessage { + return new ApplicationMetadataMessage().fromJson(jsonValue, options) } - static fromJsonString(jsonString: string, options?: Partial): ApplicationMetadataMessage { - return new ApplicationMetadataMessage().fromJsonString(jsonString, options); + static fromJsonString( + jsonString: string, + options?: Partial + ): ApplicationMetadataMessage { + return new ApplicationMetadataMessage().fromJsonString(jsonString, options) } - static equals(a: ApplicationMetadataMessage | PlainMessage | undefined, b: ApplicationMetadataMessage | PlainMessage | undefined): boolean { - return proto3.util.equals(ApplicationMetadataMessage, a, b); + static equals( + a: + | ApplicationMetadataMessage + | PlainMessage + | undefined, + b: + | ApplicationMetadataMessage + | PlainMessage + | undefined + ): boolean { + return proto3.util.equals(ApplicationMetadataMessage, a, b) } } @@ -236,40 +266,43 @@ export enum ApplicationMetadataMessage_Type { ANONYMOUS_METRIC_BATCH = 33, } // Retrieve enum metadata with: proto3.getEnumType(ApplicationMetadataMessage_Type) -proto3.util.setEnumType(ApplicationMetadataMessage_Type, "ApplicationMetadataMessage.Type", [ - { no: 0, name: "TYPE_UNKNOWN_UNSPECIFIED" }, - { no: 1, name: "TYPE_CHAT_MESSAGE" }, - { no: 2, name: "TYPE_CONTACT_UPDATE" }, - { no: 3, name: "TYPE_MEMBERSHIP_UPDATE_MESSAGE" }, - { no: 4, name: "TYPE_PAIR_INSTALLATION" }, - { no: 5, name: "TYPE_SYNC_INSTALLATION" }, - { no: 6, name: "TYPE_REQUEST_ADDRESS_FOR_TRANSACTION" }, - { no: 7, name: "TYPE_ACCEPT_REQUEST_ADDRESS_FOR_TRANSACTION" }, - { no: 8, name: "TYPE_DECLINE_REQUEST_ADDRESS_FOR_TRANSACTION" }, - { no: 9, name: "TYPE_REQUEST_TRANSACTION" }, - { no: 10, name: "TYPE_SEND_TRANSACTION" }, - { no: 11, name: "TYPE_DECLINE_REQUEST_TRANSACTION" }, - { no: 12, name: "TYPE_SYNC_INSTALLATION_CONTACT" }, - { no: 13, name: "TYPE_SYNC_INSTALLATION_ACCOUNT" }, - { no: 14, name: "TYPE_SYNC_INSTALLATION_PUBLIC_CHAT" }, - { no: 15, name: "TYPE_CONTACT_CODE_ADVERTISEMENT" }, - { no: 16, name: "TYPE_PUSH_NOTIFICATION_REGISTRATION" }, - { no: 17, name: "TYPE_PUSH_NOTIFICATION_REGISTRATION_RESPONSE" }, - { no: 18, name: "TYPE_PUSH_NOTIFICATION_QUERY" }, - { no: 19, name: "TYPE_PUSH_NOTIFICATION_QUERY_RESPONSE" }, - { no: 20, name: "TYPE_PUSH_NOTIFICATION_REQUEST" }, - { no: 21, name: "TYPE_PUSH_NOTIFICATION_RESPONSE" }, - { no: 22, name: "TYPE_EMOJI_REACTION" }, - { no: 23, name: "TYPE_GROUP_CHAT_INVITATION" }, - { no: 24, name: "TYPE_CHAT_IDENTITY" }, - { no: 25, name: "TYPE_COMMUNITY_DESCRIPTION" }, - { no: 26, name: "TYPE_COMMUNITY_INVITATION" }, - { no: 27, name: "TYPE_COMMUNITY_REQUEST_TO_JOIN" }, - { no: 28, name: "TYPE_PIN_MESSAGE" }, - { no: 29, name: "TYPE_EDIT_MESSAGE" }, - { no: 30, name: "TYPE_STATUS_UPDATE" }, - { no: 31, name: "TYPE_DELETE_MESSAGE" }, - { no: 32, name: "TYPE_SYNC_INSTALLATION_COMMUNITY" }, - { no: 33, name: "TYPE_ANONYMOUS_METRIC_BATCH" }, -]); - +proto3.util.setEnumType( + ApplicationMetadataMessage_Type, + 'ApplicationMetadataMessage.Type', + [ + { no: 0, name: 'TYPE_UNKNOWN_UNSPECIFIED' }, + { no: 1, name: 'TYPE_CHAT_MESSAGE' }, + { no: 2, name: 'TYPE_CONTACT_UPDATE' }, + { no: 3, name: 'TYPE_MEMBERSHIP_UPDATE_MESSAGE' }, + { no: 4, name: 'TYPE_PAIR_INSTALLATION' }, + { no: 5, name: 'TYPE_SYNC_INSTALLATION' }, + { no: 6, name: 'TYPE_REQUEST_ADDRESS_FOR_TRANSACTION' }, + { no: 7, name: 'TYPE_ACCEPT_REQUEST_ADDRESS_FOR_TRANSACTION' }, + { no: 8, name: 'TYPE_DECLINE_REQUEST_ADDRESS_FOR_TRANSACTION' }, + { no: 9, name: 'TYPE_REQUEST_TRANSACTION' }, + { no: 10, name: 'TYPE_SEND_TRANSACTION' }, + { no: 11, name: 'TYPE_DECLINE_REQUEST_TRANSACTION' }, + { no: 12, name: 'TYPE_SYNC_INSTALLATION_CONTACT' }, + { no: 13, name: 'TYPE_SYNC_INSTALLATION_ACCOUNT' }, + { no: 14, name: 'TYPE_SYNC_INSTALLATION_PUBLIC_CHAT' }, + { no: 15, name: 'TYPE_CONTACT_CODE_ADVERTISEMENT' }, + { no: 16, name: 'TYPE_PUSH_NOTIFICATION_REGISTRATION' }, + { no: 17, name: 'TYPE_PUSH_NOTIFICATION_REGISTRATION_RESPONSE' }, + { no: 18, name: 'TYPE_PUSH_NOTIFICATION_QUERY' }, + { no: 19, name: 'TYPE_PUSH_NOTIFICATION_QUERY_RESPONSE' }, + { no: 20, name: 'TYPE_PUSH_NOTIFICATION_REQUEST' }, + { no: 21, name: 'TYPE_PUSH_NOTIFICATION_RESPONSE' }, + { no: 22, name: 'TYPE_EMOJI_REACTION' }, + { no: 23, name: 'TYPE_GROUP_CHAT_INVITATION' }, + { no: 24, name: 'TYPE_CHAT_IDENTITY' }, + { no: 25, name: 'TYPE_COMMUNITY_DESCRIPTION' }, + { no: 26, name: 'TYPE_COMMUNITY_INVITATION' }, + { no: 27, name: 'TYPE_COMMUNITY_REQUEST_TO_JOIN' }, + { no: 28, name: 'TYPE_PIN_MESSAGE' }, + { no: 29, name: 'TYPE_EDIT_MESSAGE' }, + { no: 30, name: 'TYPE_STATUS_UPDATE' }, + { no: 31, name: 'TYPE_DELETE_MESSAGE' }, + { no: 32, name: 'TYPE_SYNC_INSTALLATION_COMMUNITY' }, + { no: 33, name: 'TYPE_ANONYMOUS_METRIC_BATCH' }, + ] +) diff --git a/packages/status-js/src/protos/chat-identity_pb.ts b/packages/status-js/src/protos/chat-identity_pb.ts index f1279d65..91ee9ddd 100644 --- a/packages/status-js/src/protos/chat-identity_pb.ts +++ b/packages/status-js/src/protos/chat-identity_pb.ts @@ -3,9 +3,16 @@ /* eslint-disable */ // @ts-nocheck -import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; -import { Message, proto3, protoInt64 } from "@bufbuild/protobuf"; -import { ImageType } from "./enums_pb.js"; +import type { + BinaryReadOptions, + FieldList, + JsonReadOptions, + JsonValue, + PartialMessage, + PlainMessage, +} from '@bufbuild/protobuf' +import { Message, proto3, protoInt64 } from '@bufbuild/protobuf' +import { ImageType } from './enums_pb.js' /** * ChatIdentity represents the user defined identity associated with their public chat key @@ -18,50 +25,50 @@ export class ChatIdentity extends Message { * * @generated from field: uint64 clock = 1; */ - clock = protoInt64.zero; + clock = protoInt64.zero /** * ens_name is the valid ENS name associated with the chat key * * @generated from field: string ens_name = 2; */ - ensName = ""; + ensName = '' /** * images is a string indexed mapping of images associated with an identity * * @generated from field: map images = 3; */ - images: { [key: string]: IdentityImage } = {}; + images: { [key: string]: IdentityImage } = {} /** * display name is the user set identity * * @generated from field: string display_name = 4; */ - displayName = ""; + displayName = '' /** * description is the user set description * * @generated from field: string description = 5; */ - description = ""; + description = '' /** * @generated from field: string color = 6; */ - color = ""; + color = '' /** * @generated from field: string emoji = 7; */ - emoji = ""; + emoji = '' /** * @generated from field: repeated SocialLink social_links = 8; */ - socialLinks: SocialLink[] = []; + socialLinks: SocialLink[] = [] /** * first known message timestamp in seconds (valid only for community chats for now) @@ -70,41 +77,80 @@ export class ChatIdentity extends Message { * * @generated from field: uint32 first_message_timestamp = 9; */ - firstMessageTimestamp = 0; + firstMessageTimestamp = 0 constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); + super() + proto3.util.initPartial(data, this) } - static readonly runtime = proto3; - static readonly typeName = "ChatIdentity"; + static readonly runtime = proto3 + static readonly typeName = 'ChatIdentity' static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "clock", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 2, name: "ens_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "images", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "message", T: IdentityImage} }, - { no: 4, name: "display_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 5, name: "description", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 6, name: "color", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 7, name: "emoji", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 8, name: "social_links", kind: "message", T: SocialLink, repeated: true }, - { no: 9, name: "first_message_timestamp", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - ]); + { no: 1, name: 'clock', kind: 'scalar', T: 4 /* ScalarType.UINT64 */ }, + { no: 2, name: 'ens_name', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, + { + no: 3, + name: 'images', + kind: 'map', + K: 9 /* ScalarType.STRING */, + V: { kind: 'message', T: IdentityImage }, + }, + { + no: 4, + name: 'display_name', + kind: 'scalar', + T: 9 /* ScalarType.STRING */, + }, + { + no: 5, + name: 'description', + kind: 'scalar', + T: 9 /* ScalarType.STRING */, + }, + { no: 6, name: 'color', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, + { no: 7, name: 'emoji', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, + { + no: 8, + name: 'social_links', + kind: 'message', + T: SocialLink, + repeated: true, + }, + { + no: 9, + name: 'first_message_timestamp', + kind: 'scalar', + T: 13 /* ScalarType.UINT32 */, + }, + ]) - static fromBinary(bytes: Uint8Array, options?: Partial): ChatIdentity { - return new ChatIdentity().fromBinary(bytes, options); + static fromBinary( + bytes: Uint8Array, + options?: Partial + ): ChatIdentity { + return new ChatIdentity().fromBinary(bytes, options) } - static fromJson(jsonValue: JsonValue, options?: Partial): ChatIdentity { - return new ChatIdentity().fromJson(jsonValue, options); + static fromJson( + jsonValue: JsonValue, + options?: Partial + ): ChatIdentity { + return new ChatIdentity().fromJson(jsonValue, options) } - static fromJsonString(jsonString: string, options?: Partial): ChatIdentity { - return new ChatIdentity().fromJsonString(jsonString, options); + static fromJsonString( + jsonString: string, + options?: Partial + ): ChatIdentity { + return new ChatIdentity().fromJsonString(jsonString, options) } - static equals(a: ChatIdentity | PlainMessage | undefined, b: ChatIdentity | PlainMessage | undefined): boolean { - return proto3.util.equals(ChatIdentity, a, b); + static equals( + a: ChatIdentity | PlainMessage | undefined, + b: ChatIdentity | PlainMessage | undefined + ): boolean { + return proto3.util.equals(ChatIdentity, a, b) } } @@ -120,65 +166,93 @@ export class IdentityImage extends Message { * * @generated from field: bytes payload = 1; */ - payload = new Uint8Array(0); + payload = new Uint8Array(0) /** * source_type signals the image payload source * * @generated from field: IdentityImage.SourceType source_type = 2; */ - sourceType = IdentityImage_SourceType.UNKNOWN_SOURCE_TYPE; + sourceType = IdentityImage_SourceType.UNKNOWN_SOURCE_TYPE /** * image_type signals the image type and method of parsing the payload * * @generated from field: ImageType image_type = 3; */ - imageType = ImageType.UNKNOWN_IMAGE_TYPE; + imageType = ImageType.UNKNOWN_IMAGE_TYPE /** * encryption_keys is a list of encrypted keys that can be used to decrypted an encrypted payload * * @generated from field: repeated bytes encryption_keys = 4; */ - encryptionKeys: Uint8Array[] = []; + encryptionKeys: Uint8Array[] = [] /** * encrypted signals the encryption state of the payload, default is false. * * @generated from field: bool encrypted = 5; */ - encrypted = false; + encrypted = false constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); + super() + proto3.util.initPartial(data, this) } - static readonly runtime = proto3; - static readonly typeName = "IdentityImage"; + static readonly runtime = proto3 + static readonly typeName = 'IdentityImage' static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "payload", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - { no: 2, name: "source_type", kind: "enum", T: proto3.getEnumType(IdentityImage_SourceType) }, - { no: 3, name: "image_type", kind: "enum", T: proto3.getEnumType(ImageType) }, - { no: 4, name: "encryption_keys", kind: "scalar", T: 12 /* ScalarType.BYTES */, repeated: true }, - { no: 5, name: "encrypted", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - ]); + { no: 1, name: 'payload', kind: 'scalar', T: 12 /* ScalarType.BYTES */ }, + { + no: 2, + name: 'source_type', + kind: 'enum', + T: proto3.getEnumType(IdentityImage_SourceType), + }, + { + no: 3, + name: 'image_type', + kind: 'enum', + T: proto3.getEnumType(ImageType), + }, + { + no: 4, + name: 'encryption_keys', + kind: 'scalar', + T: 12 /* ScalarType.BYTES */, + repeated: true, + }, + { no: 5, name: 'encrypted', kind: 'scalar', T: 8 /* ScalarType.BOOL */ }, + ]) - static fromBinary(bytes: Uint8Array, options?: Partial): IdentityImage { - return new IdentityImage().fromBinary(bytes, options); + static fromBinary( + bytes: Uint8Array, + options?: Partial + ): IdentityImage { + return new IdentityImage().fromBinary(bytes, options) } - static fromJson(jsonValue: JsonValue, options?: Partial): IdentityImage { - return new IdentityImage().fromJson(jsonValue, options); + static fromJson( + jsonValue: JsonValue, + options?: Partial + ): IdentityImage { + return new IdentityImage().fromJson(jsonValue, options) } - static fromJsonString(jsonString: string, options?: Partial): IdentityImage { - return new IdentityImage().fromJsonString(jsonString, options); + static fromJsonString( + jsonString: string, + options?: Partial + ): IdentityImage { + return new IdentityImage().fromJsonString(jsonString, options) } - static equals(a: IdentityImage | PlainMessage | undefined, b: IdentityImage | PlainMessage | undefined): boolean { - return proto3.util.equals(IdentityImage, a, b); + static equals( + a: IdentityImage | PlainMessage | undefined, + b: IdentityImage | PlainMessage | undefined + ): boolean { + return proto3.util.equals(IdentityImage, a, b) } } @@ -211,11 +285,11 @@ export enum IdentityImage_SourceType { ENS_AVATAR = 2, } // Retrieve enum metadata with: proto3.getEnumType(IdentityImage_SourceType) -proto3.util.setEnumType(IdentityImage_SourceType, "IdentityImage.SourceType", [ - { no: 0, name: "UNKNOWN_SOURCE_TYPE" }, - { no: 1, name: "RAW_PAYLOAD" }, - { no: 2, name: "ENS_AVATAR" }, -]); +proto3.util.setEnumType(IdentityImage_SourceType, 'IdentityImage.SourceType', [ + { no: 0, name: 'UNKNOWN_SOURCE_TYPE' }, + { no: 1, name: 'RAW_PAYLOAD' }, + { no: 2, name: 'ENS_AVATAR' }, +]) /** * SocialLinks represents social link assosiated with given chat identity (personal/community) @@ -226,39 +300,50 @@ export class SocialLink extends Message { /** * @generated from field: string text = 1; */ - text = ""; + text = '' /** * @generated from field: string url = 2; */ - url = ""; + url = '' constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); + super() + proto3.util.initPartial(data, this) } - static readonly runtime = proto3; - static readonly typeName = "SocialLink"; + static readonly runtime = proto3 + static readonly typeName = 'SocialLink' static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "text", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "url", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); + { no: 1, name: 'text', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, + { no: 2, name: 'url', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, + ]) - static fromBinary(bytes: Uint8Array, options?: Partial): SocialLink { - return new SocialLink().fromBinary(bytes, options); + static fromBinary( + bytes: Uint8Array, + options?: Partial + ): SocialLink { + return new SocialLink().fromBinary(bytes, options) } - static fromJson(jsonValue: JsonValue, options?: Partial): SocialLink { - return new SocialLink().fromJson(jsonValue, options); + static fromJson( + jsonValue: JsonValue, + options?: Partial + ): SocialLink { + return new SocialLink().fromJson(jsonValue, options) } - static fromJsonString(jsonString: string, options?: Partial): SocialLink { - return new SocialLink().fromJsonString(jsonString, options); + static fromJsonString( + jsonString: string, + options?: Partial + ): SocialLink { + return new SocialLink().fromJsonString(jsonString, options) } - static equals(a: SocialLink | PlainMessage | undefined, b: SocialLink | PlainMessage | undefined): boolean { - return proto3.util.equals(SocialLink, a, b); + static equals( + a: SocialLink | PlainMessage | undefined, + b: SocialLink | PlainMessage | undefined + ): boolean { + return proto3.util.equals(SocialLink, a, b) } } - diff --git a/packages/status-js/src/protos/chat-message_pb.ts b/packages/status-js/src/protos/chat-message_pb.ts index 91fcabd6..579dfc10 100644 --- a/packages/status-js/src/protos/chat-message_pb.ts +++ b/packages/status-js/src/protos/chat-message_pb.ts @@ -3,9 +3,16 @@ /* eslint-disable */ // @ts-nocheck -import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; -import { Message, proto3, protoInt64 } from "@bufbuild/protobuf"; -import { ImageType, MessageType } from "./enums_pb.js"; +import type { + BinaryReadOptions, + FieldList, + JsonReadOptions, + JsonValue, + PartialMessage, + PlainMessage, +} from '@bufbuild/protobuf' +import { Message, proto3, protoInt64 } from '@bufbuild/protobuf' +import { ImageType, MessageType } from './enums_pb.js' /** * @generated from message StickerMessage @@ -14,39 +21,51 @@ export class StickerMessage extends Message { /** * @generated from field: string hash = 1; */ - hash = ""; + hash = '' /** * @generated from field: int32 pack = 2; */ - pack = 0; + pack = 0 constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); + super() + proto3.util.initPartial(data, this) } - static readonly runtime = proto3; - static readonly typeName = "StickerMessage"; + static readonly runtime = proto3 + static readonly typeName = 'StickerMessage' static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "hash", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "pack", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, - ]); + { no: 1, name: 'hash', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, + { no: 2, name: 'pack', kind: 'scalar', T: 5 /* ScalarType.INT32 */ }, + ]) - static fromBinary(bytes: Uint8Array, options?: Partial): StickerMessage { - return new StickerMessage().fromBinary(bytes, options); + static fromBinary( + bytes: Uint8Array, + options?: Partial + ): StickerMessage { + return new StickerMessage().fromBinary(bytes, options) } - static fromJson(jsonValue: JsonValue, options?: Partial): StickerMessage { - return new StickerMessage().fromJson(jsonValue, options); + static fromJson( + jsonValue: JsonValue, + options?: Partial + ): StickerMessage { + return new StickerMessage().fromJson(jsonValue, options) } - static fromJsonString(jsonString: string, options?: Partial): StickerMessage { - return new StickerMessage().fromJsonString(jsonString, options); + static fromJsonString( + jsonString: string, + options?: Partial + ): StickerMessage { + return new StickerMessage().fromJsonString(jsonString, options) } - static equals(a: StickerMessage | PlainMessage | undefined, b: StickerMessage | PlainMessage | undefined): boolean { - return proto3.util.equals(StickerMessage, a, b); + static equals( + a: StickerMessage | PlainMessage | undefined, + b: StickerMessage | PlainMessage | undefined + ): boolean { + return proto3.util.equals(StickerMessage, a, b) } } @@ -57,39 +76,51 @@ export class ImageMessage extends Message { /** * @generated from field: bytes payload = 1; */ - payload = new Uint8Array(0); + payload = new Uint8Array(0) /** * @generated from field: ImageType type = 2; */ - type = ImageType.UNKNOWN_IMAGE_TYPE; + type = ImageType.UNKNOWN_IMAGE_TYPE constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); + super() + proto3.util.initPartial(data, this) } - static readonly runtime = proto3; - static readonly typeName = "ImageMessage"; + static readonly runtime = proto3 + static readonly typeName = 'ImageMessage' static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "payload", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - { no: 2, name: "type", kind: "enum", T: proto3.getEnumType(ImageType) }, - ]); + { no: 1, name: 'payload', kind: 'scalar', T: 12 /* ScalarType.BYTES */ }, + { no: 2, name: 'type', kind: 'enum', T: proto3.getEnumType(ImageType) }, + ]) - static fromBinary(bytes: Uint8Array, options?: Partial): ImageMessage { - return new ImageMessage().fromBinary(bytes, options); + static fromBinary( + bytes: Uint8Array, + options?: Partial + ): ImageMessage { + return new ImageMessage().fromBinary(bytes, options) } - static fromJson(jsonValue: JsonValue, options?: Partial): ImageMessage { - return new ImageMessage().fromJson(jsonValue, options); + static fromJson( + jsonValue: JsonValue, + options?: Partial + ): ImageMessage { + return new ImageMessage().fromJson(jsonValue, options) } - static fromJsonString(jsonString: string, options?: Partial): ImageMessage { - return new ImageMessage().fromJsonString(jsonString, options); + static fromJsonString( + jsonString: string, + options?: Partial + ): ImageMessage { + return new ImageMessage().fromJsonString(jsonString, options) } - static equals(a: ImageMessage | PlainMessage | undefined, b: ImageMessage | PlainMessage | undefined): boolean { - return proto3.util.equals(ImageMessage, a, b); + static equals( + a: ImageMessage | PlainMessage | undefined, + b: ImageMessage | PlainMessage | undefined + ): boolean { + return proto3.util.equals(ImageMessage, a, b) } } @@ -100,45 +131,67 @@ export class AudioMessage extends Message { /** * @generated from field: bytes payload = 1; */ - payload = new Uint8Array(0); + payload = new Uint8Array(0) /** * @generated from field: AudioMessage.AudioType type = 2; */ - type = AudioMessage_AudioType.UNKNOWN_AUDIO_TYPE; + type = AudioMessage_AudioType.UNKNOWN_AUDIO_TYPE /** * @generated from field: uint64 duration_ms = 3; */ - durationMs = protoInt64.zero; + durationMs = protoInt64.zero constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); + super() + proto3.util.initPartial(data, this) } - static readonly runtime = proto3; - static readonly typeName = "AudioMessage"; + static readonly runtime = proto3 + static readonly typeName = 'AudioMessage' static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "payload", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - { no: 2, name: "type", kind: "enum", T: proto3.getEnumType(AudioMessage_AudioType) }, - { no: 3, name: "duration_ms", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - ]); + { no: 1, name: 'payload', kind: 'scalar', T: 12 /* ScalarType.BYTES */ }, + { + no: 2, + name: 'type', + kind: 'enum', + T: proto3.getEnumType(AudioMessage_AudioType), + }, + { + no: 3, + name: 'duration_ms', + kind: 'scalar', + T: 4 /* ScalarType.UINT64 */, + }, + ]) - static fromBinary(bytes: Uint8Array, options?: Partial): AudioMessage { - return new AudioMessage().fromBinary(bytes, options); + static fromBinary( + bytes: Uint8Array, + options?: Partial + ): AudioMessage { + return new AudioMessage().fromBinary(bytes, options) } - static fromJson(jsonValue: JsonValue, options?: Partial): AudioMessage { - return new AudioMessage().fromJson(jsonValue, options); + static fromJson( + jsonValue: JsonValue, + options?: Partial + ): AudioMessage { + return new AudioMessage().fromJson(jsonValue, options) } - static fromJsonString(jsonString: string, options?: Partial): AudioMessage { - return new AudioMessage().fromJsonString(jsonString, options); + static fromJsonString( + jsonString: string, + options?: Partial + ): AudioMessage { + return new AudioMessage().fromJsonString(jsonString, options) } - static equals(a: AudioMessage | PlainMessage | undefined, b: AudioMessage | PlainMessage | undefined): boolean { - return proto3.util.equals(AudioMessage, a, b); + static equals( + a: AudioMessage | PlainMessage | undefined, + b: AudioMessage | PlainMessage | undefined + ): boolean { + return proto3.util.equals(AudioMessage, a, b) } } @@ -162,11 +215,11 @@ export enum AudioMessage_AudioType { AMR = 2, } // Retrieve enum metadata with: proto3.getEnumType(AudioMessage_AudioType) -proto3.util.setEnumType(AudioMessage_AudioType, "AudioMessage.AudioType", [ - { no: 0, name: "UNKNOWN_AUDIO_TYPE" }, - { no: 1, name: "AAC" }, - { no: 2, name: "AMR" }, -]); +proto3.util.setEnumType(AudioMessage_AudioType, 'AudioMessage.AudioType', [ + { no: 0, name: 'UNKNOWN_AUDIO_TYPE' }, + { no: 1, name: 'AAC' }, + { no: 2, name: 'AMR' }, +]) /** * @generated from message EditMessage @@ -175,69 +228,86 @@ export class EditMessage extends Message { /** * @generated from field: uint64 clock = 1; */ - clock = protoInt64.zero; + clock = protoInt64.zero /** * Text of the message * * @generated from field: string text = 2; */ - text = ""; + text = '' /** * @generated from field: string chat_id = 3; */ - chatId = ""; + chatId = '' /** * @generated from field: string message_id = 4; */ - messageId = ""; + messageId = '' /** * Grant for community edit messages * * @generated from field: bytes grant = 5; */ - grant = new Uint8Array(0); + grant = new Uint8Array(0) /** * The type of message (public/one-to-one/private-group-chat) * * @generated from field: MessageType message_type = 6; */ - messageType = MessageType.UNKNOWN_MESSAGE_TYPE; + messageType = MessageType.UNKNOWN_MESSAGE_TYPE constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); + super() + proto3.util.initPartial(data, this) } - static readonly runtime = proto3; - static readonly typeName = "EditMessage"; + static readonly runtime = proto3 + static readonly typeName = 'EditMessage' static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "clock", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 2, name: "text", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "chat_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "message_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 5, name: "grant", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - { no: 6, name: "message_type", kind: "enum", T: proto3.getEnumType(MessageType) }, - ]); + { no: 1, name: 'clock', kind: 'scalar', T: 4 /* ScalarType.UINT64 */ }, + { no: 2, name: 'text', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, + { no: 3, name: 'chat_id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, + { no: 4, name: 'message_id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, + { no: 5, name: 'grant', kind: 'scalar', T: 12 /* ScalarType.BYTES */ }, + { + no: 6, + name: 'message_type', + kind: 'enum', + T: proto3.getEnumType(MessageType), + }, + ]) - static fromBinary(bytes: Uint8Array, options?: Partial): EditMessage { - return new EditMessage().fromBinary(bytes, options); + static fromBinary( + bytes: Uint8Array, + options?: Partial + ): EditMessage { + return new EditMessage().fromBinary(bytes, options) } - static fromJson(jsonValue: JsonValue, options?: Partial): EditMessage { - return new EditMessage().fromJson(jsonValue, options); + static fromJson( + jsonValue: JsonValue, + options?: Partial + ): EditMessage { + return new EditMessage().fromJson(jsonValue, options) } - static fromJsonString(jsonString: string, options?: Partial): EditMessage { - return new EditMessage().fromJsonString(jsonString, options); + static fromJsonString( + jsonString: string, + options?: Partial + ): EditMessage { + return new EditMessage().fromJsonString(jsonString, options) } - static equals(a: EditMessage | PlainMessage | undefined, b: EditMessage | PlainMessage | undefined): boolean { - return proto3.util.equals(EditMessage, a, b); + static equals( + a: EditMessage | PlainMessage | undefined, + b: EditMessage | PlainMessage | undefined + ): boolean { + return proto3.util.equals(EditMessage, a, b) } } @@ -248,61 +318,78 @@ export class DeleteMessage extends Message { /** * @generated from field: uint64 clock = 1; */ - clock = protoInt64.zero; + clock = protoInt64.zero /** * @generated from field: string chat_id = 2; */ - chatId = ""; + chatId = '' /** * @generated from field: string message_id = 3; */ - messageId = ""; + messageId = '' /** * Grant for community delete messages * * @generated from field: bytes grant = 4; */ - grant = new Uint8Array(0); + grant = new Uint8Array(0) /** * The type of message (public/one-to-one/private-group-chat) * * @generated from field: MessageType message_type = 5; */ - messageType = MessageType.UNKNOWN_MESSAGE_TYPE; + messageType = MessageType.UNKNOWN_MESSAGE_TYPE constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); + super() + proto3.util.initPartial(data, this) } - static readonly runtime = proto3; - static readonly typeName = "DeleteMessage"; + static readonly runtime = proto3 + static readonly typeName = 'DeleteMessage' static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "clock", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 2, name: "chat_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "message_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "grant", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - { no: 5, name: "message_type", kind: "enum", T: proto3.getEnumType(MessageType) }, - ]); + { no: 1, name: 'clock', kind: 'scalar', T: 4 /* ScalarType.UINT64 */ }, + { no: 2, name: 'chat_id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, + { no: 3, name: 'message_id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, + { no: 4, name: 'grant', kind: 'scalar', T: 12 /* ScalarType.BYTES */ }, + { + no: 5, + name: 'message_type', + kind: 'enum', + T: proto3.getEnumType(MessageType), + }, + ]) - static fromBinary(bytes: Uint8Array, options?: Partial): DeleteMessage { - return new DeleteMessage().fromBinary(bytes, options); + static fromBinary( + bytes: Uint8Array, + options?: Partial + ): DeleteMessage { + return new DeleteMessage().fromBinary(bytes, options) } - static fromJson(jsonValue: JsonValue, options?: Partial): DeleteMessage { - return new DeleteMessage().fromJson(jsonValue, options); + static fromJson( + jsonValue: JsonValue, + options?: Partial + ): DeleteMessage { + return new DeleteMessage().fromJson(jsonValue, options) } - static fromJsonString(jsonString: string, options?: Partial): DeleteMessage { - return new DeleteMessage().fromJsonString(jsonString, options); + static fromJsonString( + jsonString: string, + options?: Partial + ): DeleteMessage { + return new DeleteMessage().fromJsonString(jsonString, options) } - static equals(a: DeleteMessage | PlainMessage | undefined, b: DeleteMessage | PlainMessage | undefined): boolean { - return proto3.util.equals(DeleteMessage, a, b); + static equals( + a: DeleteMessage | PlainMessage | undefined, + b: DeleteMessage | PlainMessage | undefined + ): boolean { + return proto3.util.equals(DeleteMessage, a, b) } } @@ -315,7 +402,7 @@ export class ChatMessage extends Message { * * @generated from field: uint64 clock = 1; */ - clock = protoInt64.zero; + clock = protoInt64.zero /** * Unix timestamps in milliseconds, currently not used as we use whisper as more reliable, but here @@ -323,28 +410,28 @@ export class ChatMessage extends Message { * * @generated from field: uint64 timestamp = 2; */ - timestamp = protoInt64.zero; + timestamp = protoInt64.zero /** * Text of the message * * @generated from field: string text = 3; */ - text = ""; + text = '' /** * Id of the message that we are replying to * * @generated from field: string response_to = 4; */ - responseTo = ""; + responseTo = '' /** * Ens name of the sender * * @generated from field: string ens_name = 5; */ - ensName = ""; + ensName = '' /** * Chat id, this field is symmetric for public-chats and private group chats, @@ -354,103 +441,164 @@ export class ChatMessage extends Message { * * @generated from field: string chat_id = 6; */ - chatId = ""; + chatId = '' /** * The type of message (public/one-to-one/private-group-chat) * * @generated from field: MessageType message_type = 7; */ - messageType = MessageType.UNKNOWN_MESSAGE_TYPE; + messageType = MessageType.UNKNOWN_MESSAGE_TYPE /** * The type of the content of the message * * @generated from field: ChatMessage.ContentType content_type = 8; */ - contentType = ChatMessage_ContentType.UNKNOWN_CONTENT_TYPE; + contentType = ChatMessage_ContentType.UNKNOWN_CONTENT_TYPE /** * @generated from oneof ChatMessage.payload */ - payload: { - /** - * @generated from field: StickerMessage sticker = 9; - */ - value: StickerMessage; - case: "sticker"; - } | { - /** - * @generated from field: ImageMessage image = 10; - */ - value: ImageMessage; - case: "image"; - } | { - /** - * @generated from field: AudioMessage audio = 11; - */ - value: AudioMessage; - case: "audio"; - } | { - /** - * @generated from field: bytes community = 12; - */ - value: Uint8Array; - case: "community"; - } | { case: undefined; value?: undefined } = { case: undefined }; + payload: + | { + /** + * @generated from field: StickerMessage sticker = 9; + */ + value: StickerMessage + case: 'sticker' + } + | { + /** + * @generated from field: ImageMessage image = 10; + */ + value: ImageMessage + case: 'image' + } + | { + /** + * @generated from field: AudioMessage audio = 11; + */ + value: AudioMessage + case: 'audio' + } + | { + /** + * @generated from field: bytes community = 12; + */ + value: Uint8Array + case: 'community' + } + | { case: undefined; value?: undefined } = { case: undefined } /** * Grant for community chat messages * * @generated from field: bytes grant = 13; */ - grant = new Uint8Array(0); + grant = new Uint8Array(0) /** * Message author's display name, introduced in version 1 * * @generated from field: string display_name = 14; */ - displayName = ""; + displayName = '' constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); + super() + proto3.util.initPartial(data, this) } - static readonly runtime = proto3; - static readonly typeName = "ChatMessage"; + static readonly runtime = proto3 + static readonly typeName = 'ChatMessage' static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "clock", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 2, name: "timestamp", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 3, name: "text", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "response_to", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 5, name: "ens_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 6, name: "chat_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 7, name: "message_type", kind: "enum", T: proto3.getEnumType(MessageType) }, - { no: 8, name: "content_type", kind: "enum", T: proto3.getEnumType(ChatMessage_ContentType) }, - { no: 9, name: "sticker", kind: "message", T: StickerMessage, oneof: "payload" }, - { no: 10, name: "image", kind: "message", T: ImageMessage, oneof: "payload" }, - { no: 11, name: "audio", kind: "message", T: AudioMessage, oneof: "payload" }, - { no: 12, name: "community", kind: "scalar", T: 12 /* ScalarType.BYTES */, oneof: "payload" }, - { no: 13, name: "grant", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - { no: 14, name: "display_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); + { no: 1, name: 'clock', kind: 'scalar', T: 4 /* ScalarType.UINT64 */ }, + { no: 2, name: 'timestamp', kind: 'scalar', T: 4 /* ScalarType.UINT64 */ }, + { no: 3, name: 'text', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, + { + no: 4, + name: 'response_to', + kind: 'scalar', + T: 9 /* ScalarType.STRING */, + }, + { no: 5, name: 'ens_name', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, + { no: 6, name: 'chat_id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, + { + no: 7, + name: 'message_type', + kind: 'enum', + T: proto3.getEnumType(MessageType), + }, + { + no: 8, + name: 'content_type', + kind: 'enum', + T: proto3.getEnumType(ChatMessage_ContentType), + }, + { + no: 9, + name: 'sticker', + kind: 'message', + T: StickerMessage, + oneof: 'payload', + }, + { + no: 10, + name: 'image', + kind: 'message', + T: ImageMessage, + oneof: 'payload', + }, + { + no: 11, + name: 'audio', + kind: 'message', + T: AudioMessage, + oneof: 'payload', + }, + { + no: 12, + name: 'community', + kind: 'scalar', + T: 12 /* ScalarType.BYTES */, + oneof: 'payload', + }, + { no: 13, name: 'grant', kind: 'scalar', T: 12 /* ScalarType.BYTES */ }, + { + no: 14, + name: 'display_name', + kind: 'scalar', + T: 9 /* ScalarType.STRING */, + }, + ]) - static fromBinary(bytes: Uint8Array, options?: Partial): ChatMessage { - return new ChatMessage().fromBinary(bytes, options); + static fromBinary( + bytes: Uint8Array, + options?: Partial + ): ChatMessage { + return new ChatMessage().fromBinary(bytes, options) } - static fromJson(jsonValue: JsonValue, options?: Partial): ChatMessage { - return new ChatMessage().fromJson(jsonValue, options); + static fromJson( + jsonValue: JsonValue, + options?: Partial + ): ChatMessage { + return new ChatMessage().fromJson(jsonValue, options) } - static fromJsonString(jsonString: string, options?: Partial): ChatMessage { - return new ChatMessage().fromJsonString(jsonString, options); + static fromJsonString( + jsonString: string, + options?: Partial + ): ChatMessage { + return new ChatMessage().fromJsonString(jsonString, options) } - static equals(a: ChatMessage | PlainMessage | undefined, b: ChatMessage | PlainMessage | undefined): boolean { - return proto3.util.equals(ChatMessage, a, b); + static equals( + a: ChatMessage | PlainMessage | undefined, + b: ChatMessage | PlainMessage | undefined + ): boolean { + return proto3.util.equals(ChatMessage, a, b) } } @@ -518,17 +666,16 @@ export enum ChatMessage_ContentType { SYSTEM_MESSAGE_GAP = 10, } // Retrieve enum metadata with: proto3.getEnumType(ChatMessage_ContentType) -proto3.util.setEnumType(ChatMessage_ContentType, "ChatMessage.ContentType", [ - { no: 0, name: "UNKNOWN_CONTENT_TYPE" }, - { no: 1, name: "TEXT_PLAIN" }, - { no: 2, name: "STICKER" }, - { no: 3, name: "STATUS" }, - { no: 4, name: "EMOJI" }, - { no: 5, name: "TRANSACTION_COMMAND" }, - { no: 6, name: "SYSTEM_MESSAGE_CONTENT_PRIVATE_GROUP" }, - { no: 7, name: "IMAGE" }, - { no: 8, name: "AUDIO" }, - { no: 9, name: "COMMUNITY" }, - { no: 10, name: "SYSTEM_MESSAGE_GAP" }, -]); - +proto3.util.setEnumType(ChatMessage_ContentType, 'ChatMessage.ContentType', [ + { no: 0, name: 'UNKNOWN_CONTENT_TYPE' }, + { no: 1, name: 'TEXT_PLAIN' }, + { no: 2, name: 'STICKER' }, + { no: 3, name: 'STATUS' }, + { no: 4, name: 'EMOJI' }, + { no: 5, name: 'TRANSACTION_COMMAND' }, + { no: 6, name: 'SYSTEM_MESSAGE_CONTENT_PRIVATE_GROUP' }, + { no: 7, name: 'IMAGE' }, + { no: 8, name: 'AUDIO' }, + { no: 9, name: 'COMMUNITY' }, + { no: 10, name: 'SYSTEM_MESSAGE_GAP' }, +]) diff --git a/packages/status-js/src/protos/communities_pb.ts b/packages/status-js/src/protos/communities_pb.ts index 09744c3f..b0e3c342 100644 --- a/packages/status-js/src/protos/communities_pb.ts +++ b/packages/status-js/src/protos/communities_pb.ts @@ -3,10 +3,17 @@ /* eslint-disable */ // @ts-nocheck -import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; -import { Message, proto3, protoInt64 } from "@bufbuild/protobuf"; -import { ChatIdentity } from "./chat-identity_pb.js"; -import { URLParams } from "./url-data_pb.js"; +import type { + BinaryReadOptions, + FieldList, + JsonReadOptions, + JsonValue, + PartialMessage, + PlainMessage, +} from '@bufbuild/protobuf' +import { Message, proto3, protoInt64 } from '@bufbuild/protobuf' +import { ChatIdentity } from './chat-identity_pb.js' +import { URLParams } from './url-data_pb.js' /** * @generated from message Grant @@ -15,51 +22,68 @@ export class Grant extends Message { /** * @generated from field: bytes community_id = 1; */ - communityId = new Uint8Array(0); + communityId = new Uint8Array(0) /** * @generated from field: bytes member_id = 2; */ - memberId = new Uint8Array(0); + memberId = new Uint8Array(0) /** * @generated from field: string chat_id = 3; */ - chatId = ""; + chatId = '' /** * @generated from field: uint64 clock = 4; */ - clock = protoInt64.zero; + clock = protoInt64.zero constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); + super() + proto3.util.initPartial(data, this) } - static readonly runtime = proto3; - static readonly typeName = "Grant"; + static readonly runtime = proto3 + static readonly typeName = 'Grant' static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "community_id", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - { no: 2, name: "member_id", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - { no: 3, name: "chat_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "clock", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - ]); + { + no: 1, + name: 'community_id', + kind: 'scalar', + T: 12 /* ScalarType.BYTES */, + }, + { no: 2, name: 'member_id', kind: 'scalar', T: 12 /* ScalarType.BYTES */ }, + { no: 3, name: 'chat_id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, + { no: 4, name: 'clock', kind: 'scalar', T: 4 /* ScalarType.UINT64 */ }, + ]) - static fromBinary(bytes: Uint8Array, options?: Partial): Grant { - return new Grant().fromBinary(bytes, options); + static fromBinary( + bytes: Uint8Array, + options?: Partial + ): Grant { + return new Grant().fromBinary(bytes, options) } - static fromJson(jsonValue: JsonValue, options?: Partial): Grant { - return new Grant().fromJson(jsonValue, options); + static fromJson( + jsonValue: JsonValue, + options?: Partial + ): Grant { + return new Grant().fromJson(jsonValue, options) } - static fromJsonString(jsonString: string, options?: Partial): Grant { - return new Grant().fromJsonString(jsonString, options); + static fromJsonString( + jsonString: string, + options?: Partial + ): Grant { + return new Grant().fromJsonString(jsonString, options) } - static equals(a: Grant | PlainMessage | undefined, b: Grant | PlainMessage | undefined): boolean { - return proto3.util.equals(Grant, a, b); + static equals( + a: Grant | PlainMessage | undefined, + b: Grant | PlainMessage | undefined + ): boolean { + return proto3.util.equals(Grant, a, b) } } @@ -70,33 +94,51 @@ export class CommunityMember extends Message { /** * @generated from field: repeated CommunityMember.Roles roles = 1; */ - roles: CommunityMember_Roles[] = []; + roles: CommunityMember_Roles[] = [] constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); + super() + proto3.util.initPartial(data, this) } - static readonly runtime = proto3; - static readonly typeName = "CommunityMember"; + static readonly runtime = proto3 + static readonly typeName = 'CommunityMember' static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "roles", kind: "enum", T: proto3.getEnumType(CommunityMember_Roles), repeated: true }, - ]); + { + no: 1, + name: 'roles', + kind: 'enum', + T: proto3.getEnumType(CommunityMember_Roles), + repeated: true, + }, + ]) - static fromBinary(bytes: Uint8Array, options?: Partial): CommunityMember { - return new CommunityMember().fromBinary(bytes, options); + static fromBinary( + bytes: Uint8Array, + options?: Partial + ): CommunityMember { + return new CommunityMember().fromBinary(bytes, options) } - static fromJson(jsonValue: JsonValue, options?: Partial): CommunityMember { - return new CommunityMember().fromJson(jsonValue, options); + static fromJson( + jsonValue: JsonValue, + options?: Partial + ): CommunityMember { + return new CommunityMember().fromJson(jsonValue, options) } - static fromJsonString(jsonString: string, options?: Partial): CommunityMember { - return new CommunityMember().fromJsonString(jsonString, options); + static fromJsonString( + jsonString: string, + options?: Partial + ): CommunityMember { + return new CommunityMember().fromJsonString(jsonString, options) } - static equals(a: CommunityMember | PlainMessage | undefined, b: CommunityMember | PlainMessage | undefined): boolean { - return proto3.util.equals(CommunityMember, a, b); + static equals( + a: CommunityMember | PlainMessage | undefined, + b: CommunityMember | PlainMessage | undefined + ): boolean { + return proto3.util.equals(CommunityMember, a, b) } } @@ -125,12 +167,12 @@ export enum CommunityMember_Roles { ROLE_MODERATE_CONTENT = 3, } // Retrieve enum metadata with: proto3.getEnumType(CommunityMember_Roles) -proto3.util.setEnumType(CommunityMember_Roles, "CommunityMember.Roles", [ - { no: 0, name: "UNKNOWN_ROLE" }, - { no: 1, name: "ROLE_ALL" }, - { no: 2, name: "ROLE_MANAGE_USERS" }, - { no: 3, name: "ROLE_MODERATE_CONTENT" }, -]); +proto3.util.setEnumType(CommunityMember_Roles, 'CommunityMember.Roles', [ + { no: 0, name: 'UNKNOWN_ROLE' }, + { no: 1, name: 'ROLE_ALL' }, + { no: 2, name: 'ROLE_MANAGE_USERS' }, + { no: 3, name: 'ROLE_MODERATE_CONTENT' }, +]) /** * @generated from message CommunityPermissions @@ -139,47 +181,64 @@ export class CommunityPermissions extends Message { /** * @generated from field: bool ens_only = 1; */ - ensOnly = false; + ensOnly = false /** * https://gitlab.matrix.org/matrix-org/olm/blob/master/docs/megolm.md is a candidate for the algorithm to be used in case we want to have private communityal chats, lighter than pairwise encryption using the DR, less secure, but more efficient for large number of participants * * @generated from field: bool private = 2; */ - private = false; + private = false /** * @generated from field: CommunityPermissions.Access access = 3; */ - access = CommunityPermissions_Access.UNKNOWN_ACCESS; + access = CommunityPermissions_Access.UNKNOWN_ACCESS constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); + super() + proto3.util.initPartial(data, this) } - static readonly runtime = proto3; - static readonly typeName = "CommunityPermissions"; + static readonly runtime = proto3 + static readonly typeName = 'CommunityPermissions' static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "ens_only", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 2, name: "private", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 3, name: "access", kind: "enum", T: proto3.getEnumType(CommunityPermissions_Access) }, - ]); + { no: 1, name: 'ens_only', kind: 'scalar', T: 8 /* ScalarType.BOOL */ }, + { no: 2, name: 'private', kind: 'scalar', T: 8 /* ScalarType.BOOL */ }, + { + no: 3, + name: 'access', + kind: 'enum', + T: proto3.getEnumType(CommunityPermissions_Access), + }, + ]) - static fromBinary(bytes: Uint8Array, options?: Partial): CommunityPermissions { - return new CommunityPermissions().fromBinary(bytes, options); + static fromBinary( + bytes: Uint8Array, + options?: Partial + ): CommunityPermissions { + return new CommunityPermissions().fromBinary(bytes, options) } - static fromJson(jsonValue: JsonValue, options?: Partial): CommunityPermissions { - return new CommunityPermissions().fromJson(jsonValue, options); + static fromJson( + jsonValue: JsonValue, + options?: Partial + ): CommunityPermissions { + return new CommunityPermissions().fromJson(jsonValue, options) } - static fromJsonString(jsonString: string, options?: Partial): CommunityPermissions { - return new CommunityPermissions().fromJsonString(jsonString, options); + static fromJsonString( + jsonString: string, + options?: Partial + ): CommunityPermissions { + return new CommunityPermissions().fromJsonString(jsonString, options) } - static equals(a: CommunityPermissions | PlainMessage | undefined, b: CommunityPermissions | PlainMessage | undefined): boolean { - return proto3.util.equals(CommunityPermissions, a, b); + static equals( + a: CommunityPermissions | PlainMessage | undefined, + b: CommunityPermissions | PlainMessage | undefined + ): boolean { + return proto3.util.equals(CommunityPermissions, a, b) } } @@ -208,12 +267,16 @@ export enum CommunityPermissions_Access { ON_REQUEST = 3, } // Retrieve enum metadata with: proto3.getEnumType(CommunityPermissions_Access) -proto3.util.setEnumType(CommunityPermissions_Access, "CommunityPermissions.Access", [ - { no: 0, name: "UNKNOWN_ACCESS" }, - { no: 1, name: "NO_MEMBERSHIP" }, - { no: 2, name: "INVITATION_ONLY" }, - { no: 3, name: "ON_REQUEST" }, -]); +proto3.util.setEnumType( + CommunityPermissions_Access, + 'CommunityPermissions.Access', + [ + { no: 0, name: 'UNKNOWN_ACCESS' }, + { no: 1, name: 'NO_MEMBERSHIP' }, + { no: 2, name: 'INVITATION_ONLY' }, + { no: 3, name: 'ON_REQUEST' }, + ] +) /** * @generated from message CommunityDescription @@ -222,111 +285,173 @@ export class CommunityDescription extends Message { /** * @generated from field: uint64 clock = 1; */ - clock = protoInt64.zero; + clock = protoInt64.zero /** * @generated from field: map members = 2; */ - members: { [key: string]: CommunityMember } = {}; + members: { [key: string]: CommunityMember } = {} /** * @generated from field: CommunityPermissions permissions = 3; */ - permissions?: CommunityPermissions; + permissions?: CommunityPermissions /** * @generated from field: ChatIdentity identity = 5; */ - identity?: ChatIdentity; + identity?: ChatIdentity /** * @generated from field: map chats = 6; */ - chats: { [key: string]: CommunityChat } = {}; + chats: { [key: string]: CommunityChat } = {} /** * @generated from field: repeated string ban_list = 7; */ - banList: string[] = []; + banList: string[] = [] /** * @generated from field: map categories = 8; */ - categories: { [key: string]: CommunityCategory } = {}; + categories: { [key: string]: CommunityCategory } = {} /** * @generated from field: uint64 archive_magnetlink_clock = 9; */ - archiveMagnetlinkClock = protoInt64.zero; + archiveMagnetlinkClock = protoInt64.zero /** * @generated from field: CommunityAdminSettings admin_settings = 10; */ - adminSettings?: CommunityAdminSettings; + adminSettings?: CommunityAdminSettings /** * @generated from field: string intro_message = 11; */ - introMessage = ""; + introMessage = '' /** * @generated from field: string outro_message = 12; */ - outroMessage = ""; + outroMessage = '' /** * @generated from field: bool encrypted = 13; */ - encrypted = false; + encrypted = false /** * @generated from field: repeated string tags = 14; */ - tags: string[] = []; + tags: string[] = [] /** * @generated from field: URLParams url_params = 15; */ - urlParams?: URLParams; + urlParams?: URLParams constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); + super() + proto3.util.initPartial(data, this) } - static readonly runtime = proto3; - static readonly typeName = "CommunityDescription"; + static readonly runtime = proto3 + static readonly typeName = 'CommunityDescription' static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "clock", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 2, name: "members", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "message", T: CommunityMember} }, - { no: 3, name: "permissions", kind: "message", T: CommunityPermissions }, - { no: 5, name: "identity", kind: "message", T: ChatIdentity }, - { no: 6, name: "chats", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "message", T: CommunityChat} }, - { no: 7, name: "ban_list", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - { no: 8, name: "categories", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "message", T: CommunityCategory} }, - { no: 9, name: "archive_magnetlink_clock", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 10, name: "admin_settings", kind: "message", T: CommunityAdminSettings }, - { no: 11, name: "intro_message", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 12, name: "outro_message", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 13, name: "encrypted", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 14, name: "tags", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - { no: 15, name: "url_params", kind: "message", T: URLParams }, - ]); + { no: 1, name: 'clock', kind: 'scalar', T: 4 /* ScalarType.UINT64 */ }, + { + no: 2, + name: 'members', + kind: 'map', + K: 9 /* ScalarType.STRING */, + V: { kind: 'message', T: CommunityMember }, + }, + { no: 3, name: 'permissions', kind: 'message', T: CommunityPermissions }, + { no: 5, name: 'identity', kind: 'message', T: ChatIdentity }, + { + no: 6, + name: 'chats', + kind: 'map', + K: 9 /* ScalarType.STRING */, + V: { kind: 'message', T: CommunityChat }, + }, + { + no: 7, + name: 'ban_list', + kind: 'scalar', + T: 9 /* ScalarType.STRING */, + repeated: true, + }, + { + no: 8, + name: 'categories', + kind: 'map', + K: 9 /* ScalarType.STRING */, + V: { kind: 'message', T: CommunityCategory }, + }, + { + no: 9, + name: 'archive_magnetlink_clock', + kind: 'scalar', + T: 4 /* ScalarType.UINT64 */, + }, + { + no: 10, + name: 'admin_settings', + kind: 'message', + T: CommunityAdminSettings, + }, + { + no: 11, + name: 'intro_message', + kind: 'scalar', + T: 9 /* ScalarType.STRING */, + }, + { + no: 12, + name: 'outro_message', + kind: 'scalar', + T: 9 /* ScalarType.STRING */, + }, + { no: 13, name: 'encrypted', kind: 'scalar', T: 8 /* ScalarType.BOOL */ }, + { + no: 14, + name: 'tags', + kind: 'scalar', + T: 9 /* ScalarType.STRING */, + repeated: true, + }, + { no: 15, name: 'url_params', kind: 'message', T: URLParams }, + ]) - static fromBinary(bytes: Uint8Array, options?: Partial): CommunityDescription { - return new CommunityDescription().fromBinary(bytes, options); + static fromBinary( + bytes: Uint8Array, + options?: Partial + ): CommunityDescription { + return new CommunityDescription().fromBinary(bytes, options) } - static fromJson(jsonValue: JsonValue, options?: Partial): CommunityDescription { - return new CommunityDescription().fromJson(jsonValue, options); + static fromJson( + jsonValue: JsonValue, + options?: Partial + ): CommunityDescription { + return new CommunityDescription().fromJson(jsonValue, options) } - static fromJsonString(jsonString: string, options?: Partial): CommunityDescription { - return new CommunityDescription().fromJsonString(jsonString, options); + static fromJsonString( + jsonString: string, + options?: Partial + ): CommunityDescription { + return new CommunityDescription().fromJsonString(jsonString, options) } - static equals(a: CommunityDescription | PlainMessage | undefined, b: CommunityDescription | PlainMessage | undefined): boolean { - return proto3.util.equals(CommunityDescription, a, b); + static equals( + a: CommunityDescription | PlainMessage | undefined, + b: CommunityDescription | PlainMessage | undefined + ): boolean { + return proto3.util.equals(CommunityDescription, a, b) } } @@ -337,33 +462,53 @@ export class CommunityAdminSettings extends Message { /** * @generated from field: bool pin_message_all_members_enabled = 1; */ - pinMessageAllMembersEnabled = false; + pinMessageAllMembersEnabled = false constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); + super() + proto3.util.initPartial(data, this) } - static readonly runtime = proto3; - static readonly typeName = "CommunityAdminSettings"; + static readonly runtime = proto3 + static readonly typeName = 'CommunityAdminSettings' static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "pin_message_all_members_enabled", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - ]); + { + no: 1, + name: 'pin_message_all_members_enabled', + kind: 'scalar', + T: 8 /* ScalarType.BOOL */, + }, + ]) - static fromBinary(bytes: Uint8Array, options?: Partial): CommunityAdminSettings { - return new CommunityAdminSettings().fromBinary(bytes, options); + static fromBinary( + bytes: Uint8Array, + options?: Partial + ): CommunityAdminSettings { + return new CommunityAdminSettings().fromBinary(bytes, options) } - static fromJson(jsonValue: JsonValue, options?: Partial): CommunityAdminSettings { - return new CommunityAdminSettings().fromJson(jsonValue, options); + static fromJson( + jsonValue: JsonValue, + options?: Partial + ): CommunityAdminSettings { + return new CommunityAdminSettings().fromJson(jsonValue, options) } - static fromJsonString(jsonString: string, options?: Partial): CommunityAdminSettings { - return new CommunityAdminSettings().fromJsonString(jsonString, options); + static fromJsonString( + jsonString: string, + options?: Partial + ): CommunityAdminSettings { + return new CommunityAdminSettings().fromJsonString(jsonString, options) } - static equals(a: CommunityAdminSettings | PlainMessage | undefined, b: CommunityAdminSettings | PlainMessage | undefined): boolean { - return proto3.util.equals(CommunityAdminSettings, a, b); + static equals( + a: + | CommunityAdminSettings + | PlainMessage + | undefined, + b: CommunityAdminSettings | PlainMessage | undefined + ): boolean { + return proto3.util.equals(CommunityAdminSettings, a, b) } } @@ -374,63 +519,86 @@ export class CommunityChat extends Message { /** * @generated from field: map members = 1; */ - members: { [key: string]: CommunityMember } = {}; + members: { [key: string]: CommunityMember } = {} /** * @generated from field: CommunityPermissions permissions = 2; */ - permissions?: CommunityPermissions; + permissions?: CommunityPermissions /** * @generated from field: ChatIdentity identity = 3; */ - identity?: ChatIdentity; + identity?: ChatIdentity /** * @generated from field: string category_id = 4; */ - categoryId = ""; + categoryId = '' /** * @generated from field: int32 position = 5; */ - position = 0; + position = 0 /** * @generated from field: URLParams url_params = 6; */ - urlParams?: URLParams; + urlParams?: URLParams constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); + super() + proto3.util.initPartial(data, this) } - static readonly runtime = proto3; - static readonly typeName = "CommunityChat"; + static readonly runtime = proto3 + static readonly typeName = 'CommunityChat' static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "members", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "message", T: CommunityMember} }, - { no: 2, name: "permissions", kind: "message", T: CommunityPermissions }, - { no: 3, name: "identity", kind: "message", T: ChatIdentity }, - { no: 4, name: "category_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 5, name: "position", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, - { no: 6, name: "url_params", kind: "message", T: URLParams }, - ]); + { + no: 1, + name: 'members', + kind: 'map', + K: 9 /* ScalarType.STRING */, + V: { kind: 'message', T: CommunityMember }, + }, + { no: 2, name: 'permissions', kind: 'message', T: CommunityPermissions }, + { no: 3, name: 'identity', kind: 'message', T: ChatIdentity }, + { + no: 4, + name: 'category_id', + kind: 'scalar', + T: 9 /* ScalarType.STRING */, + }, + { no: 5, name: 'position', kind: 'scalar', T: 5 /* ScalarType.INT32 */ }, + { no: 6, name: 'url_params', kind: 'message', T: URLParams }, + ]) - static fromBinary(bytes: Uint8Array, options?: Partial): CommunityChat { - return new CommunityChat().fromBinary(bytes, options); + static fromBinary( + bytes: Uint8Array, + options?: Partial + ): CommunityChat { + return new CommunityChat().fromBinary(bytes, options) } - static fromJson(jsonValue: JsonValue, options?: Partial): CommunityChat { - return new CommunityChat().fromJson(jsonValue, options); + static fromJson( + jsonValue: JsonValue, + options?: Partial + ): CommunityChat { + return new CommunityChat().fromJson(jsonValue, options) } - static fromJsonString(jsonString: string, options?: Partial): CommunityChat { - return new CommunityChat().fromJsonString(jsonString, options); + static fromJsonString( + jsonString: string, + options?: Partial + ): CommunityChat { + return new CommunityChat().fromJsonString(jsonString, options) } - static equals(a: CommunityChat | PlainMessage | undefined, b: CommunityChat | PlainMessage | undefined): boolean { - return proto3.util.equals(CommunityChat, a, b); + static equals( + a: CommunityChat | PlainMessage | undefined, + b: CommunityChat | PlainMessage | undefined + ): boolean { + return proto3.util.equals(CommunityChat, a, b) } } @@ -441,45 +609,62 @@ export class CommunityCategory extends Message { /** * @generated from field: string category_id = 1; */ - categoryId = ""; + categoryId = '' /** * @generated from field: string name = 2; */ - name = ""; + name = '' /** * @generated from field: int32 position = 3; */ - position = 0; + position = 0 constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); + super() + proto3.util.initPartial(data, this) } - static readonly runtime = proto3; - static readonly typeName = "CommunityCategory"; + static readonly runtime = proto3 + static readonly typeName = 'CommunityCategory' static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "category_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "position", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, - ]); + { + no: 1, + name: 'category_id', + kind: 'scalar', + T: 9 /* ScalarType.STRING */, + }, + { no: 2, name: 'name', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, + { no: 3, name: 'position', kind: 'scalar', T: 5 /* ScalarType.INT32 */ }, + ]) - static fromBinary(bytes: Uint8Array, options?: Partial): CommunityCategory { - return new CommunityCategory().fromBinary(bytes, options); + static fromBinary( + bytes: Uint8Array, + options?: Partial + ): CommunityCategory { + return new CommunityCategory().fromBinary(bytes, options) } - static fromJson(jsonValue: JsonValue, options?: Partial): CommunityCategory { - return new CommunityCategory().fromJson(jsonValue, options); + static fromJson( + jsonValue: JsonValue, + options?: Partial + ): CommunityCategory { + return new CommunityCategory().fromJson(jsonValue, options) } - static fromJsonString(jsonString: string, options?: Partial): CommunityCategory { - return new CommunityCategory().fromJsonString(jsonString, options); + static fromJsonString( + jsonString: string, + options?: Partial + ): CommunityCategory { + return new CommunityCategory().fromJsonString(jsonString, options) } - static equals(a: CommunityCategory | PlainMessage | undefined, b: CommunityCategory | PlainMessage | undefined): boolean { - return proto3.util.equals(CommunityCategory, a, b); + static equals( + a: CommunityCategory | PlainMessage | undefined, + b: CommunityCategory | PlainMessage | undefined + ): boolean { + return proto3.util.equals(CommunityCategory, a, b) } } @@ -490,51 +675,68 @@ export class CommunityInvitation extends Message { /** * @generated from field: bytes community_description = 1; */ - communityDescription = new Uint8Array(0); + communityDescription = new Uint8Array(0) /** * @generated from field: bytes grant = 2; */ - grant = new Uint8Array(0); + grant = new Uint8Array(0) /** * @generated from field: string chat_id = 3; */ - chatId = ""; + chatId = '' /** * @generated from field: bytes public_key = 4; */ - publicKey = new Uint8Array(0); + publicKey = new Uint8Array(0) constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); + super() + proto3.util.initPartial(data, this) } - static readonly runtime = proto3; - static readonly typeName = "CommunityInvitation"; + static readonly runtime = proto3 + static readonly typeName = 'CommunityInvitation' static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "community_description", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - { no: 2, name: "grant", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - { no: 3, name: "chat_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "public_key", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - ]); + { + no: 1, + name: 'community_description', + kind: 'scalar', + T: 12 /* ScalarType.BYTES */, + }, + { no: 2, name: 'grant', kind: 'scalar', T: 12 /* ScalarType.BYTES */ }, + { no: 3, name: 'chat_id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, + { no: 4, name: 'public_key', kind: 'scalar', T: 12 /* ScalarType.BYTES */ }, + ]) - static fromBinary(bytes: Uint8Array, options?: Partial): CommunityInvitation { - return new CommunityInvitation().fromBinary(bytes, options); + static fromBinary( + bytes: Uint8Array, + options?: Partial + ): CommunityInvitation { + return new CommunityInvitation().fromBinary(bytes, options) } - static fromJson(jsonValue: JsonValue, options?: Partial): CommunityInvitation { - return new CommunityInvitation().fromJson(jsonValue, options); + static fromJson( + jsonValue: JsonValue, + options?: Partial + ): CommunityInvitation { + return new CommunityInvitation().fromJson(jsonValue, options) } - static fromJsonString(jsonString: string, options?: Partial): CommunityInvitation { - return new CommunityInvitation().fromJsonString(jsonString, options); + static fromJsonString( + jsonString: string, + options?: Partial + ): CommunityInvitation { + return new CommunityInvitation().fromJsonString(jsonString, options) } - static equals(a: CommunityInvitation | PlainMessage | undefined, b: CommunityInvitation | PlainMessage | undefined): boolean { - return proto3.util.equals(CommunityInvitation, a, b); + static equals( + a: CommunityInvitation | PlainMessage | undefined, + b: CommunityInvitation | PlainMessage | undefined + ): boolean { + return proto3.util.equals(CommunityInvitation, a, b) } } @@ -545,57 +747,82 @@ export class CommunityRequestToJoin extends Message { /** * @generated from field: uint64 clock = 1; */ - clock = protoInt64.zero; + clock = protoInt64.zero /** * @generated from field: string ens_name = 2; */ - ensName = ""; + ensName = '' /** * @generated from field: string chat_id = 3; */ - chatId = ""; + chatId = '' /** * @generated from field: bytes community_id = 4; */ - communityId = new Uint8Array(0); + communityId = new Uint8Array(0) /** * @generated from field: string display_name = 5; */ - displayName = ""; + displayName = '' constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); + super() + proto3.util.initPartial(data, this) } - static readonly runtime = proto3; - static readonly typeName = "CommunityRequestToJoin"; + static readonly runtime = proto3 + static readonly typeName = 'CommunityRequestToJoin' static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "clock", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 2, name: "ens_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "chat_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "community_id", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - { no: 5, name: "display_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); + { no: 1, name: 'clock', kind: 'scalar', T: 4 /* ScalarType.UINT64 */ }, + { no: 2, name: 'ens_name', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, + { no: 3, name: 'chat_id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, + { + no: 4, + name: 'community_id', + kind: 'scalar', + T: 12 /* ScalarType.BYTES */, + }, + { + no: 5, + name: 'display_name', + kind: 'scalar', + T: 9 /* ScalarType.STRING */, + }, + ]) - static fromBinary(bytes: Uint8Array, options?: Partial): CommunityRequestToJoin { - return new CommunityRequestToJoin().fromBinary(bytes, options); + static fromBinary( + bytes: Uint8Array, + options?: Partial + ): CommunityRequestToJoin { + return new CommunityRequestToJoin().fromBinary(bytes, options) } - static fromJson(jsonValue: JsonValue, options?: Partial): CommunityRequestToJoin { - return new CommunityRequestToJoin().fromJson(jsonValue, options); + static fromJson( + jsonValue: JsonValue, + options?: Partial + ): CommunityRequestToJoin { + return new CommunityRequestToJoin().fromJson(jsonValue, options) } - static fromJsonString(jsonString: string, options?: Partial): CommunityRequestToJoin { - return new CommunityRequestToJoin().fromJsonString(jsonString, options); + static fromJsonString( + jsonString: string, + options?: Partial + ): CommunityRequestToJoin { + return new CommunityRequestToJoin().fromJsonString(jsonString, options) } - static equals(a: CommunityRequestToJoin | PlainMessage | undefined, b: CommunityRequestToJoin | PlainMessage | undefined): boolean { - return proto3.util.equals(CommunityRequestToJoin, a, b); + static equals( + a: + | CommunityRequestToJoin + | PlainMessage + | undefined, + b: CommunityRequestToJoin | PlainMessage | undefined + ): boolean { + return proto3.util.equals(CommunityRequestToJoin, a, b) } } @@ -606,57 +833,88 @@ export class CommunityCancelRequestToJoin extends Message) { - super(); - proto3.util.initPartial(data, this); + super() + proto3.util.initPartial(data, this) } - static readonly runtime = proto3; - static readonly typeName = "CommunityCancelRequestToJoin"; + static readonly runtime = proto3 + static readonly typeName = 'CommunityCancelRequestToJoin' static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "clock", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 2, name: "ens_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "chat_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "community_id", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - { no: 5, name: "display_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); + { no: 1, name: 'clock', kind: 'scalar', T: 4 /* ScalarType.UINT64 */ }, + { no: 2, name: 'ens_name', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, + { no: 3, name: 'chat_id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, + { + no: 4, + name: 'community_id', + kind: 'scalar', + T: 12 /* ScalarType.BYTES */, + }, + { + no: 5, + name: 'display_name', + kind: 'scalar', + T: 9 /* ScalarType.STRING */, + }, + ]) - static fromBinary(bytes: Uint8Array, options?: Partial): CommunityCancelRequestToJoin { - return new CommunityCancelRequestToJoin().fromBinary(bytes, options); + static fromBinary( + bytes: Uint8Array, + options?: Partial + ): CommunityCancelRequestToJoin { + return new CommunityCancelRequestToJoin().fromBinary(bytes, options) } - static fromJson(jsonValue: JsonValue, options?: Partial): CommunityCancelRequestToJoin { - return new CommunityCancelRequestToJoin().fromJson(jsonValue, options); + static fromJson( + jsonValue: JsonValue, + options?: Partial + ): CommunityCancelRequestToJoin { + return new CommunityCancelRequestToJoin().fromJson(jsonValue, options) } - static fromJsonString(jsonString: string, options?: Partial): CommunityCancelRequestToJoin { - return new CommunityCancelRequestToJoin().fromJsonString(jsonString, options); + static fromJsonString( + jsonString: string, + options?: Partial + ): CommunityCancelRequestToJoin { + return new CommunityCancelRequestToJoin().fromJsonString( + jsonString, + options + ) } - static equals(a: CommunityCancelRequestToJoin | PlainMessage | undefined, b: CommunityCancelRequestToJoin | PlainMessage | undefined): boolean { - return proto3.util.equals(CommunityCancelRequestToJoin, a, b); + static equals( + a: + | CommunityCancelRequestToJoin + | PlainMessage + | undefined, + b: + | CommunityCancelRequestToJoin + | PlainMessage + | undefined + ): boolean { + return proto3.util.equals(CommunityCancelRequestToJoin, a, b) } } @@ -667,63 +925,89 @@ export class CommunityRequestToJoinResponse extends Message) { - super(); - proto3.util.initPartial(data, this); + super() + proto3.util.initPartial(data, this) } - static readonly runtime = proto3; - static readonly typeName = "CommunityRequestToJoinResponse"; + static readonly runtime = proto3 + static readonly typeName = 'CommunityRequestToJoinResponse' static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "clock", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 2, name: "community", kind: "message", T: CommunityDescription }, - { no: 3, name: "accepted", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 4, name: "grant", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - { no: 5, name: "community_id", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - { no: 6, name: "magnet_uri", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); + { no: 1, name: 'clock', kind: 'scalar', T: 4 /* ScalarType.UINT64 */ }, + { no: 2, name: 'community', kind: 'message', T: CommunityDescription }, + { no: 3, name: 'accepted', kind: 'scalar', T: 8 /* ScalarType.BOOL */ }, + { no: 4, name: 'grant', kind: 'scalar', T: 12 /* ScalarType.BYTES */ }, + { + no: 5, + name: 'community_id', + kind: 'scalar', + T: 12 /* ScalarType.BYTES */, + }, + { no: 6, name: 'magnet_uri', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, + ]) - static fromBinary(bytes: Uint8Array, options?: Partial): CommunityRequestToJoinResponse { - return new CommunityRequestToJoinResponse().fromBinary(bytes, options); + static fromBinary( + bytes: Uint8Array, + options?: Partial + ): CommunityRequestToJoinResponse { + return new CommunityRequestToJoinResponse().fromBinary(bytes, options) } - static fromJson(jsonValue: JsonValue, options?: Partial): CommunityRequestToJoinResponse { - return new CommunityRequestToJoinResponse().fromJson(jsonValue, options); + static fromJson( + jsonValue: JsonValue, + options?: Partial + ): CommunityRequestToJoinResponse { + return new CommunityRequestToJoinResponse().fromJson(jsonValue, options) } - static fromJsonString(jsonString: string, options?: Partial): CommunityRequestToJoinResponse { - return new CommunityRequestToJoinResponse().fromJsonString(jsonString, options); + static fromJsonString( + jsonString: string, + options?: Partial + ): CommunityRequestToJoinResponse { + return new CommunityRequestToJoinResponse().fromJsonString( + jsonString, + options + ) } - static equals(a: CommunityRequestToJoinResponse | PlainMessage | undefined, b: CommunityRequestToJoinResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(CommunityRequestToJoinResponse, a, b); + static equals( + a: + | CommunityRequestToJoinResponse + | PlainMessage + | undefined, + b: + | CommunityRequestToJoinResponse + | PlainMessage + | undefined + ): boolean { + return proto3.util.equals(CommunityRequestToJoinResponse, a, b) } } @@ -734,39 +1018,62 @@ export class CommunityRequestToLeave extends Message { /** * @generated from field: uint64 clock = 1; */ - clock = protoInt64.zero; + clock = protoInt64.zero /** * @generated from field: bytes community_id = 2; */ - communityId = new Uint8Array(0); + communityId = new Uint8Array(0) constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); + super() + proto3.util.initPartial(data, this) } - static readonly runtime = proto3; - static readonly typeName = "CommunityRequestToLeave"; + static readonly runtime = proto3 + static readonly typeName = 'CommunityRequestToLeave' static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "clock", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 2, name: "community_id", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - ]); + { no: 1, name: 'clock', kind: 'scalar', T: 4 /* ScalarType.UINT64 */ }, + { + no: 2, + name: 'community_id', + kind: 'scalar', + T: 12 /* ScalarType.BYTES */, + }, + ]) - static fromBinary(bytes: Uint8Array, options?: Partial): CommunityRequestToLeave { - return new CommunityRequestToLeave().fromBinary(bytes, options); + static fromBinary( + bytes: Uint8Array, + options?: Partial + ): CommunityRequestToLeave { + return new CommunityRequestToLeave().fromBinary(bytes, options) } - static fromJson(jsonValue: JsonValue, options?: Partial): CommunityRequestToLeave { - return new CommunityRequestToLeave().fromJson(jsonValue, options); + static fromJson( + jsonValue: JsonValue, + options?: Partial + ): CommunityRequestToLeave { + return new CommunityRequestToLeave().fromJson(jsonValue, options) } - static fromJsonString(jsonString: string, options?: Partial): CommunityRequestToLeave { - return new CommunityRequestToLeave().fromJsonString(jsonString, options); + static fromJsonString( + jsonString: string, + options?: Partial + ): CommunityRequestToLeave { + return new CommunityRequestToLeave().fromJsonString(jsonString, options) } - static equals(a: CommunityRequestToLeave | PlainMessage | undefined, b: CommunityRequestToLeave | PlainMessage | undefined): boolean { - return proto3.util.equals(CommunityRequestToLeave, a, b); + static equals( + a: + | CommunityRequestToLeave + | PlainMessage + | undefined, + b: + | CommunityRequestToLeave + | PlainMessage + | undefined + ): boolean { + return proto3.util.equals(CommunityRequestToLeave, a, b) } } @@ -777,39 +1084,60 @@ export class CommunityMessageArchiveMagnetlink extends Message) { - super(); - proto3.util.initPartial(data, this); + super() + proto3.util.initPartial(data, this) } - static readonly runtime = proto3; - static readonly typeName = "CommunityMessageArchiveMagnetlink"; + static readonly runtime = proto3 + static readonly typeName = 'CommunityMessageArchiveMagnetlink' static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "clock", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 2, name: "magnet_uri", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); + { no: 1, name: 'clock', kind: 'scalar', T: 4 /* ScalarType.UINT64 */ }, + { no: 2, name: 'magnet_uri', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, + ]) - static fromBinary(bytes: Uint8Array, options?: Partial): CommunityMessageArchiveMagnetlink { - return new CommunityMessageArchiveMagnetlink().fromBinary(bytes, options); + static fromBinary( + bytes: Uint8Array, + options?: Partial + ): CommunityMessageArchiveMagnetlink { + return new CommunityMessageArchiveMagnetlink().fromBinary(bytes, options) } - static fromJson(jsonValue: JsonValue, options?: Partial): CommunityMessageArchiveMagnetlink { - return new CommunityMessageArchiveMagnetlink().fromJson(jsonValue, options); + static fromJson( + jsonValue: JsonValue, + options?: Partial + ): CommunityMessageArchiveMagnetlink { + return new CommunityMessageArchiveMagnetlink().fromJson(jsonValue, options) } - static fromJsonString(jsonString: string, options?: Partial): CommunityMessageArchiveMagnetlink { - return new CommunityMessageArchiveMagnetlink().fromJsonString(jsonString, options); + static fromJsonString( + jsonString: string, + options?: Partial + ): CommunityMessageArchiveMagnetlink { + return new CommunityMessageArchiveMagnetlink().fromJsonString( + jsonString, + options + ) } - static equals(a: CommunityMessageArchiveMagnetlink | PlainMessage | undefined, b: CommunityMessageArchiveMagnetlink | PlainMessage | undefined): boolean { - return proto3.util.equals(CommunityMessageArchiveMagnetlink, a, b); + static equals( + a: + | CommunityMessageArchiveMagnetlink + | PlainMessage + | undefined, + b: + | CommunityMessageArchiveMagnetlink + | PlainMessage + | undefined + ): boolean { + return proto3.util.equals(CommunityMessageArchiveMagnetlink, a, b) } } @@ -820,69 +1148,86 @@ export class WakuMessage extends Message { /** * @generated from field: bytes sig = 1; */ - sig = new Uint8Array(0); + sig = new Uint8Array(0) /** * @generated from field: uint64 timestamp = 2; */ - timestamp = protoInt64.zero; + timestamp = protoInt64.zero /** * @generated from field: bytes topic = 3; */ - topic = new Uint8Array(0); + topic = new Uint8Array(0) /** * @generated from field: bytes payload = 4; */ - payload = new Uint8Array(0); + payload = new Uint8Array(0) /** * @generated from field: bytes padding = 5; */ - padding = new Uint8Array(0); + padding = new Uint8Array(0) /** * @generated from field: bytes hash = 6; */ - hash = new Uint8Array(0); + hash = new Uint8Array(0) /** * @generated from field: string thirdPartyId = 7; */ - thirdPartyId = ""; + thirdPartyId = '' constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); + super() + proto3.util.initPartial(data, this) } - static readonly runtime = proto3; - static readonly typeName = "WakuMessage"; + static readonly runtime = proto3 + static readonly typeName = 'WakuMessage' static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "sig", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - { no: 2, name: "timestamp", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 3, name: "topic", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - { no: 4, name: "payload", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - { no: 5, name: "padding", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - { no: 6, name: "hash", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - { no: 7, name: "thirdPartyId", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); + { no: 1, name: 'sig', kind: 'scalar', T: 12 /* ScalarType.BYTES */ }, + { no: 2, name: 'timestamp', kind: 'scalar', T: 4 /* ScalarType.UINT64 */ }, + { no: 3, name: 'topic', kind: 'scalar', T: 12 /* ScalarType.BYTES */ }, + { no: 4, name: 'payload', kind: 'scalar', T: 12 /* ScalarType.BYTES */ }, + { no: 5, name: 'padding', kind: 'scalar', T: 12 /* ScalarType.BYTES */ }, + { no: 6, name: 'hash', kind: 'scalar', T: 12 /* ScalarType.BYTES */ }, + { + no: 7, + name: 'thirdPartyId', + kind: 'scalar', + T: 9 /* ScalarType.STRING */, + }, + ]) - static fromBinary(bytes: Uint8Array, options?: Partial): WakuMessage { - return new WakuMessage().fromBinary(bytes, options); + static fromBinary( + bytes: Uint8Array, + options?: Partial + ): WakuMessage { + return new WakuMessage().fromBinary(bytes, options) } - static fromJson(jsonValue: JsonValue, options?: Partial): WakuMessage { - return new WakuMessage().fromJson(jsonValue, options); + static fromJson( + jsonValue: JsonValue, + options?: Partial + ): WakuMessage { + return new WakuMessage().fromJson(jsonValue, options) } - static fromJsonString(jsonString: string, options?: Partial): WakuMessage { - return new WakuMessage().fromJsonString(jsonString, options); + static fromJsonString( + jsonString: string, + options?: Partial + ): WakuMessage { + return new WakuMessage().fromJsonString(jsonString, options) } - static equals(a: WakuMessage | PlainMessage | undefined, b: WakuMessage | PlainMessage | undefined): boolean { - return proto3.util.equals(WakuMessage, a, b); + static equals( + a: WakuMessage | PlainMessage | undefined, + b: WakuMessage | PlainMessage | undefined + ): boolean { + return proto3.util.equals(WakuMessage, a, b) } } @@ -893,51 +1238,75 @@ export class WakuMessageArchiveMetadata extends Message) { - super(); - proto3.util.initPartial(data, this); + super() + proto3.util.initPartial(data, this) } - static readonly runtime = proto3; - static readonly typeName = "WakuMessageArchiveMetadata"; + static readonly runtime = proto3 + static readonly typeName = 'WakuMessageArchiveMetadata' static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "version", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 2, name: "from", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 3, name: "to", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 4, name: "contentTopic", kind: "scalar", T: 12 /* ScalarType.BYTES */, repeated: true }, - ]); + { no: 1, name: 'version', kind: 'scalar', T: 13 /* ScalarType.UINT32 */ }, + { no: 2, name: 'from', kind: 'scalar', T: 4 /* ScalarType.UINT64 */ }, + { no: 3, name: 'to', kind: 'scalar', T: 4 /* ScalarType.UINT64 */ }, + { + no: 4, + name: 'contentTopic', + kind: 'scalar', + T: 12 /* ScalarType.BYTES */, + repeated: true, + }, + ]) - static fromBinary(bytes: Uint8Array, options?: Partial): WakuMessageArchiveMetadata { - return new WakuMessageArchiveMetadata().fromBinary(bytes, options); + static fromBinary( + bytes: Uint8Array, + options?: Partial + ): WakuMessageArchiveMetadata { + return new WakuMessageArchiveMetadata().fromBinary(bytes, options) } - static fromJson(jsonValue: JsonValue, options?: Partial): WakuMessageArchiveMetadata { - return new WakuMessageArchiveMetadata().fromJson(jsonValue, options); + static fromJson( + jsonValue: JsonValue, + options?: Partial + ): WakuMessageArchiveMetadata { + return new WakuMessageArchiveMetadata().fromJson(jsonValue, options) } - static fromJsonString(jsonString: string, options?: Partial): WakuMessageArchiveMetadata { - return new WakuMessageArchiveMetadata().fromJsonString(jsonString, options); + static fromJsonString( + jsonString: string, + options?: Partial + ): WakuMessageArchiveMetadata { + return new WakuMessageArchiveMetadata().fromJsonString(jsonString, options) } - static equals(a: WakuMessageArchiveMetadata | PlainMessage | undefined, b: WakuMessageArchiveMetadata | PlainMessage | undefined): boolean { - return proto3.util.equals(WakuMessageArchiveMetadata, a, b); + static equals( + a: + | WakuMessageArchiveMetadata + | PlainMessage + | undefined, + b: + | WakuMessageArchiveMetadata + | PlainMessage + | undefined + ): boolean { + return proto3.util.equals(WakuMessageArchiveMetadata, a, b) } } @@ -948,45 +1317,63 @@ export class WakuMessageArchive extends Message { /** * @generated from field: uint32 version = 1; */ - version = 0; + version = 0 /** * @generated from field: WakuMessageArchiveMetadata metadata = 2; */ - metadata?: WakuMessageArchiveMetadata; + metadata?: WakuMessageArchiveMetadata /** * @generated from field: repeated WakuMessage messages = 3; */ - messages: WakuMessage[] = []; + messages: WakuMessage[] = [] constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); + super() + proto3.util.initPartial(data, this) } - static readonly runtime = proto3; - static readonly typeName = "WakuMessageArchive"; + static readonly runtime = proto3 + static readonly typeName = 'WakuMessageArchive' static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "version", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 2, name: "metadata", kind: "message", T: WakuMessageArchiveMetadata }, - { no: 3, name: "messages", kind: "message", T: WakuMessage, repeated: true }, - ]); + { no: 1, name: 'version', kind: 'scalar', T: 13 /* ScalarType.UINT32 */ }, + { no: 2, name: 'metadata', kind: 'message', T: WakuMessageArchiveMetadata }, + { + no: 3, + name: 'messages', + kind: 'message', + T: WakuMessage, + repeated: true, + }, + ]) - static fromBinary(bytes: Uint8Array, options?: Partial): WakuMessageArchive { - return new WakuMessageArchive().fromBinary(bytes, options); + static fromBinary( + bytes: Uint8Array, + options?: Partial + ): WakuMessageArchive { + return new WakuMessageArchive().fromBinary(bytes, options) } - static fromJson(jsonValue: JsonValue, options?: Partial): WakuMessageArchive { - return new WakuMessageArchive().fromJson(jsonValue, options); + static fromJson( + jsonValue: JsonValue, + options?: Partial + ): WakuMessageArchive { + return new WakuMessageArchive().fromJson(jsonValue, options) } - static fromJsonString(jsonString: string, options?: Partial): WakuMessageArchive { - return new WakuMessageArchive().fromJsonString(jsonString, options); + static fromJsonString( + jsonString: string, + options?: Partial + ): WakuMessageArchive { + return new WakuMessageArchive().fromJsonString(jsonString, options) } - static equals(a: WakuMessageArchive | PlainMessage | undefined, b: WakuMessageArchive | PlainMessage | undefined): boolean { - return proto3.util.equals(WakuMessageArchive, a, b); + static equals( + a: WakuMessageArchive | PlainMessage | undefined, + b: WakuMessageArchive | PlainMessage | undefined + ): boolean { + return proto3.util.equals(WakuMessageArchive, a, b) } } @@ -997,57 +1384,78 @@ export class WakuMessageArchiveIndexMetadata extends Message) { - super(); - proto3.util.initPartial(data, this); + super() + proto3.util.initPartial(data, this) } - static readonly runtime = proto3; - static readonly typeName = "WakuMessageArchiveIndexMetadata"; + static readonly runtime = proto3 + static readonly typeName = 'WakuMessageArchiveIndexMetadata' static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "version", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 2, name: "metadata", kind: "message", T: WakuMessageArchiveMetadata }, - { no: 3, name: "offset", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 4, name: "size", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 5, name: "padding", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - ]); + { no: 1, name: 'version', kind: 'scalar', T: 13 /* ScalarType.UINT32 */ }, + { no: 2, name: 'metadata', kind: 'message', T: WakuMessageArchiveMetadata }, + { no: 3, name: 'offset', kind: 'scalar', T: 4 /* ScalarType.UINT64 */ }, + { no: 4, name: 'size', kind: 'scalar', T: 4 /* ScalarType.UINT64 */ }, + { no: 5, name: 'padding', kind: 'scalar', T: 4 /* ScalarType.UINT64 */ }, + ]) - static fromBinary(bytes: Uint8Array, options?: Partial): WakuMessageArchiveIndexMetadata { - return new WakuMessageArchiveIndexMetadata().fromBinary(bytes, options); + static fromBinary( + bytes: Uint8Array, + options?: Partial + ): WakuMessageArchiveIndexMetadata { + return new WakuMessageArchiveIndexMetadata().fromBinary(bytes, options) } - static fromJson(jsonValue: JsonValue, options?: Partial): WakuMessageArchiveIndexMetadata { - return new WakuMessageArchiveIndexMetadata().fromJson(jsonValue, options); + static fromJson( + jsonValue: JsonValue, + options?: Partial + ): WakuMessageArchiveIndexMetadata { + return new WakuMessageArchiveIndexMetadata().fromJson(jsonValue, options) } - static fromJsonString(jsonString: string, options?: Partial): WakuMessageArchiveIndexMetadata { - return new WakuMessageArchiveIndexMetadata().fromJsonString(jsonString, options); + static fromJsonString( + jsonString: string, + options?: Partial + ): WakuMessageArchiveIndexMetadata { + return new WakuMessageArchiveIndexMetadata().fromJsonString( + jsonString, + options + ) } - static equals(a: WakuMessageArchiveIndexMetadata | PlainMessage | undefined, b: WakuMessageArchiveIndexMetadata | PlainMessage | undefined): boolean { - return proto3.util.equals(WakuMessageArchiveIndexMetadata, a, b); + static equals( + a: + | WakuMessageArchiveIndexMetadata + | PlainMessage + | undefined, + b: + | WakuMessageArchiveIndexMetadata + | PlainMessage + | undefined + ): boolean { + return proto3.util.equals(WakuMessageArchiveIndexMetadata, a, b) } } @@ -1058,33 +1466,56 @@ export class WakuMessageArchiveIndex extends Message { /** * @generated from field: map archives = 1; */ - archives: { [key: string]: WakuMessageArchiveIndexMetadata } = {}; + archives: { [key: string]: WakuMessageArchiveIndexMetadata } = {} constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); + super() + proto3.util.initPartial(data, this) } - static readonly runtime = proto3; - static readonly typeName = "WakuMessageArchiveIndex"; + static readonly runtime = proto3 + static readonly typeName = 'WakuMessageArchiveIndex' static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "archives", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "message", T: WakuMessageArchiveIndexMetadata} }, - ]); + { + no: 1, + name: 'archives', + kind: 'map', + K: 9 /* ScalarType.STRING */, + V: { kind: 'message', T: WakuMessageArchiveIndexMetadata }, + }, + ]) - static fromBinary(bytes: Uint8Array, options?: Partial): WakuMessageArchiveIndex { - return new WakuMessageArchiveIndex().fromBinary(bytes, options); + static fromBinary( + bytes: Uint8Array, + options?: Partial + ): WakuMessageArchiveIndex { + return new WakuMessageArchiveIndex().fromBinary(bytes, options) } - static fromJson(jsonValue: JsonValue, options?: Partial): WakuMessageArchiveIndex { - return new WakuMessageArchiveIndex().fromJson(jsonValue, options); + static fromJson( + jsonValue: JsonValue, + options?: Partial + ): WakuMessageArchiveIndex { + return new WakuMessageArchiveIndex().fromJson(jsonValue, options) } - static fromJsonString(jsonString: string, options?: Partial): WakuMessageArchiveIndex { - return new WakuMessageArchiveIndex().fromJsonString(jsonString, options); + static fromJsonString( + jsonString: string, + options?: Partial + ): WakuMessageArchiveIndex { + return new WakuMessageArchiveIndex().fromJsonString(jsonString, options) } - static equals(a: WakuMessageArchiveIndex | PlainMessage | undefined, b: WakuMessageArchiveIndex | PlainMessage | undefined): boolean { - return proto3.util.equals(WakuMessageArchiveIndex, a, b); + static equals( + a: + | WakuMessageArchiveIndex + | PlainMessage + | undefined, + b: + | WakuMessageArchiveIndex + | PlainMessage + | undefined + ): boolean { + return proto3.util.equals(WakuMessageArchiveIndex, a, b) } } - diff --git a/packages/status-js/src/protos/emoji-reaction_pb.ts b/packages/status-js/src/protos/emoji-reaction_pb.ts index 55a4d333..64d56d54 100644 --- a/packages/status-js/src/protos/emoji-reaction_pb.ts +++ b/packages/status-js/src/protos/emoji-reaction_pb.ts @@ -3,9 +3,16 @@ /* eslint-disable */ // @ts-nocheck -import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; -import { Message, proto3, protoInt64 } from "@bufbuild/protobuf"; -import { MessageType } from "./enums_pb.js"; +import type { + BinaryReadOptions, + FieldList, + JsonReadOptions, + JsonValue, + PartialMessage, + PlainMessage, +} from '@bufbuild/protobuf' +import { Message, proto3, protoInt64 } from '@bufbuild/protobuf' +import { MessageType } from './enums_pb.js' /** * @generated from message EmojiReaction @@ -16,7 +23,7 @@ export class EmojiReaction extends Message { * * @generated from field: uint64 clock = 1; */ - clock = protoInt64.zero; + clock = protoInt64.zero /** * chat_id the ID of the chat the message belongs to, for query efficiency the chat_id is stored in the db even though the @@ -24,74 +31,96 @@ export class EmojiReaction extends Message { * * @generated from field: string chat_id = 2; */ - chatId = ""; + chatId = '' /** * message_id the ID of the target message that the user wishes to react to * * @generated from field: string message_id = 3; */ - messageId = ""; + messageId = '' /** * message_type is (somewhat confusingly) the ID of the type of chat the message belongs to * * @generated from field: MessageType message_type = 4; */ - messageType = MessageType.UNKNOWN_MESSAGE_TYPE; + messageType = MessageType.UNKNOWN_MESSAGE_TYPE /** * type the ID of the emoji the user wishes to react with * * @generated from field: EmojiReaction.Type type = 5; */ - type = EmojiReaction_Type.UNKNOWN_EMOJI_REACTION_TYPE; + type = EmojiReaction_Type.UNKNOWN_EMOJI_REACTION_TYPE /** * whether this is a rectraction of a previously sent emoji * * @generated from field: bool retracted = 6; */ - retracted = false; + retracted = false /** * Grant for organisation chat messages * * @generated from field: bytes grant = 7; */ - grant = new Uint8Array(0); + grant = new Uint8Array(0) constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); + super() + proto3.util.initPartial(data, this) } - static readonly runtime = proto3; - static readonly typeName = "EmojiReaction"; + static readonly runtime = proto3 + static readonly typeName = 'EmojiReaction' static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "clock", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 2, name: "chat_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "message_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "message_type", kind: "enum", T: proto3.getEnumType(MessageType) }, - { no: 5, name: "type", kind: "enum", T: proto3.getEnumType(EmojiReaction_Type) }, - { no: 6, name: "retracted", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 7, name: "grant", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - ]); + { no: 1, name: 'clock', kind: 'scalar', T: 4 /* ScalarType.UINT64 */ }, + { no: 2, name: 'chat_id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, + { no: 3, name: 'message_id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, + { + no: 4, + name: 'message_type', + kind: 'enum', + T: proto3.getEnumType(MessageType), + }, + { + no: 5, + name: 'type', + kind: 'enum', + T: proto3.getEnumType(EmojiReaction_Type), + }, + { no: 6, name: 'retracted', kind: 'scalar', T: 8 /* ScalarType.BOOL */ }, + { no: 7, name: 'grant', kind: 'scalar', T: 12 /* ScalarType.BYTES */ }, + ]) - static fromBinary(bytes: Uint8Array, options?: Partial): EmojiReaction { - return new EmojiReaction().fromBinary(bytes, options); + static fromBinary( + bytes: Uint8Array, + options?: Partial + ): EmojiReaction { + return new EmojiReaction().fromBinary(bytes, options) } - static fromJson(jsonValue: JsonValue, options?: Partial): EmojiReaction { - return new EmojiReaction().fromJson(jsonValue, options); + static fromJson( + jsonValue: JsonValue, + options?: Partial + ): EmojiReaction { + return new EmojiReaction().fromJson(jsonValue, options) } - static fromJsonString(jsonString: string, options?: Partial): EmojiReaction { - return new EmojiReaction().fromJsonString(jsonString, options); + static fromJsonString( + jsonString: string, + options?: Partial + ): EmojiReaction { + return new EmojiReaction().fromJsonString(jsonString, options) } - static equals(a: EmojiReaction | PlainMessage | undefined, b: EmojiReaction | PlainMessage | undefined): boolean { - return proto3.util.equals(EmojiReaction, a, b); + static equals( + a: EmojiReaction | PlainMessage | undefined, + b: EmojiReaction | PlainMessage | undefined + ): boolean { + return proto3.util.equals(EmojiReaction, a, b) } } @@ -135,13 +164,12 @@ export enum EmojiReaction_Type { ANGRY = 6, } // Retrieve enum metadata with: proto3.getEnumType(EmojiReaction_Type) -proto3.util.setEnumType(EmojiReaction_Type, "EmojiReaction.Type", [ - { no: 0, name: "UNKNOWN_EMOJI_REACTION_TYPE" }, - { no: 1, name: "LOVE" }, - { no: 2, name: "THUMBS_UP" }, - { no: 3, name: "THUMBS_DOWN" }, - { no: 4, name: "LAUGH" }, - { no: 5, name: "SAD" }, - { no: 6, name: "ANGRY" }, -]); - +proto3.util.setEnumType(EmojiReaction_Type, 'EmojiReaction.Type', [ + { no: 0, name: 'UNKNOWN_EMOJI_REACTION_TYPE' }, + { no: 1, name: 'LOVE' }, + { no: 2, name: 'THUMBS_UP' }, + { no: 3, name: 'THUMBS_DOWN' }, + { no: 4, name: 'LAUGH' }, + { no: 5, name: 'SAD' }, + { no: 6, name: 'ANGRY' }, +]) diff --git a/packages/status-js/src/protos/enums_pb.ts b/packages/status-js/src/protos/enums_pb.ts index bab9f9e9..98691773 100644 --- a/packages/status-js/src/protos/enums_pb.ts +++ b/packages/status-js/src/protos/enums_pb.ts @@ -3,7 +3,7 @@ /* eslint-disable */ // @ts-nocheck -import { proto3 } from "@bufbuild/protobuf"; +import { proto3 } from '@bufbuild/protobuf' /** * @generated from enum MessageType @@ -49,15 +49,15 @@ export enum MessageType { SYSTEM_MESSAGE_GAP = 6, } // Retrieve enum metadata with: proto3.getEnumType(MessageType) -proto3.util.setEnumType(MessageType, "MessageType", [ - { no: 0, name: "UNKNOWN_MESSAGE_TYPE" }, - { no: 1, name: "ONE_TO_ONE" }, - { no: 2, name: "PUBLIC_GROUP" }, - { no: 3, name: "PRIVATE_GROUP" }, - { no: 4, name: "SYSTEM_MESSAGE_PRIVATE_GROUP" }, - { no: 5, name: "COMMUNITY_CHAT" }, - { no: 6, name: "SYSTEM_MESSAGE_GAP" }, -]); +proto3.util.setEnumType(MessageType, 'MessageType', [ + { no: 0, name: 'UNKNOWN_MESSAGE_TYPE' }, + { no: 1, name: 'ONE_TO_ONE' }, + { no: 2, name: 'PUBLIC_GROUP' }, + { no: 3, name: 'PRIVATE_GROUP' }, + { no: 4, name: 'SYSTEM_MESSAGE_PRIVATE_GROUP' }, + { no: 5, name: 'COMMUNITY_CHAT' }, + { no: 6, name: 'SYSTEM_MESSAGE_GAP' }, +]) /** * @generated from enum ImageType @@ -91,11 +91,10 @@ export enum ImageType { GIF = 4, } // Retrieve enum metadata with: proto3.getEnumType(ImageType) -proto3.util.setEnumType(ImageType, "ImageType", [ - { no: 0, name: "UNKNOWN_IMAGE_TYPE" }, - { no: 1, name: "PNG" }, - { no: 2, name: "JPEG" }, - { no: 3, name: "WEBP" }, - { no: 4, name: "GIF" }, -]); - +proto3.util.setEnumType(ImageType, 'ImageType', [ + { no: 0, name: 'UNKNOWN_IMAGE_TYPE' }, + { no: 1, name: 'PNG' }, + { no: 2, name: 'JPEG' }, + { no: 3, name: 'WEBP' }, + { no: 4, name: 'GIF' }, +]) diff --git a/packages/status-js/src/protos/membership-update-message_pb.ts b/packages/status-js/src/protos/membership-update-message_pb.ts index ea5a2f63..634d0ead 100644 --- a/packages/status-js/src/protos/membership-update-message_pb.ts +++ b/packages/status-js/src/protos/membership-update-message_pb.ts @@ -3,10 +3,17 @@ /* eslint-disable */ // @ts-nocheck -import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; -import { Message, proto3, protoInt64 } from "@bufbuild/protobuf"; -import { ChatMessage } from "./chat-message_pb.js"; -import { EmojiReaction } from "./emoji-reaction_pb.js"; +import type { + BinaryReadOptions, + FieldList, + JsonReadOptions, + JsonValue, + PartialMessage, + PlainMessage, +} from '@bufbuild/protobuf' +import { Message, proto3, protoInt64 } from '@bufbuild/protobuf' +import { ChatMessage } from './chat-message_pb.js' +import { EmojiReaction } from './emoji-reaction_pb.js' /** * @generated from message MembershipUpdateEvent @@ -17,57 +24,80 @@ export class MembershipUpdateEvent extends Message { * * @generated from field: uint64 clock = 1; */ - clock = protoInt64.zero; + clock = protoInt64.zero /** * List of public keys of objects of the action * * @generated from field: repeated string members = 2; */ - members: string[] = []; + members: string[] = [] /** * Name of the chat for the CHAT_CREATED/NAME_CHANGED event types * * @generated from field: string name = 3; */ - name = ""; + name = '' /** * The type of the event * * @generated from field: MembershipUpdateEvent.EventType type = 4; */ - type = MembershipUpdateEvent_EventType.UNKNOWN; + type = MembershipUpdateEvent_EventType.UNKNOWN constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); + super() + proto3.util.initPartial(data, this) } - static readonly runtime = proto3; - static readonly typeName = "MembershipUpdateEvent"; + static readonly runtime = proto3 + static readonly typeName = 'MembershipUpdateEvent' static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "clock", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 2, name: "members", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - { no: 3, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "type", kind: "enum", T: proto3.getEnumType(MembershipUpdateEvent_EventType) }, - ]); + { no: 1, name: 'clock', kind: 'scalar', T: 4 /* ScalarType.UINT64 */ }, + { + no: 2, + name: 'members', + kind: 'scalar', + T: 9 /* ScalarType.STRING */, + repeated: true, + }, + { no: 3, name: 'name', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, + { + no: 4, + name: 'type', + kind: 'enum', + T: proto3.getEnumType(MembershipUpdateEvent_EventType), + }, + ]) - static fromBinary(bytes: Uint8Array, options?: Partial): MembershipUpdateEvent { - return new MembershipUpdateEvent().fromBinary(bytes, options); + static fromBinary( + bytes: Uint8Array, + options?: Partial + ): MembershipUpdateEvent { + return new MembershipUpdateEvent().fromBinary(bytes, options) } - static fromJson(jsonValue: JsonValue, options?: Partial): MembershipUpdateEvent { - return new MembershipUpdateEvent().fromJson(jsonValue, options); + static fromJson( + jsonValue: JsonValue, + options?: Partial + ): MembershipUpdateEvent { + return new MembershipUpdateEvent().fromJson(jsonValue, options) } - static fromJsonString(jsonString: string, options?: Partial): MembershipUpdateEvent { - return new MembershipUpdateEvent().fromJsonString(jsonString, options); + static fromJsonString( + jsonString: string, + options?: Partial + ): MembershipUpdateEvent { + return new MembershipUpdateEvent().fromJsonString(jsonString, options) } - static equals(a: MembershipUpdateEvent | PlainMessage | undefined, b: MembershipUpdateEvent | PlainMessage | undefined): boolean { - return proto3.util.equals(MembershipUpdateEvent, a, b); + static equals( + a: MembershipUpdateEvent | PlainMessage | undefined, + b: MembershipUpdateEvent | PlainMessage | undefined + ): boolean { + return proto3.util.equals(MembershipUpdateEvent, a, b) } } @@ -116,16 +146,20 @@ export enum MembershipUpdateEvent_EventType { ADMIN_REMOVED = 7, } // Retrieve enum metadata with: proto3.getEnumType(MembershipUpdateEvent_EventType) -proto3.util.setEnumType(MembershipUpdateEvent_EventType, "MembershipUpdateEvent.EventType", [ - { no: 0, name: "UNKNOWN" }, - { no: 1, name: "CHAT_CREATED" }, - { no: 2, name: "NAME_CHANGED" }, - { no: 3, name: "MEMBERS_ADDED" }, - { no: 4, name: "MEMBER_JOINED" }, - { no: 5, name: "MEMBER_REMOVED" }, - { no: 6, name: "ADMINS_ADDED" }, - { no: 7, name: "ADMIN_REMOVED" }, -]); +proto3.util.setEnumType( + MembershipUpdateEvent_EventType, + 'MembershipUpdateEvent.EventType', + [ + { no: 0, name: 'UNKNOWN' }, + { no: 1, name: 'CHAT_CREATED' }, + { no: 2, name: 'NAME_CHANGED' }, + { no: 3, name: 'MEMBERS_ADDED' }, + { no: 4, name: 'MEMBER_JOINED' }, + { no: 5, name: 'MEMBER_REMOVED' }, + { no: 6, name: 'ADMINS_ADDED' }, + { no: 7, name: 'ADMIN_REMOVED' }, + ] +) /** * MembershipUpdateMessage is a message used to propagate information @@ -140,7 +174,7 @@ export class MembershipUpdateMessage extends Message { * * @generated from field: string chat_id = 1; */ - chatId = ""; + chatId = '' /** * A list of events for this group chat, first x bytes are the signature, then is a @@ -148,55 +182,93 @@ export class MembershipUpdateMessage extends Message { * * @generated from field: repeated bytes events = 2; */ - events: Uint8Array[] = []; + events: Uint8Array[] = [] /** * An optional chat message * * @generated from oneof MembershipUpdateMessage.chat_entity */ - chatEntity: { - /** - * @generated from field: ChatMessage message = 3; - */ - value: ChatMessage; - case: "message"; - } | { - /** - * @generated from field: EmojiReaction emoji_reaction = 4; - */ - value: EmojiReaction; - case: "emojiReaction"; - } | { case: undefined; value?: undefined } = { case: undefined }; + chatEntity: + | { + /** + * @generated from field: ChatMessage message = 3; + */ + value: ChatMessage + case: 'message' + } + | { + /** + * @generated from field: EmojiReaction emoji_reaction = 4; + */ + value: EmojiReaction + case: 'emojiReaction' + } + | { case: undefined; value?: undefined } = { case: undefined } constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); + super() + proto3.util.initPartial(data, this) } - static readonly runtime = proto3; - static readonly typeName = "MembershipUpdateMessage"; + static readonly runtime = proto3 + static readonly typeName = 'MembershipUpdateMessage' static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "chat_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "events", kind: "scalar", T: 12 /* ScalarType.BYTES */, repeated: true }, - { no: 3, name: "message", kind: "message", T: ChatMessage, oneof: "chat_entity" }, - { no: 4, name: "emoji_reaction", kind: "message", T: EmojiReaction, oneof: "chat_entity" }, - ]); + { no: 1, name: 'chat_id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, + { + no: 2, + name: 'events', + kind: 'scalar', + T: 12 /* ScalarType.BYTES */, + repeated: true, + }, + { + no: 3, + name: 'message', + kind: 'message', + T: ChatMessage, + oneof: 'chat_entity', + }, + { + no: 4, + name: 'emoji_reaction', + kind: 'message', + T: EmojiReaction, + oneof: 'chat_entity', + }, + ]) - static fromBinary(bytes: Uint8Array, options?: Partial): MembershipUpdateMessage { - return new MembershipUpdateMessage().fromBinary(bytes, options); + static fromBinary( + bytes: Uint8Array, + options?: Partial + ): MembershipUpdateMessage { + return new MembershipUpdateMessage().fromBinary(bytes, options) } - static fromJson(jsonValue: JsonValue, options?: Partial): MembershipUpdateMessage { - return new MembershipUpdateMessage().fromJson(jsonValue, options); + static fromJson( + jsonValue: JsonValue, + options?: Partial + ): MembershipUpdateMessage { + return new MembershipUpdateMessage().fromJson(jsonValue, options) } - static fromJsonString(jsonString: string, options?: Partial): MembershipUpdateMessage { - return new MembershipUpdateMessage().fromJsonString(jsonString, options); + static fromJsonString( + jsonString: string, + options?: Partial + ): MembershipUpdateMessage { + return new MembershipUpdateMessage().fromJsonString(jsonString, options) } - static equals(a: MembershipUpdateMessage | PlainMessage | undefined, b: MembershipUpdateMessage | PlainMessage | undefined): boolean { - return proto3.util.equals(MembershipUpdateMessage, a, b); + static equals( + a: + | MembershipUpdateMessage + | PlainMessage + | undefined, + b: + | MembershipUpdateMessage + | PlainMessage + | undefined + ): boolean { + return proto3.util.equals(MembershipUpdateMessage, a, b) } } - diff --git a/packages/status-js/src/protos/pin-message_pb.ts b/packages/status-js/src/protos/pin-message_pb.ts index 3d019e12..3c95c7c2 100644 --- a/packages/status-js/src/protos/pin-message_pb.ts +++ b/packages/status-js/src/protos/pin-message_pb.ts @@ -3,9 +3,16 @@ /* eslint-disable */ // @ts-nocheck -import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; -import { Message, proto3, protoInt64 } from "@bufbuild/protobuf"; -import { MessageType } from "./enums_pb.js"; +import type { + BinaryReadOptions, + FieldList, + JsonReadOptions, + JsonValue, + PartialMessage, + PlainMessage, +} from '@bufbuild/protobuf' +import { Message, proto3, protoInt64 } from '@bufbuild/protobuf' +import { MessageType } from './enums_pb.js' /** * @generated from message PinMessage @@ -14,59 +21,75 @@ export class PinMessage extends Message { /** * @generated from field: uint64 clock = 1; */ - clock = protoInt64.zero; + clock = protoInt64.zero /** * @generated from field: string message_id = 2; */ - messageId = ""; + messageId = '' /** * @generated from field: string chat_id = 3; */ - chatId = ""; + chatId = '' /** * @generated from field: bool pinned = 4; */ - pinned = false; + pinned = false /** * The type of message (public/one-to-one/private-group-chat) * * @generated from field: MessageType message_type = 5; */ - messageType = MessageType.UNKNOWN_MESSAGE_TYPE; + messageType = MessageType.UNKNOWN_MESSAGE_TYPE constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); + super() + proto3.util.initPartial(data, this) } - static readonly runtime = proto3; - static readonly typeName = "PinMessage"; + static readonly runtime = proto3 + static readonly typeName = 'PinMessage' static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "clock", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 2, name: "message_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "chat_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "pinned", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 5, name: "message_type", kind: "enum", T: proto3.getEnumType(MessageType) }, - ]); + { no: 1, name: 'clock', kind: 'scalar', T: 4 /* ScalarType.UINT64 */ }, + { no: 2, name: 'message_id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, + { no: 3, name: 'chat_id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, + { no: 4, name: 'pinned', kind: 'scalar', T: 8 /* ScalarType.BOOL */ }, + { + no: 5, + name: 'message_type', + kind: 'enum', + T: proto3.getEnumType(MessageType), + }, + ]) - static fromBinary(bytes: Uint8Array, options?: Partial): PinMessage { - return new PinMessage().fromBinary(bytes, options); + static fromBinary( + bytes: Uint8Array, + options?: Partial + ): PinMessage { + return new PinMessage().fromBinary(bytes, options) } - static fromJson(jsonValue: JsonValue, options?: Partial): PinMessage { - return new PinMessage().fromJson(jsonValue, options); + static fromJson( + jsonValue: JsonValue, + options?: Partial + ): PinMessage { + return new PinMessage().fromJson(jsonValue, options) } - static fromJsonString(jsonString: string, options?: Partial): PinMessage { - return new PinMessage().fromJsonString(jsonString, options); + static fromJsonString( + jsonString: string, + options?: Partial + ): PinMessage { + return new PinMessage().fromJsonString(jsonString, options) } - static equals(a: PinMessage | PlainMessage | undefined, b: PinMessage | PlainMessage | undefined): boolean { - return proto3.util.equals(PinMessage, a, b); + static equals( + a: PinMessage | PlainMessage | undefined, + b: PinMessage | PlainMessage | undefined + ): boolean { + return proto3.util.equals(PinMessage, a, b) } } - diff --git a/packages/status-js/src/protos/protocol-message_pb.ts b/packages/status-js/src/protos/protocol-message_pb.ts index 0bf40fbd..709cdc4c 100644 --- a/packages/status-js/src/protos/protocol-message_pb.ts +++ b/packages/status-js/src/protos/protocol-message_pb.ts @@ -3,8 +3,15 @@ /* eslint-disable */ // @ts-nocheck -import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; -import { Message, proto3, protoInt64 } from "@bufbuild/protobuf"; +import type { + BinaryReadOptions, + FieldList, + JsonReadOptions, + JsonValue, + PartialMessage, + PlainMessage, +} from '@bufbuild/protobuf' +import { Message, proto3, protoInt64 } from '@bufbuild/protobuf' /** * @generated from message SignedPreKey @@ -13,45 +20,67 @@ export class SignedPreKey extends Message { /** * @generated from field: bytes signed_pre_key = 1; */ - signedPreKey = new Uint8Array(0); + signedPreKey = new Uint8Array(0) /** * @generated from field: uint32 version = 2; */ - version = 0; + version = 0 /** * @generated from field: uint32 protocol_version = 3; */ - protocolVersion = 0; + protocolVersion = 0 constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); + super() + proto3.util.initPartial(data, this) } - static readonly runtime = proto3; - static readonly typeName = "SignedPreKey"; + static readonly runtime = proto3 + static readonly typeName = 'SignedPreKey' static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "signed_pre_key", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - { no: 2, name: "version", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 3, name: "protocol_version", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - ]); + { + no: 1, + name: 'signed_pre_key', + kind: 'scalar', + T: 12 /* ScalarType.BYTES */, + }, + { no: 2, name: 'version', kind: 'scalar', T: 13 /* ScalarType.UINT32 */ }, + { + no: 3, + name: 'protocol_version', + kind: 'scalar', + T: 13 /* ScalarType.UINT32 */, + }, + ]) - static fromBinary(bytes: Uint8Array, options?: Partial): SignedPreKey { - return new SignedPreKey().fromBinary(bytes, options); + static fromBinary( + bytes: Uint8Array, + options?: Partial + ): SignedPreKey { + return new SignedPreKey().fromBinary(bytes, options) } - static fromJson(jsonValue: JsonValue, options?: Partial): SignedPreKey { - return new SignedPreKey().fromJson(jsonValue, options); + static fromJson( + jsonValue: JsonValue, + options?: Partial + ): SignedPreKey { + return new SignedPreKey().fromJson(jsonValue, options) } - static fromJsonString(jsonString: string, options?: Partial): SignedPreKey { - return new SignedPreKey().fromJsonString(jsonString, options); + static fromJsonString( + jsonString: string, + options?: Partial + ): SignedPreKey { + return new SignedPreKey().fromJsonString(jsonString, options) } - static equals(a: SignedPreKey | PlainMessage | undefined, b: SignedPreKey | PlainMessage | undefined): boolean { - return proto3.util.equals(SignedPreKey, a, b); + static equals( + a: SignedPreKey | PlainMessage | undefined, + b: SignedPreKey | PlainMessage | undefined + ): boolean { + return proto3.util.equals(SignedPreKey, a, b) } } @@ -66,57 +95,75 @@ export class Bundle extends Message { * * @generated from field: bytes identity = 1; */ - identity = new Uint8Array(0); + identity = new Uint8Array(0) /** * Installation id * * @generated from field: map signed_pre_keys = 2; */ - signedPreKeys: { [key: string]: SignedPreKey } = {}; + signedPreKeys: { [key: string]: SignedPreKey } = {} /** * Prekey signature * * @generated from field: bytes signature = 4; */ - signature = new Uint8Array(0); + signature = new Uint8Array(0) /** * When the bundle was created locally * * @generated from field: int64 timestamp = 5; */ - timestamp = protoInt64.zero; + timestamp = protoInt64.zero constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); + super() + proto3.util.initPartial(data, this) } - static readonly runtime = proto3; - static readonly typeName = "Bundle"; + static readonly runtime = proto3 + static readonly typeName = 'Bundle' static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "identity", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - { no: 2, name: "signed_pre_keys", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "message", T: SignedPreKey} }, - { no: 4, name: "signature", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - { no: 5, name: "timestamp", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, - ]); + { no: 1, name: 'identity', kind: 'scalar', T: 12 /* ScalarType.BYTES */ }, + { + no: 2, + name: 'signed_pre_keys', + kind: 'map', + K: 9 /* ScalarType.STRING */, + V: { kind: 'message', T: SignedPreKey }, + }, + { no: 4, name: 'signature', kind: 'scalar', T: 12 /* ScalarType.BYTES */ }, + { no: 5, name: 'timestamp', kind: 'scalar', T: 3 /* ScalarType.INT64 */ }, + ]) - static fromBinary(bytes: Uint8Array, options?: Partial): Bundle { - return new Bundle().fromBinary(bytes, options); + static fromBinary( + bytes: Uint8Array, + options?: Partial + ): Bundle { + return new Bundle().fromBinary(bytes, options) } - static fromJson(jsonValue: JsonValue, options?: Partial): Bundle { - return new Bundle().fromJson(jsonValue, options); + static fromJson( + jsonValue: JsonValue, + options?: Partial + ): Bundle { + return new Bundle().fromJson(jsonValue, options) } - static fromJsonString(jsonString: string, options?: Partial): Bundle { - return new Bundle().fromJsonString(jsonString, options); + static fromJsonString( + jsonString: string, + options?: Partial + ): Bundle { + return new Bundle().fromJsonString(jsonString, options) } - static equals(a: Bundle | PlainMessage | undefined, b: Bundle | PlainMessage | undefined): boolean { - return proto3.util.equals(Bundle, a, b); + static equals( + a: Bundle | PlainMessage | undefined, + b: Bundle | PlainMessage | undefined + ): boolean { + return proto3.util.equals(Bundle, a, b) } } @@ -129,41 +176,58 @@ export class BundleContainer extends Message { * * @generated from field: Bundle bundle = 1; */ - bundle?: Bundle; + bundle?: Bundle /** * Private signed prekey * * @generated from field: bytes private_signed_pre_key = 2; */ - privateSignedPreKey = new Uint8Array(0); + privateSignedPreKey = new Uint8Array(0) constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); + super() + proto3.util.initPartial(data, this) } - static readonly runtime = proto3; - static readonly typeName = "BundleContainer"; + static readonly runtime = proto3 + static readonly typeName = 'BundleContainer' static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "bundle", kind: "message", T: Bundle }, - { no: 2, name: "private_signed_pre_key", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - ]); + { no: 1, name: 'bundle', kind: 'message', T: Bundle }, + { + no: 2, + name: 'private_signed_pre_key', + kind: 'scalar', + T: 12 /* ScalarType.BYTES */, + }, + ]) - static fromBinary(bytes: Uint8Array, options?: Partial): BundleContainer { - return new BundleContainer().fromBinary(bytes, options); + static fromBinary( + bytes: Uint8Array, + options?: Partial + ): BundleContainer { + return new BundleContainer().fromBinary(bytes, options) } - static fromJson(jsonValue: JsonValue, options?: Partial): BundleContainer { - return new BundleContainer().fromJson(jsonValue, options); + static fromJson( + jsonValue: JsonValue, + options?: Partial + ): BundleContainer { + return new BundleContainer().fromJson(jsonValue, options) } - static fromJsonString(jsonString: string, options?: Partial): BundleContainer { - return new BundleContainer().fromJsonString(jsonString, options); + static fromJsonString( + jsonString: string, + options?: Partial + ): BundleContainer { + return new BundleContainer().fromJsonString(jsonString, options) } - static equals(a: BundleContainer | PlainMessage | undefined, b: BundleContainer | PlainMessage | undefined): boolean { - return proto3.util.equals(BundleContainer, a, b); + static equals( + a: BundleContainer | PlainMessage | undefined, + b: BundleContainer | PlainMessage | undefined + ): boolean { + return proto3.util.equals(BundleContainer, a, b) } } @@ -176,57 +240,69 @@ export class DRHeader extends Message { * * @generated from field: bytes key = 1; */ - key = new Uint8Array(0); + key = new Uint8Array(0) /** * Number of the message in the sending chain * * @generated from field: uint32 n = 2; */ - n = 0; + n = 0 /** * Length of the previous sending chain * * @generated from field: uint32 pn = 3; */ - pn = 0; + pn = 0 /** * Bundle ID * * @generated from field: bytes id = 4; */ - id = new Uint8Array(0); + id = new Uint8Array(0) constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); + super() + proto3.util.initPartial(data, this) } - static readonly runtime = proto3; - static readonly typeName = "DRHeader"; + static readonly runtime = proto3 + static readonly typeName = 'DRHeader' static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "key", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - { no: 2, name: "n", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 3, name: "pn", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 4, name: "id", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - ]); + { no: 1, name: 'key', kind: 'scalar', T: 12 /* ScalarType.BYTES */ }, + { no: 2, name: 'n', kind: 'scalar', T: 13 /* ScalarType.UINT32 */ }, + { no: 3, name: 'pn', kind: 'scalar', T: 13 /* ScalarType.UINT32 */ }, + { no: 4, name: 'id', kind: 'scalar', T: 12 /* ScalarType.BYTES */ }, + ]) - static fromBinary(bytes: Uint8Array, options?: Partial): DRHeader { - return new DRHeader().fromBinary(bytes, options); + static fromBinary( + bytes: Uint8Array, + options?: Partial + ): DRHeader { + return new DRHeader().fromBinary(bytes, options) } - static fromJson(jsonValue: JsonValue, options?: Partial): DRHeader { - return new DRHeader().fromJson(jsonValue, options); + static fromJson( + jsonValue: JsonValue, + options?: Partial + ): DRHeader { + return new DRHeader().fromJson(jsonValue, options) } - static fromJsonString(jsonString: string, options?: Partial): DRHeader { - return new DRHeader().fromJsonString(jsonString, options); + static fromJsonString( + jsonString: string, + options?: Partial + ): DRHeader { + return new DRHeader().fromJsonString(jsonString, options) } - static equals(a: DRHeader | PlainMessage | undefined, b: DRHeader | PlainMessage | undefined): boolean { - return proto3.util.equals(DRHeader, a, b); + static equals( + a: DRHeader | PlainMessage | undefined, + b: DRHeader | PlainMessage | undefined + ): boolean { + return proto3.util.equals(DRHeader, a, b) } } @@ -239,33 +315,45 @@ export class DHHeader extends Message { * * @generated from field: bytes key = 1; */ - key = new Uint8Array(0); + key = new Uint8Array(0) constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); + super() + proto3.util.initPartial(data, this) } - static readonly runtime = proto3; - static readonly typeName = "DHHeader"; + static readonly runtime = proto3 + static readonly typeName = 'DHHeader' static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "key", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - ]); + { no: 1, name: 'key', kind: 'scalar', T: 12 /* ScalarType.BYTES */ }, + ]) - static fromBinary(bytes: Uint8Array, options?: Partial): DHHeader { - return new DHHeader().fromBinary(bytes, options); + static fromBinary( + bytes: Uint8Array, + options?: Partial + ): DHHeader { + return new DHHeader().fromBinary(bytes, options) } - static fromJson(jsonValue: JsonValue, options?: Partial): DHHeader { - return new DHHeader().fromJson(jsonValue, options); + static fromJson( + jsonValue: JsonValue, + options?: Partial + ): DHHeader { + return new DHHeader().fromJson(jsonValue, options) } - static fromJsonString(jsonString: string, options?: Partial): DHHeader { - return new DHHeader().fromJsonString(jsonString, options); + static fromJsonString( + jsonString: string, + options?: Partial + ): DHHeader { + return new DHHeader().fromJsonString(jsonString, options) } - static equals(a: DHHeader | PlainMessage | undefined, b: DHHeader | PlainMessage | undefined): boolean { - return proto3.util.equals(DHHeader, a, b); + static equals( + a: DHHeader | PlainMessage | undefined, + b: DHHeader | PlainMessage | undefined + ): boolean { + return proto3.util.equals(DHHeader, a, b) } } @@ -278,41 +366,53 @@ export class X3DHHeader extends Message { * * @generated from field: bytes key = 1; */ - key = new Uint8Array(0); + key = new Uint8Array(0) /** * Used bundle's signed prekey * * @generated from field: bytes id = 4; */ - id = new Uint8Array(0); + id = new Uint8Array(0) constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); + super() + proto3.util.initPartial(data, this) } - static readonly runtime = proto3; - static readonly typeName = "X3DHHeader"; + static readonly runtime = proto3 + static readonly typeName = 'X3DHHeader' static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "key", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - { no: 4, name: "id", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - ]); + { no: 1, name: 'key', kind: 'scalar', T: 12 /* ScalarType.BYTES */ }, + { no: 4, name: 'id', kind: 'scalar', T: 12 /* ScalarType.BYTES */ }, + ]) - static fromBinary(bytes: Uint8Array, options?: Partial): X3DHHeader { - return new X3DHHeader().fromBinary(bytes, options); + static fromBinary( + bytes: Uint8Array, + options?: Partial + ): X3DHHeader { + return new X3DHHeader().fromBinary(bytes, options) } - static fromJson(jsonValue: JsonValue, options?: Partial): X3DHHeader { - return new X3DHHeader().fromJson(jsonValue, options); + static fromJson( + jsonValue: JsonValue, + options?: Partial + ): X3DHHeader { + return new X3DHHeader().fromJson(jsonValue, options) } - static fromJsonString(jsonString: string, options?: Partial): X3DHHeader { - return new X3DHHeader().fromJsonString(jsonString, options); + static fromJsonString( + jsonString: string, + options?: Partial + ): X3DHHeader { + return new X3DHHeader().fromJsonString(jsonString, options) } - static equals(a: X3DHHeader | PlainMessage | undefined, b: X3DHHeader | PlainMessage | undefined): boolean { - return proto3.util.equals(X3DHHeader, a, b); + static equals( + a: X3DHHeader | PlainMessage | undefined, + b: X3DHHeader | PlainMessage | undefined + ): boolean { + return proto3.util.equals(X3DHHeader, a, b) } } @@ -327,49 +427,61 @@ export class HRHeader extends Message { * * @generated from field: uint32 key_id = 1; */ - keyId = 0; + keyId = 0 /** * Community message number for this key_id * * @generated from field: uint32 seq_no = 2; */ - seqNo = 0; + seqNo = 0 /** * Community ID * * @generated from field: bytes group_id = 3; */ - groupId = new Uint8Array(0); + groupId = new Uint8Array(0) constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); + super() + proto3.util.initPartial(data, this) } - static readonly runtime = proto3; - static readonly typeName = "HRHeader"; + static readonly runtime = proto3 + static readonly typeName = 'HRHeader' static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "key_id", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 2, name: "seq_no", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 3, name: "group_id", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - ]); + { no: 1, name: 'key_id', kind: 'scalar', T: 13 /* ScalarType.UINT32 */ }, + { no: 2, name: 'seq_no', kind: 'scalar', T: 13 /* ScalarType.UINT32 */ }, + { no: 3, name: 'group_id', kind: 'scalar', T: 12 /* ScalarType.BYTES */ }, + ]) - static fromBinary(bytes: Uint8Array, options?: Partial): HRHeader { - return new HRHeader().fromBinary(bytes, options); + static fromBinary( + bytes: Uint8Array, + options?: Partial + ): HRHeader { + return new HRHeader().fromBinary(bytes, options) } - static fromJson(jsonValue: JsonValue, options?: Partial): HRHeader { - return new HRHeader().fromJson(jsonValue, options); + static fromJson( + jsonValue: JsonValue, + options?: Partial + ): HRHeader { + return new HRHeader().fromJson(jsonValue, options) } - static fromJsonString(jsonString: string, options?: Partial): HRHeader { - return new HRHeader().fromJsonString(jsonString, options); + static fromJsonString( + jsonString: string, + options?: Partial + ): HRHeader { + return new HRHeader().fromJsonString(jsonString, options) } - static equals(a: HRHeader | PlainMessage | undefined, b: HRHeader | PlainMessage | undefined): boolean { - return proto3.util.equals(HRHeader, a, b); + static equals( + a: HRHeader | PlainMessage | undefined, + b: HRHeader | PlainMessage | undefined + ): boolean { + return proto3.util.equals(HRHeader, a, b) } } @@ -380,33 +492,45 @@ export class HRKeys extends Message { /** * @generated from field: repeated HRKey keys = 1; */ - keys: HRKey[] = []; + keys: HRKey[] = [] constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); + super() + proto3.util.initPartial(data, this) } - static readonly runtime = proto3; - static readonly typeName = "HRKeys"; + static readonly runtime = proto3 + static readonly typeName = 'HRKeys' static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "keys", kind: "message", T: HRKey, repeated: true }, - ]); + { no: 1, name: 'keys', kind: 'message', T: HRKey, repeated: true }, + ]) - static fromBinary(bytes: Uint8Array, options?: Partial): HRKeys { - return new HRKeys().fromBinary(bytes, options); + static fromBinary( + bytes: Uint8Array, + options?: Partial + ): HRKeys { + return new HRKeys().fromBinary(bytes, options) } - static fromJson(jsonValue: JsonValue, options?: Partial): HRKeys { - return new HRKeys().fromJson(jsonValue, options); + static fromJson( + jsonValue: JsonValue, + options?: Partial + ): HRKeys { + return new HRKeys().fromJson(jsonValue, options) } - static fromJsonString(jsonString: string, options?: Partial): HRKeys { - return new HRKeys().fromJsonString(jsonString, options); + static fromJsonString( + jsonString: string, + options?: Partial + ): HRKeys { + return new HRKeys().fromJsonString(jsonString, options) } - static equals(a: HRKeys | PlainMessage | undefined, b: HRKeys | PlainMessage | undefined): boolean { - return proto3.util.equals(HRKeys, a, b); + static equals( + a: HRKeys | PlainMessage | undefined, + b: HRKeys | PlainMessage | undefined + ): boolean { + return proto3.util.equals(HRKeys, a, b) } } @@ -417,39 +541,51 @@ export class HRKey extends Message { /** * @generated from field: uint32 key_id = 1; */ - keyId = 0; + keyId = 0 /** * @generated from field: bytes key = 2; */ - key = new Uint8Array(0); + key = new Uint8Array(0) constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); + super() + proto3.util.initPartial(data, this) } - static readonly runtime = proto3; - static readonly typeName = "HRKey"; + static readonly runtime = proto3 + static readonly typeName = 'HRKey' static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "key_id", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 2, name: "key", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - ]); + { no: 1, name: 'key_id', kind: 'scalar', T: 13 /* ScalarType.UINT32 */ }, + { no: 2, name: 'key', kind: 'scalar', T: 12 /* ScalarType.BYTES */ }, + ]) - static fromBinary(bytes: Uint8Array, options?: Partial): HRKey { - return new HRKey().fromBinary(bytes, options); + static fromBinary( + bytes: Uint8Array, + options?: Partial + ): HRKey { + return new HRKey().fromBinary(bytes, options) } - static fromJson(jsonValue: JsonValue, options?: Partial): HRKey { - return new HRKey().fromJson(jsonValue, options); + static fromJson( + jsonValue: JsonValue, + options?: Partial + ): HRKey { + return new HRKey().fromJson(jsonValue, options) } - static fromJsonString(jsonString: string, options?: Partial): HRKey { - return new HRKey().fromJsonString(jsonString, options); + static fromJsonString( + jsonString: string, + options?: Partial + ): HRKey { + return new HRKey().fromJsonString(jsonString, options) } - static equals(a: HRKey | PlainMessage | undefined, b: HRKey | PlainMessage | undefined): boolean { - return proto3.util.equals(HRKey, a, b); + static equals( + a: HRKey | PlainMessage | undefined, + b: HRKey | PlainMessage | undefined + ): boolean { + return proto3.util.equals(HRKey, a, b) } } @@ -462,59 +598,77 @@ export class EncryptedMessageProtocol extends Message /** * @generated from field: X3DHHeader X3DH_header = 1; */ - X3DHHeader?: X3DHHeader; + X3DHHeader?: X3DHHeader /** * @generated from field: DRHeader DR_header = 2; */ - DRHeader?: DRHeader; + DRHeader?: DRHeader /** * @generated from field: DHHeader DH_header = 101; */ - DHHeader?: DHHeader; + DHHeader?: DHHeader /** * @generated from field: HRHeader HR_header = 102; */ - HRHeader?: HRHeader; + HRHeader?: HRHeader /** * Encrypted payload * * @generated from field: bytes payload = 3; */ - payload = new Uint8Array(0); + payload = new Uint8Array(0) constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); + super() + proto3.util.initPartial(data, this) } - static readonly runtime = proto3; - static readonly typeName = "EncryptedMessageProtocol"; + static readonly runtime = proto3 + static readonly typeName = 'EncryptedMessageProtocol' static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "X3DH_header", kind: "message", T: X3DHHeader }, - { no: 2, name: "DR_header", kind: "message", T: DRHeader }, - { no: 101, name: "DH_header", kind: "message", T: DHHeader }, - { no: 102, name: "HR_header", kind: "message", T: HRHeader }, - { no: 3, name: "payload", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - ]); + { no: 1, name: 'X3DH_header', kind: 'message', T: X3DHHeader }, + { no: 2, name: 'DR_header', kind: 'message', T: DRHeader }, + { no: 101, name: 'DH_header', kind: 'message', T: DHHeader }, + { no: 102, name: 'HR_header', kind: 'message', T: HRHeader }, + { no: 3, name: 'payload', kind: 'scalar', T: 12 /* ScalarType.BYTES */ }, + ]) - static fromBinary(bytes: Uint8Array, options?: Partial): EncryptedMessageProtocol { - return new EncryptedMessageProtocol().fromBinary(bytes, options); + static fromBinary( + bytes: Uint8Array, + options?: Partial + ): EncryptedMessageProtocol { + return new EncryptedMessageProtocol().fromBinary(bytes, options) } - static fromJson(jsonValue: JsonValue, options?: Partial): EncryptedMessageProtocol { - return new EncryptedMessageProtocol().fromJson(jsonValue, options); + static fromJson( + jsonValue: JsonValue, + options?: Partial + ): EncryptedMessageProtocol { + return new EncryptedMessageProtocol().fromJson(jsonValue, options) } - static fromJsonString(jsonString: string, options?: Partial): EncryptedMessageProtocol { - return new EncryptedMessageProtocol().fromJsonString(jsonString, options); + static fromJsonString( + jsonString: string, + options?: Partial + ): EncryptedMessageProtocol { + return new EncryptedMessageProtocol().fromJsonString(jsonString, options) } - static equals(a: EncryptedMessageProtocol | PlainMessage | undefined, b: EncryptedMessageProtocol | PlainMessage | undefined): boolean { - return proto3.util.equals(EncryptedMessageProtocol, a, b); + static equals( + a: + | EncryptedMessageProtocol + | PlainMessage + | undefined, + b: + | EncryptedMessageProtocol + | PlainMessage + | undefined + ): boolean { + return proto3.util.equals(EncryptedMessageProtocol, a, b) } } @@ -529,14 +683,14 @@ export class ProtocolMessage extends Message { * * @generated from field: string installation_id = 2; */ - installationId = ""; + installationId = '' /** * List of bundles * * @generated from field: repeated Bundle bundles = 3; */ - bundles: Bundle[] = []; + bundles: Bundle[] = [] /** * One to one message, encrypted, indexed by installation_id @@ -544,43 +698,70 @@ export class ProtocolMessage extends Message { * * @generated from field: map encrypted_message = 101; */ - encryptedMessage: { [key: string]: EncryptedMessageProtocol } = {}; + encryptedMessage: { [key: string]: EncryptedMessageProtocol } = {} /** * Public chats, not encrypted * * @generated from field: bytes public_message = 102; */ - publicMessage = new Uint8Array(0); + publicMessage = new Uint8Array(0) constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); + super() + proto3.util.initPartial(data, this) } - static readonly runtime = proto3; - static readonly typeName = "ProtocolMessage"; + static readonly runtime = proto3 + static readonly typeName = 'ProtocolMessage' static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 2, name: "installation_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "bundles", kind: "message", T: Bundle, repeated: true }, - { no: 101, name: "encrypted_message", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "message", T: EncryptedMessageProtocol} }, - { no: 102, name: "public_message", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - ]); + { + no: 2, + name: 'installation_id', + kind: 'scalar', + T: 9 /* ScalarType.STRING */, + }, + { no: 3, name: 'bundles', kind: 'message', T: Bundle, repeated: true }, + { + no: 101, + name: 'encrypted_message', + kind: 'map', + K: 9 /* ScalarType.STRING */, + V: { kind: 'message', T: EncryptedMessageProtocol }, + }, + { + no: 102, + name: 'public_message', + kind: 'scalar', + T: 12 /* ScalarType.BYTES */, + }, + ]) - static fromBinary(bytes: Uint8Array, options?: Partial): ProtocolMessage { - return new ProtocolMessage().fromBinary(bytes, options); + static fromBinary( + bytes: Uint8Array, + options?: Partial + ): ProtocolMessage { + return new ProtocolMessage().fromBinary(bytes, options) } - static fromJson(jsonValue: JsonValue, options?: Partial): ProtocolMessage { - return new ProtocolMessage().fromJson(jsonValue, options); + static fromJson( + jsonValue: JsonValue, + options?: Partial + ): ProtocolMessage { + return new ProtocolMessage().fromJson(jsonValue, options) } - static fromJsonString(jsonString: string, options?: Partial): ProtocolMessage { - return new ProtocolMessage().fromJsonString(jsonString, options); + static fromJsonString( + jsonString: string, + options?: Partial + ): ProtocolMessage { + return new ProtocolMessage().fromJsonString(jsonString, options) } - static equals(a: ProtocolMessage | PlainMessage | undefined, b: ProtocolMessage | PlainMessage | undefined): boolean { - return proto3.util.equals(ProtocolMessage, a, b); + static equals( + a: ProtocolMessage | PlainMessage | undefined, + b: ProtocolMessage | PlainMessage | undefined + ): boolean { + return proto3.util.equals(ProtocolMessage, a, b) } } - diff --git a/packages/status-js/src/protos/push-notifications_pb.ts b/packages/status-js/src/protos/push-notifications_pb.ts index 707738de..d773c191 100644 --- a/packages/status-js/src/protos/push-notifications_pb.ts +++ b/packages/status-js/src/protos/push-notifications_pb.ts @@ -3,10 +3,17 @@ /* eslint-disable */ // @ts-nocheck -import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; -import { Message, proto3, protoInt64 } from "@bufbuild/protobuf"; -import { ChatIdentity } from "./chat-identity_pb.js"; -import { URLParams } from "./url-data_pb.js"; +import type { + BinaryReadOptions, + FieldList, + JsonReadOptions, + JsonValue, + PartialMessage, + PlainMessage, +} from '@bufbuild/protobuf' +import { Message, proto3, protoInt64 } from '@bufbuild/protobuf' +import { ChatIdentity } from './chat-identity_pb.js' +import { URLParams } from './url-data_pb.js' /** * @generated from message PushNotificationRegistration @@ -15,111 +22,180 @@ export class PushNotificationRegistration extends Message) { - super(); - proto3.util.initPartial(data, this); + super() + proto3.util.initPartial(data, this) } - static readonly runtime = proto3; - static readonly typeName = "PushNotificationRegistration"; + static readonly runtime = proto3 + static readonly typeName = 'PushNotificationRegistration' static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "token_type", kind: "enum", T: proto3.getEnumType(PushNotificationRegistration_TokenType) }, - { no: 2, name: "device_token", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "installation_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "access_token", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 5, name: "enabled", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 6, name: "version", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 7, name: "allowed_key_list", kind: "scalar", T: 12 /* ScalarType.BYTES */, repeated: true }, - { no: 8, name: "blocked_chat_list", kind: "scalar", T: 12 /* ScalarType.BYTES */, repeated: true }, - { no: 9, name: "unregister", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 10, name: "grant", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - { no: 11, name: "allow_from_contacts_only", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 12, name: "apn_topic", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 13, name: "block_mentions", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 14, name: "allowed_mentions_chat_list", kind: "scalar", T: 12 /* ScalarType.BYTES */, repeated: true }, - ]); + { + no: 1, + name: 'token_type', + kind: 'enum', + T: proto3.getEnumType(PushNotificationRegistration_TokenType), + }, + { + no: 2, + name: 'device_token', + kind: 'scalar', + T: 9 /* ScalarType.STRING */, + }, + { + no: 3, + name: 'installation_id', + kind: 'scalar', + T: 9 /* ScalarType.STRING */, + }, + { + no: 4, + name: 'access_token', + kind: 'scalar', + T: 9 /* ScalarType.STRING */, + }, + { no: 5, name: 'enabled', kind: 'scalar', T: 8 /* ScalarType.BOOL */ }, + { no: 6, name: 'version', kind: 'scalar', T: 4 /* ScalarType.UINT64 */ }, + { + no: 7, + name: 'allowed_key_list', + kind: 'scalar', + T: 12 /* ScalarType.BYTES */, + repeated: true, + }, + { + no: 8, + name: 'blocked_chat_list', + kind: 'scalar', + T: 12 /* ScalarType.BYTES */, + repeated: true, + }, + { no: 9, name: 'unregister', kind: 'scalar', T: 8 /* ScalarType.BOOL */ }, + { no: 10, name: 'grant', kind: 'scalar', T: 12 /* ScalarType.BYTES */ }, + { + no: 11, + name: 'allow_from_contacts_only', + kind: 'scalar', + T: 8 /* ScalarType.BOOL */, + }, + { no: 12, name: 'apn_topic', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, + { + no: 13, + name: 'block_mentions', + kind: 'scalar', + T: 8 /* ScalarType.BOOL */, + }, + { + no: 14, + name: 'allowed_mentions_chat_list', + kind: 'scalar', + T: 12 /* ScalarType.BYTES */, + repeated: true, + }, + ]) - static fromBinary(bytes: Uint8Array, options?: Partial): PushNotificationRegistration { - return new PushNotificationRegistration().fromBinary(bytes, options); + static fromBinary( + bytes: Uint8Array, + options?: Partial + ): PushNotificationRegistration { + return new PushNotificationRegistration().fromBinary(bytes, options) } - static fromJson(jsonValue: JsonValue, options?: Partial): PushNotificationRegistration { - return new PushNotificationRegistration().fromJson(jsonValue, options); + static fromJson( + jsonValue: JsonValue, + options?: Partial + ): PushNotificationRegistration { + return new PushNotificationRegistration().fromJson(jsonValue, options) } - static fromJsonString(jsonString: string, options?: Partial): PushNotificationRegistration { - return new PushNotificationRegistration().fromJsonString(jsonString, options); + static fromJsonString( + jsonString: string, + options?: Partial + ): PushNotificationRegistration { + return new PushNotificationRegistration().fromJsonString( + jsonString, + options + ) } - static equals(a: PushNotificationRegistration | PlainMessage | undefined, b: PushNotificationRegistration | PlainMessage | undefined): boolean { - return proto3.util.equals(PushNotificationRegistration, a, b); + static equals( + a: + | PushNotificationRegistration + | PlainMessage + | undefined, + b: + | PushNotificationRegistration + | PlainMessage + | undefined + ): boolean { + return proto3.util.equals(PushNotificationRegistration, a, b) } } @@ -143,11 +219,15 @@ export enum PushNotificationRegistration_TokenType { FIREBASE_TOKEN = 2, } // Retrieve enum metadata with: proto3.getEnumType(PushNotificationRegistration_TokenType) -proto3.util.setEnumType(PushNotificationRegistration_TokenType, "PushNotificationRegistration.TokenType", [ - { no: 0, name: "UNKNOWN_TOKEN_TYPE" }, - { no: 1, name: "APN_TOKEN" }, - { no: 2, name: "FIREBASE_TOKEN" }, -]); +proto3.util.setEnumType( + PushNotificationRegistration_TokenType, + 'PushNotificationRegistration.TokenType', + [ + { no: 0, name: 'UNKNOWN_TOKEN_TYPE' }, + { no: 1, name: 'APN_TOKEN' }, + { no: 2, name: 'FIREBASE_TOKEN' }, + ] +) /** * @generated from message PushNotificationRegistrationResponse @@ -156,45 +236,74 @@ export class PushNotificationRegistrationResponse extends Message) { - super(); - proto3.util.initPartial(data, this); + super() + proto3.util.initPartial(data, this) } - static readonly runtime = proto3; - static readonly typeName = "PushNotificationRegistrationResponse"; + static readonly runtime = proto3 + static readonly typeName = 'PushNotificationRegistrationResponse' static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "success", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 2, name: "error", kind: "enum", T: proto3.getEnumType(PushNotificationRegistrationResponse_ErrorType) }, - { no: 3, name: "request_id", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - ]); + { no: 1, name: 'success', kind: 'scalar', T: 8 /* ScalarType.BOOL */ }, + { + no: 2, + name: 'error', + kind: 'enum', + T: proto3.getEnumType(PushNotificationRegistrationResponse_ErrorType), + }, + { no: 3, name: 'request_id', kind: 'scalar', T: 12 /* ScalarType.BYTES */ }, + ]) - static fromBinary(bytes: Uint8Array, options?: Partial): PushNotificationRegistrationResponse { - return new PushNotificationRegistrationResponse().fromBinary(bytes, options); + static fromBinary( + bytes: Uint8Array, + options?: Partial + ): PushNotificationRegistrationResponse { + return new PushNotificationRegistrationResponse().fromBinary(bytes, options) } - static fromJson(jsonValue: JsonValue, options?: Partial): PushNotificationRegistrationResponse { - return new PushNotificationRegistrationResponse().fromJson(jsonValue, options); + static fromJson( + jsonValue: JsonValue, + options?: Partial + ): PushNotificationRegistrationResponse { + return new PushNotificationRegistrationResponse().fromJson( + jsonValue, + options + ) } - static fromJsonString(jsonString: string, options?: Partial): PushNotificationRegistrationResponse { - return new PushNotificationRegistrationResponse().fromJsonString(jsonString, options); + static fromJsonString( + jsonString: string, + options?: Partial + ): PushNotificationRegistrationResponse { + return new PushNotificationRegistrationResponse().fromJsonString( + jsonString, + options + ) } - static equals(a: PushNotificationRegistrationResponse | PlainMessage | undefined, b: PushNotificationRegistrationResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(PushNotificationRegistrationResponse, a, b); + static equals( + a: + | PushNotificationRegistrationResponse + | PlainMessage + | undefined, + b: + | PushNotificationRegistrationResponse + | PlainMessage + | undefined + ): boolean { + return proto3.util.equals(PushNotificationRegistrationResponse, a, b) } } @@ -228,13 +337,17 @@ export enum PushNotificationRegistrationResponse_ErrorType { INTERNAL_ERROR = 4, } // Retrieve enum metadata with: proto3.getEnumType(PushNotificationRegistrationResponse_ErrorType) -proto3.util.setEnumType(PushNotificationRegistrationResponse_ErrorType, "PushNotificationRegistrationResponse.ErrorType", [ - { no: 0, name: "UNKNOWN_ERROR_TYPE" }, - { no: 1, name: "MALFORMED_MESSAGE" }, - { no: 2, name: "VERSION_MISMATCH" }, - { no: 3, name: "UNSUPPORTED_TOKEN_TYPE" }, - { no: 4, name: "INTERNAL_ERROR" }, -]); +proto3.util.setEnumType( + PushNotificationRegistrationResponse_ErrorType, + 'PushNotificationRegistrationResponse.ErrorType', + [ + { no: 0, name: 'UNKNOWN_ERROR_TYPE' }, + { no: 1, name: 'MALFORMED_MESSAGE' }, + { no: 2, name: 'VERSION_MISMATCH' }, + { no: 3, name: 'UNSUPPORTED_TOKEN_TYPE' }, + { no: 4, name: 'INTERNAL_ERROR' }, + ] +) /** * @generated from message ContactCodeAdvertisement @@ -243,45 +356,69 @@ export class ContactCodeAdvertisement extends Message /** * @generated from field: repeated PushNotificationQueryInfo push_notification_info = 1; */ - pushNotificationInfo: PushNotificationQueryInfo[] = []; + pushNotificationInfo: PushNotificationQueryInfo[] = [] /** * @generated from field: ChatIdentity chat_identity = 2; */ - chatIdentity?: ChatIdentity; + chatIdentity?: ChatIdentity /** * @generated from field: URLParams url_params = 3; */ - urlParams?: URLParams; + urlParams?: URLParams constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); + super() + proto3.util.initPartial(data, this) } - static readonly runtime = proto3; - static readonly typeName = "ContactCodeAdvertisement"; + static readonly runtime = proto3 + static readonly typeName = 'ContactCodeAdvertisement' static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "push_notification_info", kind: "message", T: PushNotificationQueryInfo, repeated: true }, - { no: 2, name: "chat_identity", kind: "message", T: ChatIdentity }, - { no: 3, name: "url_params", kind: "message", T: URLParams }, - ]); + { + no: 1, + name: 'push_notification_info', + kind: 'message', + T: PushNotificationQueryInfo, + repeated: true, + }, + { no: 2, name: 'chat_identity', kind: 'message', T: ChatIdentity }, + { no: 3, name: 'url_params', kind: 'message', T: URLParams }, + ]) - static fromBinary(bytes: Uint8Array, options?: Partial): ContactCodeAdvertisement { - return new ContactCodeAdvertisement().fromBinary(bytes, options); + static fromBinary( + bytes: Uint8Array, + options?: Partial + ): ContactCodeAdvertisement { + return new ContactCodeAdvertisement().fromBinary(bytes, options) } - static fromJson(jsonValue: JsonValue, options?: Partial): ContactCodeAdvertisement { - return new ContactCodeAdvertisement().fromJson(jsonValue, options); + static fromJson( + jsonValue: JsonValue, + options?: Partial + ): ContactCodeAdvertisement { + return new ContactCodeAdvertisement().fromJson(jsonValue, options) } - static fromJsonString(jsonString: string, options?: Partial): ContactCodeAdvertisement { - return new ContactCodeAdvertisement().fromJsonString(jsonString, options); + static fromJsonString( + jsonString: string, + options?: Partial + ): ContactCodeAdvertisement { + return new ContactCodeAdvertisement().fromJsonString(jsonString, options) } - static equals(a: ContactCodeAdvertisement | PlainMessage | undefined, b: ContactCodeAdvertisement | PlainMessage | undefined): boolean { - return proto3.util.equals(ContactCodeAdvertisement, a, b); + static equals( + a: + | ContactCodeAdvertisement + | PlainMessage + | undefined, + b: + | ContactCodeAdvertisement + | PlainMessage + | undefined + ): boolean { + return proto3.util.equals(ContactCodeAdvertisement, a, b) } } @@ -292,33 +429,51 @@ export class PushNotificationQuery extends Message { /** * @generated from field: repeated bytes public_keys = 1; */ - publicKeys: Uint8Array[] = []; + publicKeys: Uint8Array[] = [] constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); + super() + proto3.util.initPartial(data, this) } - static readonly runtime = proto3; - static readonly typeName = "PushNotificationQuery"; + static readonly runtime = proto3 + static readonly typeName = 'PushNotificationQuery' static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "public_keys", kind: "scalar", T: 12 /* ScalarType.BYTES */, repeated: true }, - ]); + { + no: 1, + name: 'public_keys', + kind: 'scalar', + T: 12 /* ScalarType.BYTES */, + repeated: true, + }, + ]) - static fromBinary(bytes: Uint8Array, options?: Partial): PushNotificationQuery { - return new PushNotificationQuery().fromBinary(bytes, options); + static fromBinary( + bytes: Uint8Array, + options?: Partial + ): PushNotificationQuery { + return new PushNotificationQuery().fromBinary(bytes, options) } - static fromJson(jsonValue: JsonValue, options?: Partial): PushNotificationQuery { - return new PushNotificationQuery().fromJson(jsonValue, options); + static fromJson( + jsonValue: JsonValue, + options?: Partial + ): PushNotificationQuery { + return new PushNotificationQuery().fromJson(jsonValue, options) } - static fromJsonString(jsonString: string, options?: Partial): PushNotificationQuery { - return new PushNotificationQuery().fromJsonString(jsonString, options); + static fromJsonString( + jsonString: string, + options?: Partial + ): PushNotificationQuery { + return new PushNotificationQuery().fromJsonString(jsonString, options) } - static equals(a: PushNotificationQuery | PlainMessage | undefined, b: PushNotificationQuery | PlainMessage | undefined): boolean { - return proto3.util.equals(PushNotificationQuery, a, b); + static equals( + a: PushNotificationQuery | PlainMessage | undefined, + b: PushNotificationQuery | PlainMessage | undefined + ): boolean { + return proto3.util.equals(PushNotificationQuery, a, b) } } @@ -329,69 +484,108 @@ export class PushNotificationQueryInfo extends Message) { - super(); - proto3.util.initPartial(data, this); + super() + proto3.util.initPartial(data, this) } - static readonly runtime = proto3; - static readonly typeName = "PushNotificationQueryInfo"; + static readonly runtime = proto3 + static readonly typeName = 'PushNotificationQueryInfo' static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "access_token", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "installation_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "public_key", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - { no: 4, name: "allowed_key_list", kind: "scalar", T: 12 /* ScalarType.BYTES */, repeated: true }, - { no: 5, name: "grant", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - { no: 6, name: "version", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 7, name: "server_public_key", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - ]); + { + no: 1, + name: 'access_token', + kind: 'scalar', + T: 9 /* ScalarType.STRING */, + }, + { + no: 2, + name: 'installation_id', + kind: 'scalar', + T: 9 /* ScalarType.STRING */, + }, + { no: 3, name: 'public_key', kind: 'scalar', T: 12 /* ScalarType.BYTES */ }, + { + no: 4, + name: 'allowed_key_list', + kind: 'scalar', + T: 12 /* ScalarType.BYTES */, + repeated: true, + }, + { no: 5, name: 'grant', kind: 'scalar', T: 12 /* ScalarType.BYTES */ }, + { no: 6, name: 'version', kind: 'scalar', T: 4 /* ScalarType.UINT64 */ }, + { + no: 7, + name: 'server_public_key', + kind: 'scalar', + T: 12 /* ScalarType.BYTES */, + }, + ]) - static fromBinary(bytes: Uint8Array, options?: Partial): PushNotificationQueryInfo { - return new PushNotificationQueryInfo().fromBinary(bytes, options); + static fromBinary( + bytes: Uint8Array, + options?: Partial + ): PushNotificationQueryInfo { + return new PushNotificationQueryInfo().fromBinary(bytes, options) } - static fromJson(jsonValue: JsonValue, options?: Partial): PushNotificationQueryInfo { - return new PushNotificationQueryInfo().fromJson(jsonValue, options); + static fromJson( + jsonValue: JsonValue, + options?: Partial + ): PushNotificationQueryInfo { + return new PushNotificationQueryInfo().fromJson(jsonValue, options) } - static fromJsonString(jsonString: string, options?: Partial): PushNotificationQueryInfo { - return new PushNotificationQueryInfo().fromJsonString(jsonString, options); + static fromJsonString( + jsonString: string, + options?: Partial + ): PushNotificationQueryInfo { + return new PushNotificationQueryInfo().fromJsonString(jsonString, options) } - static equals(a: PushNotificationQueryInfo | PlainMessage | undefined, b: PushNotificationQueryInfo | PlainMessage | undefined): boolean { - return proto3.util.equals(PushNotificationQueryInfo, a, b); + static equals( + a: + | PushNotificationQueryInfo + | PlainMessage + | undefined, + b: + | PushNotificationQueryInfo + | PlainMessage + | undefined + ): boolean { + return proto3.util.equals(PushNotificationQueryInfo, a, b) } } @@ -402,45 +596,72 @@ export class PushNotificationQueryResponse extends Message) { - super(); - proto3.util.initPartial(data, this); + super() + proto3.util.initPartial(data, this) } - static readonly runtime = proto3; - static readonly typeName = "PushNotificationQueryResponse"; + static readonly runtime = proto3 + static readonly typeName = 'PushNotificationQueryResponse' static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "info", kind: "message", T: PushNotificationQueryInfo, repeated: true }, - { no: 2, name: "message_id", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - { no: 3, name: "success", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - ]); + { + no: 1, + name: 'info', + kind: 'message', + T: PushNotificationQueryInfo, + repeated: true, + }, + { no: 2, name: 'message_id', kind: 'scalar', T: 12 /* ScalarType.BYTES */ }, + { no: 3, name: 'success', kind: 'scalar', T: 8 /* ScalarType.BOOL */ }, + ]) - static fromBinary(bytes: Uint8Array, options?: Partial): PushNotificationQueryResponse { - return new PushNotificationQueryResponse().fromBinary(bytes, options); + static fromBinary( + bytes: Uint8Array, + options?: Partial + ): PushNotificationQueryResponse { + return new PushNotificationQueryResponse().fromBinary(bytes, options) } - static fromJson(jsonValue: JsonValue, options?: Partial): PushNotificationQueryResponse { - return new PushNotificationQueryResponse().fromJson(jsonValue, options); + static fromJson( + jsonValue: JsonValue, + options?: Partial + ): PushNotificationQueryResponse { + return new PushNotificationQueryResponse().fromJson(jsonValue, options) } - static fromJsonString(jsonString: string, options?: Partial): PushNotificationQueryResponse { - return new PushNotificationQueryResponse().fromJsonString(jsonString, options); + static fromJsonString( + jsonString: string, + options?: Partial + ): PushNotificationQueryResponse { + return new PushNotificationQueryResponse().fromJsonString( + jsonString, + options + ) } - static equals(a: PushNotificationQueryResponse | PlainMessage | undefined, b: PushNotificationQueryResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(PushNotificationQueryResponse, a, b); + static equals( + a: + | PushNotificationQueryResponse + | PlainMessage + | undefined, + b: + | PushNotificationQueryResponse + | PlainMessage + | undefined + ): boolean { + return proto3.util.equals(PushNotificationQueryResponse, a, b) } } @@ -451,69 +672,96 @@ export class PushNotification extends Message { /** * @generated from field: string access_token = 1; */ - accessToken = ""; + accessToken = '' /** * @generated from field: bytes chat_id = 2; */ - chatId = new Uint8Array(0); + chatId = new Uint8Array(0) /** * @generated from field: bytes public_key = 3; */ - publicKey = new Uint8Array(0); + publicKey = new Uint8Array(0) /** * @generated from field: string installation_id = 4; */ - installationId = ""; + installationId = '' /** * @generated from field: bytes message = 5; */ - message = new Uint8Array(0); + message = new Uint8Array(0) /** * @generated from field: PushNotification.PushNotificationType type = 6; */ - type = PushNotification_PushNotificationType.UNKNOWN_PUSH_NOTIFICATION_TYPE; + type = PushNotification_PushNotificationType.UNKNOWN_PUSH_NOTIFICATION_TYPE /** * @generated from field: bytes author = 7; */ - author = new Uint8Array(0); + author = new Uint8Array(0) constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); + super() + proto3.util.initPartial(data, this) } - static readonly runtime = proto3; - static readonly typeName = "PushNotification"; + static readonly runtime = proto3 + static readonly typeName = 'PushNotification' static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "access_token", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "chat_id", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - { no: 3, name: "public_key", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - { no: 4, name: "installation_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 5, name: "message", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - { no: 6, name: "type", kind: "enum", T: proto3.getEnumType(PushNotification_PushNotificationType) }, - { no: 7, name: "author", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - ]); + { + no: 1, + name: 'access_token', + kind: 'scalar', + T: 9 /* ScalarType.STRING */, + }, + { no: 2, name: 'chat_id', kind: 'scalar', T: 12 /* ScalarType.BYTES */ }, + { no: 3, name: 'public_key', kind: 'scalar', T: 12 /* ScalarType.BYTES */ }, + { + no: 4, + name: 'installation_id', + kind: 'scalar', + T: 9 /* ScalarType.STRING */, + }, + { no: 5, name: 'message', kind: 'scalar', T: 12 /* ScalarType.BYTES */ }, + { + no: 6, + name: 'type', + kind: 'enum', + T: proto3.getEnumType(PushNotification_PushNotificationType), + }, + { no: 7, name: 'author', kind: 'scalar', T: 12 /* ScalarType.BYTES */ }, + ]) - static fromBinary(bytes: Uint8Array, options?: Partial): PushNotification { - return new PushNotification().fromBinary(bytes, options); + static fromBinary( + bytes: Uint8Array, + options?: Partial + ): PushNotification { + return new PushNotification().fromBinary(bytes, options) } - static fromJson(jsonValue: JsonValue, options?: Partial): PushNotification { - return new PushNotification().fromJson(jsonValue, options); + static fromJson( + jsonValue: JsonValue, + options?: Partial + ): PushNotification { + return new PushNotification().fromJson(jsonValue, options) } - static fromJsonString(jsonString: string, options?: Partial): PushNotification { - return new PushNotification().fromJsonString(jsonString, options); + static fromJsonString( + jsonString: string, + options?: Partial + ): PushNotification { + return new PushNotification().fromJsonString(jsonString, options) } - static equals(a: PushNotification | PlainMessage | undefined, b: PushNotification | PlainMessage | undefined): boolean { - return proto3.util.equals(PushNotification, a, b); + static equals( + a: PushNotification | PlainMessage | undefined, + b: PushNotification | PlainMessage | undefined + ): boolean { + return proto3.util.equals(PushNotification, a, b) } } @@ -542,12 +790,16 @@ export enum PushNotification_PushNotificationType { REQUEST_TO_JOIN_COMMUNITY = 3, } // Retrieve enum metadata with: proto3.getEnumType(PushNotification_PushNotificationType) -proto3.util.setEnumType(PushNotification_PushNotificationType, "PushNotification.PushNotificationType", [ - { no: 0, name: "UNKNOWN_PUSH_NOTIFICATION_TYPE" }, - { no: 1, name: "MESSAGE" }, - { no: 2, name: "MENTION" }, - { no: 3, name: "REQUEST_TO_JOIN_COMMUNITY" }, -]); +proto3.util.setEnumType( + PushNotification_PushNotificationType, + 'PushNotification.PushNotificationType', + [ + { no: 0, name: 'UNKNOWN_PUSH_NOTIFICATION_TYPE' }, + { no: 1, name: 'MESSAGE' }, + { no: 2, name: 'MENTION' }, + { no: 3, name: 'REQUEST_TO_JOIN_COMMUNITY' }, + ] +) /** * @generated from message PushNotificationRequest @@ -556,39 +808,63 @@ export class PushNotificationRequest extends Message { /** * @generated from field: repeated PushNotification requests = 1; */ - requests: PushNotification[] = []; + requests: PushNotification[] = [] /** * @generated from field: bytes message_id = 2; */ - messageId = new Uint8Array(0); + messageId = new Uint8Array(0) constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); + super() + proto3.util.initPartial(data, this) } - static readonly runtime = proto3; - static readonly typeName = "PushNotificationRequest"; + static readonly runtime = proto3 + static readonly typeName = 'PushNotificationRequest' static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "requests", kind: "message", T: PushNotification, repeated: true }, - { no: 2, name: "message_id", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - ]); + { + no: 1, + name: 'requests', + kind: 'message', + T: PushNotification, + repeated: true, + }, + { no: 2, name: 'message_id', kind: 'scalar', T: 12 /* ScalarType.BYTES */ }, + ]) - static fromBinary(bytes: Uint8Array, options?: Partial): PushNotificationRequest { - return new PushNotificationRequest().fromBinary(bytes, options); + static fromBinary( + bytes: Uint8Array, + options?: Partial + ): PushNotificationRequest { + return new PushNotificationRequest().fromBinary(bytes, options) } - static fromJson(jsonValue: JsonValue, options?: Partial): PushNotificationRequest { - return new PushNotificationRequest().fromJson(jsonValue, options); + static fromJson( + jsonValue: JsonValue, + options?: Partial + ): PushNotificationRequest { + return new PushNotificationRequest().fromJson(jsonValue, options) } - static fromJsonString(jsonString: string, options?: Partial): PushNotificationRequest { - return new PushNotificationRequest().fromJsonString(jsonString, options); + static fromJsonString( + jsonString: string, + options?: Partial + ): PushNotificationRequest { + return new PushNotificationRequest().fromJsonString(jsonString, options) } - static equals(a: PushNotificationRequest | PlainMessage | undefined, b: PushNotificationRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(PushNotificationRequest, a, b); + static equals( + a: + | PushNotificationRequest + | PlainMessage + | undefined, + b: + | PushNotificationRequest + | PlainMessage + | undefined + ): boolean { + return proto3.util.equals(PushNotificationRequest, a, b) } } @@ -599,51 +875,76 @@ export class PushNotificationReport extends Message { /** * @generated from field: bool success = 1; */ - success = false; + success = false /** * @generated from field: PushNotificationReport.ErrorType error = 2; */ - error = PushNotificationReport_ErrorType.UNKNOWN_ERROR_TYPE; + error = PushNotificationReport_ErrorType.UNKNOWN_ERROR_TYPE /** * @generated from field: bytes public_key = 3; */ - publicKey = new Uint8Array(0); + publicKey = new Uint8Array(0) /** * @generated from field: string installation_id = 4; */ - installationId = ""; + installationId = '' constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); + super() + proto3.util.initPartial(data, this) } - static readonly runtime = proto3; - static readonly typeName = "PushNotificationReport"; + static readonly runtime = proto3 + static readonly typeName = 'PushNotificationReport' static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "success", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 2, name: "error", kind: "enum", T: proto3.getEnumType(PushNotificationReport_ErrorType) }, - { no: 3, name: "public_key", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - { no: 4, name: "installation_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); + { no: 1, name: 'success', kind: 'scalar', T: 8 /* ScalarType.BOOL */ }, + { + no: 2, + name: 'error', + kind: 'enum', + T: proto3.getEnumType(PushNotificationReport_ErrorType), + }, + { no: 3, name: 'public_key', kind: 'scalar', T: 12 /* ScalarType.BYTES */ }, + { + no: 4, + name: 'installation_id', + kind: 'scalar', + T: 9 /* ScalarType.STRING */, + }, + ]) - static fromBinary(bytes: Uint8Array, options?: Partial): PushNotificationReport { - return new PushNotificationReport().fromBinary(bytes, options); + static fromBinary( + bytes: Uint8Array, + options?: Partial + ): PushNotificationReport { + return new PushNotificationReport().fromBinary(bytes, options) } - static fromJson(jsonValue: JsonValue, options?: Partial): PushNotificationReport { - return new PushNotificationReport().fromJson(jsonValue, options); + static fromJson( + jsonValue: JsonValue, + options?: Partial + ): PushNotificationReport { + return new PushNotificationReport().fromJson(jsonValue, options) } - static fromJsonString(jsonString: string, options?: Partial): PushNotificationReport { - return new PushNotificationReport().fromJsonString(jsonString, options); + static fromJsonString( + jsonString: string, + options?: Partial + ): PushNotificationReport { + return new PushNotificationReport().fromJsonString(jsonString, options) } - static equals(a: PushNotificationReport | PlainMessage | undefined, b: PushNotificationReport | PlainMessage | undefined): boolean { - return proto3.util.equals(PushNotificationReport, a, b); + static equals( + a: + | PushNotificationReport + | PlainMessage + | undefined, + b: PushNotificationReport | PlainMessage | undefined + ): boolean { + return proto3.util.equals(PushNotificationReport, a, b) } } @@ -672,12 +973,16 @@ export enum PushNotificationReport_ErrorType { NOT_REGISTERED = 3, } // Retrieve enum metadata with: proto3.getEnumType(PushNotificationReport_ErrorType) -proto3.util.setEnumType(PushNotificationReport_ErrorType, "PushNotificationReport.ErrorType", [ - { no: 0, name: "UNKNOWN_ERROR_TYPE" }, - { no: 1, name: "WRONG_TOKEN" }, - { no: 2, name: "INTERNAL_ERROR" }, - { no: 3, name: "NOT_REGISTERED" }, -]); +proto3.util.setEnumType( + PushNotificationReport_ErrorType, + 'PushNotificationReport.ErrorType', + [ + { no: 0, name: 'UNKNOWN_ERROR_TYPE' }, + { no: 1, name: 'WRONG_TOKEN' }, + { no: 2, name: 'INTERNAL_ERROR' }, + { no: 3, name: 'NOT_REGISTERED' }, + ] +) /** * @generated from message PushNotificationResponse @@ -686,39 +991,62 @@ export class PushNotificationResponse extends Message /** * @generated from field: bytes message_id = 1; */ - messageId = new Uint8Array(0); + messageId = new Uint8Array(0) /** * @generated from field: repeated PushNotificationReport reports = 2; */ - reports: PushNotificationReport[] = []; + reports: PushNotificationReport[] = [] constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); + super() + proto3.util.initPartial(data, this) } - static readonly runtime = proto3; - static readonly typeName = "PushNotificationResponse"; + static readonly runtime = proto3 + static readonly typeName = 'PushNotificationResponse' static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "message_id", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - { no: 2, name: "reports", kind: "message", T: PushNotificationReport, repeated: true }, - ]); + { no: 1, name: 'message_id', kind: 'scalar', T: 12 /* ScalarType.BYTES */ }, + { + no: 2, + name: 'reports', + kind: 'message', + T: PushNotificationReport, + repeated: true, + }, + ]) - static fromBinary(bytes: Uint8Array, options?: Partial): PushNotificationResponse { - return new PushNotificationResponse().fromBinary(bytes, options); + static fromBinary( + bytes: Uint8Array, + options?: Partial + ): PushNotificationResponse { + return new PushNotificationResponse().fromBinary(bytes, options) } - static fromJson(jsonValue: JsonValue, options?: Partial): PushNotificationResponse { - return new PushNotificationResponse().fromJson(jsonValue, options); + static fromJson( + jsonValue: JsonValue, + options?: Partial + ): PushNotificationResponse { + return new PushNotificationResponse().fromJson(jsonValue, options) } - static fromJsonString(jsonString: string, options?: Partial): PushNotificationResponse { - return new PushNotificationResponse().fromJsonString(jsonString, options); + static fromJsonString( + jsonString: string, + options?: Partial + ): PushNotificationResponse { + return new PushNotificationResponse().fromJsonString(jsonString, options) } - static equals(a: PushNotificationResponse | PlainMessage | undefined, b: PushNotificationResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(PushNotificationResponse, a, b); + static equals( + a: + | PushNotificationResponse + | PlainMessage + | undefined, + b: + | PushNotificationResponse + | PlainMessage + | undefined + ): boolean { + return proto3.util.equals(PushNotificationResponse, a, b) } } - diff --git a/packages/status-js/src/protos/status-update_pb.ts b/packages/status-js/src/protos/status-update_pb.ts index 3fc6bbe1..281d0754 100644 --- a/packages/status-js/src/protos/status-update_pb.ts +++ b/packages/status-js/src/protos/status-update_pb.ts @@ -3,8 +3,15 @@ /* eslint-disable */ // @ts-nocheck -import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; -import { Message, proto3, protoInt64 } from "@bufbuild/protobuf"; +import type { + BinaryReadOptions, + FieldList, + JsonReadOptions, + JsonValue, + PartialMessage, + PlainMessage, +} from '@bufbuild/protobuf' +import { Message, proto3, protoInt64 } from '@bufbuild/protobuf' /** * Specs: @@ -17,7 +24,7 @@ import { Message, proto3, protoInt64 } from "@bufbuild/protobuf"; * :INACTIVE * To Send - A single "INACTIVE" status ping * Display - Offline forever - * Note: Only send pings if the user interacted with the app in the last x minutes. + * Note: Only send pings if the user interacted with the app in the last x minutes. * * @generated from message StatusUpdate */ @@ -25,45 +32,67 @@ export class StatusUpdate extends Message { /** * @generated from field: uint64 clock = 1; */ - clock = protoInt64.zero; + clock = protoInt64.zero /** * @generated from field: StatusUpdate.StatusType status_type = 2; */ - statusType = StatusUpdate_StatusType.UNKNOWN_STATUS_TYPE; + statusType = StatusUpdate_StatusType.UNKNOWN_STATUS_TYPE /** * @generated from field: string custom_text = 3; */ - customText = ""; + customText = '' constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); + super() + proto3.util.initPartial(data, this) } - static readonly runtime = proto3; - static readonly typeName = "StatusUpdate"; + static readonly runtime = proto3 + static readonly typeName = 'StatusUpdate' static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "clock", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 2, name: "status_type", kind: "enum", T: proto3.getEnumType(StatusUpdate_StatusType) }, - { no: 3, name: "custom_text", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); + { no: 1, name: 'clock', kind: 'scalar', T: 4 /* ScalarType.UINT64 */ }, + { + no: 2, + name: 'status_type', + kind: 'enum', + T: proto3.getEnumType(StatusUpdate_StatusType), + }, + { + no: 3, + name: 'custom_text', + kind: 'scalar', + T: 9 /* ScalarType.STRING */, + }, + ]) - static fromBinary(bytes: Uint8Array, options?: Partial): StatusUpdate { - return new StatusUpdate().fromBinary(bytes, options); + static fromBinary( + bytes: Uint8Array, + options?: Partial + ): StatusUpdate { + return new StatusUpdate().fromBinary(bytes, options) } - static fromJson(jsonValue: JsonValue, options?: Partial): StatusUpdate { - return new StatusUpdate().fromJson(jsonValue, options); + static fromJson( + jsonValue: JsonValue, + options?: Partial + ): StatusUpdate { + return new StatusUpdate().fromJson(jsonValue, options) } - static fromJsonString(jsonString: string, options?: Partial): StatusUpdate { - return new StatusUpdate().fromJsonString(jsonString, options); + static fromJsonString( + jsonString: string, + options?: Partial + ): StatusUpdate { + return new StatusUpdate().fromJsonString(jsonString, options) } - static equals(a: StatusUpdate | PlainMessage | undefined, b: StatusUpdate | PlainMessage | undefined): boolean { - return proto3.util.equals(StatusUpdate, a, b); + static equals( + a: StatusUpdate | PlainMessage | undefined, + b: StatusUpdate | PlainMessage | undefined + ): boolean { + return proto3.util.equals(StatusUpdate, a, b) } } @@ -97,11 +126,10 @@ export enum StatusUpdate_StatusType { INACTIVE = 4, } // Retrieve enum metadata with: proto3.getEnumType(StatusUpdate_StatusType) -proto3.util.setEnumType(StatusUpdate_StatusType, "StatusUpdate.StatusType", [ - { no: 0, name: "UNKNOWN_STATUS_TYPE" }, - { no: 1, name: "AUTOMATIC" }, - { no: 2, name: "DO_NOT_DISTURB" }, - { no: 3, name: "ALWAYS_ONLINE" }, - { no: 4, name: "INACTIVE" }, -]); - +proto3.util.setEnumType(StatusUpdate_StatusType, 'StatusUpdate.StatusType', [ + { no: 0, name: 'UNKNOWN_STATUS_TYPE' }, + { no: 1, name: 'AUTOMATIC' }, + { no: 2, name: 'DO_NOT_DISTURB' }, + { no: 3, name: 'ALWAYS_ONLINE' }, + { no: 4, name: 'INACTIVE' }, +]) diff --git a/packages/status-js/src/protos/url-data_pb.ts b/packages/status-js/src/protos/url-data_pb.ts index 18ed7b99..e1e87535 100644 --- a/packages/status-js/src/protos/url-data_pb.ts +++ b/packages/status-js/src/protos/url-data_pb.ts @@ -3,8 +3,15 @@ /* eslint-disable */ // @ts-nocheck -import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; -import { Message, proto3 } from "@bufbuild/protobuf"; +import type { + BinaryReadOptions, + FieldList, + JsonReadOptions, + JsonValue, + PartialMessage, + PlainMessage, +} from '@bufbuild/protobuf' +import { Message, proto3 } from '@bufbuild/protobuf' /** * @generated from message Community @@ -13,57 +20,90 @@ export class Community extends Message { /** * @generated from field: string display_name = 1; */ - displayName = ""; + displayName = '' /** * @generated from field: string description = 2; */ - description = ""; + description = '' /** * @generated from field: uint32 members_count = 3; */ - membersCount = 0; + membersCount = 0 /** * @generated from field: string color = 4; */ - color = ""; + color = '' /** * @generated from field: repeated uint32 tag_indices = 5; */ - tagIndices: number[] = []; + tagIndices: number[] = [] constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); + super() + proto3.util.initPartial(data, this) } - static readonly runtime = proto3; - static readonly typeName = "Community"; + static readonly runtime = proto3 + static readonly typeName = 'Community' static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "display_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "description", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "members_count", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 4, name: "color", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 5, name: "tag_indices", kind: "scalar", T: 13 /* ScalarType.UINT32 */, repeated: true }, - ]); + { + no: 1, + name: 'display_name', + kind: 'scalar', + T: 9 /* ScalarType.STRING */, + }, + { + no: 2, + name: 'description', + kind: 'scalar', + T: 9 /* ScalarType.STRING */, + }, + { + no: 3, + name: 'members_count', + kind: 'scalar', + T: 13 /* ScalarType.UINT32 */, + }, + { no: 4, name: 'color', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, + { + no: 5, + name: 'tag_indices', + kind: 'scalar', + T: 13 /* ScalarType.UINT32 */, + repeated: true, + }, + ]) - static fromBinary(bytes: Uint8Array, options?: Partial): Community { - return new Community().fromBinary(bytes, options); + static fromBinary( + bytes: Uint8Array, + options?: Partial + ): Community { + return new Community().fromBinary(bytes, options) } - static fromJson(jsonValue: JsonValue, options?: Partial): Community { - return new Community().fromJson(jsonValue, options); + static fromJson( + jsonValue: JsonValue, + options?: Partial + ): Community { + return new Community().fromJson(jsonValue, options) } - static fromJsonString(jsonString: string, options?: Partial): Community { - return new Community().fromJsonString(jsonString, options); + static fromJsonString( + jsonString: string, + options?: Partial + ): Community { + return new Community().fromJsonString(jsonString, options) } - static equals(a: Community | PlainMessage | undefined, b: Community | PlainMessage | undefined): boolean { - return proto3.util.equals(Community, a, b); + static equals( + a: Community | PlainMessage | undefined, + b: Community | PlainMessage | undefined + ): boolean { + return proto3.util.equals(Community, a, b) } } @@ -74,63 +114,85 @@ export class Channel extends Message { /** * @generated from field: string display_name = 1; */ - displayName = ""; + displayName = '' /** * @generated from field: string description = 2; */ - description = ""; + description = '' /** * @generated from field: string emoji = 3; */ - emoji = ""; + emoji = '' /** * @generated from field: string color = 4; */ - color = ""; + color = '' /** * @generated from field: Community community = 5; */ - community?: Community; + community?: Community /** * @generated from field: string uuid = 6; */ - uuid = ""; + uuid = '' constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); + super() + proto3.util.initPartial(data, this) } - static readonly runtime = proto3; - static readonly typeName = "Channel"; + static readonly runtime = proto3 + static readonly typeName = 'Channel' static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "display_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "description", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "emoji", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "color", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 5, name: "community", kind: "message", T: Community }, - { no: 6, name: "uuid", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); + { + no: 1, + name: 'display_name', + kind: 'scalar', + T: 9 /* ScalarType.STRING */, + }, + { + no: 2, + name: 'description', + kind: 'scalar', + T: 9 /* ScalarType.STRING */, + }, + { no: 3, name: 'emoji', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, + { no: 4, name: 'color', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, + { no: 5, name: 'community', kind: 'message', T: Community }, + { no: 6, name: 'uuid', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, + ]) - static fromBinary(bytes: Uint8Array, options?: Partial): Channel { - return new Channel().fromBinary(bytes, options); + static fromBinary( + bytes: Uint8Array, + options?: Partial + ): Channel { + return new Channel().fromBinary(bytes, options) } - static fromJson(jsonValue: JsonValue, options?: Partial): Channel { - return new Channel().fromJson(jsonValue, options); + static fromJson( + jsonValue: JsonValue, + options?: Partial + ): Channel { + return new Channel().fromJson(jsonValue, options) } - static fromJsonString(jsonString: string, options?: Partial): Channel { - return new Channel().fromJsonString(jsonString, options); + static fromJsonString( + jsonString: string, + options?: Partial + ): Channel { + return new Channel().fromJsonString(jsonString, options) } - static equals(a: Channel | PlainMessage | undefined, b: Channel | PlainMessage | undefined): boolean { - return proto3.util.equals(Channel, a, b); + static equals( + a: Channel | PlainMessage | undefined, + b: Channel | PlainMessage | undefined + ): boolean { + return proto3.util.equals(Channel, a, b) } } @@ -141,45 +203,67 @@ export class User extends Message { /** * @generated from field: string display_name = 1; */ - displayName = ""; + displayName = '' /** * @generated from field: string description = 2; */ - description = ""; + description = '' /** * @generated from field: string color = 3; */ - color = ""; + color = '' constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); + super() + proto3.util.initPartial(data, this) } - static readonly runtime = proto3; - static readonly typeName = "User"; + static readonly runtime = proto3 + static readonly typeName = 'User' static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "display_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "description", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "color", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); + { + no: 1, + name: 'display_name', + kind: 'scalar', + T: 9 /* ScalarType.STRING */, + }, + { + no: 2, + name: 'description', + kind: 'scalar', + T: 9 /* ScalarType.STRING */, + }, + { no: 3, name: 'color', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, + ]) - static fromBinary(bytes: Uint8Array, options?: Partial): User { - return new User().fromBinary(bytes, options); + static fromBinary( + bytes: Uint8Array, + options?: Partial + ): User { + return new User().fromBinary(bytes, options) } - static fromJson(jsonValue: JsonValue, options?: Partial): User { - return new User().fromJson(jsonValue, options); + static fromJson( + jsonValue: JsonValue, + options?: Partial + ): User { + return new User().fromJson(jsonValue, options) } - static fromJsonString(jsonString: string, options?: Partial): User { - return new User().fromJsonString(jsonString, options); + static fromJsonString( + jsonString: string, + options?: Partial + ): User { + return new User().fromJsonString(jsonString, options) } - static equals(a: User | PlainMessage | undefined, b: User | PlainMessage | undefined): boolean { - return proto3.util.equals(User, a, b); + static equals( + a: User | PlainMessage | undefined, + b: User | PlainMessage | undefined + ): boolean { + return proto3.util.equals(User, a, b) } } @@ -192,33 +276,45 @@ export class URLData extends Message { * * @generated from field: bytes content = 1; */ - content = new Uint8Array(0); + content = new Uint8Array(0) constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); + super() + proto3.util.initPartial(data, this) } - static readonly runtime = proto3; - static readonly typeName = "URLData"; + static readonly runtime = proto3 + static readonly typeName = 'URLData' static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "content", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - ]); + { no: 1, name: 'content', kind: 'scalar', T: 12 /* ScalarType.BYTES */ }, + ]) - static fromBinary(bytes: Uint8Array, options?: Partial): URLData { - return new URLData().fromBinary(bytes, options); + static fromBinary( + bytes: Uint8Array, + options?: Partial + ): URLData { + return new URLData().fromBinary(bytes, options) } - static fromJson(jsonValue: JsonValue, options?: Partial): URLData { - return new URLData().fromJson(jsonValue, options); + static fromJson( + jsonValue: JsonValue, + options?: Partial + ): URLData { + return new URLData().fromJson(jsonValue, options) } - static fromJsonString(jsonString: string, options?: Partial): URLData { - return new URLData().fromJsonString(jsonString, options); + static fromJsonString( + jsonString: string, + options?: Partial + ): URLData { + return new URLData().fromJsonString(jsonString, options) } - static equals(a: URLData | PlainMessage | undefined, b: URLData | PlainMessage | undefined): boolean { - return proto3.util.equals(URLData, a, b); + static equals( + a: URLData | PlainMessage | undefined, + b: URLData | PlainMessage | undefined + ): boolean { + return proto3.util.equals(URLData, a, b) } } @@ -229,41 +325,62 @@ export class URLParams extends Message { /** * @generated from field: string encoded_url_data = 1; */ - encodedUrlData = ""; + encodedUrlData = '' /** * Signature of encoded URL data * * @generated from field: string encoded_signature = 2; */ - encodedSignature = ""; + encodedSignature = '' constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); + super() + proto3.util.initPartial(data, this) } - static readonly runtime = proto3; - static readonly typeName = "URLParams"; + static readonly runtime = proto3 + static readonly typeName = 'URLParams' static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "encoded_url_data", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "encoded_signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); + { + no: 1, + name: 'encoded_url_data', + kind: 'scalar', + T: 9 /* ScalarType.STRING */, + }, + { + no: 2, + name: 'encoded_signature', + kind: 'scalar', + T: 9 /* ScalarType.STRING */, + }, + ]) - static fromBinary(bytes: Uint8Array, options?: Partial): URLParams { - return new URLParams().fromBinary(bytes, options); + static fromBinary( + bytes: Uint8Array, + options?: Partial + ): URLParams { + return new URLParams().fromBinary(bytes, options) } - static fromJson(jsonValue: JsonValue, options?: Partial): URLParams { - return new URLParams().fromJson(jsonValue, options); + static fromJson( + jsonValue: JsonValue, + options?: Partial + ): URLParams { + return new URLParams().fromJson(jsonValue, options) } - static fromJsonString(jsonString: string, options?: Partial): URLParams { - return new URLParams().fromJsonString(jsonString, options); + static fromJsonString( + jsonString: string, + options?: Partial + ): URLParams { + return new URLParams().fromJsonString(jsonString, options) } - static equals(a: URLParams | PlainMessage | undefined, b: URLParams | PlainMessage | undefined): boolean { - return proto3.util.equals(URLParams, a, b); + static equals( + a: URLParams | PlainMessage | undefined, + b: URLParams | PlainMessage | undefined + ): boolean { + return proto3.util.equals(URLParams, a, b) } } - diff --git a/packages/status-js/src/utils/deserialize-public-key.ts b/packages/status-js/src/utils/deserialize-public-key.ts index 989562a0..cd432468 100644 --- a/packages/status-js/src/utils/deserialize-public-key.ts +++ b/packages/status-js/src/utils/deserialize-public-key.ts @@ -14,7 +14,7 @@ const VALID_MULTIBASE_CODES = [ 'z', // base58btc ] as const -type MultibaseCode = typeof VALID_MULTIBASE_CODES[number] +type MultibaseCode = (typeof VALID_MULTIBASE_CODES)[number] /** * @see https://pkg.go.dev/github.com/multiformats/go-multicodec#pkg-types @@ -23,7 +23,7 @@ const VALID_MULTICODEC_CODES = [ 231, // secp256k1-pub (compressed) (0xe7) ] as const -type MulticodecCode = typeof VALID_MULTICODEC_CODES[number] +type MulticodecCode = (typeof VALID_MULTICODEC_CODES)[number] /** * @see https://specs.status.im/spec/2#public-key-serialization for specification