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

View File

@ -3,9 +3,16 @@
/* eslint-disable */
// @ts-nocheck
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto3, protoInt64 } from "@bufbuild/protobuf";
import { ImageType } from "./enums_pb.js";
import type {
BinaryReadOptions,
FieldList,
JsonReadOptions,
JsonValue,
PartialMessage,
PlainMessage,
} from '@bufbuild/protobuf'
import { Message, proto3, protoInt64 } from '@bufbuild/protobuf'
import { ImageType } from './enums_pb.js'
/**
* ChatIdentity represents the user defined identity associated with their public chat key
@ -18,50 +25,50 @@ export class ChatIdentity extends Message<ChatIdentity> {
*
* @generated from field: uint64 clock = 1;
*/
clock = protoInt64.zero;
clock = protoInt64.zero
/**
* ens_name is the valid ENS name associated with the chat key
*
* @generated from field: string ens_name = 2;
*/
ensName = "";
ensName = ''
/**
* images is a string indexed mapping of images associated with an identity
*
* @generated from field: map<string, IdentityImage> images = 3;
*/
images: { [key: string]: IdentityImage } = {};
images: { [key: string]: IdentityImage } = {}
/**
* display name is the user set identity
*
* @generated from field: string display_name = 4;
*/
displayName = "";
displayName = ''
/**
* description is the user set description
*
* @generated from field: string description = 5;
*/
description = "";
description = ''
/**
* @generated from field: string color = 6;
*/
color = "";
color = ''
/**
* @generated from field: string emoji = 7;
*/
emoji = "";
emoji = ''
/**
* @generated from field: repeated SocialLink social_links = 8;
*/
socialLinks: SocialLink[] = [];
socialLinks: SocialLink[] = []
/**
* first known message timestamp in seconds (valid only for community chats for now)
@ -70,41 +77,80 @@ export class ChatIdentity extends Message<ChatIdentity> {
*
* @generated from field: uint32 first_message_timestamp = 9;
*/
firstMessageTimestamp = 0;
firstMessageTimestamp = 0
constructor(data?: PartialMessage<ChatIdentity>) {
super();
proto3.util.initPartial(data, this);
super()
proto3.util.initPartial(data, this)
}
static readonly runtime = proto3;
static readonly typeName = "ChatIdentity";
static readonly runtime = proto3
static readonly typeName = 'ChatIdentity'
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "clock", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
{ no: 2, name: "ens_name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 3, name: "images", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "message", T: IdentityImage} },
{ no: 4, name: "display_name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 5, name: "description", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 6, name: "color", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 7, name: "emoji", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 8, name: "social_links", kind: "message", T: SocialLink, repeated: true },
{ no: 9, name: "first_message_timestamp", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
]);
{ no: 1, name: 'clock', kind: 'scalar', T: 4 /* ScalarType.UINT64 */ },
{ no: 2, name: 'ens_name', kind: 'scalar', T: 9 /* ScalarType.STRING */ },
{
no: 3,
name: 'images',
kind: 'map',
K: 9 /* ScalarType.STRING */,
V: { kind: 'message', T: IdentityImage },
},
{
no: 4,
name: 'display_name',
kind: 'scalar',
T: 9 /* ScalarType.STRING */,
},
{
no: 5,
name: 'description',
kind: 'scalar',
T: 9 /* ScalarType.STRING */,
},
{ no: 6, name: 'color', kind: 'scalar', T: 9 /* ScalarType.STRING */ },
{ no: 7, name: 'emoji', kind: 'scalar', T: 9 /* ScalarType.STRING */ },
{
no: 8,
name: 'social_links',
kind: 'message',
T: SocialLink,
repeated: true,
},
{
no: 9,
name: 'first_message_timestamp',
kind: 'scalar',
T: 13 /* ScalarType.UINT32 */,
},
])
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ChatIdentity {
return new ChatIdentity().fromBinary(bytes, options);
static fromBinary(
bytes: Uint8Array,
options?: Partial<BinaryReadOptions>
): ChatIdentity {
return new ChatIdentity().fromBinary(bytes, options)
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ChatIdentity {
return new ChatIdentity().fromJson(jsonValue, options);
static fromJson(
jsonValue: JsonValue,
options?: Partial<JsonReadOptions>
): ChatIdentity {
return new ChatIdentity().fromJson(jsonValue, options)
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ChatIdentity {
return new ChatIdentity().fromJsonString(jsonString, options);
static fromJsonString(
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 {
return proto3.util.equals(ChatIdentity, a, b);
static equals(
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;
*/
payload = new Uint8Array(0);
payload = new Uint8Array(0)
/**
* source_type signals the image payload source
*
* @generated from field: IdentityImage.SourceType source_type = 2;
*/
sourceType = IdentityImage_SourceType.UNKNOWN_SOURCE_TYPE;
sourceType = IdentityImage_SourceType.UNKNOWN_SOURCE_TYPE
/**
* image_type signals the image type and method of parsing the payload
*
* @generated from field: ImageType image_type = 3;
*/
imageType = ImageType.UNKNOWN_IMAGE_TYPE;
imageType = ImageType.UNKNOWN_IMAGE_TYPE
/**
* encryption_keys is a list of encrypted keys that can be used to decrypted an encrypted payload
*
* @generated from field: repeated bytes encryption_keys = 4;
*/
encryptionKeys: Uint8Array[] = [];
encryptionKeys: Uint8Array[] = []
/**
* encrypted signals the encryption state of the payload, default is false.
*
* @generated from field: bool encrypted = 5;
*/
encrypted = false;
encrypted = false
constructor(data?: PartialMessage<IdentityImage>) {
super();
proto3.util.initPartial(data, this);
super()
proto3.util.initPartial(data, this)
}
static readonly runtime = proto3;
static readonly typeName = "IdentityImage";
static readonly runtime = proto3
static readonly typeName = 'IdentityImage'
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "payload", kind: "scalar", T: 12 /* ScalarType.BYTES */ },
{ no: 2, name: "source_type", kind: "enum", T: proto3.getEnumType(IdentityImage_SourceType) },
{ no: 3, name: "image_type", kind: "enum", T: proto3.getEnumType(ImageType) },
{ no: 4, name: "encryption_keys", kind: "scalar", T: 12 /* ScalarType.BYTES */, repeated: true },
{ no: 5, name: "encrypted", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
]);
{ no: 1, name: 'payload', kind: 'scalar', T: 12 /* ScalarType.BYTES */ },
{
no: 2,
name: 'source_type',
kind: 'enum',
T: proto3.getEnumType(IdentityImage_SourceType),
},
{
no: 3,
name: 'image_type',
kind: 'enum',
T: proto3.getEnumType(ImageType),
},
{
no: 4,
name: 'encryption_keys',
kind: 'scalar',
T: 12 /* ScalarType.BYTES */,
repeated: true,
},
{ no: 5, name: 'encrypted', kind: 'scalar', T: 8 /* ScalarType.BOOL */ },
])
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): IdentityImage {
return new IdentityImage().fromBinary(bytes, options);
static fromBinary(
bytes: Uint8Array,
options?: Partial<BinaryReadOptions>
): IdentityImage {
return new IdentityImage().fromBinary(bytes, options)
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): IdentityImage {
return new IdentityImage().fromJson(jsonValue, options);
static fromJson(
jsonValue: JsonValue,
options?: Partial<JsonReadOptions>
): IdentityImage {
return new IdentityImage().fromJson(jsonValue, options)
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): IdentityImage {
return new IdentityImage().fromJsonString(jsonString, options);
static fromJsonString(
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 {
return proto3.util.equals(IdentityImage, a, b);
static equals(
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,
}
// Retrieve enum metadata with: proto3.getEnumType(IdentityImage_SourceType)
proto3.util.setEnumType(IdentityImage_SourceType, "IdentityImage.SourceType", [
{ no: 0, name: "UNKNOWN_SOURCE_TYPE" },
{ no: 1, name: "RAW_PAYLOAD" },
{ no: 2, name: "ENS_AVATAR" },
]);
proto3.util.setEnumType(IdentityImage_SourceType, 'IdentityImage.SourceType', [
{ no: 0, name: 'UNKNOWN_SOURCE_TYPE' },
{ no: 1, name: 'RAW_PAYLOAD' },
{ no: 2, name: 'ENS_AVATAR' },
])
/**
* SocialLinks represents social link assosiated with given chat identity (personal/community)
@ -226,39 +300,50 @@ export class SocialLink extends Message<SocialLink> {
/**
* @generated from field: string text = 1;
*/
text = "";
text = ''
/**
* @generated from field: string url = 2;
*/
url = "";
url = ''
constructor(data?: PartialMessage<SocialLink>) {
super();
proto3.util.initPartial(data, this);
super()
proto3.util.initPartial(data, this)
}
static readonly runtime = proto3;
static readonly typeName = "SocialLink";
static readonly runtime = proto3
static readonly typeName = 'SocialLink'
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "text", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "url", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
{ no: 1, name: 'text', kind: 'scalar', T: 9 /* ScalarType.STRING */ },
{ no: 2, name: 'url', kind: 'scalar', T: 9 /* ScalarType.STRING */ },
])
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SocialLink {
return new SocialLink().fromBinary(bytes, options);
static fromBinary(
bytes: Uint8Array,
options?: Partial<BinaryReadOptions>
): SocialLink {
return new SocialLink().fromBinary(bytes, options)
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SocialLink {
return new SocialLink().fromJson(jsonValue, options);
static fromJson(
jsonValue: JsonValue,
options?: Partial<JsonReadOptions>
): SocialLink {
return new SocialLink().fromJson(jsonValue, options)
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SocialLink {
return new SocialLink().fromJsonString(jsonString, options);
static fromJsonString(
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 {
return proto3.util.equals(SocialLink, a, b);
static equals(
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 */
// @ts-nocheck
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto3, protoInt64 } from "@bufbuild/protobuf";
import { ImageType, MessageType } from "./enums_pb.js";
import type {
BinaryReadOptions,
FieldList,
JsonReadOptions,
JsonValue,
PartialMessage,
PlainMessage,
} from '@bufbuild/protobuf'
import { Message, proto3, protoInt64 } from '@bufbuild/protobuf'
import { ImageType, MessageType } from './enums_pb.js'
/**
* @generated from message StickerMessage
@ -14,39 +21,51 @@ export class StickerMessage extends Message<StickerMessage> {
/**
* @generated from field: string hash = 1;
*/
hash = "";
hash = ''
/**
* @generated from field: int32 pack = 2;
*/
pack = 0;
pack = 0
constructor(data?: PartialMessage<StickerMessage>) {
super();
proto3.util.initPartial(data, this);
super()
proto3.util.initPartial(data, this)
}
static readonly runtime = proto3;
static readonly typeName = "StickerMessage";
static readonly runtime = proto3
static readonly typeName = 'StickerMessage'
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "hash", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "pack", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
]);
{ no: 1, name: 'hash', kind: 'scalar', T: 9 /* ScalarType.STRING */ },
{ no: 2, name: 'pack', kind: 'scalar', T: 5 /* ScalarType.INT32 */ },
])
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): StickerMessage {
return new StickerMessage().fromBinary(bytes, options);
static fromBinary(
bytes: Uint8Array,
options?: Partial<BinaryReadOptions>
): StickerMessage {
return new StickerMessage().fromBinary(bytes, options)
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): StickerMessage {
return new StickerMessage().fromJson(jsonValue, options);
static fromJson(
jsonValue: JsonValue,
options?: Partial<JsonReadOptions>
): StickerMessage {
return new StickerMessage().fromJson(jsonValue, options)
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): StickerMessage {
return new StickerMessage().fromJsonString(jsonString, options);
static fromJsonString(
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 {
return proto3.util.equals(StickerMessage, a, b);
static equals(
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;
*/
payload = new Uint8Array(0);
payload = new Uint8Array(0)
/**
* @generated from field: ImageType type = 2;
*/
type = ImageType.UNKNOWN_IMAGE_TYPE;
type = ImageType.UNKNOWN_IMAGE_TYPE
constructor(data?: PartialMessage<ImageMessage>) {
super();
proto3.util.initPartial(data, this);
super()
proto3.util.initPartial(data, this)
}
static readonly runtime = proto3;
static readonly typeName = "ImageMessage";
static readonly runtime = proto3
static readonly typeName = 'ImageMessage'
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "payload", kind: "scalar", T: 12 /* ScalarType.BYTES */ },
{ no: 2, name: "type", kind: "enum", T: proto3.getEnumType(ImageType) },
]);
{ no: 1, name: 'payload', kind: 'scalar', T: 12 /* ScalarType.BYTES */ },
{ no: 2, name: 'type', kind: 'enum', T: proto3.getEnumType(ImageType) },
])
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ImageMessage {
return new ImageMessage().fromBinary(bytes, options);
static fromBinary(
bytes: Uint8Array,
options?: Partial<BinaryReadOptions>
): ImageMessage {
return new ImageMessage().fromBinary(bytes, options)
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ImageMessage {
return new ImageMessage().fromJson(jsonValue, options);
static fromJson(
jsonValue: JsonValue,
options?: Partial<JsonReadOptions>
): ImageMessage {
return new ImageMessage().fromJson(jsonValue, options)
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ImageMessage {
return new ImageMessage().fromJsonString(jsonString, options);
static fromJsonString(
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 {
return proto3.util.equals(ImageMessage, a, b);
static equals(
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;
*/
payload = new Uint8Array(0);
payload = new Uint8Array(0)
/**
* @generated from field: AudioMessage.AudioType type = 2;
*/
type = AudioMessage_AudioType.UNKNOWN_AUDIO_TYPE;
type = AudioMessage_AudioType.UNKNOWN_AUDIO_TYPE
/**
* @generated from field: uint64 duration_ms = 3;
*/
durationMs = protoInt64.zero;
durationMs = protoInt64.zero
constructor(data?: PartialMessage<AudioMessage>) {
super();
proto3.util.initPartial(data, this);
super()
proto3.util.initPartial(data, this)
}
static readonly runtime = proto3;
static readonly typeName = "AudioMessage";
static readonly runtime = proto3
static readonly typeName = 'AudioMessage'
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "payload", kind: "scalar", T: 12 /* ScalarType.BYTES */ },
{ no: 2, name: "type", kind: "enum", T: proto3.getEnumType(AudioMessage_AudioType) },
{ no: 3, name: "duration_ms", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
]);
{ no: 1, name: 'payload', kind: 'scalar', T: 12 /* ScalarType.BYTES */ },
{
no: 2,
name: 'type',
kind: 'enum',
T: proto3.getEnumType(AudioMessage_AudioType),
},
{
no: 3,
name: 'duration_ms',
kind: 'scalar',
T: 4 /* ScalarType.UINT64 */,
},
])
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): AudioMessage {
return new AudioMessage().fromBinary(bytes, options);
static fromBinary(
bytes: Uint8Array,
options?: Partial<BinaryReadOptions>
): AudioMessage {
return new AudioMessage().fromBinary(bytes, options)
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): AudioMessage {
return new AudioMessage().fromJson(jsonValue, options);
static fromJson(
jsonValue: JsonValue,
options?: Partial<JsonReadOptions>
): AudioMessage {
return new AudioMessage().fromJson(jsonValue, options)
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): AudioMessage {
return new AudioMessage().fromJsonString(jsonString, options);
static fromJsonString(
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 {
return proto3.util.equals(AudioMessage, a, b);
static equals(
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,
}
// Retrieve enum metadata with: proto3.getEnumType(AudioMessage_AudioType)
proto3.util.setEnumType(AudioMessage_AudioType, "AudioMessage.AudioType", [
{ no: 0, name: "UNKNOWN_AUDIO_TYPE" },
{ no: 1, name: "AAC" },
{ no: 2, name: "AMR" },
]);
proto3.util.setEnumType(AudioMessage_AudioType, 'AudioMessage.AudioType', [
{ no: 0, name: 'UNKNOWN_AUDIO_TYPE' },
{ no: 1, name: 'AAC' },
{ no: 2, name: 'AMR' },
])
/**
* @generated from message EditMessage
@ -175,69 +228,86 @@ export class EditMessage extends Message<EditMessage> {
/**
* @generated from field: uint64 clock = 1;
*/
clock = protoInt64.zero;
clock = protoInt64.zero
/**
* Text of the message
*
* @generated from field: string text = 2;
*/
text = "";
text = ''
/**
* @generated from field: string chat_id = 3;
*/
chatId = "";
chatId = ''
/**
* @generated from field: string message_id = 4;
*/
messageId = "";
messageId = ''
/**
* Grant for community edit messages
*
* @generated from field: bytes grant = 5;
*/
grant = new Uint8Array(0);
grant = new Uint8Array(0)
/**
* The type of message (public/one-to-one/private-group-chat)
*
* @generated from field: MessageType message_type = 6;
*/
messageType = MessageType.UNKNOWN_MESSAGE_TYPE;
messageType = MessageType.UNKNOWN_MESSAGE_TYPE
constructor(data?: PartialMessage<EditMessage>) {
super();
proto3.util.initPartial(data, this);
super()
proto3.util.initPartial(data, this)
}
static readonly runtime = proto3;
static readonly typeName = "EditMessage";
static readonly runtime = proto3
static readonly typeName = 'EditMessage'
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "clock", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
{ no: 2, name: "text", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 3, name: "chat_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 4, name: "message_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 5, name: "grant", kind: "scalar", T: 12 /* ScalarType.BYTES */ },
{ no: 6, name: "message_type", kind: "enum", T: proto3.getEnumType(MessageType) },
]);
{ no: 1, name: 'clock', kind: 'scalar', T: 4 /* ScalarType.UINT64 */ },
{ no: 2, name: 'text', kind: 'scalar', T: 9 /* ScalarType.STRING */ },
{ no: 3, name: 'chat_id', kind: 'scalar', T: 9 /* ScalarType.STRING */ },
{ no: 4, name: 'message_id', kind: 'scalar', T: 9 /* ScalarType.STRING */ },
{ no: 5, name: 'grant', kind: 'scalar', T: 12 /* ScalarType.BYTES */ },
{
no: 6,
name: 'message_type',
kind: 'enum',
T: proto3.getEnumType(MessageType),
},
])
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): EditMessage {
return new EditMessage().fromBinary(bytes, options);
static fromBinary(
bytes: Uint8Array,
options?: Partial<BinaryReadOptions>
): EditMessage {
return new EditMessage().fromBinary(bytes, options)
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): EditMessage {
return new EditMessage().fromJson(jsonValue, options);
static fromJson(
jsonValue: JsonValue,
options?: Partial<JsonReadOptions>
): EditMessage {
return new EditMessage().fromJson(jsonValue, options)
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): EditMessage {
return new EditMessage().fromJsonString(jsonString, options);
static fromJsonString(
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 {
return proto3.util.equals(EditMessage, a, b);
static equals(
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;
*/
clock = protoInt64.zero;
clock = protoInt64.zero
/**
* @generated from field: string chat_id = 2;
*/
chatId = "";
chatId = ''
/**
* @generated from field: string message_id = 3;
*/
messageId = "";
messageId = ''
/**
* Grant for community delete messages
*
* @generated from field: bytes grant = 4;
*/
grant = new Uint8Array(0);
grant = new Uint8Array(0)
/**
* The type of message (public/one-to-one/private-group-chat)
*
* @generated from field: MessageType message_type = 5;
*/
messageType = MessageType.UNKNOWN_MESSAGE_TYPE;
messageType = MessageType.UNKNOWN_MESSAGE_TYPE
constructor(data?: PartialMessage<DeleteMessage>) {
super();
proto3.util.initPartial(data, this);
super()
proto3.util.initPartial(data, this)
}
static readonly runtime = proto3;
static readonly typeName = "DeleteMessage";
static readonly runtime = proto3
static readonly typeName = 'DeleteMessage'
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "clock", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
{ no: 2, name: "chat_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 3, name: "message_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 4, name: "grant", kind: "scalar", T: 12 /* ScalarType.BYTES */ },
{ no: 5, name: "message_type", kind: "enum", T: proto3.getEnumType(MessageType) },
]);
{ no: 1, name: 'clock', kind: 'scalar', T: 4 /* ScalarType.UINT64 */ },
{ no: 2, name: 'chat_id', kind: 'scalar', T: 9 /* ScalarType.STRING */ },
{ no: 3, name: 'message_id', kind: 'scalar', T: 9 /* ScalarType.STRING */ },
{ no: 4, name: 'grant', kind: 'scalar', T: 12 /* ScalarType.BYTES */ },
{
no: 5,
name: 'message_type',
kind: 'enum',
T: proto3.getEnumType(MessageType),
},
])
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): DeleteMessage {
return new DeleteMessage().fromBinary(bytes, options);
static fromBinary(
bytes: Uint8Array,
options?: Partial<BinaryReadOptions>
): DeleteMessage {
return new DeleteMessage().fromBinary(bytes, options)
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): DeleteMessage {
return new DeleteMessage().fromJson(jsonValue, options);
static fromJson(
jsonValue: JsonValue,
options?: Partial<JsonReadOptions>
): DeleteMessage {
return new DeleteMessage().fromJson(jsonValue, options)
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): DeleteMessage {
return new DeleteMessage().fromJsonString(jsonString, options);
static fromJsonString(
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 {
return proto3.util.equals(DeleteMessage, a, b);
static equals(
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;
*/
clock = protoInt64.zero;
clock = protoInt64.zero
/**
* Unix timestamps in milliseconds, currently not used as we use whisper as more reliable, but here
@ -323,28 +410,28 @@ export class ChatMessage extends Message<ChatMessage> {
*
* @generated from field: uint64 timestamp = 2;
*/
timestamp = protoInt64.zero;
timestamp = protoInt64.zero
/**
* Text of the message
*
* @generated from field: string text = 3;
*/
text = "";
text = ''
/**
* Id of the message that we are replying to
*
* @generated from field: string response_to = 4;
*/
responseTo = "";
responseTo = ''
/**
* Ens name of the sender
*
* @generated from field: string ens_name = 5;
*/
ensName = "";
ensName = ''
/**
* Chat id, this field is symmetric for public-chats and private group chats,
@ -354,103 +441,164 @@ export class ChatMessage extends Message<ChatMessage> {
*
* @generated from field: string chat_id = 6;
*/
chatId = "";
chatId = ''
/**
* The type of message (public/one-to-one/private-group-chat)
*
* @generated from field: MessageType message_type = 7;
*/
messageType = MessageType.UNKNOWN_MESSAGE_TYPE;
messageType = MessageType.UNKNOWN_MESSAGE_TYPE
/**
* The type of the content of the message
*
* @generated from field: ChatMessage.ContentType content_type = 8;
*/
contentType = ChatMessage_ContentType.UNKNOWN_CONTENT_TYPE;
contentType = ChatMessage_ContentType.UNKNOWN_CONTENT_TYPE
/**
* @generated from oneof ChatMessage.payload
*/
payload: {
payload:
| {
/**
* @generated from field: StickerMessage sticker = 9;
*/
value: StickerMessage;
case: "sticker";
} | {
value: StickerMessage
case: 'sticker'
}
| {
/**
* @generated from field: ImageMessage image = 10;
*/
value: ImageMessage;
case: "image";
} | {
value: ImageMessage
case: 'image'
}
| {
/**
* @generated from field: AudioMessage audio = 11;
*/
value: AudioMessage;
case: "audio";
} | {
value: AudioMessage
case: 'audio'
}
| {
/**
* @generated from field: bytes community = 12;
*/
value: Uint8Array;
case: "community";
} | { case: undefined; value?: undefined } = { case: undefined };
value: Uint8Array
case: 'community'
}
| { case: undefined; value?: undefined } = { case: undefined }
/**
* Grant for community chat messages
*
* @generated from field: bytes grant = 13;
*/
grant = new Uint8Array(0);
grant = new Uint8Array(0)
/**
* Message author's display name, introduced in version 1
*
* @generated from field: string display_name = 14;
*/
displayName = "";
displayName = ''
constructor(data?: PartialMessage<ChatMessage>) {
super();
proto3.util.initPartial(data, this);
super()
proto3.util.initPartial(data, this)
}
static readonly runtime = proto3;
static readonly typeName = "ChatMessage";
static readonly runtime = proto3
static readonly typeName = 'ChatMessage'
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "clock", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
{ no: 2, name: "timestamp", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
{ no: 3, name: "text", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 4, name: "response_to", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 5, name: "ens_name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 6, name: "chat_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 7, name: "message_type", kind: "enum", T: proto3.getEnumType(MessageType) },
{ no: 8, name: "content_type", kind: "enum", T: proto3.getEnumType(ChatMessage_ContentType) },
{ no: 9, name: "sticker", kind: "message", T: StickerMessage, oneof: "payload" },
{ no: 10, name: "image", kind: "message", T: ImageMessage, oneof: "payload" },
{ no: 11, name: "audio", kind: "message", T: AudioMessage, oneof: "payload" },
{ no: 12, name: "community", kind: "scalar", T: 12 /* ScalarType.BYTES */, oneof: "payload" },
{ no: 13, name: "grant", kind: "scalar", T: 12 /* ScalarType.BYTES */ },
{ no: 14, name: "display_name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
{ no: 1, name: 'clock', kind: 'scalar', T: 4 /* ScalarType.UINT64 */ },
{ no: 2, name: 'timestamp', kind: 'scalar', T: 4 /* ScalarType.UINT64 */ },
{ no: 3, name: 'text', kind: 'scalar', T: 9 /* ScalarType.STRING */ },
{
no: 4,
name: 'response_to',
kind: 'scalar',
T: 9 /* ScalarType.STRING */,
},
{ no: 5, name: 'ens_name', kind: 'scalar', T: 9 /* ScalarType.STRING */ },
{ no: 6, name: 'chat_id', kind: 'scalar', T: 9 /* ScalarType.STRING */ },
{
no: 7,
name: 'message_type',
kind: 'enum',
T: proto3.getEnumType(MessageType),
},
{
no: 8,
name: 'content_type',
kind: 'enum',
T: proto3.getEnumType(ChatMessage_ContentType),
},
{
no: 9,
name: 'sticker',
kind: 'message',
T: StickerMessage,
oneof: 'payload',
},
{
no: 10,
name: 'image',
kind: 'message',
T: ImageMessage,
oneof: 'payload',
},
{
no: 11,
name: 'audio',
kind: 'message',
T: AudioMessage,
oneof: 'payload',
},
{
no: 12,
name: 'community',
kind: 'scalar',
T: 12 /* ScalarType.BYTES */,
oneof: 'payload',
},
{ no: 13, name: 'grant', kind: 'scalar', T: 12 /* ScalarType.BYTES */ },
{
no: 14,
name: 'display_name',
kind: 'scalar',
T: 9 /* ScalarType.STRING */,
},
])
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ChatMessage {
return new ChatMessage().fromBinary(bytes, options);
static fromBinary(
bytes: Uint8Array,
options?: Partial<BinaryReadOptions>
): ChatMessage {
return new ChatMessage().fromBinary(bytes, options)
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ChatMessage {
return new ChatMessage().fromJson(jsonValue, options);
static fromJson(
jsonValue: JsonValue,
options?: Partial<JsonReadOptions>
): ChatMessage {
return new ChatMessage().fromJson(jsonValue, options)
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ChatMessage {
return new ChatMessage().fromJsonString(jsonString, options);
static fromJsonString(
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 {
return proto3.util.equals(ChatMessage, a, b);
static equals(
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,
}
// Retrieve enum metadata with: proto3.getEnumType(ChatMessage_ContentType)
proto3.util.setEnumType(ChatMessage_ContentType, "ChatMessage.ContentType", [
{ no: 0, name: "UNKNOWN_CONTENT_TYPE" },
{ no: 1, name: "TEXT_PLAIN" },
{ no: 2, name: "STICKER" },
{ no: 3, name: "STATUS" },
{ no: 4, name: "EMOJI" },
{ no: 5, name: "TRANSACTION_COMMAND" },
{ no: 6, name: "SYSTEM_MESSAGE_CONTENT_PRIVATE_GROUP" },
{ no: 7, name: "IMAGE" },
{ no: 8, name: "AUDIO" },
{ no: 9, name: "COMMUNITY" },
{ no: 10, name: "SYSTEM_MESSAGE_GAP" },
]);
proto3.util.setEnumType(ChatMessage_ContentType, 'ChatMessage.ContentType', [
{ no: 0, name: 'UNKNOWN_CONTENT_TYPE' },
{ no: 1, name: 'TEXT_PLAIN' },
{ no: 2, name: 'STICKER' },
{ no: 3, name: 'STATUS' },
{ no: 4, name: 'EMOJI' },
{ no: 5, name: 'TRANSACTION_COMMAND' },
{ no: 6, name: 'SYSTEM_MESSAGE_CONTENT_PRIVATE_GROUP' },
{ no: 7, name: 'IMAGE' },
{ no: 8, name: 'AUDIO' },
{ no: 9, name: 'COMMUNITY' },
{ no: 10, name: 'SYSTEM_MESSAGE_GAP' },
])

File diff suppressed because it is too large Load Diff

View File

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

View File

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

View File

@ -3,10 +3,17 @@
/* eslint-disable */
// @ts-nocheck
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto3, protoInt64 } from "@bufbuild/protobuf";
import { ChatMessage } from "./chat-message_pb.js";
import { EmojiReaction } from "./emoji-reaction_pb.js";
import type {
BinaryReadOptions,
FieldList,
JsonReadOptions,
JsonValue,
PartialMessage,
PlainMessage,
} from '@bufbuild/protobuf'
import { Message, proto3, protoInt64 } from '@bufbuild/protobuf'
import { ChatMessage } from './chat-message_pb.js'
import { EmojiReaction } from './emoji-reaction_pb.js'
/**
* @generated from message MembershipUpdateEvent
@ -17,57 +24,80 @@ export class MembershipUpdateEvent extends Message<MembershipUpdateEvent> {
*
* @generated from field: uint64 clock = 1;
*/
clock = protoInt64.zero;
clock = protoInt64.zero
/**
* List of public keys of objects of the action
*
* @generated from field: repeated string members = 2;
*/
members: string[] = [];
members: string[] = []
/**
* Name of the chat for the CHAT_CREATED/NAME_CHANGED event types
*
* @generated from field: string name = 3;
*/
name = "";
name = ''
/**
* The type of the event
*
* @generated from field: MembershipUpdateEvent.EventType type = 4;
*/
type = MembershipUpdateEvent_EventType.UNKNOWN;
type = MembershipUpdateEvent_EventType.UNKNOWN
constructor(data?: PartialMessage<MembershipUpdateEvent>) {
super();
proto3.util.initPartial(data, this);
super()
proto3.util.initPartial(data, this)
}
static readonly runtime = proto3;
static readonly typeName = "MembershipUpdateEvent";
static readonly runtime = proto3
static readonly typeName = 'MembershipUpdateEvent'
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "clock", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
{ no: 2, name: "members", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
{ no: 3, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 4, name: "type", kind: "enum", T: proto3.getEnumType(MembershipUpdateEvent_EventType) },
]);
{ no: 1, name: 'clock', kind: 'scalar', T: 4 /* ScalarType.UINT64 */ },
{
no: 2,
name: 'members',
kind: 'scalar',
T: 9 /* ScalarType.STRING */,
repeated: true,
},
{ no: 3, name: 'name', kind: 'scalar', T: 9 /* ScalarType.STRING */ },
{
no: 4,
name: 'type',
kind: 'enum',
T: proto3.getEnumType(MembershipUpdateEvent_EventType),
},
])
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): MembershipUpdateEvent {
return new MembershipUpdateEvent().fromBinary(bytes, options);
static fromBinary(
bytes: Uint8Array,
options?: Partial<BinaryReadOptions>
): MembershipUpdateEvent {
return new MembershipUpdateEvent().fromBinary(bytes, options)
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): MembershipUpdateEvent {
return new MembershipUpdateEvent().fromJson(jsonValue, options);
static fromJson(
jsonValue: JsonValue,
options?: Partial<JsonReadOptions>
): MembershipUpdateEvent {
return new MembershipUpdateEvent().fromJson(jsonValue, options)
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): MembershipUpdateEvent {
return new MembershipUpdateEvent().fromJsonString(jsonString, options);
static fromJsonString(
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 {
return proto3.util.equals(MembershipUpdateEvent, a, b);
static equals(
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,
}
// Retrieve enum metadata with: proto3.getEnumType(MembershipUpdateEvent_EventType)
proto3.util.setEnumType(MembershipUpdateEvent_EventType, "MembershipUpdateEvent.EventType", [
{ no: 0, name: "UNKNOWN" },
{ no: 1, name: "CHAT_CREATED" },
{ no: 2, name: "NAME_CHANGED" },
{ no: 3, name: "MEMBERS_ADDED" },
{ no: 4, name: "MEMBER_JOINED" },
{ no: 5, name: "MEMBER_REMOVED" },
{ no: 6, name: "ADMINS_ADDED" },
{ no: 7, name: "ADMIN_REMOVED" },
]);
proto3.util.setEnumType(
MembershipUpdateEvent_EventType,
'MembershipUpdateEvent.EventType',
[
{ no: 0, name: 'UNKNOWN' },
{ no: 1, name: 'CHAT_CREATED' },
{ no: 2, name: 'NAME_CHANGED' },
{ no: 3, name: 'MEMBERS_ADDED' },
{ no: 4, name: 'MEMBER_JOINED' },
{ no: 5, name: 'MEMBER_REMOVED' },
{ no: 6, name: 'ADMINS_ADDED' },
{ no: 7, name: 'ADMIN_REMOVED' },
]
)
/**
* MembershipUpdateMessage is a message used to propagate information
@ -140,7 +174,7 @@ export class MembershipUpdateMessage extends Message<MembershipUpdateMessage> {
*
* @generated from field: string chat_id = 1;
*/
chatId = "";
chatId = ''
/**
* A list of events for this group chat, first x bytes are the signature, then is a
@ -148,55 +182,93 @@ export class MembershipUpdateMessage extends Message<MembershipUpdateMessage> {
*
* @generated from field: repeated bytes events = 2;
*/
events: Uint8Array[] = [];
events: Uint8Array[] = []
/**
* An optional chat message
*
* @generated from oneof MembershipUpdateMessage.chat_entity
*/
chatEntity: {
chatEntity:
| {
/**
* @generated from field: ChatMessage message = 3;
*/
value: ChatMessage;
case: "message";
} | {
value: ChatMessage
case: 'message'
}
| {
/**
* @generated from field: EmojiReaction emoji_reaction = 4;
*/
value: EmojiReaction;
case: "emojiReaction";
} | { case: undefined; value?: undefined } = { case: undefined };
value: EmojiReaction
case: 'emojiReaction'
}
| { case: undefined; value?: undefined } = { case: undefined }
constructor(data?: PartialMessage<MembershipUpdateMessage>) {
super();
proto3.util.initPartial(data, this);
super()
proto3.util.initPartial(data, this)
}
static readonly runtime = proto3;
static readonly typeName = "MembershipUpdateMessage";
static readonly runtime = proto3
static readonly typeName = 'MembershipUpdateMessage'
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "chat_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "events", kind: "scalar", T: 12 /* ScalarType.BYTES */, repeated: true },
{ no: 3, name: "message", kind: "message", T: ChatMessage, oneof: "chat_entity" },
{ no: 4, name: "emoji_reaction", kind: "message", T: EmojiReaction, oneof: "chat_entity" },
]);
{ no: 1, name: 'chat_id', kind: 'scalar', T: 9 /* ScalarType.STRING */ },
{
no: 2,
name: 'events',
kind: 'scalar',
T: 12 /* ScalarType.BYTES */,
repeated: true,
},
{
no: 3,
name: 'message',
kind: 'message',
T: ChatMessage,
oneof: 'chat_entity',
},
{
no: 4,
name: 'emoji_reaction',
kind: 'message',
T: EmojiReaction,
oneof: 'chat_entity',
},
])
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): MembershipUpdateMessage {
return new MembershipUpdateMessage().fromBinary(bytes, options);
static fromBinary(
bytes: Uint8Array,
options?: Partial<BinaryReadOptions>
): MembershipUpdateMessage {
return new MembershipUpdateMessage().fromBinary(bytes, options)
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): MembershipUpdateMessage {
return new MembershipUpdateMessage().fromJson(jsonValue, options);
static fromJson(
jsonValue: JsonValue,
options?: Partial<JsonReadOptions>
): MembershipUpdateMessage {
return new MembershipUpdateMessage().fromJson(jsonValue, options)
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): MembershipUpdateMessage {
return new MembershipUpdateMessage().fromJsonString(jsonString, options);
static fromJsonString(
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 {
return proto3.util.equals(MembershipUpdateMessage, a, b);
static equals(
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 */
// @ts-nocheck
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto3, protoInt64 } from "@bufbuild/protobuf";
import { MessageType } from "./enums_pb.js";
import type {
BinaryReadOptions,
FieldList,
JsonReadOptions,
JsonValue,
PartialMessage,
PlainMessage,
} from '@bufbuild/protobuf'
import { Message, proto3, protoInt64 } from '@bufbuild/protobuf'
import { MessageType } from './enums_pb.js'
/**
* @generated from message PinMessage
@ -14,59 +21,75 @@ export class PinMessage extends Message<PinMessage> {
/**
* @generated from field: uint64 clock = 1;
*/
clock = protoInt64.zero;
clock = protoInt64.zero
/**
* @generated from field: string message_id = 2;
*/
messageId = "";
messageId = ''
/**
* @generated from field: string chat_id = 3;
*/
chatId = "";
chatId = ''
/**
* @generated from field: bool pinned = 4;
*/
pinned = false;
pinned = false
/**
* The type of message (public/one-to-one/private-group-chat)
*
* @generated from field: MessageType message_type = 5;
*/
messageType = MessageType.UNKNOWN_MESSAGE_TYPE;
messageType = MessageType.UNKNOWN_MESSAGE_TYPE
constructor(data?: PartialMessage<PinMessage>) {
super();
proto3.util.initPartial(data, this);
super()
proto3.util.initPartial(data, this)
}
static readonly runtime = proto3;
static readonly typeName = "PinMessage";
static readonly runtime = proto3
static readonly typeName = 'PinMessage'
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "clock", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
{ no: 2, name: "message_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 3, name: "chat_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 4, name: "pinned", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
{ no: 5, name: "message_type", kind: "enum", T: proto3.getEnumType(MessageType) },
]);
{ no: 1, name: 'clock', kind: 'scalar', T: 4 /* ScalarType.UINT64 */ },
{ no: 2, name: 'message_id', kind: 'scalar', T: 9 /* ScalarType.STRING */ },
{ no: 3, name: 'chat_id', kind: 'scalar', T: 9 /* ScalarType.STRING */ },
{ no: 4, name: 'pinned', kind: 'scalar', T: 8 /* ScalarType.BOOL */ },
{
no: 5,
name: 'message_type',
kind: 'enum',
T: proto3.getEnumType(MessageType),
},
])
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PinMessage {
return new PinMessage().fromBinary(bytes, options);
static fromBinary(
bytes: Uint8Array,
options?: Partial<BinaryReadOptions>
): PinMessage {
return new PinMessage().fromBinary(bytes, options)
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): PinMessage {
return new PinMessage().fromJson(jsonValue, options);
static fromJson(
jsonValue: JsonValue,
options?: Partial<JsonReadOptions>
): PinMessage {
return new PinMessage().fromJson(jsonValue, options)
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PinMessage {
return new PinMessage().fromJsonString(jsonString, options);
static fromJsonString(
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 {
return proto3.util.equals(PinMessage, a, b);
static equals(
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 */
// @ts-nocheck
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto3, protoInt64 } from "@bufbuild/protobuf";
import type {
BinaryReadOptions,
FieldList,
JsonReadOptions,
JsonValue,
PartialMessage,
PlainMessage,
} from '@bufbuild/protobuf'
import { Message, proto3, protoInt64 } from '@bufbuild/protobuf'
/**
* @generated from message SignedPreKey
@ -13,45 +20,67 @@ export class SignedPreKey extends Message<SignedPreKey> {
/**
* @generated from field: bytes signed_pre_key = 1;
*/
signedPreKey = new Uint8Array(0);
signedPreKey = new Uint8Array(0)
/**
* @generated from field: uint32 version = 2;
*/
version = 0;
version = 0
/**
* @generated from field: uint32 protocol_version = 3;
*/
protocolVersion = 0;
protocolVersion = 0
constructor(data?: PartialMessage<SignedPreKey>) {
super();
proto3.util.initPartial(data, this);
super()
proto3.util.initPartial(data, this)
}
static readonly runtime = proto3;
static readonly typeName = "SignedPreKey";
static readonly runtime = proto3
static readonly typeName = 'SignedPreKey'
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "signed_pre_key", kind: "scalar", T: 12 /* ScalarType.BYTES */ },
{ no: 2, name: "version", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
{ no: 3, name: "protocol_version", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
]);
{
no: 1,
name: 'signed_pre_key',
kind: 'scalar',
T: 12 /* ScalarType.BYTES */,
},
{ no: 2, name: 'version', kind: 'scalar', T: 13 /* ScalarType.UINT32 */ },
{
no: 3,
name: 'protocol_version',
kind: 'scalar',
T: 13 /* ScalarType.UINT32 */,
},
])
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SignedPreKey {
return new SignedPreKey().fromBinary(bytes, options);
static fromBinary(
bytes: Uint8Array,
options?: Partial<BinaryReadOptions>
): SignedPreKey {
return new SignedPreKey().fromBinary(bytes, options)
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SignedPreKey {
return new SignedPreKey().fromJson(jsonValue, options);
static fromJson(
jsonValue: JsonValue,
options?: Partial<JsonReadOptions>
): SignedPreKey {
return new SignedPreKey().fromJson(jsonValue, options)
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SignedPreKey {
return new SignedPreKey().fromJsonString(jsonString, options);
static fromJsonString(
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 {
return proto3.util.equals(SignedPreKey, a, b);
static equals(
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;
*/
identity = new Uint8Array(0);
identity = new Uint8Array(0)
/**
* Installation id
*
* @generated from field: map<string, SignedPreKey> signed_pre_keys = 2;
*/
signedPreKeys: { [key: string]: SignedPreKey } = {};
signedPreKeys: { [key: string]: SignedPreKey } = {}
/**
* Prekey signature
*
* @generated from field: bytes signature = 4;
*/
signature = new Uint8Array(0);
signature = new Uint8Array(0)
/**
* When the bundle was created locally
*
* @generated from field: int64 timestamp = 5;
*/
timestamp = protoInt64.zero;
timestamp = protoInt64.zero
constructor(data?: PartialMessage<Bundle>) {
super();
proto3.util.initPartial(data, this);
super()
proto3.util.initPartial(data, this)
}
static readonly runtime = proto3;
static readonly typeName = "Bundle";
static readonly runtime = proto3
static readonly typeName = 'Bundle'
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "identity", kind: "scalar", T: 12 /* ScalarType.BYTES */ },
{ no: 2, name: "signed_pre_keys", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "message", T: SignedPreKey} },
{ no: 4, name: "signature", kind: "scalar", T: 12 /* ScalarType.BYTES */ },
{ no: 5, name: "timestamp", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
]);
{ no: 1, name: 'identity', kind: 'scalar', T: 12 /* ScalarType.BYTES */ },
{
no: 2,
name: 'signed_pre_keys',
kind: 'map',
K: 9 /* ScalarType.STRING */,
V: { kind: 'message', T: SignedPreKey },
},
{ no: 4, name: 'signature', kind: 'scalar', T: 12 /* ScalarType.BYTES */ },
{ no: 5, name: 'timestamp', kind: 'scalar', T: 3 /* ScalarType.INT64 */ },
])
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Bundle {
return new Bundle().fromBinary(bytes, options);
static fromBinary(
bytes: Uint8Array,
options?: Partial<BinaryReadOptions>
): Bundle {
return new Bundle().fromBinary(bytes, options)
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Bundle {
return new Bundle().fromJson(jsonValue, options);
static fromJson(
jsonValue: JsonValue,
options?: Partial<JsonReadOptions>
): Bundle {
return new Bundle().fromJson(jsonValue, options)
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Bundle {
return new Bundle().fromJsonString(jsonString, options);
static fromJsonString(
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 {
return proto3.util.equals(Bundle, a, b);
static equals(
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;
*/
bundle?: Bundle;
bundle?: Bundle
/**
* Private signed prekey
*
* @generated from field: bytes private_signed_pre_key = 2;
*/
privateSignedPreKey = new Uint8Array(0);
privateSignedPreKey = new Uint8Array(0)
constructor(data?: PartialMessage<BundleContainer>) {
super();
proto3.util.initPartial(data, this);
super()
proto3.util.initPartial(data, this)
}
static readonly runtime = proto3;
static readonly typeName = "BundleContainer";
static readonly runtime = proto3
static readonly typeName = 'BundleContainer'
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "bundle", kind: "message", T: Bundle },
{ no: 2, name: "private_signed_pre_key", kind: "scalar", T: 12 /* ScalarType.BYTES */ },
]);
{ no: 1, name: 'bundle', kind: 'message', T: Bundle },
{
no: 2,
name: 'private_signed_pre_key',
kind: 'scalar',
T: 12 /* ScalarType.BYTES */,
},
])
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): BundleContainer {
return new BundleContainer().fromBinary(bytes, options);
static fromBinary(
bytes: Uint8Array,
options?: Partial<BinaryReadOptions>
): BundleContainer {
return new BundleContainer().fromBinary(bytes, options)
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): BundleContainer {
return new BundleContainer().fromJson(jsonValue, options);
static fromJson(
jsonValue: JsonValue,
options?: Partial<JsonReadOptions>
): BundleContainer {
return new BundleContainer().fromJson(jsonValue, options)
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): BundleContainer {
return new BundleContainer().fromJsonString(jsonString, options);
static fromJsonString(
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 {
return proto3.util.equals(BundleContainer, a, b);
static equals(
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;
*/
key = new Uint8Array(0);
key = new Uint8Array(0)
/**
* Number of the message in the sending chain
*
* @generated from field: uint32 n = 2;
*/
n = 0;
n = 0
/**
* Length of the previous sending chain
*
* @generated from field: uint32 pn = 3;
*/
pn = 0;
pn = 0
/**
* Bundle ID
*
* @generated from field: bytes id = 4;
*/
id = new Uint8Array(0);
id = new Uint8Array(0)
constructor(data?: PartialMessage<DRHeader>) {
super();
proto3.util.initPartial(data, this);
super()
proto3.util.initPartial(data, this)
}
static readonly runtime = proto3;
static readonly typeName = "DRHeader";
static readonly runtime = proto3
static readonly typeName = 'DRHeader'
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "key", kind: "scalar", T: 12 /* ScalarType.BYTES */ },
{ no: 2, name: "n", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
{ no: 3, name: "pn", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
{ no: 4, name: "id", kind: "scalar", T: 12 /* ScalarType.BYTES */ },
]);
{ no: 1, name: 'key', kind: 'scalar', T: 12 /* ScalarType.BYTES */ },
{ no: 2, name: 'n', kind: 'scalar', T: 13 /* ScalarType.UINT32 */ },
{ no: 3, name: 'pn', kind: 'scalar', T: 13 /* ScalarType.UINT32 */ },
{ no: 4, name: 'id', kind: 'scalar', T: 12 /* ScalarType.BYTES */ },
])
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): DRHeader {
return new DRHeader().fromBinary(bytes, options);
static fromBinary(
bytes: Uint8Array,
options?: Partial<BinaryReadOptions>
): DRHeader {
return new DRHeader().fromBinary(bytes, options)
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): DRHeader {
return new DRHeader().fromJson(jsonValue, options);
static fromJson(
jsonValue: JsonValue,
options?: Partial<JsonReadOptions>
): DRHeader {
return new DRHeader().fromJson(jsonValue, options)
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): DRHeader {
return new DRHeader().fromJsonString(jsonString, options);
static fromJsonString(
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 {
return proto3.util.equals(DRHeader, a, b);
static equals(
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;
*/
key = new Uint8Array(0);
key = new Uint8Array(0)
constructor(data?: PartialMessage<DHHeader>) {
super();
proto3.util.initPartial(data, this);
super()
proto3.util.initPartial(data, this)
}
static readonly runtime = proto3;
static readonly typeName = "DHHeader";
static readonly runtime = proto3
static readonly typeName = 'DHHeader'
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "key", kind: "scalar", T: 12 /* ScalarType.BYTES */ },
]);
{ no: 1, name: 'key', kind: 'scalar', T: 12 /* ScalarType.BYTES */ },
])
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): DHHeader {
return new DHHeader().fromBinary(bytes, options);
static fromBinary(
bytes: Uint8Array,
options?: Partial<BinaryReadOptions>
): DHHeader {
return new DHHeader().fromBinary(bytes, options)
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): DHHeader {
return new DHHeader().fromJson(jsonValue, options);
static fromJson(
jsonValue: JsonValue,
options?: Partial<JsonReadOptions>
): DHHeader {
return new DHHeader().fromJson(jsonValue, options)
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): DHHeader {
return new DHHeader().fromJsonString(jsonString, options);
static fromJsonString(
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 {
return proto3.util.equals(DHHeader, a, b);
static equals(
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;
*/
key = new Uint8Array(0);
key = new Uint8Array(0)
/**
* Used bundle's signed prekey
*
* @generated from field: bytes id = 4;
*/
id = new Uint8Array(0);
id = new Uint8Array(0)
constructor(data?: PartialMessage<X3DHHeader>) {
super();
proto3.util.initPartial(data, this);
super()
proto3.util.initPartial(data, this)
}
static readonly runtime = proto3;
static readonly typeName = "X3DHHeader";
static readonly runtime = proto3
static readonly typeName = 'X3DHHeader'
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "key", kind: "scalar", T: 12 /* ScalarType.BYTES */ },
{ no: 4, name: "id", kind: "scalar", T: 12 /* ScalarType.BYTES */ },
]);
{ no: 1, name: 'key', kind: 'scalar', T: 12 /* ScalarType.BYTES */ },
{ no: 4, name: 'id', kind: 'scalar', T: 12 /* ScalarType.BYTES */ },
])
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): X3DHHeader {
return new X3DHHeader().fromBinary(bytes, options);
static fromBinary(
bytes: Uint8Array,
options?: Partial<BinaryReadOptions>
): X3DHHeader {
return new X3DHHeader().fromBinary(bytes, options)
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): X3DHHeader {
return new X3DHHeader().fromJson(jsonValue, options);
static fromJson(
jsonValue: JsonValue,
options?: Partial<JsonReadOptions>
): X3DHHeader {
return new X3DHHeader().fromJson(jsonValue, options)
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): X3DHHeader {
return new X3DHHeader().fromJsonString(jsonString, options);
static fromJsonString(
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 {
return proto3.util.equals(X3DHHeader, a, b);
static equals(
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;
*/
keyId = 0;
keyId = 0
/**
* Community message number for this key_id
*
* @generated from field: uint32 seq_no = 2;
*/
seqNo = 0;
seqNo = 0
/**
* Community ID
*
* @generated from field: bytes group_id = 3;
*/
groupId = new Uint8Array(0);
groupId = new Uint8Array(0)
constructor(data?: PartialMessage<HRHeader>) {
super();
proto3.util.initPartial(data, this);
super()
proto3.util.initPartial(data, this)
}
static readonly runtime = proto3;
static readonly typeName = "HRHeader";
static readonly runtime = proto3
static readonly typeName = 'HRHeader'
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "key_id", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
{ no: 2, name: "seq_no", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
{ no: 3, name: "group_id", kind: "scalar", T: 12 /* ScalarType.BYTES */ },
]);
{ no: 1, name: 'key_id', kind: 'scalar', T: 13 /* ScalarType.UINT32 */ },
{ no: 2, name: 'seq_no', kind: 'scalar', T: 13 /* ScalarType.UINT32 */ },
{ no: 3, name: 'group_id', kind: 'scalar', T: 12 /* ScalarType.BYTES */ },
])
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): HRHeader {
return new HRHeader().fromBinary(bytes, options);
static fromBinary(
bytes: Uint8Array,
options?: Partial<BinaryReadOptions>
): HRHeader {
return new HRHeader().fromBinary(bytes, options)
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): HRHeader {
return new HRHeader().fromJson(jsonValue, options);
static fromJson(
jsonValue: JsonValue,
options?: Partial<JsonReadOptions>
): HRHeader {
return new HRHeader().fromJson(jsonValue, options)
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): HRHeader {
return new HRHeader().fromJsonString(jsonString, options);
static fromJsonString(
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 {
return proto3.util.equals(HRHeader, a, b);
static equals(
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;
*/
keys: HRKey[] = [];
keys: HRKey[] = []
constructor(data?: PartialMessage<HRKeys>) {
super();
proto3.util.initPartial(data, this);
super()
proto3.util.initPartial(data, this)
}
static readonly runtime = proto3;
static readonly typeName = "HRKeys";
static readonly runtime = proto3
static readonly typeName = 'HRKeys'
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "keys", kind: "message", T: HRKey, repeated: true },
]);
{ no: 1, name: 'keys', kind: 'message', T: HRKey, repeated: true },
])
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): HRKeys {
return new HRKeys().fromBinary(bytes, options);
static fromBinary(
bytes: Uint8Array,
options?: Partial<BinaryReadOptions>
): HRKeys {
return new HRKeys().fromBinary(bytes, options)
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): HRKeys {
return new HRKeys().fromJson(jsonValue, options);
static fromJson(
jsonValue: JsonValue,
options?: Partial<JsonReadOptions>
): HRKeys {
return new HRKeys().fromJson(jsonValue, options)
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): HRKeys {
return new HRKeys().fromJsonString(jsonString, options);
static fromJsonString(
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 {
return proto3.util.equals(HRKeys, a, b);
static equals(
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;
*/
keyId = 0;
keyId = 0
/**
* @generated from field: bytes key = 2;
*/
key = new Uint8Array(0);
key = new Uint8Array(0)
constructor(data?: PartialMessage<HRKey>) {
super();
proto3.util.initPartial(data, this);
super()
proto3.util.initPartial(data, this)
}
static readonly runtime = proto3;
static readonly typeName = "HRKey";
static readonly runtime = proto3
static readonly typeName = 'HRKey'
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "key_id", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
{ no: 2, name: "key", kind: "scalar", T: 12 /* ScalarType.BYTES */ },
]);
{ no: 1, name: 'key_id', kind: 'scalar', T: 13 /* ScalarType.UINT32 */ },
{ no: 2, name: 'key', kind: 'scalar', T: 12 /* ScalarType.BYTES */ },
])
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): HRKey {
return new HRKey().fromBinary(bytes, options);
static fromBinary(
bytes: Uint8Array,
options?: Partial<BinaryReadOptions>
): HRKey {
return new HRKey().fromBinary(bytes, options)
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): HRKey {
return new HRKey().fromJson(jsonValue, options);
static fromJson(
jsonValue: JsonValue,
options?: Partial<JsonReadOptions>
): HRKey {
return new HRKey().fromJson(jsonValue, options)
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): HRKey {
return new HRKey().fromJsonString(jsonString, options);
static fromJsonString(
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 {
return proto3.util.equals(HRKey, a, b);
static equals(
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;
*/
X3DHHeader?: X3DHHeader;
X3DHHeader?: X3DHHeader
/**
* @generated from field: DRHeader DR_header = 2;
*/
DRHeader?: DRHeader;
DRHeader?: DRHeader
/**
* @generated from field: DHHeader DH_header = 101;
*/
DHHeader?: DHHeader;
DHHeader?: DHHeader
/**
* @generated from field: HRHeader HR_header = 102;
*/
HRHeader?: HRHeader;
HRHeader?: HRHeader
/**
* Encrypted payload
*
* @generated from field: bytes payload = 3;
*/
payload = new Uint8Array(0);
payload = new Uint8Array(0)
constructor(data?: PartialMessage<EncryptedMessageProtocol>) {
super();
proto3.util.initPartial(data, this);
super()
proto3.util.initPartial(data, this)
}
static readonly runtime = proto3;
static readonly typeName = "EncryptedMessageProtocol";
static readonly runtime = proto3
static readonly typeName = 'EncryptedMessageProtocol'
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "X3DH_header", kind: "message", T: X3DHHeader },
{ no: 2, name: "DR_header", kind: "message", T: DRHeader },
{ no: 101, name: "DH_header", kind: "message", T: DHHeader },
{ no: 102, name: "HR_header", kind: "message", T: HRHeader },
{ no: 3, name: "payload", kind: "scalar", T: 12 /* ScalarType.BYTES */ },
]);
{ no: 1, name: 'X3DH_header', kind: 'message', T: X3DHHeader },
{ no: 2, name: 'DR_header', kind: 'message', T: DRHeader },
{ no: 101, name: 'DH_header', kind: 'message', T: DHHeader },
{ no: 102, name: 'HR_header', kind: 'message', T: HRHeader },
{ no: 3, name: 'payload', kind: 'scalar', T: 12 /* ScalarType.BYTES */ },
])
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): EncryptedMessageProtocol {
return new EncryptedMessageProtocol().fromBinary(bytes, options);
static fromBinary(
bytes: Uint8Array,
options?: Partial<BinaryReadOptions>
): EncryptedMessageProtocol {
return new EncryptedMessageProtocol().fromBinary(bytes, options)
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): EncryptedMessageProtocol {
return new EncryptedMessageProtocol().fromJson(jsonValue, options);
static fromJson(
jsonValue: JsonValue,
options?: Partial<JsonReadOptions>
): EncryptedMessageProtocol {
return new EncryptedMessageProtocol().fromJson(jsonValue, options)
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): EncryptedMessageProtocol {
return new EncryptedMessageProtocol().fromJsonString(jsonString, options);
static fromJsonString(
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 {
return proto3.util.equals(EncryptedMessageProtocol, a, b);
static equals(
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;
*/
installationId = "";
installationId = ''
/**
* List of bundles
*
* @generated from field: repeated Bundle bundles = 3;
*/
bundles: Bundle[] = [];
bundles: Bundle[] = []
/**
* One to one message, encrypted, indexed by installation_id
@ -544,43 +698,70 @@ export class ProtocolMessage extends Message<ProtocolMessage> {
*
* @generated from field: map<string, EncryptedMessageProtocol> encrypted_message = 101;
*/
encryptedMessage: { [key: string]: EncryptedMessageProtocol } = {};
encryptedMessage: { [key: string]: EncryptedMessageProtocol } = {}
/**
* Public chats, not encrypted
*
* @generated from field: bytes public_message = 102;
*/
publicMessage = new Uint8Array(0);
publicMessage = new Uint8Array(0)
constructor(data?: PartialMessage<ProtocolMessage>) {
super();
proto3.util.initPartial(data, this);
super()
proto3.util.initPartial(data, this)
}
static readonly runtime = proto3;
static readonly typeName = "ProtocolMessage";
static readonly runtime = proto3
static readonly typeName = 'ProtocolMessage'
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 2, name: "installation_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 3, name: "bundles", kind: "message", T: Bundle, repeated: true },
{ no: 101, name: "encrypted_message", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "message", T: EncryptedMessageProtocol} },
{ no: 102, name: "public_message", kind: "scalar", T: 12 /* ScalarType.BYTES */ },
]);
{
no: 2,
name: 'installation_id',
kind: 'scalar',
T: 9 /* ScalarType.STRING */,
},
{ no: 3, name: 'bundles', kind: 'message', T: Bundle, repeated: true },
{
no: 101,
name: 'encrypted_message',
kind: 'map',
K: 9 /* ScalarType.STRING */,
V: { kind: 'message', T: EncryptedMessageProtocol },
},
{
no: 102,
name: 'public_message',
kind: 'scalar',
T: 12 /* ScalarType.BYTES */,
},
])
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ProtocolMessage {
return new ProtocolMessage().fromBinary(bytes, options);
static fromBinary(
bytes: Uint8Array,
options?: Partial<BinaryReadOptions>
): ProtocolMessage {
return new ProtocolMessage().fromBinary(bytes, options)
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ProtocolMessage {
return new ProtocolMessage().fromJson(jsonValue, options);
static fromJson(
jsonValue: JsonValue,
options?: Partial<JsonReadOptions>
): ProtocolMessage {
return new ProtocolMessage().fromJson(jsonValue, options)
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ProtocolMessage {
return new ProtocolMessage().fromJsonString(jsonString, options);
static fromJsonString(
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 {
return proto3.util.equals(ProtocolMessage, a, b);
static equals(
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 */
// @ts-nocheck
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto3, protoInt64 } from "@bufbuild/protobuf";
import type {
BinaryReadOptions,
FieldList,
JsonReadOptions,
JsonValue,
PartialMessage,
PlainMessage,
} from '@bufbuild/protobuf'
import { Message, proto3, protoInt64 } from '@bufbuild/protobuf'
/**
* Specs:
@ -25,45 +32,67 @@ export class StatusUpdate extends Message<StatusUpdate> {
/**
* @generated from field: uint64 clock = 1;
*/
clock = protoInt64.zero;
clock = protoInt64.zero
/**
* @generated from field: StatusUpdate.StatusType status_type = 2;
*/
statusType = StatusUpdate_StatusType.UNKNOWN_STATUS_TYPE;
statusType = StatusUpdate_StatusType.UNKNOWN_STATUS_TYPE
/**
* @generated from field: string custom_text = 3;
*/
customText = "";
customText = ''
constructor(data?: PartialMessage<StatusUpdate>) {
super();
proto3.util.initPartial(data, this);
super()
proto3.util.initPartial(data, this)
}
static readonly runtime = proto3;
static readonly typeName = "StatusUpdate";
static readonly runtime = proto3
static readonly typeName = 'StatusUpdate'
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "clock", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
{ no: 2, name: "status_type", kind: "enum", T: proto3.getEnumType(StatusUpdate_StatusType) },
{ no: 3, name: "custom_text", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
{ no: 1, name: 'clock', kind: 'scalar', T: 4 /* ScalarType.UINT64 */ },
{
no: 2,
name: 'status_type',
kind: 'enum',
T: proto3.getEnumType(StatusUpdate_StatusType),
},
{
no: 3,
name: 'custom_text',
kind: 'scalar',
T: 9 /* ScalarType.STRING */,
},
])
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): StatusUpdate {
return new StatusUpdate().fromBinary(bytes, options);
static fromBinary(
bytes: Uint8Array,
options?: Partial<BinaryReadOptions>
): StatusUpdate {
return new StatusUpdate().fromBinary(bytes, options)
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): StatusUpdate {
return new StatusUpdate().fromJson(jsonValue, options);
static fromJson(
jsonValue: JsonValue,
options?: Partial<JsonReadOptions>
): StatusUpdate {
return new StatusUpdate().fromJson(jsonValue, options)
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): StatusUpdate {
return new StatusUpdate().fromJsonString(jsonString, options);
static fromJsonString(
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 {
return proto3.util.equals(StatusUpdate, a, b);
static equals(
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,
}
// Retrieve enum metadata with: proto3.getEnumType(StatusUpdate_StatusType)
proto3.util.setEnumType(StatusUpdate_StatusType, "StatusUpdate.StatusType", [
{ no: 0, name: "UNKNOWN_STATUS_TYPE" },
{ no: 1, name: "AUTOMATIC" },
{ no: 2, name: "DO_NOT_DISTURB" },
{ no: 3, name: "ALWAYS_ONLINE" },
{ no: 4, name: "INACTIVE" },
]);
proto3.util.setEnumType(StatusUpdate_StatusType, 'StatusUpdate.StatusType', [
{ no: 0, name: 'UNKNOWN_STATUS_TYPE' },
{ no: 1, name: 'AUTOMATIC' },
{ no: 2, name: 'DO_NOT_DISTURB' },
{ no: 3, name: 'ALWAYS_ONLINE' },
{ no: 4, name: 'INACTIVE' },
])

View File

@ -3,8 +3,15 @@
/* eslint-disable */
// @ts-nocheck
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto3 } from "@bufbuild/protobuf";
import type {
BinaryReadOptions,
FieldList,
JsonReadOptions,
JsonValue,
PartialMessage,
PlainMessage,
} from '@bufbuild/protobuf'
import { Message, proto3 } from '@bufbuild/protobuf'
/**
* @generated from message Community
@ -13,57 +20,90 @@ export class Community extends Message<Community> {
/**
* @generated from field: string display_name = 1;
*/
displayName = "";
displayName = ''
/**
* @generated from field: string description = 2;
*/
description = "";
description = ''
/**
* @generated from field: uint32 members_count = 3;
*/
membersCount = 0;
membersCount = 0
/**
* @generated from field: string color = 4;
*/
color = "";
color = ''
/**
* @generated from field: repeated uint32 tag_indices = 5;
*/
tagIndices: number[] = [];
tagIndices: number[] = []
constructor(data?: PartialMessage<Community>) {
super();
proto3.util.initPartial(data, this);
super()
proto3.util.initPartial(data, this)
}
static readonly runtime = proto3;
static readonly typeName = "Community";
static readonly runtime = proto3
static readonly typeName = 'Community'
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "display_name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "description", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 3, name: "members_count", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
{ no: 4, name: "color", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 5, name: "tag_indices", kind: "scalar", T: 13 /* ScalarType.UINT32 */, repeated: true },
]);
{
no: 1,
name: 'display_name',
kind: 'scalar',
T: 9 /* ScalarType.STRING */,
},
{
no: 2,
name: 'description',
kind: 'scalar',
T: 9 /* ScalarType.STRING */,
},
{
no: 3,
name: 'members_count',
kind: 'scalar',
T: 13 /* ScalarType.UINT32 */,
},
{ no: 4, name: 'color', kind: 'scalar', T: 9 /* ScalarType.STRING */ },
{
no: 5,
name: 'tag_indices',
kind: 'scalar',
T: 13 /* ScalarType.UINT32 */,
repeated: true,
},
])
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Community {
return new Community().fromBinary(bytes, options);
static fromBinary(
bytes: Uint8Array,
options?: Partial<BinaryReadOptions>
): Community {
return new Community().fromBinary(bytes, options)
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Community {
return new Community().fromJson(jsonValue, options);
static fromJson(
jsonValue: JsonValue,
options?: Partial<JsonReadOptions>
): Community {
return new Community().fromJson(jsonValue, options)
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Community {
return new Community().fromJsonString(jsonString, options);
static fromJsonString(
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 {
return proto3.util.equals(Community, a, b);
static equals(
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;
*/
displayName = "";
displayName = ''
/**
* @generated from field: string description = 2;
*/
description = "";
description = ''
/**
* @generated from field: string emoji = 3;
*/
emoji = "";
emoji = ''
/**
* @generated from field: string color = 4;
*/
color = "";
color = ''
/**
* @generated from field: Community community = 5;
*/
community?: Community;
community?: Community
/**
* @generated from field: string uuid = 6;
*/
uuid = "";
uuid = ''
constructor(data?: PartialMessage<Channel>) {
super();
proto3.util.initPartial(data, this);
super()
proto3.util.initPartial(data, this)
}
static readonly runtime = proto3;
static readonly typeName = "Channel";
static readonly runtime = proto3
static readonly typeName = 'Channel'
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "display_name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "description", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 3, name: "emoji", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 4, name: "color", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 5, name: "community", kind: "message", T: Community },
{ no: 6, name: "uuid", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
{
no: 1,
name: 'display_name',
kind: 'scalar',
T: 9 /* ScalarType.STRING */,
},
{
no: 2,
name: 'description',
kind: 'scalar',
T: 9 /* ScalarType.STRING */,
},
{ no: 3, name: 'emoji', kind: 'scalar', T: 9 /* ScalarType.STRING */ },
{ no: 4, name: 'color', kind: 'scalar', T: 9 /* ScalarType.STRING */ },
{ no: 5, name: 'community', kind: 'message', T: Community },
{ no: 6, name: 'uuid', kind: 'scalar', T: 9 /* ScalarType.STRING */ },
])
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Channel {
return new Channel().fromBinary(bytes, options);
static fromBinary(
bytes: Uint8Array,
options?: Partial<BinaryReadOptions>
): Channel {
return new Channel().fromBinary(bytes, options)
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Channel {
return new Channel().fromJson(jsonValue, options);
static fromJson(
jsonValue: JsonValue,
options?: Partial<JsonReadOptions>
): Channel {
return new Channel().fromJson(jsonValue, options)
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Channel {
return new Channel().fromJsonString(jsonString, options);
static fromJsonString(
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 {
return proto3.util.equals(Channel, a, b);
static equals(
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;
*/
displayName = "";
displayName = ''
/**
* @generated from field: string description = 2;
*/
description = "";
description = ''
/**
* @generated from field: string color = 3;
*/
color = "";
color = ''
constructor(data?: PartialMessage<User>) {
super();
proto3.util.initPartial(data, this);
super()
proto3.util.initPartial(data, this)
}
static readonly runtime = proto3;
static readonly typeName = "User";
static readonly runtime = proto3
static readonly typeName = 'User'
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "display_name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "description", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 3, name: "color", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
{
no: 1,
name: 'display_name',
kind: 'scalar',
T: 9 /* ScalarType.STRING */,
},
{
no: 2,
name: 'description',
kind: 'scalar',
T: 9 /* ScalarType.STRING */,
},
{ no: 3, name: 'color', kind: 'scalar', T: 9 /* ScalarType.STRING */ },
])
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): User {
return new User().fromBinary(bytes, options);
static fromBinary(
bytes: Uint8Array,
options?: Partial<BinaryReadOptions>
): User {
return new User().fromBinary(bytes, options)
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): User {
return new User().fromJson(jsonValue, options);
static fromJson(
jsonValue: JsonValue,
options?: Partial<JsonReadOptions>
): User {
return new User().fromJson(jsonValue, options)
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): User {
return new User().fromJsonString(jsonString, options);
static fromJsonString(
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 {
return proto3.util.equals(User, a, b);
static equals(
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;
*/
content = new Uint8Array(0);
content = new Uint8Array(0)
constructor(data?: PartialMessage<URLData>) {
super();
proto3.util.initPartial(data, this);
super()
proto3.util.initPartial(data, this)
}
static readonly runtime = proto3;
static readonly typeName = "URLData";
static readonly runtime = proto3
static readonly typeName = 'URLData'
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "content", kind: "scalar", T: 12 /* ScalarType.BYTES */ },
]);
{ no: 1, name: 'content', kind: 'scalar', T: 12 /* ScalarType.BYTES */ },
])
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): URLData {
return new URLData().fromBinary(bytes, options);
static fromBinary(
bytes: Uint8Array,
options?: Partial<BinaryReadOptions>
): URLData {
return new URLData().fromBinary(bytes, options)
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): URLData {
return new URLData().fromJson(jsonValue, options);
static fromJson(
jsonValue: JsonValue,
options?: Partial<JsonReadOptions>
): URLData {
return new URLData().fromJson(jsonValue, options)
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): URLData {
return new URLData().fromJsonString(jsonString, options);
static fromJsonString(
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 {
return proto3.util.equals(URLData, a, b);
static equals(
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;
*/
encodedUrlData = "";
encodedUrlData = ''
/**
* Signature of encoded URL data
*
* @generated from field: string encoded_signature = 2;
*/
encodedSignature = "";
encodedSignature = ''
constructor(data?: PartialMessage<URLParams>) {
super();
proto3.util.initPartial(data, this);
super()
proto3.util.initPartial(data, this)
}
static readonly runtime = proto3;
static readonly typeName = "URLParams";
static readonly runtime = proto3
static readonly typeName = 'URLParams'
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "encoded_url_data", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "encoded_signature", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
{
no: 1,
name: 'encoded_url_data',
kind: 'scalar',
T: 9 /* ScalarType.STRING */,
},
{
no: 2,
name: 'encoded_signature',
kind: 'scalar',
T: 9 /* ScalarType.STRING */,
},
])
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): URLParams {
return new URLParams().fromBinary(bytes, options);
static fromBinary(
bytes: Uint8Array,
options?: Partial<BinaryReadOptions>
): URLParams {
return new URLParams().fromBinary(bytes, options)
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): URLParams {
return new URLParams().fromJson(jsonValue, options);
static fromJson(
jsonValue: JsonValue,
options?: Partial<JsonReadOptions>
): URLParams {
return new URLParams().fromJson(jsonValue, options)
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): URLParams {
return new URLParams().fromJsonString(jsonString, options);
static fromJsonString(
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 {
return proto3.util.equals(URLParams, a, b);
static equals(
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
] as const
type MultibaseCode = typeof VALID_MULTIBASE_CODES[number]
type MultibaseCode = (typeof VALID_MULTIBASE_CODES)[number]
/**
* @see https://pkg.go.dev/github.com/multiformats/go-multicodec#pkg-types
@ -23,7 +23,7 @@ const VALID_MULTICODEC_CODES = [
231, // secp256k1-pub (compressed) (0xe7)
] as const
type MulticodecCode = typeof VALID_MULTICODEC_CODES[number]
type MulticodecCode = (typeof VALID_MULTICODEC_CODES)[number]
/**
* @see https://specs.status.im/spec/2#public-key-serialization for specification