format files

This commit is contained in:
Felicio Mununga 2023-04-17 12:17:23 +02:00
parent 6558e437f5
commit adac3ad25e
No known key found for this signature in database
GPG Key ID: 0EB8D75C775AB6F1
13 changed files with 2944 additions and 1472 deletions

View File

@ -3,8 +3,15 @@
/* eslint-disable */ /* eslint-disable */
// @ts-nocheck // @ts-nocheck
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; import type {
import { Message, proto3 } from "@bufbuild/protobuf"; BinaryReadOptions,
FieldList,
JsonReadOptions,
JsonValue,
PartialMessage,
PlainMessage,
} from '@bufbuild/protobuf'
import { Message, proto3 } from '@bufbuild/protobuf'
/** /**
* @generated from message ApplicationMetadataMessage * @generated from message ApplicationMetadataMessage
@ -15,49 +22,72 @@ export class ApplicationMetadataMessage extends Message<ApplicationMetadataMessa
* *
* @generated from field: bytes signature = 1; * @generated from field: bytes signature = 1;
*/ */
signature = new Uint8Array(0); signature = new Uint8Array(0)
/** /**
* This is the encoded protobuf of the application level message, i.e ChatMessage * This is the encoded protobuf of the application level message, i.e ChatMessage
* *
* @generated from field: bytes payload = 2; * @generated from field: bytes payload = 2;
*/ */
payload = new Uint8Array(0); payload = new Uint8Array(0)
/** /**
* The type of protobuf message sent * The type of protobuf message sent
* *
* @generated from field: ApplicationMetadataMessage.Type type = 3; * @generated from field: ApplicationMetadataMessage.Type type = 3;
*/ */
type = ApplicationMetadataMessage_Type.UNKNOWN_UNSPECIFIED; type = ApplicationMetadataMessage_Type.UNKNOWN_UNSPECIFIED
constructor(data?: PartialMessage<ApplicationMetadataMessage>) { constructor(data?: PartialMessage<ApplicationMetadataMessage>) {
super(); super()
proto3.util.initPartial(data, this); proto3.util.initPartial(data, this)
} }
static readonly runtime = proto3; static readonly runtime = proto3
static readonly typeName = "ApplicationMetadataMessage"; static readonly typeName = 'ApplicationMetadataMessage'
static readonly fields: FieldList = proto3.util.newFieldList(() => [ static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "signature", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, { no: 1, name: 'signature', kind: 'scalar', T: 12 /* ScalarType.BYTES */ },
{ no: 2, name: "payload", 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: 3,
name: 'type',
kind: 'enum',
T: proto3.getEnumType(ApplicationMetadataMessage_Type),
},
])
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ApplicationMetadataMessage { static fromBinary(
return new ApplicationMetadataMessage().fromBinary(bytes, options); bytes: Uint8Array,
options?: Partial<BinaryReadOptions>
): ApplicationMetadataMessage {
return new ApplicationMetadataMessage().fromBinary(bytes, options)
} }
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ApplicationMetadataMessage { static fromJson(
return new ApplicationMetadataMessage().fromJson(jsonValue, options); jsonValue: JsonValue,
options?: Partial<JsonReadOptions>
): ApplicationMetadataMessage {
return new ApplicationMetadataMessage().fromJson(jsonValue, options)
} }
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ApplicationMetadataMessage { static fromJsonString(
return new ApplicationMetadataMessage().fromJsonString(jsonString, options); jsonString: string,
options?: Partial<JsonReadOptions>
): ApplicationMetadataMessage {
return new ApplicationMetadataMessage().fromJsonString(jsonString, options)
} }
static equals(a: ApplicationMetadataMessage | PlainMessage<ApplicationMetadataMessage> | undefined, b: ApplicationMetadataMessage | PlainMessage<ApplicationMetadataMessage> | undefined): boolean { static equals(
return proto3.util.equals(ApplicationMetadataMessage, a, b); a:
| ApplicationMetadataMessage
| PlainMessage<ApplicationMetadataMessage>
| undefined,
b:
| ApplicationMetadataMessage
| PlainMessage<ApplicationMetadataMessage>
| undefined
): boolean {
return proto3.util.equals(ApplicationMetadataMessage, a, b)
} }
} }
@ -236,40 +266,43 @@ export enum ApplicationMetadataMessage_Type {
ANONYMOUS_METRIC_BATCH = 33, ANONYMOUS_METRIC_BATCH = 33,
} }
// Retrieve enum metadata with: proto3.getEnumType(ApplicationMetadataMessage_Type) // Retrieve enum metadata with: proto3.getEnumType(ApplicationMetadataMessage_Type)
proto3.util.setEnumType(ApplicationMetadataMessage_Type, "ApplicationMetadataMessage.Type", [ proto3.util.setEnumType(
{ no: 0, name: "TYPE_UNKNOWN_UNSPECIFIED" }, ApplicationMetadataMessage_Type,
{ no: 1, name: "TYPE_CHAT_MESSAGE" }, 'ApplicationMetadataMessage.Type',
{ no: 2, name: "TYPE_CONTACT_UPDATE" }, [
{ no: 3, name: "TYPE_MEMBERSHIP_UPDATE_MESSAGE" }, { no: 0, name: 'TYPE_UNKNOWN_UNSPECIFIED' },
{ no: 4, name: "TYPE_PAIR_INSTALLATION" }, { no: 1, name: 'TYPE_CHAT_MESSAGE' },
{ no: 5, name: "TYPE_SYNC_INSTALLATION" }, { no: 2, name: 'TYPE_CONTACT_UPDATE' },
{ no: 6, name: "TYPE_REQUEST_ADDRESS_FOR_TRANSACTION" }, { no: 3, name: 'TYPE_MEMBERSHIP_UPDATE_MESSAGE' },
{ no: 7, name: "TYPE_ACCEPT_REQUEST_ADDRESS_FOR_TRANSACTION" }, { no: 4, name: 'TYPE_PAIR_INSTALLATION' },
{ no: 8, name: "TYPE_DECLINE_REQUEST_ADDRESS_FOR_TRANSACTION" }, { no: 5, name: 'TYPE_SYNC_INSTALLATION' },
{ no: 9, name: "TYPE_REQUEST_TRANSACTION" }, { no: 6, name: 'TYPE_REQUEST_ADDRESS_FOR_TRANSACTION' },
{ no: 10, name: "TYPE_SEND_TRANSACTION" }, { no: 7, name: 'TYPE_ACCEPT_REQUEST_ADDRESS_FOR_TRANSACTION' },
{ no: 11, name: "TYPE_DECLINE_REQUEST_TRANSACTION" }, { no: 8, name: 'TYPE_DECLINE_REQUEST_ADDRESS_FOR_TRANSACTION' },
{ no: 12, name: "TYPE_SYNC_INSTALLATION_CONTACT" }, { no: 9, name: 'TYPE_REQUEST_TRANSACTION' },
{ no: 13, name: "TYPE_SYNC_INSTALLATION_ACCOUNT" }, { no: 10, name: 'TYPE_SEND_TRANSACTION' },
{ no: 14, name: "TYPE_SYNC_INSTALLATION_PUBLIC_CHAT" }, { no: 11, name: 'TYPE_DECLINE_REQUEST_TRANSACTION' },
{ no: 15, name: "TYPE_CONTACT_CODE_ADVERTISEMENT" }, { no: 12, name: 'TYPE_SYNC_INSTALLATION_CONTACT' },
{ no: 16, name: "TYPE_PUSH_NOTIFICATION_REGISTRATION" }, { no: 13, name: 'TYPE_SYNC_INSTALLATION_ACCOUNT' },
{ no: 17, name: "TYPE_PUSH_NOTIFICATION_REGISTRATION_RESPONSE" }, { no: 14, name: 'TYPE_SYNC_INSTALLATION_PUBLIC_CHAT' },
{ no: 18, name: "TYPE_PUSH_NOTIFICATION_QUERY" }, { no: 15, name: 'TYPE_CONTACT_CODE_ADVERTISEMENT' },
{ no: 19, name: "TYPE_PUSH_NOTIFICATION_QUERY_RESPONSE" }, { no: 16, name: 'TYPE_PUSH_NOTIFICATION_REGISTRATION' },
{ no: 20, name: "TYPE_PUSH_NOTIFICATION_REQUEST" }, { no: 17, name: 'TYPE_PUSH_NOTIFICATION_REGISTRATION_RESPONSE' },
{ no: 21, name: "TYPE_PUSH_NOTIFICATION_RESPONSE" }, { no: 18, name: 'TYPE_PUSH_NOTIFICATION_QUERY' },
{ no: 22, name: "TYPE_EMOJI_REACTION" }, { no: 19, name: 'TYPE_PUSH_NOTIFICATION_QUERY_RESPONSE' },
{ no: 23, name: "TYPE_GROUP_CHAT_INVITATION" }, { no: 20, name: 'TYPE_PUSH_NOTIFICATION_REQUEST' },
{ no: 24, name: "TYPE_CHAT_IDENTITY" }, { no: 21, name: 'TYPE_PUSH_NOTIFICATION_RESPONSE' },
{ no: 25, name: "TYPE_COMMUNITY_DESCRIPTION" }, { no: 22, name: 'TYPE_EMOJI_REACTION' },
{ no: 26, name: "TYPE_COMMUNITY_INVITATION" }, { no: 23, name: 'TYPE_GROUP_CHAT_INVITATION' },
{ no: 27, name: "TYPE_COMMUNITY_REQUEST_TO_JOIN" }, { no: 24, name: 'TYPE_CHAT_IDENTITY' },
{ no: 28, name: "TYPE_PIN_MESSAGE" }, { no: 25, name: 'TYPE_COMMUNITY_DESCRIPTION' },
{ no: 29, name: "TYPE_EDIT_MESSAGE" }, { no: 26, name: 'TYPE_COMMUNITY_INVITATION' },
{ no: 30, name: "TYPE_STATUS_UPDATE" }, { no: 27, name: 'TYPE_COMMUNITY_REQUEST_TO_JOIN' },
{ no: 31, name: "TYPE_DELETE_MESSAGE" }, { no: 28, name: 'TYPE_PIN_MESSAGE' },
{ no: 32, name: "TYPE_SYNC_INSTALLATION_COMMUNITY" }, { no: 29, name: 'TYPE_EDIT_MESSAGE' },
{ no: 33, name: "TYPE_ANONYMOUS_METRIC_BATCH" }, { 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' },
]
)

View File

@ -3,9 +3,16 @@
/* eslint-disable */ /* eslint-disable */
// @ts-nocheck // @ts-nocheck
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; import type {
import { Message, proto3, protoInt64 } from "@bufbuild/protobuf"; BinaryReadOptions,
import { ImageType } from "./enums_pb.js"; 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 * ChatIdentity represents the user defined identity associated with their public chat key
@ -18,50 +25,50 @@ export class ChatIdentity extends Message<ChatIdentity> {
* *
* @generated from field: uint64 clock = 1; * @generated from field: uint64 clock = 1;
*/ */
clock = protoInt64.zero; clock = protoInt64.zero
/** /**
* ens_name is the valid ENS name associated with the chat key * ens_name is the valid ENS name associated with the chat key
* *
* @generated from field: string ens_name = 2; * @generated from field: string ens_name = 2;
*/ */
ensName = ""; ensName = ''
/** /**
* images is a string indexed mapping of images associated with an identity * images is a string indexed mapping of images associated with an identity
* *
* @generated from field: map<string, IdentityImage> images = 3; * @generated from field: map<string, IdentityImage> images = 3;
*/ */
images: { [key: string]: IdentityImage } = {}; images: { [key: string]: IdentityImage } = {}
/** /**
* display name is the user set identity * display name is the user set identity
* *
* @generated from field: string display_name = 4; * @generated from field: string display_name = 4;
*/ */
displayName = ""; displayName = ''
/** /**
* description is the user set description * description is the user set description
* *
* @generated from field: string description = 5; * @generated from field: string description = 5;
*/ */
description = ""; description = ''
/** /**
* @generated from field: string color = 6; * @generated from field: string color = 6;
*/ */
color = ""; color = ''
/** /**
* @generated from field: string emoji = 7; * @generated from field: string emoji = 7;
*/ */
emoji = ""; emoji = ''
/** /**
* @generated from field: repeated SocialLink social_links = 8; * @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) * first known message timestamp in seconds (valid only for community chats for now)
@ -70,41 +77,80 @@ export class ChatIdentity extends Message<ChatIdentity> {
* *
* @generated from field: uint32 first_message_timestamp = 9; * @generated from field: uint32 first_message_timestamp = 9;
*/ */
firstMessageTimestamp = 0; firstMessageTimestamp = 0
constructor(data?: PartialMessage<ChatIdentity>) { constructor(data?: PartialMessage<ChatIdentity>) {
super(); super()
proto3.util.initPartial(data, this); proto3.util.initPartial(data, this)
} }
static readonly runtime = proto3; static readonly runtime = proto3
static readonly typeName = "ChatIdentity"; static readonly typeName = 'ChatIdentity'
static readonly fields: FieldList = proto3.util.newFieldList(() => [ static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "clock", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, { no: 1, name: 'clock', kind: 'scalar', T: 4 /* ScalarType.UINT64 */ },
{ no: 2, name: "ens_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { 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: 3,
{ no: 5, name: "description", kind: "scalar", T: 9 /* ScalarType.STRING */ }, name: 'images',
{ no: 6, name: "color", kind: "scalar", T: 9 /* ScalarType.STRING */ }, kind: 'map',
{ no: 7, name: "emoji", kind: "scalar", T: 9 /* ScalarType.STRING */ }, K: 9 /* ScalarType.STRING */,
{ no: 8, name: "social_links", kind: "message", T: SocialLink, repeated: true }, V: { kind: 'message', T: IdentityImage },
{ no: 9, name: "first_message_timestamp", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, },
]); {
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<BinaryReadOptions>): ChatIdentity { static fromBinary(
return new ChatIdentity().fromBinary(bytes, options); bytes: Uint8Array,
options?: Partial<BinaryReadOptions>
): ChatIdentity {
return new ChatIdentity().fromBinary(bytes, options)
} }
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ChatIdentity { static fromJson(
return new ChatIdentity().fromJson(jsonValue, options); jsonValue: JsonValue,
options?: Partial<JsonReadOptions>
): ChatIdentity {
return new ChatIdentity().fromJson(jsonValue, options)
} }
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ChatIdentity { static fromJsonString(
return new ChatIdentity().fromJsonString(jsonString, options); jsonString: string,
options?: Partial<JsonReadOptions>
): ChatIdentity {
return new ChatIdentity().fromJsonString(jsonString, options)
} }
static equals(a: ChatIdentity | PlainMessage<ChatIdentity> | undefined, b: ChatIdentity | PlainMessage<ChatIdentity> | undefined): boolean { static equals(
return proto3.util.equals(ChatIdentity, a, b); a: ChatIdentity | PlainMessage<ChatIdentity> | undefined,
b: ChatIdentity | PlainMessage<ChatIdentity> | undefined
): boolean {
return proto3.util.equals(ChatIdentity, a, b)
} }
} }
@ -120,65 +166,93 @@ export class IdentityImage extends Message<IdentityImage> {
* *
* @generated from field: bytes payload = 1; * @generated from field: bytes payload = 1;
*/ */
payload = new Uint8Array(0); payload = new Uint8Array(0)
/** /**
* source_type signals the image payload source * source_type signals the image payload source
* *
* @generated from field: IdentityImage.SourceType source_type = 2; * @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 * image_type signals the image type and method of parsing the payload
* *
* @generated from field: ImageType image_type = 3; * @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 * 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; * @generated from field: repeated bytes encryption_keys = 4;
*/ */
encryptionKeys: Uint8Array[] = []; encryptionKeys: Uint8Array[] = []
/** /**
* encrypted signals the encryption state of the payload, default is false. * encrypted signals the encryption state of the payload, default is false.
* *
* @generated from field: bool encrypted = 5; * @generated from field: bool encrypted = 5;
*/ */
encrypted = false; encrypted = false
constructor(data?: PartialMessage<IdentityImage>) { constructor(data?: PartialMessage<IdentityImage>) {
super(); super()
proto3.util.initPartial(data, this); proto3.util.initPartial(data, this)
} }
static readonly runtime = proto3; static readonly runtime = proto3
static readonly typeName = "IdentityImage"; static readonly typeName = 'IdentityImage'
static readonly fields: FieldList = proto3.util.newFieldList(() => [ static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "payload", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, { 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: 2,
{ no: 4, name: "encryption_keys", kind: "scalar", T: 12 /* ScalarType.BYTES */, repeated: true }, name: 'source_type',
{ no: 5, name: "encrypted", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, 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<BinaryReadOptions>): IdentityImage { static fromBinary(
return new IdentityImage().fromBinary(bytes, options); bytes: Uint8Array,
options?: Partial<BinaryReadOptions>
): IdentityImage {
return new IdentityImage().fromBinary(bytes, options)
} }
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): IdentityImage { static fromJson(
return new IdentityImage().fromJson(jsonValue, options); jsonValue: JsonValue,
options?: Partial<JsonReadOptions>
): IdentityImage {
return new IdentityImage().fromJson(jsonValue, options)
} }
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): IdentityImage { static fromJsonString(
return new IdentityImage().fromJsonString(jsonString, options); jsonString: string,
options?: Partial<JsonReadOptions>
): IdentityImage {
return new IdentityImage().fromJsonString(jsonString, options)
} }
static equals(a: IdentityImage | PlainMessage<IdentityImage> | undefined, b: IdentityImage | PlainMessage<IdentityImage> | undefined): boolean { static equals(
return proto3.util.equals(IdentityImage, a, b); a: IdentityImage | PlainMessage<IdentityImage> | undefined,
b: IdentityImage | PlainMessage<IdentityImage> | undefined
): boolean {
return proto3.util.equals(IdentityImage, a, b)
} }
} }
@ -211,11 +285,11 @@ export enum IdentityImage_SourceType {
ENS_AVATAR = 2, ENS_AVATAR = 2,
} }
// Retrieve enum metadata with: proto3.getEnumType(IdentityImage_SourceType) // Retrieve enum metadata with: proto3.getEnumType(IdentityImage_SourceType)
proto3.util.setEnumType(IdentityImage_SourceType, "IdentityImage.SourceType", [ proto3.util.setEnumType(IdentityImage_SourceType, 'IdentityImage.SourceType', [
{ no: 0, name: "UNKNOWN_SOURCE_TYPE" }, { no: 0, name: 'UNKNOWN_SOURCE_TYPE' },
{ no: 1, name: "RAW_PAYLOAD" }, { no: 1, name: 'RAW_PAYLOAD' },
{ no: 2, name: "ENS_AVATAR" }, { no: 2, name: 'ENS_AVATAR' },
]); ])
/** /**
* SocialLinks represents social link assosiated with given chat identity (personal/community) * SocialLinks represents social link assosiated with given chat identity (personal/community)
@ -226,39 +300,50 @@ export class SocialLink extends Message<SocialLink> {
/** /**
* @generated from field: string text = 1; * @generated from field: string text = 1;
*/ */
text = ""; text = ''
/** /**
* @generated from field: string url = 2; * @generated from field: string url = 2;
*/ */
url = ""; url = ''
constructor(data?: PartialMessage<SocialLink>) { constructor(data?: PartialMessage<SocialLink>) {
super(); super()
proto3.util.initPartial(data, this); proto3.util.initPartial(data, this)
} }
static readonly runtime = proto3; static readonly runtime = proto3
static readonly typeName = "SocialLink"; static readonly typeName = 'SocialLink'
static readonly fields: FieldList = proto3.util.newFieldList(() => [ static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "text", 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 */ }, { no: 2, name: 'url', kind: 'scalar', T: 9 /* ScalarType.STRING */ },
]); ])
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SocialLink { static fromBinary(
return new SocialLink().fromBinary(bytes, options); bytes: Uint8Array,
options?: Partial<BinaryReadOptions>
): SocialLink {
return new SocialLink().fromBinary(bytes, options)
} }
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SocialLink { static fromJson(
return new SocialLink().fromJson(jsonValue, options); jsonValue: JsonValue,
options?: Partial<JsonReadOptions>
): SocialLink {
return new SocialLink().fromJson(jsonValue, options)
} }
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SocialLink { static fromJsonString(
return new SocialLink().fromJsonString(jsonString, options); jsonString: string,
options?: Partial<JsonReadOptions>
): SocialLink {
return new SocialLink().fromJsonString(jsonString, options)
} }
static equals(a: SocialLink | PlainMessage<SocialLink> | undefined, b: SocialLink | PlainMessage<SocialLink> | undefined): boolean { static equals(
return proto3.util.equals(SocialLink, a, b); a: SocialLink | PlainMessage<SocialLink> | undefined,
b: SocialLink | PlainMessage<SocialLink> | undefined
): boolean {
return proto3.util.equals(SocialLink, a, b)
} }
} }

View File

@ -3,9 +3,16 @@
/* eslint-disable */ /* eslint-disable */
// @ts-nocheck // @ts-nocheck
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; import type {
import { Message, proto3, protoInt64 } from "@bufbuild/protobuf"; BinaryReadOptions,
import { ImageType, MessageType } from "./enums_pb.js"; 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 * @generated from message StickerMessage
@ -14,39 +21,51 @@ export class StickerMessage extends Message<StickerMessage> {
/** /**
* @generated from field: string hash = 1; * @generated from field: string hash = 1;
*/ */
hash = ""; hash = ''
/** /**
* @generated from field: int32 pack = 2; * @generated from field: int32 pack = 2;
*/ */
pack = 0; pack = 0
constructor(data?: PartialMessage<StickerMessage>) { constructor(data?: PartialMessage<StickerMessage>) {
super(); super()
proto3.util.initPartial(data, this); proto3.util.initPartial(data, this)
} }
static readonly runtime = proto3; static readonly runtime = proto3
static readonly typeName = "StickerMessage"; static readonly typeName = 'StickerMessage'
static readonly fields: FieldList = proto3.util.newFieldList(() => [ static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "hash", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 1, name: 'hash', kind: 'scalar', T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "pack", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, { no: 2, name: 'pack', kind: 'scalar', T: 5 /* ScalarType.INT32 */ },
]); ])
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): StickerMessage { static fromBinary(
return new StickerMessage().fromBinary(bytes, options); bytes: Uint8Array,
options?: Partial<BinaryReadOptions>
): StickerMessage {
return new StickerMessage().fromBinary(bytes, options)
} }
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): StickerMessage { static fromJson(
return new StickerMessage().fromJson(jsonValue, options); jsonValue: JsonValue,
options?: Partial<JsonReadOptions>
): StickerMessage {
return new StickerMessage().fromJson(jsonValue, options)
} }
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): StickerMessage { static fromJsonString(
return new StickerMessage().fromJsonString(jsonString, options); jsonString: string,
options?: Partial<JsonReadOptions>
): StickerMessage {
return new StickerMessage().fromJsonString(jsonString, options)
} }
static equals(a: StickerMessage | PlainMessage<StickerMessage> | undefined, b: StickerMessage | PlainMessage<StickerMessage> | undefined): boolean { static equals(
return proto3.util.equals(StickerMessage, a, b); a: StickerMessage | PlainMessage<StickerMessage> | undefined,
b: StickerMessage | PlainMessage<StickerMessage> | undefined
): boolean {
return proto3.util.equals(StickerMessage, a, b)
} }
} }
@ -57,39 +76,51 @@ export class ImageMessage extends Message<ImageMessage> {
/** /**
* @generated from field: bytes payload = 1; * @generated from field: bytes payload = 1;
*/ */
payload = new Uint8Array(0); payload = new Uint8Array(0)
/** /**
* @generated from field: ImageType type = 2; * @generated from field: ImageType type = 2;
*/ */
type = ImageType.UNKNOWN_IMAGE_TYPE; type = ImageType.UNKNOWN_IMAGE_TYPE
constructor(data?: PartialMessage<ImageMessage>) { constructor(data?: PartialMessage<ImageMessage>) {
super(); super()
proto3.util.initPartial(data, this); proto3.util.initPartial(data, this)
} }
static readonly runtime = proto3; static readonly runtime = proto3
static readonly typeName = "ImageMessage"; static readonly typeName = 'ImageMessage'
static readonly fields: FieldList = proto3.util.newFieldList(() => [ static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "payload", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, { no: 1, name: 'payload', kind: 'scalar', T: 12 /* ScalarType.BYTES */ },
{ no: 2, name: "type", kind: "enum", T: proto3.getEnumType(ImageType) }, { no: 2, name: 'type', kind: 'enum', T: proto3.getEnumType(ImageType) },
]); ])
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ImageMessage { static fromBinary(
return new ImageMessage().fromBinary(bytes, options); bytes: Uint8Array,
options?: Partial<BinaryReadOptions>
): ImageMessage {
return new ImageMessage().fromBinary(bytes, options)
} }
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ImageMessage { static fromJson(
return new ImageMessage().fromJson(jsonValue, options); jsonValue: JsonValue,
options?: Partial<JsonReadOptions>
): ImageMessage {
return new ImageMessage().fromJson(jsonValue, options)
} }
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ImageMessage { static fromJsonString(
return new ImageMessage().fromJsonString(jsonString, options); jsonString: string,
options?: Partial<JsonReadOptions>
): ImageMessage {
return new ImageMessage().fromJsonString(jsonString, options)
} }
static equals(a: ImageMessage | PlainMessage<ImageMessage> | undefined, b: ImageMessage | PlainMessage<ImageMessage> | undefined): boolean { static equals(
return proto3.util.equals(ImageMessage, a, b); a: ImageMessage | PlainMessage<ImageMessage> | undefined,
b: ImageMessage | PlainMessage<ImageMessage> | undefined
): boolean {
return proto3.util.equals(ImageMessage, a, b)
} }
} }
@ -100,45 +131,67 @@ export class AudioMessage extends Message<AudioMessage> {
/** /**
* @generated from field: bytes payload = 1; * @generated from field: bytes payload = 1;
*/ */
payload = new Uint8Array(0); payload = new Uint8Array(0)
/** /**
* @generated from field: AudioMessage.AudioType type = 2; * @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; * @generated from field: uint64 duration_ms = 3;
*/ */
durationMs = protoInt64.zero; durationMs = protoInt64.zero
constructor(data?: PartialMessage<AudioMessage>) { constructor(data?: PartialMessage<AudioMessage>) {
super(); super()
proto3.util.initPartial(data, this); proto3.util.initPartial(data, this)
} }
static readonly runtime = proto3; static readonly runtime = proto3
static readonly typeName = "AudioMessage"; static readonly typeName = 'AudioMessage'
static readonly fields: FieldList = proto3.util.newFieldList(() => [ static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "payload", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, { 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: 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<BinaryReadOptions>): AudioMessage { static fromBinary(
return new AudioMessage().fromBinary(bytes, options); bytes: Uint8Array,
options?: Partial<BinaryReadOptions>
): AudioMessage {
return new AudioMessage().fromBinary(bytes, options)
} }
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): AudioMessage { static fromJson(
return new AudioMessage().fromJson(jsonValue, options); jsonValue: JsonValue,
options?: Partial<JsonReadOptions>
): AudioMessage {
return new AudioMessage().fromJson(jsonValue, options)
} }
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): AudioMessage { static fromJsonString(
return new AudioMessage().fromJsonString(jsonString, options); jsonString: string,
options?: Partial<JsonReadOptions>
): AudioMessage {
return new AudioMessage().fromJsonString(jsonString, options)
} }
static equals(a: AudioMessage | PlainMessage<AudioMessage> | undefined, b: AudioMessage | PlainMessage<AudioMessage> | undefined): boolean { static equals(
return proto3.util.equals(AudioMessage, a, b); a: AudioMessage | PlainMessage<AudioMessage> | undefined,
b: AudioMessage | PlainMessage<AudioMessage> | undefined
): boolean {
return proto3.util.equals(AudioMessage, a, b)
} }
} }
@ -162,11 +215,11 @@ export enum AudioMessage_AudioType {
AMR = 2, AMR = 2,
} }
// Retrieve enum metadata with: proto3.getEnumType(AudioMessage_AudioType) // Retrieve enum metadata with: proto3.getEnumType(AudioMessage_AudioType)
proto3.util.setEnumType(AudioMessage_AudioType, "AudioMessage.AudioType", [ proto3.util.setEnumType(AudioMessage_AudioType, 'AudioMessage.AudioType', [
{ no: 0, name: "UNKNOWN_AUDIO_TYPE" }, { no: 0, name: 'UNKNOWN_AUDIO_TYPE' },
{ no: 1, name: "AAC" }, { no: 1, name: 'AAC' },
{ no: 2, name: "AMR" }, { no: 2, name: 'AMR' },
]); ])
/** /**
* @generated from message EditMessage * @generated from message EditMessage
@ -175,69 +228,86 @@ export class EditMessage extends Message<EditMessage> {
/** /**
* @generated from field: uint64 clock = 1; * @generated from field: uint64 clock = 1;
*/ */
clock = protoInt64.zero; clock = protoInt64.zero
/** /**
* Text of the message * Text of the message
* *
* @generated from field: string text = 2; * @generated from field: string text = 2;
*/ */
text = ""; text = ''
/** /**
* @generated from field: string chat_id = 3; * @generated from field: string chat_id = 3;
*/ */
chatId = ""; chatId = ''
/** /**
* @generated from field: string message_id = 4; * @generated from field: string message_id = 4;
*/ */
messageId = ""; messageId = ''
/** /**
* Grant for community edit messages * Grant for community edit messages
* *
* @generated from field: bytes grant = 5; * @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) * The type of message (public/one-to-one/private-group-chat)
* *
* @generated from field: MessageType message_type = 6; * @generated from field: MessageType message_type = 6;
*/ */
messageType = MessageType.UNKNOWN_MESSAGE_TYPE; messageType = MessageType.UNKNOWN_MESSAGE_TYPE
constructor(data?: PartialMessage<EditMessage>) { constructor(data?: PartialMessage<EditMessage>) {
super(); super()
proto3.util.initPartial(data, this); proto3.util.initPartial(data, this)
} }
static readonly runtime = proto3; static readonly runtime = proto3
static readonly typeName = "EditMessage"; static readonly typeName = 'EditMessage'
static readonly fields: FieldList = proto3.util.newFieldList(() => [ static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "clock", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, { no: 1, name: 'clock', kind: 'scalar', T: 4 /* ScalarType.UINT64 */ },
{ no: 2, name: "text", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 2, name: 'text', kind: 'scalar', T: 9 /* ScalarType.STRING */ },
{ no: 3, name: "chat_id", 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: 4, name: 'message_id', kind: 'scalar', T: 9 /* ScalarType.STRING */ },
{ no: 5, name: "grant", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, { no: 5, name: 'grant', kind: 'scalar', T: 12 /* ScalarType.BYTES */ },
{ no: 6, name: "message_type", kind: "enum", T: proto3.getEnumType(MessageType) }, {
]); no: 6,
name: 'message_type',
kind: 'enum',
T: proto3.getEnumType(MessageType),
},
])
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): EditMessage { static fromBinary(
return new EditMessage().fromBinary(bytes, options); bytes: Uint8Array,
options?: Partial<BinaryReadOptions>
): EditMessage {
return new EditMessage().fromBinary(bytes, options)
} }
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): EditMessage { static fromJson(
return new EditMessage().fromJson(jsonValue, options); jsonValue: JsonValue,
options?: Partial<JsonReadOptions>
): EditMessage {
return new EditMessage().fromJson(jsonValue, options)
} }
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): EditMessage { static fromJsonString(
return new EditMessage().fromJsonString(jsonString, options); jsonString: string,
options?: Partial<JsonReadOptions>
): EditMessage {
return new EditMessage().fromJsonString(jsonString, options)
} }
static equals(a: EditMessage | PlainMessage<EditMessage> | undefined, b: EditMessage | PlainMessage<EditMessage> | undefined): boolean { static equals(
return proto3.util.equals(EditMessage, a, b); a: EditMessage | PlainMessage<EditMessage> | undefined,
b: EditMessage | PlainMessage<EditMessage> | undefined
): boolean {
return proto3.util.equals(EditMessage, a, b)
} }
} }
@ -248,61 +318,78 @@ export class DeleteMessage extends Message<DeleteMessage> {
/** /**
* @generated from field: uint64 clock = 1; * @generated from field: uint64 clock = 1;
*/ */
clock = protoInt64.zero; clock = protoInt64.zero
/** /**
* @generated from field: string chat_id = 2; * @generated from field: string chat_id = 2;
*/ */
chatId = ""; chatId = ''
/** /**
* @generated from field: string message_id = 3; * @generated from field: string message_id = 3;
*/ */
messageId = ""; messageId = ''
/** /**
* Grant for community delete messages * Grant for community delete messages
* *
* @generated from field: bytes grant = 4; * @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) * The type of message (public/one-to-one/private-group-chat)
* *
* @generated from field: MessageType message_type = 5; * @generated from field: MessageType message_type = 5;
*/ */
messageType = MessageType.UNKNOWN_MESSAGE_TYPE; messageType = MessageType.UNKNOWN_MESSAGE_TYPE
constructor(data?: PartialMessage<DeleteMessage>) { constructor(data?: PartialMessage<DeleteMessage>) {
super(); super()
proto3.util.initPartial(data, this); proto3.util.initPartial(data, this)
} }
static readonly runtime = proto3; static readonly runtime = proto3
static readonly typeName = "DeleteMessage"; static readonly typeName = 'DeleteMessage'
static readonly fields: FieldList = proto3.util.newFieldList(() => [ static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "clock", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, { no: 1, name: 'clock', kind: 'scalar', T: 4 /* ScalarType.UINT64 */ },
{ no: 2, name: "chat_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 2, name: 'chat_id', kind: 'scalar', T: 9 /* ScalarType.STRING */ },
{ no: 3, name: "message_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: 4, name: 'grant', kind: 'scalar', T: 12 /* ScalarType.BYTES */ },
{ no: 5, name: "message_type", kind: "enum", T: proto3.getEnumType(MessageType) }, {
]); no: 5,
name: 'message_type',
kind: 'enum',
T: proto3.getEnumType(MessageType),
},
])
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): DeleteMessage { static fromBinary(
return new DeleteMessage().fromBinary(bytes, options); bytes: Uint8Array,
options?: Partial<BinaryReadOptions>
): DeleteMessage {
return new DeleteMessage().fromBinary(bytes, options)
} }
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): DeleteMessage { static fromJson(
return new DeleteMessage().fromJson(jsonValue, options); jsonValue: JsonValue,
options?: Partial<JsonReadOptions>
): DeleteMessage {
return new DeleteMessage().fromJson(jsonValue, options)
} }
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): DeleteMessage { static fromJsonString(
return new DeleteMessage().fromJsonString(jsonString, options); jsonString: string,
options?: Partial<JsonReadOptions>
): DeleteMessage {
return new DeleteMessage().fromJsonString(jsonString, options)
} }
static equals(a: DeleteMessage | PlainMessage<DeleteMessage> | undefined, b: DeleteMessage | PlainMessage<DeleteMessage> | undefined): boolean { static equals(
return proto3.util.equals(DeleteMessage, a, b); a: DeleteMessage | PlainMessage<DeleteMessage> | undefined,
b: DeleteMessage | PlainMessage<DeleteMessage> | undefined
): boolean {
return proto3.util.equals(DeleteMessage, a, b)
} }
} }
@ -315,7 +402,7 @@ export class ChatMessage extends Message<ChatMessage> {
* *
* @generated from field: uint64 clock = 1; * @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 * 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<ChatMessage> {
* *
* @generated from field: uint64 timestamp = 2; * @generated from field: uint64 timestamp = 2;
*/ */
timestamp = protoInt64.zero; timestamp = protoInt64.zero
/** /**
* Text of the message * Text of the message
* *
* @generated from field: string text = 3; * @generated from field: string text = 3;
*/ */
text = ""; text = ''
/** /**
* Id of the message that we are replying to * Id of the message that we are replying to
* *
* @generated from field: string response_to = 4; * @generated from field: string response_to = 4;
*/ */
responseTo = ""; responseTo = ''
/** /**
* Ens name of the sender * Ens name of the sender
* *
* @generated from field: string ens_name = 5; * @generated from field: string ens_name = 5;
*/ */
ensName = ""; ensName = ''
/** /**
* Chat id, this field is symmetric for public-chats and private group chats, * Chat id, this field is symmetric for public-chats and private group chats,
@ -354,103 +441,164 @@ export class ChatMessage extends Message<ChatMessage> {
* *
* @generated from field: string chat_id = 6; * @generated from field: string chat_id = 6;
*/ */
chatId = ""; chatId = ''
/** /**
* The type of message (public/one-to-one/private-group-chat) * The type of message (public/one-to-one/private-group-chat)
* *
* @generated from field: MessageType message_type = 7; * @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 * The type of the content of the message
* *
* @generated from field: ChatMessage.ContentType content_type = 8; * @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 * @generated from oneof ChatMessage.payload
*/ */
payload: { payload:
/** | {
* @generated from field: StickerMessage sticker = 9; /**
*/ * @generated from field: StickerMessage sticker = 9;
value: StickerMessage; */
case: "sticker"; value: StickerMessage
} | { case: 'sticker'
/** }
* @generated from field: ImageMessage image = 10; | {
*/ /**
value: ImageMessage; * @generated from field: ImageMessage image = 10;
case: "image"; */
} | { value: ImageMessage
/** case: 'image'
* @generated from field: AudioMessage audio = 11; }
*/ | {
value: AudioMessage; /**
case: "audio"; * @generated from field: AudioMessage audio = 11;
} | { */
/** value: AudioMessage
* @generated from field: bytes community = 12; case: 'audio'
*/ }
value: Uint8Array; | {
case: "community"; /**
} | { case: undefined; value?: undefined } = { case: undefined }; * @generated from field: bytes community = 12;
*/
value: Uint8Array
case: 'community'
}
| { case: undefined; value?: undefined } = { case: undefined }
/** /**
* Grant for community chat messages * Grant for community chat messages
* *
* @generated from field: bytes grant = 13; * @generated from field: bytes grant = 13;
*/ */
grant = new Uint8Array(0); grant = new Uint8Array(0)
/** /**
* Message author's display name, introduced in version 1 * Message author's display name, introduced in version 1
* *
* @generated from field: string display_name = 14; * @generated from field: string display_name = 14;
*/ */
displayName = ""; displayName = ''
constructor(data?: PartialMessage<ChatMessage>) { constructor(data?: PartialMessage<ChatMessage>) {
super(); super()
proto3.util.initPartial(data, this); proto3.util.initPartial(data, this)
} }
static readonly runtime = proto3; static readonly runtime = proto3
static readonly typeName = "ChatMessage"; static readonly typeName = 'ChatMessage'
static readonly fields: FieldList = proto3.util.newFieldList(() => [ static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "clock", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, { no: 1, name: 'clock', kind: 'scalar', T: 4 /* ScalarType.UINT64 */ },
{ no: 2, name: "timestamp", 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: 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: 4,
{ no: 6, name: "chat_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, name: 'response_to',
{ no: 7, name: "message_type", kind: "enum", T: proto3.getEnumType(MessageType) }, kind: 'scalar',
{ no: 8, name: "content_type", kind: "enum", T: proto3.getEnumType(ChatMessage_ContentType) }, T: 9 /* ScalarType.STRING */,
{ no: 9, name: "sticker", kind: "message", T: StickerMessage, oneof: "payload" }, },
{ no: 10, name: "image", kind: "message", T: ImageMessage, oneof: "payload" }, { no: 5, name: 'ens_name', kind: 'scalar', T: 9 /* ScalarType.STRING */ },
{ no: 11, name: "audio", kind: "message", T: AudioMessage, oneof: "payload" }, { no: 6, name: 'chat_id', kind: 'scalar', T: 9 /* ScalarType.STRING */ },
{ no: 12, name: "community", kind: "scalar", T: 12 /* ScalarType.BYTES */, oneof: "payload" }, {
{ no: 13, name: "grant", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, no: 7,
{ no: 14, name: "display_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, 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<BinaryReadOptions>): ChatMessage { static fromBinary(
return new ChatMessage().fromBinary(bytes, options); bytes: Uint8Array,
options?: Partial<BinaryReadOptions>
): ChatMessage {
return new ChatMessage().fromBinary(bytes, options)
} }
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ChatMessage { static fromJson(
return new ChatMessage().fromJson(jsonValue, options); jsonValue: JsonValue,
options?: Partial<JsonReadOptions>
): ChatMessage {
return new ChatMessage().fromJson(jsonValue, options)
} }
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ChatMessage { static fromJsonString(
return new ChatMessage().fromJsonString(jsonString, options); jsonString: string,
options?: Partial<JsonReadOptions>
): ChatMessage {
return new ChatMessage().fromJsonString(jsonString, options)
} }
static equals(a: ChatMessage | PlainMessage<ChatMessage> | undefined, b: ChatMessage | PlainMessage<ChatMessage> | undefined): boolean { static equals(
return proto3.util.equals(ChatMessage, a, b); a: ChatMessage | PlainMessage<ChatMessage> | undefined,
b: ChatMessage | PlainMessage<ChatMessage> | undefined
): boolean {
return proto3.util.equals(ChatMessage, a, b)
} }
} }
@ -518,17 +666,16 @@ export enum ChatMessage_ContentType {
SYSTEM_MESSAGE_GAP = 10, SYSTEM_MESSAGE_GAP = 10,
} }
// Retrieve enum metadata with: proto3.getEnumType(ChatMessage_ContentType) // Retrieve enum metadata with: proto3.getEnumType(ChatMessage_ContentType)
proto3.util.setEnumType(ChatMessage_ContentType, "ChatMessage.ContentType", [ proto3.util.setEnumType(ChatMessage_ContentType, 'ChatMessage.ContentType', [
{ no: 0, name: "UNKNOWN_CONTENT_TYPE" }, { no: 0, name: 'UNKNOWN_CONTENT_TYPE' },
{ no: 1, name: "TEXT_PLAIN" }, { no: 1, name: 'TEXT_PLAIN' },
{ no: 2, name: "STICKER" }, { no: 2, name: 'STICKER' },
{ no: 3, name: "STATUS" }, { no: 3, name: 'STATUS' },
{ no: 4, name: "EMOJI" }, { no: 4, name: 'EMOJI' },
{ no: 5, name: "TRANSACTION_COMMAND" }, { no: 5, name: 'TRANSACTION_COMMAND' },
{ no: 6, name: "SYSTEM_MESSAGE_CONTENT_PRIVATE_GROUP" }, { no: 6, name: 'SYSTEM_MESSAGE_CONTENT_PRIVATE_GROUP' },
{ no: 7, name: "IMAGE" }, { no: 7, name: 'IMAGE' },
{ no: 8, name: "AUDIO" }, { no: 8, name: 'AUDIO' },
{ no: 9, name: "COMMUNITY" }, { no: 9, name: 'COMMUNITY' },
{ no: 10, name: "SYSTEM_MESSAGE_GAP" }, { no: 10, name: 'SYSTEM_MESSAGE_GAP' },
]); ])

File diff suppressed because it is too large Load Diff

View File

@ -3,9 +3,16 @@
/* eslint-disable */ /* eslint-disable */
// @ts-nocheck // @ts-nocheck
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; import type {
import { Message, proto3, protoInt64 } from "@bufbuild/protobuf"; BinaryReadOptions,
import { MessageType } from "./enums_pb.js"; 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 * @generated from message EmojiReaction
@ -16,7 +23,7 @@ export class EmojiReaction extends Message<EmojiReaction> {
* *
* @generated from field: uint64 clock = 1; * @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 * 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<EmojiReaction> {
* *
* @generated from field: string chat_id = 2; * @generated from field: string chat_id = 2;
*/ */
chatId = ""; chatId = ''
/** /**
* message_id the ID of the target message that the user wishes to react to * message_id the ID of the target message that the user wishes to react to
* *
* @generated from field: string message_id = 3; * @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 * message_type is (somewhat confusingly) the ID of the type of chat the message belongs to
* *
* @generated from field: MessageType message_type = 4; * @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 * type the ID of the emoji the user wishes to react with
* *
* @generated from field: EmojiReaction.Type type = 5; * @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 * whether this is a rectraction of a previously sent emoji
* *
* @generated from field: bool retracted = 6; * @generated from field: bool retracted = 6;
*/ */
retracted = false; retracted = false
/** /**
* Grant for organisation chat messages * Grant for organisation chat messages
* *
* @generated from field: bytes grant = 7; * @generated from field: bytes grant = 7;
*/ */
grant = new Uint8Array(0); grant = new Uint8Array(0)
constructor(data?: PartialMessage<EmojiReaction>) { constructor(data?: PartialMessage<EmojiReaction>) {
super(); super()
proto3.util.initPartial(data, this); proto3.util.initPartial(data, this)
} }
static readonly runtime = proto3; static readonly runtime = proto3
static readonly typeName = "EmojiReaction"; static readonly typeName = 'EmojiReaction'
static readonly fields: FieldList = proto3.util.newFieldList(() => [ static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "clock", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, { no: 1, name: 'clock', kind: 'scalar', T: 4 /* ScalarType.UINT64 */ },
{ no: 2, name: "chat_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 2, name: 'chat_id', kind: 'scalar', T: 9 /* ScalarType.STRING */ },
{ no: 3, name: "message_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: 4,
{ no: 6, name: "retracted", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, name: 'message_type',
{ no: 7, name: "grant", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, 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<BinaryReadOptions>): EmojiReaction { static fromBinary(
return new EmojiReaction().fromBinary(bytes, options); bytes: Uint8Array,
options?: Partial<BinaryReadOptions>
): EmojiReaction {
return new EmojiReaction().fromBinary(bytes, options)
} }
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): EmojiReaction { static fromJson(
return new EmojiReaction().fromJson(jsonValue, options); jsonValue: JsonValue,
options?: Partial<JsonReadOptions>
): EmojiReaction {
return new EmojiReaction().fromJson(jsonValue, options)
} }
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): EmojiReaction { static fromJsonString(
return new EmojiReaction().fromJsonString(jsonString, options); jsonString: string,
options?: Partial<JsonReadOptions>
): EmojiReaction {
return new EmojiReaction().fromJsonString(jsonString, options)
} }
static equals(a: EmojiReaction | PlainMessage<EmojiReaction> | undefined, b: EmojiReaction | PlainMessage<EmojiReaction> | undefined): boolean { static equals(
return proto3.util.equals(EmojiReaction, a, b); a: EmojiReaction | PlainMessage<EmojiReaction> | undefined,
b: EmojiReaction | PlainMessage<EmojiReaction> | undefined
): boolean {
return proto3.util.equals(EmojiReaction, a, b)
} }
} }
@ -135,13 +164,12 @@ export enum EmojiReaction_Type {
ANGRY = 6, ANGRY = 6,
} }
// Retrieve enum metadata with: proto3.getEnumType(EmojiReaction_Type) // Retrieve enum metadata with: proto3.getEnumType(EmojiReaction_Type)
proto3.util.setEnumType(EmojiReaction_Type, "EmojiReaction.Type", [ proto3.util.setEnumType(EmojiReaction_Type, 'EmojiReaction.Type', [
{ no: 0, name: "UNKNOWN_EMOJI_REACTION_TYPE" }, { no: 0, name: 'UNKNOWN_EMOJI_REACTION_TYPE' },
{ no: 1, name: "LOVE" }, { no: 1, name: 'LOVE' },
{ no: 2, name: "THUMBS_UP" }, { no: 2, name: 'THUMBS_UP' },
{ no: 3, name: "THUMBS_DOWN" }, { no: 3, name: 'THUMBS_DOWN' },
{ no: 4, name: "LAUGH" }, { no: 4, name: 'LAUGH' },
{ no: 5, name: "SAD" }, { no: 5, name: 'SAD' },
{ no: 6, name: "ANGRY" }, { no: 6, name: 'ANGRY' },
]); ])

View File

@ -3,7 +3,7 @@
/* eslint-disable */ /* eslint-disable */
// @ts-nocheck // @ts-nocheck
import { proto3 } from "@bufbuild/protobuf"; import { proto3 } from '@bufbuild/protobuf'
/** /**
* @generated from enum MessageType * @generated from enum MessageType
@ -49,15 +49,15 @@ export enum MessageType {
SYSTEM_MESSAGE_GAP = 6, SYSTEM_MESSAGE_GAP = 6,
} }
// Retrieve enum metadata with: proto3.getEnumType(MessageType) // Retrieve enum metadata with: proto3.getEnumType(MessageType)
proto3.util.setEnumType(MessageType, "MessageType", [ proto3.util.setEnumType(MessageType, 'MessageType', [
{ no: 0, name: "UNKNOWN_MESSAGE_TYPE" }, { no: 0, name: 'UNKNOWN_MESSAGE_TYPE' },
{ no: 1, name: "ONE_TO_ONE" }, { no: 1, name: 'ONE_TO_ONE' },
{ no: 2, name: "PUBLIC_GROUP" }, { no: 2, name: 'PUBLIC_GROUP' },
{ no: 3, name: "PRIVATE_GROUP" }, { no: 3, name: 'PRIVATE_GROUP' },
{ no: 4, name: "SYSTEM_MESSAGE_PRIVATE_GROUP" }, { no: 4, name: 'SYSTEM_MESSAGE_PRIVATE_GROUP' },
{ no: 5, name: "COMMUNITY_CHAT" }, { no: 5, name: 'COMMUNITY_CHAT' },
{ no: 6, name: "SYSTEM_MESSAGE_GAP" }, { no: 6, name: 'SYSTEM_MESSAGE_GAP' },
]); ])
/** /**
* @generated from enum ImageType * @generated from enum ImageType
@ -91,11 +91,10 @@ export enum ImageType {
GIF = 4, GIF = 4,
} }
// Retrieve enum metadata with: proto3.getEnumType(ImageType) // Retrieve enum metadata with: proto3.getEnumType(ImageType)
proto3.util.setEnumType(ImageType, "ImageType", [ proto3.util.setEnumType(ImageType, 'ImageType', [
{ no: 0, name: "UNKNOWN_IMAGE_TYPE" }, { no: 0, name: 'UNKNOWN_IMAGE_TYPE' },
{ no: 1, name: "PNG" }, { no: 1, name: 'PNG' },
{ no: 2, name: "JPEG" }, { no: 2, name: 'JPEG' },
{ no: 3, name: "WEBP" }, { no: 3, name: 'WEBP' },
{ no: 4, name: "GIF" }, { no: 4, name: 'GIF' },
]); ])

View File

@ -3,10 +3,17 @@
/* eslint-disable */ /* eslint-disable */
// @ts-nocheck // @ts-nocheck
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; import type {
import { Message, proto3, protoInt64 } from "@bufbuild/protobuf"; BinaryReadOptions,
import { ChatMessage } from "./chat-message_pb.js"; FieldList,
import { EmojiReaction } from "./emoji-reaction_pb.js"; 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 * @generated from message MembershipUpdateEvent
@ -17,57 +24,80 @@ export class MembershipUpdateEvent extends Message<MembershipUpdateEvent> {
* *
* @generated from field: uint64 clock = 1; * @generated from field: uint64 clock = 1;
*/ */
clock = protoInt64.zero; clock = protoInt64.zero
/** /**
* List of public keys of objects of the action * List of public keys of objects of the action
* *
* @generated from field: repeated string members = 2; * @generated from field: repeated string members = 2;
*/ */
members: string[] = []; members: string[] = []
/** /**
* Name of the chat for the CHAT_CREATED/NAME_CHANGED event types * Name of the chat for the CHAT_CREATED/NAME_CHANGED event types
* *
* @generated from field: string name = 3; * @generated from field: string name = 3;
*/ */
name = ""; name = ''
/** /**
* The type of the event * The type of the event
* *
* @generated from field: MembershipUpdateEvent.EventType type = 4; * @generated from field: MembershipUpdateEvent.EventType type = 4;
*/ */
type = MembershipUpdateEvent_EventType.UNKNOWN; type = MembershipUpdateEvent_EventType.UNKNOWN
constructor(data?: PartialMessage<MembershipUpdateEvent>) { constructor(data?: PartialMessage<MembershipUpdateEvent>) {
super(); super()
proto3.util.initPartial(data, this); proto3.util.initPartial(data, this)
} }
static readonly runtime = proto3; static readonly runtime = proto3
static readonly typeName = "MembershipUpdateEvent"; static readonly typeName = 'MembershipUpdateEvent'
static readonly fields: FieldList = proto3.util.newFieldList(() => [ static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "clock", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, { 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: 2,
{ no: 4, name: "type", kind: "enum", T: proto3.getEnumType(MembershipUpdateEvent_EventType) }, 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<BinaryReadOptions>): MembershipUpdateEvent { static fromBinary(
return new MembershipUpdateEvent().fromBinary(bytes, options); bytes: Uint8Array,
options?: Partial<BinaryReadOptions>
): MembershipUpdateEvent {
return new MembershipUpdateEvent().fromBinary(bytes, options)
} }
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): MembershipUpdateEvent { static fromJson(
return new MembershipUpdateEvent().fromJson(jsonValue, options); jsonValue: JsonValue,
options?: Partial<JsonReadOptions>
): MembershipUpdateEvent {
return new MembershipUpdateEvent().fromJson(jsonValue, options)
} }
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): MembershipUpdateEvent { static fromJsonString(
return new MembershipUpdateEvent().fromJsonString(jsonString, options); jsonString: string,
options?: Partial<JsonReadOptions>
): MembershipUpdateEvent {
return new MembershipUpdateEvent().fromJsonString(jsonString, options)
} }
static equals(a: MembershipUpdateEvent | PlainMessage<MembershipUpdateEvent> | undefined, b: MembershipUpdateEvent | PlainMessage<MembershipUpdateEvent> | undefined): boolean { static equals(
return proto3.util.equals(MembershipUpdateEvent, a, b); a: MembershipUpdateEvent | PlainMessage<MembershipUpdateEvent> | undefined,
b: MembershipUpdateEvent | PlainMessage<MembershipUpdateEvent> | undefined
): boolean {
return proto3.util.equals(MembershipUpdateEvent, a, b)
} }
} }
@ -116,16 +146,20 @@ export enum MembershipUpdateEvent_EventType {
ADMIN_REMOVED = 7, ADMIN_REMOVED = 7,
} }
// Retrieve enum metadata with: proto3.getEnumType(MembershipUpdateEvent_EventType) // Retrieve enum metadata with: proto3.getEnumType(MembershipUpdateEvent_EventType)
proto3.util.setEnumType(MembershipUpdateEvent_EventType, "MembershipUpdateEvent.EventType", [ proto3.util.setEnumType(
{ no: 0, name: "UNKNOWN" }, MembershipUpdateEvent_EventType,
{ no: 1, name: "CHAT_CREATED" }, 'MembershipUpdateEvent.EventType',
{ no: 2, name: "NAME_CHANGED" }, [
{ no: 3, name: "MEMBERS_ADDED" }, { no: 0, name: 'UNKNOWN' },
{ no: 4, name: "MEMBER_JOINED" }, { no: 1, name: 'CHAT_CREATED' },
{ no: 5, name: "MEMBER_REMOVED" }, { no: 2, name: 'NAME_CHANGED' },
{ no: 6, name: "ADMINS_ADDED" }, { no: 3, name: 'MEMBERS_ADDED' },
{ no: 7, name: "ADMIN_REMOVED" }, { 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 * MembershipUpdateMessage is a message used to propagate information
@ -140,7 +174,7 @@ export class MembershipUpdateMessage extends Message<MembershipUpdateMessage> {
* *
* @generated from field: string chat_id = 1; * @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 * 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<MembershipUpdateMessage> {
* *
* @generated from field: repeated bytes events = 2; * @generated from field: repeated bytes events = 2;
*/ */
events: Uint8Array[] = []; events: Uint8Array[] = []
/** /**
* An optional chat message * An optional chat message
* *
* @generated from oneof MembershipUpdateMessage.chat_entity * @generated from oneof MembershipUpdateMessage.chat_entity
*/ */
chatEntity: { chatEntity:
/** | {
* @generated from field: ChatMessage message = 3; /**
*/ * @generated from field: ChatMessage message = 3;
value: ChatMessage; */
case: "message"; value: ChatMessage
} | { case: 'message'
/** }
* @generated from field: EmojiReaction emoji_reaction = 4; | {
*/ /**
value: EmojiReaction; * @generated from field: EmojiReaction emoji_reaction = 4;
case: "emojiReaction"; */
} | { case: undefined; value?: undefined } = { case: undefined }; value: EmojiReaction
case: 'emojiReaction'
}
| { case: undefined; value?: undefined } = { case: undefined }
constructor(data?: PartialMessage<MembershipUpdateMessage>) { constructor(data?: PartialMessage<MembershipUpdateMessage>) {
super(); super()
proto3.util.initPartial(data, this); proto3.util.initPartial(data, this)
} }
static readonly runtime = proto3; static readonly runtime = proto3
static readonly typeName = "MembershipUpdateMessage"; static readonly typeName = 'MembershipUpdateMessage'
static readonly fields: FieldList = proto3.util.newFieldList(() => [ static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "chat_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { 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: 2,
{ no: 4, name: "emoji_reaction", kind: "message", T: EmojiReaction, oneof: "chat_entity" }, 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<BinaryReadOptions>): MembershipUpdateMessage { static fromBinary(
return new MembershipUpdateMessage().fromBinary(bytes, options); bytes: Uint8Array,
options?: Partial<BinaryReadOptions>
): MembershipUpdateMessage {
return new MembershipUpdateMessage().fromBinary(bytes, options)
} }
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): MembershipUpdateMessage { static fromJson(
return new MembershipUpdateMessage().fromJson(jsonValue, options); jsonValue: JsonValue,
options?: Partial<JsonReadOptions>
): MembershipUpdateMessage {
return new MembershipUpdateMessage().fromJson(jsonValue, options)
} }
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): MembershipUpdateMessage { static fromJsonString(
return new MembershipUpdateMessage().fromJsonString(jsonString, options); jsonString: string,
options?: Partial<JsonReadOptions>
): MembershipUpdateMessage {
return new MembershipUpdateMessage().fromJsonString(jsonString, options)
} }
static equals(a: MembershipUpdateMessage | PlainMessage<MembershipUpdateMessage> | undefined, b: MembershipUpdateMessage | PlainMessage<MembershipUpdateMessage> | undefined): boolean { static equals(
return proto3.util.equals(MembershipUpdateMessage, a, b); a:
| MembershipUpdateMessage
| PlainMessage<MembershipUpdateMessage>
| undefined,
b:
| MembershipUpdateMessage
| PlainMessage<MembershipUpdateMessage>
| undefined
): boolean {
return proto3.util.equals(MembershipUpdateMessage, a, b)
} }
} }

View File

@ -3,9 +3,16 @@
/* eslint-disable */ /* eslint-disable */
// @ts-nocheck // @ts-nocheck
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; import type {
import { Message, proto3, protoInt64 } from "@bufbuild/protobuf"; BinaryReadOptions,
import { MessageType } from "./enums_pb.js"; 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 * @generated from message PinMessage
@ -14,59 +21,75 @@ export class PinMessage extends Message<PinMessage> {
/** /**
* @generated from field: uint64 clock = 1; * @generated from field: uint64 clock = 1;
*/ */
clock = protoInt64.zero; clock = protoInt64.zero
/** /**
* @generated from field: string message_id = 2; * @generated from field: string message_id = 2;
*/ */
messageId = ""; messageId = ''
/** /**
* @generated from field: string chat_id = 3; * @generated from field: string chat_id = 3;
*/ */
chatId = ""; chatId = ''
/** /**
* @generated from field: bool pinned = 4; * @generated from field: bool pinned = 4;
*/ */
pinned = false; pinned = false
/** /**
* The type of message (public/one-to-one/private-group-chat) * The type of message (public/one-to-one/private-group-chat)
* *
* @generated from field: MessageType message_type = 5; * @generated from field: MessageType message_type = 5;
*/ */
messageType = MessageType.UNKNOWN_MESSAGE_TYPE; messageType = MessageType.UNKNOWN_MESSAGE_TYPE
constructor(data?: PartialMessage<PinMessage>) { constructor(data?: PartialMessage<PinMessage>) {
super(); super()
proto3.util.initPartial(data, this); proto3.util.initPartial(data, this)
} }
static readonly runtime = proto3; static readonly runtime = proto3
static readonly typeName = "PinMessage"; static readonly typeName = 'PinMessage'
static readonly fields: FieldList = proto3.util.newFieldList(() => [ static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "clock", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, { no: 1, name: 'clock', kind: 'scalar', T: 4 /* ScalarType.UINT64 */ },
{ no: 2, name: "message_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 2, name: 'message_id', kind: 'scalar', T: 9 /* ScalarType.STRING */ },
{ no: 3, name: "chat_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: 4, name: 'pinned', kind: 'scalar', T: 8 /* ScalarType.BOOL */ },
{ no: 5, name: "message_type", kind: "enum", T: proto3.getEnumType(MessageType) }, {
]); no: 5,
name: 'message_type',
kind: 'enum',
T: proto3.getEnumType(MessageType),
},
])
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PinMessage { static fromBinary(
return new PinMessage().fromBinary(bytes, options); bytes: Uint8Array,
options?: Partial<BinaryReadOptions>
): PinMessage {
return new PinMessage().fromBinary(bytes, options)
} }
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): PinMessage { static fromJson(
return new PinMessage().fromJson(jsonValue, options); jsonValue: JsonValue,
options?: Partial<JsonReadOptions>
): PinMessage {
return new PinMessage().fromJson(jsonValue, options)
} }
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PinMessage { static fromJsonString(
return new PinMessage().fromJsonString(jsonString, options); jsonString: string,
options?: Partial<JsonReadOptions>
): PinMessage {
return new PinMessage().fromJsonString(jsonString, options)
} }
static equals(a: PinMessage | PlainMessage<PinMessage> | undefined, b: PinMessage | PlainMessage<PinMessage> | undefined): boolean { static equals(
return proto3.util.equals(PinMessage, a, b); a: PinMessage | PlainMessage<PinMessage> | undefined,
b: PinMessage | PlainMessage<PinMessage> | undefined
): boolean {
return proto3.util.equals(PinMessage, a, b)
} }
} }

View File

@ -3,8 +3,15 @@
/* eslint-disable */ /* eslint-disable */
// @ts-nocheck // @ts-nocheck
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; import type {
import { Message, proto3, protoInt64 } from "@bufbuild/protobuf"; BinaryReadOptions,
FieldList,
JsonReadOptions,
JsonValue,
PartialMessage,
PlainMessage,
} from '@bufbuild/protobuf'
import { Message, proto3, protoInt64 } from '@bufbuild/protobuf'
/** /**
* @generated from message SignedPreKey * @generated from message SignedPreKey
@ -13,45 +20,67 @@ export class SignedPreKey extends Message<SignedPreKey> {
/** /**
* @generated from field: bytes signed_pre_key = 1; * @generated from field: bytes signed_pre_key = 1;
*/ */
signedPreKey = new Uint8Array(0); signedPreKey = new Uint8Array(0)
/** /**
* @generated from field: uint32 version = 2; * @generated from field: uint32 version = 2;
*/ */
version = 0; version = 0
/** /**
* @generated from field: uint32 protocol_version = 3; * @generated from field: uint32 protocol_version = 3;
*/ */
protocolVersion = 0; protocolVersion = 0
constructor(data?: PartialMessage<SignedPreKey>) { constructor(data?: PartialMessage<SignedPreKey>) {
super(); super()
proto3.util.initPartial(data, this); proto3.util.initPartial(data, this)
} }
static readonly runtime = proto3; static readonly runtime = proto3
static readonly typeName = "SignedPreKey"; static readonly typeName = 'SignedPreKey'
static readonly fields: FieldList = proto3.util.newFieldList(() => [ 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: 1,
{ no: 3, name: "protocol_version", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, 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<BinaryReadOptions>): SignedPreKey { static fromBinary(
return new SignedPreKey().fromBinary(bytes, options); bytes: Uint8Array,
options?: Partial<BinaryReadOptions>
): SignedPreKey {
return new SignedPreKey().fromBinary(bytes, options)
} }
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SignedPreKey { static fromJson(
return new SignedPreKey().fromJson(jsonValue, options); jsonValue: JsonValue,
options?: Partial<JsonReadOptions>
): SignedPreKey {
return new SignedPreKey().fromJson(jsonValue, options)
} }
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SignedPreKey { static fromJsonString(
return new SignedPreKey().fromJsonString(jsonString, options); jsonString: string,
options?: Partial<JsonReadOptions>
): SignedPreKey {
return new SignedPreKey().fromJsonString(jsonString, options)
} }
static equals(a: SignedPreKey | PlainMessage<SignedPreKey> | undefined, b: SignedPreKey | PlainMessage<SignedPreKey> | undefined): boolean { static equals(
return proto3.util.equals(SignedPreKey, a, b); a: SignedPreKey | PlainMessage<SignedPreKey> | undefined,
b: SignedPreKey | PlainMessage<SignedPreKey> | undefined
): boolean {
return proto3.util.equals(SignedPreKey, a, b)
} }
} }
@ -66,57 +95,75 @@ export class Bundle extends Message<Bundle> {
* *
* @generated from field: bytes identity = 1; * @generated from field: bytes identity = 1;
*/ */
identity = new Uint8Array(0); identity = new Uint8Array(0)
/** /**
* Installation id * Installation id
* *
* @generated from field: map<string, SignedPreKey> signed_pre_keys = 2; * @generated from field: map<string, SignedPreKey> signed_pre_keys = 2;
*/ */
signedPreKeys: { [key: string]: SignedPreKey } = {}; signedPreKeys: { [key: string]: SignedPreKey } = {}
/** /**
* Prekey signature * Prekey signature
* *
* @generated from field: bytes signature = 4; * @generated from field: bytes signature = 4;
*/ */
signature = new Uint8Array(0); signature = new Uint8Array(0)
/** /**
* When the bundle was created locally * When the bundle was created locally
* *
* @generated from field: int64 timestamp = 5; * @generated from field: int64 timestamp = 5;
*/ */
timestamp = protoInt64.zero; timestamp = protoInt64.zero
constructor(data?: PartialMessage<Bundle>) { constructor(data?: PartialMessage<Bundle>) {
super(); super()
proto3.util.initPartial(data, this); proto3.util.initPartial(data, this)
} }
static readonly runtime = proto3; static readonly runtime = proto3
static readonly typeName = "Bundle"; static readonly typeName = 'Bundle'
static readonly fields: FieldList = proto3.util.newFieldList(() => [ static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "identity", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, { 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: 2,
{ no: 5, name: "timestamp", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, 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<BinaryReadOptions>): Bundle { static fromBinary(
return new Bundle().fromBinary(bytes, options); bytes: Uint8Array,
options?: Partial<BinaryReadOptions>
): Bundle {
return new Bundle().fromBinary(bytes, options)
} }
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Bundle { static fromJson(
return new Bundle().fromJson(jsonValue, options); jsonValue: JsonValue,
options?: Partial<JsonReadOptions>
): Bundle {
return new Bundle().fromJson(jsonValue, options)
} }
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Bundle { static fromJsonString(
return new Bundle().fromJsonString(jsonString, options); jsonString: string,
options?: Partial<JsonReadOptions>
): Bundle {
return new Bundle().fromJsonString(jsonString, options)
} }
static equals(a: Bundle | PlainMessage<Bundle> | undefined, b: Bundle | PlainMessage<Bundle> | undefined): boolean { static equals(
return proto3.util.equals(Bundle, a, b); a: Bundle | PlainMessage<Bundle> | undefined,
b: Bundle | PlainMessage<Bundle> | undefined
): boolean {
return proto3.util.equals(Bundle, a, b)
} }
} }
@ -129,41 +176,58 @@ export class BundleContainer extends Message<BundleContainer> {
* *
* @generated from field: Bundle bundle = 1; * @generated from field: Bundle bundle = 1;
*/ */
bundle?: Bundle; bundle?: Bundle
/** /**
* Private signed prekey * Private signed prekey
* *
* @generated from field: bytes private_signed_pre_key = 2; * @generated from field: bytes private_signed_pre_key = 2;
*/ */
privateSignedPreKey = new Uint8Array(0); privateSignedPreKey = new Uint8Array(0)
constructor(data?: PartialMessage<BundleContainer>) { constructor(data?: PartialMessage<BundleContainer>) {
super(); super()
proto3.util.initPartial(data, this); proto3.util.initPartial(data, this)
} }
static readonly runtime = proto3; static readonly runtime = proto3
static readonly typeName = "BundleContainer"; static readonly typeName = 'BundleContainer'
static readonly fields: FieldList = proto3.util.newFieldList(() => [ static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "bundle", kind: "message", T: Bundle }, { no: 1, name: 'bundle', kind: 'message', T: Bundle },
{ no: 2, name: "private_signed_pre_key", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, {
]); no: 2,
name: 'private_signed_pre_key',
kind: 'scalar',
T: 12 /* ScalarType.BYTES */,
},
])
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): BundleContainer { static fromBinary(
return new BundleContainer().fromBinary(bytes, options); bytes: Uint8Array,
options?: Partial<BinaryReadOptions>
): BundleContainer {
return new BundleContainer().fromBinary(bytes, options)
} }
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): BundleContainer { static fromJson(
return new BundleContainer().fromJson(jsonValue, options); jsonValue: JsonValue,
options?: Partial<JsonReadOptions>
): BundleContainer {
return new BundleContainer().fromJson(jsonValue, options)
} }
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): BundleContainer { static fromJsonString(
return new BundleContainer().fromJsonString(jsonString, options); jsonString: string,
options?: Partial<JsonReadOptions>
): BundleContainer {
return new BundleContainer().fromJsonString(jsonString, options)
} }
static equals(a: BundleContainer | PlainMessage<BundleContainer> | undefined, b: BundleContainer | PlainMessage<BundleContainer> | undefined): boolean { static equals(
return proto3.util.equals(BundleContainer, a, b); a: BundleContainer | PlainMessage<BundleContainer> | undefined,
b: BundleContainer | PlainMessage<BundleContainer> | undefined
): boolean {
return proto3.util.equals(BundleContainer, a, b)
} }
} }
@ -176,57 +240,69 @@ export class DRHeader extends Message<DRHeader> {
* *
* @generated from field: bytes key = 1; * @generated from field: bytes key = 1;
*/ */
key = new Uint8Array(0); key = new Uint8Array(0)
/** /**
* Number of the message in the sending chain * Number of the message in the sending chain
* *
* @generated from field: uint32 n = 2; * @generated from field: uint32 n = 2;
*/ */
n = 0; n = 0
/** /**
* Length of the previous sending chain * Length of the previous sending chain
* *
* @generated from field: uint32 pn = 3; * @generated from field: uint32 pn = 3;
*/ */
pn = 0; pn = 0
/** /**
* Bundle ID * Bundle ID
* *
* @generated from field: bytes id = 4; * @generated from field: bytes id = 4;
*/ */
id = new Uint8Array(0); id = new Uint8Array(0)
constructor(data?: PartialMessage<DRHeader>) { constructor(data?: PartialMessage<DRHeader>) {
super(); super()
proto3.util.initPartial(data, this); proto3.util.initPartial(data, this)
} }
static readonly runtime = proto3; static readonly runtime = proto3
static readonly typeName = "DRHeader"; static readonly typeName = 'DRHeader'
static readonly fields: FieldList = proto3.util.newFieldList(() => [ 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 */ },
{ no: 2, name: "n", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, { no: 2, name: 'n', kind: 'scalar', T: 13 /* ScalarType.UINT32 */ },
{ no: 3, name: "pn", 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: 4, name: 'id', kind: 'scalar', T: 12 /* ScalarType.BYTES */ },
]); ])
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): DRHeader { static fromBinary(
return new DRHeader().fromBinary(bytes, options); bytes: Uint8Array,
options?: Partial<BinaryReadOptions>
): DRHeader {
return new DRHeader().fromBinary(bytes, options)
} }
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): DRHeader { static fromJson(
return new DRHeader().fromJson(jsonValue, options); jsonValue: JsonValue,
options?: Partial<JsonReadOptions>
): DRHeader {
return new DRHeader().fromJson(jsonValue, options)
} }
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): DRHeader { static fromJsonString(
return new DRHeader().fromJsonString(jsonString, options); jsonString: string,
options?: Partial<JsonReadOptions>
): DRHeader {
return new DRHeader().fromJsonString(jsonString, options)
} }
static equals(a: DRHeader | PlainMessage<DRHeader> | undefined, b: DRHeader | PlainMessage<DRHeader> | undefined): boolean { static equals(
return proto3.util.equals(DRHeader, a, b); a: DRHeader | PlainMessage<DRHeader> | undefined,
b: DRHeader | PlainMessage<DRHeader> | undefined
): boolean {
return proto3.util.equals(DRHeader, a, b)
} }
} }
@ -239,33 +315,45 @@ export class DHHeader extends Message<DHHeader> {
* *
* @generated from field: bytes key = 1; * @generated from field: bytes key = 1;
*/ */
key = new Uint8Array(0); key = new Uint8Array(0)
constructor(data?: PartialMessage<DHHeader>) { constructor(data?: PartialMessage<DHHeader>) {
super(); super()
proto3.util.initPartial(data, this); proto3.util.initPartial(data, this)
} }
static readonly runtime = proto3; static readonly runtime = proto3
static readonly typeName = "DHHeader"; static readonly typeName = 'DHHeader'
static readonly fields: FieldList = proto3.util.newFieldList(() => [ 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<BinaryReadOptions>): DHHeader { static fromBinary(
return new DHHeader().fromBinary(bytes, options); bytes: Uint8Array,
options?: Partial<BinaryReadOptions>
): DHHeader {
return new DHHeader().fromBinary(bytes, options)
} }
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): DHHeader { static fromJson(
return new DHHeader().fromJson(jsonValue, options); jsonValue: JsonValue,
options?: Partial<JsonReadOptions>
): DHHeader {
return new DHHeader().fromJson(jsonValue, options)
} }
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): DHHeader { static fromJsonString(
return new DHHeader().fromJsonString(jsonString, options); jsonString: string,
options?: Partial<JsonReadOptions>
): DHHeader {
return new DHHeader().fromJsonString(jsonString, options)
} }
static equals(a: DHHeader | PlainMessage<DHHeader> | undefined, b: DHHeader | PlainMessage<DHHeader> | undefined): boolean { static equals(
return proto3.util.equals(DHHeader, a, b); a: DHHeader | PlainMessage<DHHeader> | undefined,
b: DHHeader | PlainMessage<DHHeader> | undefined
): boolean {
return proto3.util.equals(DHHeader, a, b)
} }
} }
@ -278,41 +366,53 @@ export class X3DHHeader extends Message<X3DHHeader> {
* *
* @generated from field: bytes key = 1; * @generated from field: bytes key = 1;
*/ */
key = new Uint8Array(0); key = new Uint8Array(0)
/** /**
* Used bundle's signed prekey * Used bundle's signed prekey
* *
* @generated from field: bytes id = 4; * @generated from field: bytes id = 4;
*/ */
id = new Uint8Array(0); id = new Uint8Array(0)
constructor(data?: PartialMessage<X3DHHeader>) { constructor(data?: PartialMessage<X3DHHeader>) {
super(); super()
proto3.util.initPartial(data, this); proto3.util.initPartial(data, this)
} }
static readonly runtime = proto3; static readonly runtime = proto3
static readonly typeName = "X3DHHeader"; static readonly typeName = 'X3DHHeader'
static readonly fields: FieldList = proto3.util.newFieldList(() => [ 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 */ },
{ no: 4, name: "id", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, { no: 4, name: 'id', kind: 'scalar', T: 12 /* ScalarType.BYTES */ },
]); ])
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): X3DHHeader { static fromBinary(
return new X3DHHeader().fromBinary(bytes, options); bytes: Uint8Array,
options?: Partial<BinaryReadOptions>
): X3DHHeader {
return new X3DHHeader().fromBinary(bytes, options)
} }
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): X3DHHeader { static fromJson(
return new X3DHHeader().fromJson(jsonValue, options); jsonValue: JsonValue,
options?: Partial<JsonReadOptions>
): X3DHHeader {
return new X3DHHeader().fromJson(jsonValue, options)
} }
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): X3DHHeader { static fromJsonString(
return new X3DHHeader().fromJsonString(jsonString, options); jsonString: string,
options?: Partial<JsonReadOptions>
): X3DHHeader {
return new X3DHHeader().fromJsonString(jsonString, options)
} }
static equals(a: X3DHHeader | PlainMessage<X3DHHeader> | undefined, b: X3DHHeader | PlainMessage<X3DHHeader> | undefined): boolean { static equals(
return proto3.util.equals(X3DHHeader, a, b); a: X3DHHeader | PlainMessage<X3DHHeader> | undefined,
b: X3DHHeader | PlainMessage<X3DHHeader> | undefined
): boolean {
return proto3.util.equals(X3DHHeader, a, b)
} }
} }
@ -327,49 +427,61 @@ export class HRHeader extends Message<HRHeader> {
* *
* @generated from field: uint32 key_id = 1; * @generated from field: uint32 key_id = 1;
*/ */
keyId = 0; keyId = 0
/** /**
* Community message number for this key_id * Community message number for this key_id
* *
* @generated from field: uint32 seq_no = 2; * @generated from field: uint32 seq_no = 2;
*/ */
seqNo = 0; seqNo = 0
/** /**
* Community ID * Community ID
* *
* @generated from field: bytes group_id = 3; * @generated from field: bytes group_id = 3;
*/ */
groupId = new Uint8Array(0); groupId = new Uint8Array(0)
constructor(data?: PartialMessage<HRHeader>) { constructor(data?: PartialMessage<HRHeader>) {
super(); super()
proto3.util.initPartial(data, this); proto3.util.initPartial(data, this)
} }
static readonly runtime = proto3; static readonly runtime = proto3
static readonly typeName = "HRHeader"; static readonly typeName = 'HRHeader'
static readonly fields: FieldList = proto3.util.newFieldList(() => [ static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "key_id", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, { no: 1, name: 'key_id', kind: 'scalar', T: 13 /* ScalarType.UINT32 */ },
{ no: 2, name: "seq_no", 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: 3, name: 'group_id', kind: 'scalar', T: 12 /* ScalarType.BYTES */ },
]); ])
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): HRHeader { static fromBinary(
return new HRHeader().fromBinary(bytes, options); bytes: Uint8Array,
options?: Partial<BinaryReadOptions>
): HRHeader {
return new HRHeader().fromBinary(bytes, options)
} }
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): HRHeader { static fromJson(
return new HRHeader().fromJson(jsonValue, options); jsonValue: JsonValue,
options?: Partial<JsonReadOptions>
): HRHeader {
return new HRHeader().fromJson(jsonValue, options)
} }
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): HRHeader { static fromJsonString(
return new HRHeader().fromJsonString(jsonString, options); jsonString: string,
options?: Partial<JsonReadOptions>
): HRHeader {
return new HRHeader().fromJsonString(jsonString, options)
} }
static equals(a: HRHeader | PlainMessage<HRHeader> | undefined, b: HRHeader | PlainMessage<HRHeader> | undefined): boolean { static equals(
return proto3.util.equals(HRHeader, a, b); a: HRHeader | PlainMessage<HRHeader> | undefined,
b: HRHeader | PlainMessage<HRHeader> | undefined
): boolean {
return proto3.util.equals(HRHeader, a, b)
} }
} }
@ -380,33 +492,45 @@ export class HRKeys extends Message<HRKeys> {
/** /**
* @generated from field: repeated HRKey keys = 1; * @generated from field: repeated HRKey keys = 1;
*/ */
keys: HRKey[] = []; keys: HRKey[] = []
constructor(data?: PartialMessage<HRKeys>) { constructor(data?: PartialMessage<HRKeys>) {
super(); super()
proto3.util.initPartial(data, this); proto3.util.initPartial(data, this)
} }
static readonly runtime = proto3; static readonly runtime = proto3
static readonly typeName = "HRKeys"; static readonly typeName = 'HRKeys'
static readonly fields: FieldList = proto3.util.newFieldList(() => [ 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<BinaryReadOptions>): HRKeys { static fromBinary(
return new HRKeys().fromBinary(bytes, options); bytes: Uint8Array,
options?: Partial<BinaryReadOptions>
): HRKeys {
return new HRKeys().fromBinary(bytes, options)
} }
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): HRKeys { static fromJson(
return new HRKeys().fromJson(jsonValue, options); jsonValue: JsonValue,
options?: Partial<JsonReadOptions>
): HRKeys {
return new HRKeys().fromJson(jsonValue, options)
} }
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): HRKeys { static fromJsonString(
return new HRKeys().fromJsonString(jsonString, options); jsonString: string,
options?: Partial<JsonReadOptions>
): HRKeys {
return new HRKeys().fromJsonString(jsonString, options)
} }
static equals(a: HRKeys | PlainMessage<HRKeys> | undefined, b: HRKeys | PlainMessage<HRKeys> | undefined): boolean { static equals(
return proto3.util.equals(HRKeys, a, b); a: HRKeys | PlainMessage<HRKeys> | undefined,
b: HRKeys | PlainMessage<HRKeys> | undefined
): boolean {
return proto3.util.equals(HRKeys, a, b)
} }
} }
@ -417,39 +541,51 @@ export class HRKey extends Message<HRKey> {
/** /**
* @generated from field: uint32 key_id = 1; * @generated from field: uint32 key_id = 1;
*/ */
keyId = 0; keyId = 0
/** /**
* @generated from field: bytes key = 2; * @generated from field: bytes key = 2;
*/ */
key = new Uint8Array(0); key = new Uint8Array(0)
constructor(data?: PartialMessage<HRKey>) { constructor(data?: PartialMessage<HRKey>) {
super(); super()
proto3.util.initPartial(data, this); proto3.util.initPartial(data, this)
} }
static readonly runtime = proto3; static readonly runtime = proto3
static readonly typeName = "HRKey"; static readonly typeName = 'HRKey'
static readonly fields: FieldList = proto3.util.newFieldList(() => [ static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "key_id", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, { no: 1, name: 'key_id', kind: 'scalar', T: 13 /* ScalarType.UINT32 */ },
{ no: 2, name: "key", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, { no: 2, name: 'key', kind: 'scalar', T: 12 /* ScalarType.BYTES */ },
]); ])
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): HRKey { static fromBinary(
return new HRKey().fromBinary(bytes, options); bytes: Uint8Array,
options?: Partial<BinaryReadOptions>
): HRKey {
return new HRKey().fromBinary(bytes, options)
} }
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): HRKey { static fromJson(
return new HRKey().fromJson(jsonValue, options); jsonValue: JsonValue,
options?: Partial<JsonReadOptions>
): HRKey {
return new HRKey().fromJson(jsonValue, options)
} }
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): HRKey { static fromJsonString(
return new HRKey().fromJsonString(jsonString, options); jsonString: string,
options?: Partial<JsonReadOptions>
): HRKey {
return new HRKey().fromJsonString(jsonString, options)
} }
static equals(a: HRKey | PlainMessage<HRKey> | undefined, b: HRKey | PlainMessage<HRKey> | undefined): boolean { static equals(
return proto3.util.equals(HRKey, a, b); a: HRKey | PlainMessage<HRKey> | undefined,
b: HRKey | PlainMessage<HRKey> | undefined
): boolean {
return proto3.util.equals(HRKey, a, b)
} }
} }
@ -462,59 +598,77 @@ export class EncryptedMessageProtocol extends Message<EncryptedMessageProtocol>
/** /**
* @generated from field: X3DHHeader X3DH_header = 1; * @generated from field: X3DHHeader X3DH_header = 1;
*/ */
X3DHHeader?: X3DHHeader; X3DHHeader?: X3DHHeader
/** /**
* @generated from field: DRHeader DR_header = 2; * @generated from field: DRHeader DR_header = 2;
*/ */
DRHeader?: DRHeader; DRHeader?: DRHeader
/** /**
* @generated from field: DHHeader DH_header = 101; * @generated from field: DHHeader DH_header = 101;
*/ */
DHHeader?: DHHeader; DHHeader?: DHHeader
/** /**
* @generated from field: HRHeader HR_header = 102; * @generated from field: HRHeader HR_header = 102;
*/ */
HRHeader?: HRHeader; HRHeader?: HRHeader
/** /**
* Encrypted payload * Encrypted payload
* *
* @generated from field: bytes payload = 3; * @generated from field: bytes payload = 3;
*/ */
payload = new Uint8Array(0); payload = new Uint8Array(0)
constructor(data?: PartialMessage<EncryptedMessageProtocol>) { constructor(data?: PartialMessage<EncryptedMessageProtocol>) {
super(); super()
proto3.util.initPartial(data, this); proto3.util.initPartial(data, this)
} }
static readonly runtime = proto3; static readonly runtime = proto3
static readonly typeName = "EncryptedMessageProtocol"; static readonly typeName = 'EncryptedMessageProtocol'
static readonly fields: FieldList = proto3.util.newFieldList(() => [ static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "X3DH_header", kind: "message", T: X3DHHeader }, { no: 1, name: 'X3DH_header', kind: 'message', T: X3DHHeader },
{ no: 2, name: "DR_header", kind: "message", T: DRHeader }, { no: 2, name: 'DR_header', kind: 'message', T: DRHeader },
{ no: 101, name: "DH_header", kind: "message", T: DHHeader }, { no: 101, name: 'DH_header', kind: 'message', T: DHHeader },
{ no: 102, name: "HR_header", kind: "message", T: HRHeader }, { no: 102, name: 'HR_header', kind: 'message', T: HRHeader },
{ no: 3, name: "payload", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, { no: 3, name: 'payload', kind: 'scalar', T: 12 /* ScalarType.BYTES */ },
]); ])
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): EncryptedMessageProtocol { static fromBinary(
return new EncryptedMessageProtocol().fromBinary(bytes, options); bytes: Uint8Array,
options?: Partial<BinaryReadOptions>
): EncryptedMessageProtocol {
return new EncryptedMessageProtocol().fromBinary(bytes, options)
} }
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): EncryptedMessageProtocol { static fromJson(
return new EncryptedMessageProtocol().fromJson(jsonValue, options); jsonValue: JsonValue,
options?: Partial<JsonReadOptions>
): EncryptedMessageProtocol {
return new EncryptedMessageProtocol().fromJson(jsonValue, options)
} }
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): EncryptedMessageProtocol { static fromJsonString(
return new EncryptedMessageProtocol().fromJsonString(jsonString, options); jsonString: string,
options?: Partial<JsonReadOptions>
): EncryptedMessageProtocol {
return new EncryptedMessageProtocol().fromJsonString(jsonString, options)
} }
static equals(a: EncryptedMessageProtocol | PlainMessage<EncryptedMessageProtocol> | undefined, b: EncryptedMessageProtocol | PlainMessage<EncryptedMessageProtocol> | undefined): boolean { static equals(
return proto3.util.equals(EncryptedMessageProtocol, a, b); a:
| EncryptedMessageProtocol
| PlainMessage<EncryptedMessageProtocol>
| undefined,
b:
| EncryptedMessageProtocol
| PlainMessage<EncryptedMessageProtocol>
| undefined
): boolean {
return proto3.util.equals(EncryptedMessageProtocol, a, b)
} }
} }
@ -529,14 +683,14 @@ export class ProtocolMessage extends Message<ProtocolMessage> {
* *
* @generated from field: string installation_id = 2; * @generated from field: string installation_id = 2;
*/ */
installationId = ""; installationId = ''
/** /**
* List of bundles * List of bundles
* *
* @generated from field: repeated Bundle bundles = 3; * @generated from field: repeated Bundle bundles = 3;
*/ */
bundles: Bundle[] = []; bundles: Bundle[] = []
/** /**
* One to one message, encrypted, indexed by installation_id * One to one message, encrypted, indexed by installation_id
@ -544,43 +698,70 @@ export class ProtocolMessage extends Message<ProtocolMessage> {
* *
* @generated from field: map<string, EncryptedMessageProtocol> encrypted_message = 101; * @generated from field: map<string, EncryptedMessageProtocol> encrypted_message = 101;
*/ */
encryptedMessage: { [key: string]: EncryptedMessageProtocol } = {}; encryptedMessage: { [key: string]: EncryptedMessageProtocol } = {}
/** /**
* Public chats, not encrypted * Public chats, not encrypted
* *
* @generated from field: bytes public_message = 102; * @generated from field: bytes public_message = 102;
*/ */
publicMessage = new Uint8Array(0); publicMessage = new Uint8Array(0)
constructor(data?: PartialMessage<ProtocolMessage>) { constructor(data?: PartialMessage<ProtocolMessage>) {
super(); super()
proto3.util.initPartial(data, this); proto3.util.initPartial(data, this)
} }
static readonly runtime = proto3; static readonly runtime = proto3
static readonly typeName = "ProtocolMessage"; static readonly typeName = 'ProtocolMessage'
static readonly fields: FieldList = proto3.util.newFieldList(() => [ 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: 2,
{ no: 101, name: "encrypted_message", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "message", T: EncryptedMessageProtocol} }, name: 'installation_id',
{ no: 102, name: "public_message", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, 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<BinaryReadOptions>): ProtocolMessage { static fromBinary(
return new ProtocolMessage().fromBinary(bytes, options); bytes: Uint8Array,
options?: Partial<BinaryReadOptions>
): ProtocolMessage {
return new ProtocolMessage().fromBinary(bytes, options)
} }
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ProtocolMessage { static fromJson(
return new ProtocolMessage().fromJson(jsonValue, options); jsonValue: JsonValue,
options?: Partial<JsonReadOptions>
): ProtocolMessage {
return new ProtocolMessage().fromJson(jsonValue, options)
} }
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ProtocolMessage { static fromJsonString(
return new ProtocolMessage().fromJsonString(jsonString, options); jsonString: string,
options?: Partial<JsonReadOptions>
): ProtocolMessage {
return new ProtocolMessage().fromJsonString(jsonString, options)
} }
static equals(a: ProtocolMessage | PlainMessage<ProtocolMessage> | undefined, b: ProtocolMessage | PlainMessage<ProtocolMessage> | undefined): boolean { static equals(
return proto3.util.equals(ProtocolMessage, a, b); a: ProtocolMessage | PlainMessage<ProtocolMessage> | undefined,
b: ProtocolMessage | PlainMessage<ProtocolMessage> | undefined
): boolean {
return proto3.util.equals(ProtocolMessage, a, b)
} }
} }

File diff suppressed because it is too large Load Diff

View File

@ -3,8 +3,15 @@
/* eslint-disable */ /* eslint-disable */
// @ts-nocheck // @ts-nocheck
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; import type {
import { Message, proto3, protoInt64 } from "@bufbuild/protobuf"; BinaryReadOptions,
FieldList,
JsonReadOptions,
JsonValue,
PartialMessage,
PlainMessage,
} from '@bufbuild/protobuf'
import { Message, proto3, protoInt64 } from '@bufbuild/protobuf'
/** /**
* Specs: * Specs:
@ -17,7 +24,7 @@ import { Message, proto3, protoInt64 } from "@bufbuild/protobuf";
* :INACTIVE * :INACTIVE
* To Send - A single "INACTIVE" status ping * To Send - A single "INACTIVE" status ping
* Display - Offline forever * 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 * @generated from message StatusUpdate
*/ */
@ -25,45 +32,67 @@ export class StatusUpdate extends Message<StatusUpdate> {
/** /**
* @generated from field: uint64 clock = 1; * @generated from field: uint64 clock = 1;
*/ */
clock = protoInt64.zero; clock = protoInt64.zero
/** /**
* @generated from field: StatusUpdate.StatusType status_type = 2; * @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; * @generated from field: string custom_text = 3;
*/ */
customText = ""; customText = ''
constructor(data?: PartialMessage<StatusUpdate>) { constructor(data?: PartialMessage<StatusUpdate>) {
super(); super()
proto3.util.initPartial(data, this); proto3.util.initPartial(data, this)
} }
static readonly runtime = proto3; static readonly runtime = proto3
static readonly typeName = "StatusUpdate"; static readonly typeName = 'StatusUpdate'
static readonly fields: FieldList = proto3.util.newFieldList(() => [ static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "clock", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, { 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: 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<BinaryReadOptions>): StatusUpdate { static fromBinary(
return new StatusUpdate().fromBinary(bytes, options); bytes: Uint8Array,
options?: Partial<BinaryReadOptions>
): StatusUpdate {
return new StatusUpdate().fromBinary(bytes, options)
} }
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): StatusUpdate { static fromJson(
return new StatusUpdate().fromJson(jsonValue, options); jsonValue: JsonValue,
options?: Partial<JsonReadOptions>
): StatusUpdate {
return new StatusUpdate().fromJson(jsonValue, options)
} }
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): StatusUpdate { static fromJsonString(
return new StatusUpdate().fromJsonString(jsonString, options); jsonString: string,
options?: Partial<JsonReadOptions>
): StatusUpdate {
return new StatusUpdate().fromJsonString(jsonString, options)
} }
static equals(a: StatusUpdate | PlainMessage<StatusUpdate> | undefined, b: StatusUpdate | PlainMessage<StatusUpdate> | undefined): boolean { static equals(
return proto3.util.equals(StatusUpdate, a, b); a: StatusUpdate | PlainMessage<StatusUpdate> | undefined,
b: StatusUpdate | PlainMessage<StatusUpdate> | undefined
): boolean {
return proto3.util.equals(StatusUpdate, a, b)
} }
} }
@ -97,11 +126,10 @@ export enum StatusUpdate_StatusType {
INACTIVE = 4, INACTIVE = 4,
} }
// Retrieve enum metadata with: proto3.getEnumType(StatusUpdate_StatusType) // Retrieve enum metadata with: proto3.getEnumType(StatusUpdate_StatusType)
proto3.util.setEnumType(StatusUpdate_StatusType, "StatusUpdate.StatusType", [ proto3.util.setEnumType(StatusUpdate_StatusType, 'StatusUpdate.StatusType', [
{ no: 0, name: "UNKNOWN_STATUS_TYPE" }, { no: 0, name: 'UNKNOWN_STATUS_TYPE' },
{ no: 1, name: "AUTOMATIC" }, { no: 1, name: 'AUTOMATIC' },
{ no: 2, name: "DO_NOT_DISTURB" }, { no: 2, name: 'DO_NOT_DISTURB' },
{ no: 3, name: "ALWAYS_ONLINE" }, { no: 3, name: 'ALWAYS_ONLINE' },
{ no: 4, name: "INACTIVE" }, { no: 4, name: 'INACTIVE' },
]); ])

View File

@ -3,8 +3,15 @@
/* eslint-disable */ /* eslint-disable */
// @ts-nocheck // @ts-nocheck
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; import type {
import { Message, proto3 } from "@bufbuild/protobuf"; BinaryReadOptions,
FieldList,
JsonReadOptions,
JsonValue,
PartialMessage,
PlainMessage,
} from '@bufbuild/protobuf'
import { Message, proto3 } from '@bufbuild/protobuf'
/** /**
* @generated from message Community * @generated from message Community
@ -13,57 +20,90 @@ export class Community extends Message<Community> {
/** /**
* @generated from field: string display_name = 1; * @generated from field: string display_name = 1;
*/ */
displayName = ""; displayName = ''
/** /**
* @generated from field: string description = 2; * @generated from field: string description = 2;
*/ */
description = ""; description = ''
/** /**
* @generated from field: uint32 members_count = 3; * @generated from field: uint32 members_count = 3;
*/ */
membersCount = 0; membersCount = 0
/** /**
* @generated from field: string color = 4; * @generated from field: string color = 4;
*/ */
color = ""; color = ''
/** /**
* @generated from field: repeated uint32 tag_indices = 5; * @generated from field: repeated uint32 tag_indices = 5;
*/ */
tagIndices: number[] = []; tagIndices: number[] = []
constructor(data?: PartialMessage<Community>) { constructor(data?: PartialMessage<Community>) {
super(); super()
proto3.util.initPartial(data, this); proto3.util.initPartial(data, this)
} }
static readonly runtime = proto3; static readonly runtime = proto3
static readonly typeName = "Community"; static readonly typeName = 'Community'
static readonly fields: FieldList = proto3.util.newFieldList(() => [ 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: 1,
{ no: 3, name: "members_count", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, name: 'display_name',
{ no: 4, name: "color", kind: "scalar", T: 9 /* ScalarType.STRING */ }, kind: 'scalar',
{ no: 5, name: "tag_indices", kind: "scalar", T: 13 /* ScalarType.UINT32 */, repeated: true }, 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<BinaryReadOptions>): Community { static fromBinary(
return new Community().fromBinary(bytes, options); bytes: Uint8Array,
options?: Partial<BinaryReadOptions>
): Community {
return new Community().fromBinary(bytes, options)
} }
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Community { static fromJson(
return new Community().fromJson(jsonValue, options); jsonValue: JsonValue,
options?: Partial<JsonReadOptions>
): Community {
return new Community().fromJson(jsonValue, options)
} }
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Community { static fromJsonString(
return new Community().fromJsonString(jsonString, options); jsonString: string,
options?: Partial<JsonReadOptions>
): Community {
return new Community().fromJsonString(jsonString, options)
} }
static equals(a: Community | PlainMessage<Community> | undefined, b: Community | PlainMessage<Community> | undefined): boolean { static equals(
return proto3.util.equals(Community, a, b); a: Community | PlainMessage<Community> | undefined,
b: Community | PlainMessage<Community> | undefined
): boolean {
return proto3.util.equals(Community, a, b)
} }
} }
@ -74,63 +114,85 @@ export class Channel extends Message<Channel> {
/** /**
* @generated from field: string display_name = 1; * @generated from field: string display_name = 1;
*/ */
displayName = ""; displayName = ''
/** /**
* @generated from field: string description = 2; * @generated from field: string description = 2;
*/ */
description = ""; description = ''
/** /**
* @generated from field: string emoji = 3; * @generated from field: string emoji = 3;
*/ */
emoji = ""; emoji = ''
/** /**
* @generated from field: string color = 4; * @generated from field: string color = 4;
*/ */
color = ""; color = ''
/** /**
* @generated from field: Community community = 5; * @generated from field: Community community = 5;
*/ */
community?: Community; community?: Community
/** /**
* @generated from field: string uuid = 6; * @generated from field: string uuid = 6;
*/ */
uuid = ""; uuid = ''
constructor(data?: PartialMessage<Channel>) { constructor(data?: PartialMessage<Channel>) {
super(); super()
proto3.util.initPartial(data, this); proto3.util.initPartial(data, this)
} }
static readonly runtime = proto3; static readonly runtime = proto3
static readonly typeName = "Channel"; static readonly typeName = 'Channel'
static readonly fields: FieldList = proto3.util.newFieldList(() => [ 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: 1,
{ no: 3, name: "emoji", kind: "scalar", T: 9 /* ScalarType.STRING */ }, name: 'display_name',
{ no: 4, name: "color", kind: "scalar", T: 9 /* ScalarType.STRING */ }, kind: 'scalar',
{ no: 5, name: "community", kind: "message", T: Community }, T: 9 /* ScalarType.STRING */,
{ no: 6, name: "uuid", 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<BinaryReadOptions>): Channel { static fromBinary(
return new Channel().fromBinary(bytes, options); bytes: Uint8Array,
options?: Partial<BinaryReadOptions>
): Channel {
return new Channel().fromBinary(bytes, options)
} }
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Channel { static fromJson(
return new Channel().fromJson(jsonValue, options); jsonValue: JsonValue,
options?: Partial<JsonReadOptions>
): Channel {
return new Channel().fromJson(jsonValue, options)
} }
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Channel { static fromJsonString(
return new Channel().fromJsonString(jsonString, options); jsonString: string,
options?: Partial<JsonReadOptions>
): Channel {
return new Channel().fromJsonString(jsonString, options)
} }
static equals(a: Channel | PlainMessage<Channel> | undefined, b: Channel | PlainMessage<Channel> | undefined): boolean { static equals(
return proto3.util.equals(Channel, a, b); a: Channel | PlainMessage<Channel> | undefined,
b: Channel | PlainMessage<Channel> | undefined
): boolean {
return proto3.util.equals(Channel, a, b)
} }
} }
@ -141,45 +203,67 @@ export class User extends Message<User> {
/** /**
* @generated from field: string display_name = 1; * @generated from field: string display_name = 1;
*/ */
displayName = ""; displayName = ''
/** /**
* @generated from field: string description = 2; * @generated from field: string description = 2;
*/ */
description = ""; description = ''
/** /**
* @generated from field: string color = 3; * @generated from field: string color = 3;
*/ */
color = ""; color = ''
constructor(data?: PartialMessage<User>) { constructor(data?: PartialMessage<User>) {
super(); super()
proto3.util.initPartial(data, this); proto3.util.initPartial(data, this)
} }
static readonly runtime = proto3; static readonly runtime = proto3
static readonly typeName = "User"; static readonly typeName = 'User'
static readonly fields: FieldList = proto3.util.newFieldList(() => [ 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: 1,
{ no: 3, name: "color", kind: "scalar", T: 9 /* ScalarType.STRING */ }, 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<BinaryReadOptions>): User { static fromBinary(
return new User().fromBinary(bytes, options); bytes: Uint8Array,
options?: Partial<BinaryReadOptions>
): User {
return new User().fromBinary(bytes, options)
} }
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): User { static fromJson(
return new User().fromJson(jsonValue, options); jsonValue: JsonValue,
options?: Partial<JsonReadOptions>
): User {
return new User().fromJson(jsonValue, options)
} }
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): User { static fromJsonString(
return new User().fromJsonString(jsonString, options); jsonString: string,
options?: Partial<JsonReadOptions>
): User {
return new User().fromJsonString(jsonString, options)
} }
static equals(a: User | PlainMessage<User> | undefined, b: User | PlainMessage<User> | undefined): boolean { static equals(
return proto3.util.equals(User, a, b); a: User | PlainMessage<User> | undefined,
b: User | PlainMessage<User> | undefined
): boolean {
return proto3.util.equals(User, a, b)
} }
} }
@ -192,33 +276,45 @@ export class URLData extends Message<URLData> {
* *
* @generated from field: bytes content = 1; * @generated from field: bytes content = 1;
*/ */
content = new Uint8Array(0); content = new Uint8Array(0)
constructor(data?: PartialMessage<URLData>) { constructor(data?: PartialMessage<URLData>) {
super(); super()
proto3.util.initPartial(data, this); proto3.util.initPartial(data, this)
} }
static readonly runtime = proto3; static readonly runtime = proto3
static readonly typeName = "URLData"; static readonly typeName = 'URLData'
static readonly fields: FieldList = proto3.util.newFieldList(() => [ 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<BinaryReadOptions>): URLData { static fromBinary(
return new URLData().fromBinary(bytes, options); bytes: Uint8Array,
options?: Partial<BinaryReadOptions>
): URLData {
return new URLData().fromBinary(bytes, options)
} }
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): URLData { static fromJson(
return new URLData().fromJson(jsonValue, options); jsonValue: JsonValue,
options?: Partial<JsonReadOptions>
): URLData {
return new URLData().fromJson(jsonValue, options)
} }
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): URLData { static fromJsonString(
return new URLData().fromJsonString(jsonString, options); jsonString: string,
options?: Partial<JsonReadOptions>
): URLData {
return new URLData().fromJsonString(jsonString, options)
} }
static equals(a: URLData | PlainMessage<URLData> | undefined, b: URLData | PlainMessage<URLData> | undefined): boolean { static equals(
return proto3.util.equals(URLData, a, b); a: URLData | PlainMessage<URLData> | undefined,
b: URLData | PlainMessage<URLData> | undefined
): boolean {
return proto3.util.equals(URLData, a, b)
} }
} }
@ -229,41 +325,62 @@ export class URLParams extends Message<URLParams> {
/** /**
* @generated from field: string encoded_url_data = 1; * @generated from field: string encoded_url_data = 1;
*/ */
encodedUrlData = ""; encodedUrlData = ''
/** /**
* Signature of encoded URL data * Signature of encoded URL data
* *
* @generated from field: string encoded_signature = 2; * @generated from field: string encoded_signature = 2;
*/ */
encodedSignature = ""; encodedSignature = ''
constructor(data?: PartialMessage<URLParams>) { constructor(data?: PartialMessage<URLParams>) {
super(); super()
proto3.util.initPartial(data, this); proto3.util.initPartial(data, this)
} }
static readonly runtime = proto3; static readonly runtime = proto3
static readonly typeName = "URLParams"; static readonly typeName = 'URLParams'
static readonly fields: FieldList = proto3.util.newFieldList(() => [ 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<BinaryReadOptions>): URLParams { static fromBinary(
return new URLParams().fromBinary(bytes, options); bytes: Uint8Array,
options?: Partial<BinaryReadOptions>
): URLParams {
return new URLParams().fromBinary(bytes, options)
} }
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): URLParams { static fromJson(
return new URLParams().fromJson(jsonValue, options); jsonValue: JsonValue,
options?: Partial<JsonReadOptions>
): URLParams {
return new URLParams().fromJson(jsonValue, options)
} }
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): URLParams { static fromJsonString(
return new URLParams().fromJsonString(jsonString, options); jsonString: string,
options?: Partial<JsonReadOptions>
): URLParams {
return new URLParams().fromJsonString(jsonString, options)
} }
static equals(a: URLParams | PlainMessage<URLParams> | undefined, b: URLParams | PlainMessage<URLParams> | undefined): boolean { static equals(
return proto3.util.equals(URLParams, a, b); a: URLParams | PlainMessage<URLParams> | undefined,
b: URLParams | PlainMessage<URLParams> | undefined
): boolean {
return proto3.util.equals(URLParams, a, b)
} }
} }

View File

@ -14,7 +14,7 @@ const VALID_MULTIBASE_CODES = [
'z', // base58btc 'z', // base58btc
] as const ] 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 * @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) 231, // secp256k1-pub (compressed) (0xe7)
] as const ] 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 * @see https://specs.status.im/spec/2#public-key-serialization for specification