tabledb array work

This commit is contained in:
Christien Rioux 2024-05-25 22:46:43 -04:00
parent 83c8715742
commit 5d89de9bfe
45 changed files with 3022 additions and 1035 deletions

12
lib/proto/extensions.dart Normal file
View file

@ -0,0 +1,12 @@
import 'proto.dart' as proto;
proto.Message messageFromJson(Map<String, dynamic> j) =>
proto.Message.create()..mergeFromJsonMap(j);
Map<String, dynamic> messageToJson(proto.Message m) => m.writeToJsonMap();
proto.ReconciledMessage reconciledMessageFromJson(Map<String, dynamic> j) =>
proto.ReconciledMessage.create()..mergeFromJsonMap(j);
Map<String, dynamic> reconciledMessageToJson(proto.ReconciledMessage m) =>
m.writeToJsonMap();

View file

@ -1,5 +1,7 @@
export 'package:veilid_support/dht_support/proto/proto.dart';
export 'package:veilid_support/proto/proto.dart';
export 'extensions.dart';
export 'veilidchat.pb.dart';
export 'veilidchat.pbenum.dart';
export 'veilidchat.pbjson.dart';

File diff suppressed because it is too large Load diff

View file

@ -13,23 +13,6 @@ import 'dart:core' as $core;
import 'package:protobuf/protobuf.dart' as $pb;
class AttachmentKind extends $pb.ProtobufEnum {
static const AttachmentKind ATTACHMENT_KIND_UNSPECIFIED = AttachmentKind._(0, _omitEnumNames ? '' : 'ATTACHMENT_KIND_UNSPECIFIED');
static const AttachmentKind ATTACHMENT_KIND_FILE = AttachmentKind._(1, _omitEnumNames ? '' : 'ATTACHMENT_KIND_FILE');
static const AttachmentKind ATTACHMENT_KIND_IMAGE = AttachmentKind._(2, _omitEnumNames ? '' : 'ATTACHMENT_KIND_IMAGE');
static const $core.List<AttachmentKind> values = <AttachmentKind> [
ATTACHMENT_KIND_UNSPECIFIED,
ATTACHMENT_KIND_FILE,
ATTACHMENT_KIND_IMAGE,
];
static final $core.Map<$core.int, AttachmentKind> _byValue = $pb.ProtobufEnum.initByValue(values);
static AttachmentKind? valueOf($core.int value) => _byValue[value];
const AttachmentKind._($core.int v, $core.String n) : super(v, n);
}
class Availability extends $pb.ProtobufEnum {
static const Availability AVAILABILITY_UNSPECIFIED = Availability._(0, _omitEnumNames ? '' : 'AVAILABILITY_UNSPECIFIED');
static const Availability AVAILABILITY_OFFLINE = Availability._(1, _omitEnumNames ? '' : 'AVAILABILITY_OFFLINE');
@ -51,23 +34,6 @@ class Availability extends $pb.ProtobufEnum {
const Availability._($core.int v, $core.String n) : super(v, n);
}
class ChatType extends $pb.ProtobufEnum {
static const ChatType CHAT_TYPE_UNSPECIFIED = ChatType._(0, _omitEnumNames ? '' : 'CHAT_TYPE_UNSPECIFIED');
static const ChatType SINGLE_CONTACT = ChatType._(1, _omitEnumNames ? '' : 'SINGLE_CONTACT');
static const ChatType GROUP = ChatType._(2, _omitEnumNames ? '' : 'GROUP');
static const $core.List<ChatType> values = <ChatType> [
CHAT_TYPE_UNSPECIFIED,
SINGLE_CONTACT,
GROUP,
];
static final $core.Map<$core.int, ChatType> _byValue = $pb.ProtobufEnum.initByValue(values);
static ChatType? valueOf($core.int value) => _byValue[value];
const ChatType._($core.int v, $core.String n) : super(v, n);
}
class EncryptionKeyType extends $pb.ProtobufEnum {
static const EncryptionKeyType ENCRYPTION_KEY_TYPE_UNSPECIFIED = EncryptionKeyType._(0, _omitEnumNames ? '' : 'ENCRYPTION_KEY_TYPE_UNSPECIFIED');
static const EncryptionKeyType ENCRYPTION_KEY_TYPE_NONE = EncryptionKeyType._(1, _omitEnumNames ? '' : 'ENCRYPTION_KEY_TYPE_NONE');
@ -87,5 +53,26 @@ class EncryptionKeyType extends $pb.ProtobufEnum {
const EncryptionKeyType._($core.int v, $core.String n) : super(v, n);
}
class Scope extends $pb.ProtobufEnum {
static const Scope WATCHERS = Scope._(0, _omitEnumNames ? '' : 'WATCHERS');
static const Scope MODERATED = Scope._(1, _omitEnumNames ? '' : 'MODERATED');
static const Scope TALKERS = Scope._(2, _omitEnumNames ? '' : 'TALKERS');
static const Scope MODERATORS = Scope._(3, _omitEnumNames ? '' : 'MODERATORS');
static const Scope ADMINS = Scope._(4, _omitEnumNames ? '' : 'ADMINS');
static const $core.List<Scope> values = <Scope> [
WATCHERS,
MODERATED,
TALKERS,
MODERATORS,
ADMINS,
];
static final $core.Map<$core.int, Scope> _byValue = $pb.ProtobufEnum.initByValue(values);
static Scope? valueOf($core.int value) => _byValue[value];
const Scope._($core.int v, $core.String n) : super(v, n);
}
const _omitEnumNames = $core.bool.fromEnvironment('protobuf.omit_enum_names');

View file

@ -13,21 +13,6 @@ import 'dart:convert' as $convert;
import 'dart:core' as $core;
import 'dart:typed_data' as $typed_data;
@$core.Deprecated('Use attachmentKindDescriptor instead')
const AttachmentKind$json = {
'1': 'AttachmentKind',
'2': [
{'1': 'ATTACHMENT_KIND_UNSPECIFIED', '2': 0},
{'1': 'ATTACHMENT_KIND_FILE', '2': 1},
{'1': 'ATTACHMENT_KIND_IMAGE', '2': 2},
],
};
/// Descriptor for `AttachmentKind`. Decode as a `google.protobuf.EnumDescriptorProto`.
final $typed_data.Uint8List attachmentKindDescriptor = $convert.base64Decode(
'Cg5BdHRhY2htZW50S2luZBIfChtBVFRBQ0hNRU5UX0tJTkRfVU5TUEVDSUZJRUQQABIYChRBVF'
'RBQ0hNRU5UX0tJTkRfRklMRRABEhkKFUFUVEFDSE1FTlRfS0lORF9JTUFHRRAC');
@$core.Deprecated('Use availabilityDescriptor instead')
const Availability$json = {
'1': 'Availability',
@ -46,21 +31,6 @@ final $typed_data.Uint8List availabilityDescriptor = $convert.base64Decode(
'lMSVRZX09GRkxJTkUQARIVChFBVkFJTEFCSUxJVFlfRlJFRRACEhUKEUFWQUlMQUJJTElUWV9C'
'VVNZEAMSFQoRQVZBSUxBQklMSVRZX0FXQVkQBA==');
@$core.Deprecated('Use chatTypeDescriptor instead')
const ChatType$json = {
'1': 'ChatType',
'2': [
{'1': 'CHAT_TYPE_UNSPECIFIED', '2': 0},
{'1': 'SINGLE_CONTACT', '2': 1},
{'1': 'GROUP', '2': 2},
],
};
/// Descriptor for `ChatType`. Decode as a `google.protobuf.EnumDescriptorProto`.
final $typed_data.Uint8List chatTypeDescriptor = $convert.base64Decode(
'CghDaGF0VHlwZRIZChVDSEFUX1RZUEVfVU5TUEVDSUZJRUQQABISCg5TSU5HTEVfQ09OVEFDVB'
'ABEgkKBUdST1VQEAI=');
@$core.Deprecated('Use encryptionKeyTypeDescriptor instead')
const EncryptionKeyType$json = {
'1': 'EncryptionKeyType',
@ -78,43 +48,249 @@ final $typed_data.Uint8List encryptionKeyTypeDescriptor = $convert.base64Decode(
'ASHAoYRU5DUllQVElPTl9LRVlfVFlQRV9OT05FEAESGwoXRU5DUllQVElPTl9LRVlfVFlQRV9Q'
'SU4QAhIgChxFTkNSWVBUSU9OX0tFWV9UWVBFX1BBU1NXT1JEEAM=');
@$core.Deprecated('Use scopeDescriptor instead')
const Scope$json = {
'1': 'Scope',
'2': [
{'1': 'WATCHERS', '2': 0},
{'1': 'MODERATED', '2': 1},
{'1': 'TALKERS', '2': 2},
{'1': 'MODERATORS', '2': 3},
{'1': 'ADMINS', '2': 4},
],
};
/// Descriptor for `Scope`. Decode as a `google.protobuf.EnumDescriptorProto`.
final $typed_data.Uint8List scopeDescriptor = $convert.base64Decode(
'CgVTY29wZRIMCghXQVRDSEVSUxAAEg0KCU1PREVSQVRFRBABEgsKB1RBTEtFUlMQAhIOCgpNT0'
'RFUkFUT1JTEAMSCgoGQURNSU5TEAQ=');
@$core.Deprecated('Use attachmentDescriptor instead')
const Attachment$json = {
'1': 'Attachment',
'2': [
{'1': 'kind', '3': 1, '4': 1, '5': 14, '6': '.veilidchat.AttachmentKind', '10': 'kind'},
{'1': 'mime', '3': 2, '4': 1, '5': 9, '10': 'mime'},
{'1': 'name', '3': 3, '4': 1, '5': 9, '10': 'name'},
{'1': 'content', '3': 4, '4': 1, '5': 11, '6': '.dht.DataReference', '10': 'content'},
{'1': 'signature', '3': 5, '4': 1, '5': 11, '6': '.veilid.Signature', '10': 'signature'},
{'1': 'media', '3': 1, '4': 1, '5': 11, '6': '.veilidchat.AttachmentMedia', '9': 0, '10': 'media'},
{'1': 'signature', '3': 2, '4': 1, '5': 11, '6': '.veilid.Signature', '10': 'signature'},
],
'8': [
{'1': 'kind'},
],
};
/// Descriptor for `Attachment`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List attachmentDescriptor = $convert.base64Decode(
'CgpBdHRhY2htZW50Ei4KBGtpbmQYASABKA4yGi52ZWlsaWRjaGF0LkF0dGFjaG1lbnRLaW5kUg'
'RraW5kEhIKBG1pbWUYAiABKAlSBG1pbWUSEgoEbmFtZRgDIAEoCVIEbmFtZRIsCgdjb250ZW50'
'GAQgASgLMhIuZGh0LkRhdGFSZWZlcmVuY2VSB2NvbnRlbnQSLwoJc2lnbmF0dXJlGAUgASgLMh'
'EudmVpbGlkLlNpZ25hdHVyZVIJc2lnbmF0dXJl');
'CgpBdHRhY2htZW50EjMKBW1lZGlhGAEgASgLMhsudmVpbGlkY2hhdC5BdHRhY2htZW50TWVkaW'
'FIAFIFbWVkaWESLwoJc2lnbmF0dXJlGAIgASgLMhEudmVpbGlkLlNpZ25hdHVyZVIJc2lnbmF0'
'dXJlQgYKBGtpbmQ=');
@$core.Deprecated('Use attachmentMediaDescriptor instead')
const AttachmentMedia$json = {
'1': 'AttachmentMedia',
'2': [
{'1': 'mime', '3': 1, '4': 1, '5': 9, '10': 'mime'},
{'1': 'name', '3': 2, '4': 1, '5': 9, '10': 'name'},
{'1': 'content', '3': 3, '4': 1, '5': 11, '6': '.dht.DataReference', '10': 'content'},
],
};
/// Descriptor for `AttachmentMedia`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List attachmentMediaDescriptor = $convert.base64Decode(
'Cg9BdHRhY2htZW50TWVkaWESEgoEbWltZRgBIAEoCVIEbWltZRISCgRuYW1lGAIgASgJUgRuYW'
'1lEiwKB2NvbnRlbnQYAyABKAsyEi5kaHQuRGF0YVJlZmVyZW5jZVIHY29udGVudA==');
@$core.Deprecated('Use permissionsDescriptor instead')
const Permissions$json = {
'1': 'Permissions',
'2': [
{'1': 'can_add_members', '3': 1, '4': 1, '5': 14, '6': '.veilidchat.Scope', '10': 'canAddMembers'},
{'1': 'can_edit_info', '3': 2, '4': 1, '5': 14, '6': '.veilidchat.Scope', '10': 'canEditInfo'},
{'1': 'moderated', '3': 3, '4': 1, '5': 8, '10': 'moderated'},
],
};
/// Descriptor for `Permissions`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List permissionsDescriptor = $convert.base64Decode(
'CgtQZXJtaXNzaW9ucxI5Cg9jYW5fYWRkX21lbWJlcnMYASABKA4yES52ZWlsaWRjaGF0LlNjb3'
'BlUg1jYW5BZGRNZW1iZXJzEjUKDWNhbl9lZGl0X2luZm8YAiABKA4yES52ZWlsaWRjaGF0LlNj'
'b3BlUgtjYW5FZGl0SW5mbxIcCgltb2RlcmF0ZWQYAyABKAhSCW1vZGVyYXRlZA==');
@$core.Deprecated('Use membershipDescriptor instead')
const Membership$json = {
'1': 'Membership',
'2': [
{'1': 'watchers', '3': 1, '4': 3, '5': 11, '6': '.veilid.TypedKey', '10': 'watchers'},
{'1': 'moderated', '3': 2, '4': 3, '5': 11, '6': '.veilid.TypedKey', '10': 'moderated'},
{'1': 'talkers', '3': 3, '4': 3, '5': 11, '6': '.veilid.TypedKey', '10': 'talkers'},
{'1': 'moderators', '3': 4, '4': 3, '5': 11, '6': '.veilid.TypedKey', '10': 'moderators'},
{'1': 'admins', '3': 5, '4': 3, '5': 11, '6': '.veilid.TypedKey', '10': 'admins'},
],
};
/// Descriptor for `Membership`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List membershipDescriptor = $convert.base64Decode(
'CgpNZW1iZXJzaGlwEiwKCHdhdGNoZXJzGAEgAygLMhAudmVpbGlkLlR5cGVkS2V5Ugh3YXRjaG'
'VycxIuCgltb2RlcmF0ZWQYAiADKAsyEC52ZWlsaWQuVHlwZWRLZXlSCW1vZGVyYXRlZBIqCgd0'
'YWxrZXJzGAMgAygLMhAudmVpbGlkLlR5cGVkS2V5Ugd0YWxrZXJzEjAKCm1vZGVyYXRvcnMYBC'
'ADKAsyEC52ZWlsaWQuVHlwZWRLZXlSCm1vZGVyYXRvcnMSKAoGYWRtaW5zGAUgAygLMhAudmVp'
'bGlkLlR5cGVkS2V5UgZhZG1pbnM=');
@$core.Deprecated('Use chatSettingsDescriptor instead')
const ChatSettings$json = {
'1': 'ChatSettings',
'2': [
{'1': 'title', '3': 1, '4': 1, '5': 9, '10': 'title'},
{'1': 'description', '3': 2, '4': 1, '5': 9, '10': 'description'},
{'1': 'icon', '3': 3, '4': 1, '5': 11, '6': '.dht.DataReference', '9': 0, '10': 'icon', '17': true},
{'1': 'default_expiration', '3': 4, '4': 1, '5': 4, '10': 'defaultExpiration'},
],
'8': [
{'1': '_icon'},
],
};
/// Descriptor for `ChatSettings`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List chatSettingsDescriptor = $convert.base64Decode(
'CgxDaGF0U2V0dGluZ3MSFAoFdGl0bGUYASABKAlSBXRpdGxlEiAKC2Rlc2NyaXB0aW9uGAIgAS'
'gJUgtkZXNjcmlwdGlvbhIrCgRpY29uGAMgASgLMhIuZGh0LkRhdGFSZWZlcmVuY2VIAFIEaWNv'
'bogBARItChJkZWZhdWx0X2V4cGlyYXRpb24YBCABKARSEWRlZmF1bHRFeHBpcmF0aW9uQgcKBV'
'9pY29u');
@$core.Deprecated('Use messageDescriptor instead')
const Message$json = {
'1': 'Message',
'2': [
{'1': 'author', '3': 1, '4': 1, '5': 11, '6': '.veilid.TypedKey', '10': 'author'},
{'1': 'timestamp', '3': 2, '4': 1, '5': 4, '10': 'timestamp'},
{'1': 'text', '3': 3, '4': 1, '5': 9, '10': 'text'},
{'1': 'signature', '3': 4, '4': 1, '5': 11, '6': '.veilid.Signature', '10': 'signature'},
{'1': 'attachments', '3': 5, '4': 3, '5': 11, '6': '.veilidchat.Attachment', '10': 'attachments'},
{'1': 'id', '3': 1, '4': 1, '5': 11, '6': '.veilid.TypedKey', '10': 'id'},
{'1': 'author', '3': 2, '4': 1, '5': 11, '6': '.veilid.TypedKey', '10': 'author'},
{'1': 'timestamp', '3': 3, '4': 1, '5': 4, '10': 'timestamp'},
{'1': 'text', '3': 4, '4': 1, '5': 11, '6': '.veilidchat.Message.Text', '9': 0, '10': 'text'},
{'1': 'secret', '3': 5, '4': 1, '5': 11, '6': '.veilidchat.Message.Secret', '9': 0, '10': 'secret'},
{'1': 'delete', '3': 6, '4': 1, '5': 11, '6': '.veilidchat.Message.ControlDelete', '9': 0, '10': 'delete'},
{'1': 'clear', '3': 7, '4': 1, '5': 11, '6': '.veilidchat.Message.ControlClear', '9': 0, '10': 'clear'},
{'1': 'settings', '3': 8, '4': 1, '5': 11, '6': '.veilidchat.Message.ControlSettings', '9': 0, '10': 'settings'},
{'1': 'permissions', '3': 9, '4': 1, '5': 11, '6': '.veilidchat.Message.ControlPermissions', '9': 0, '10': 'permissions'},
{'1': 'membership', '3': 10, '4': 1, '5': 11, '6': '.veilidchat.Message.ControlMembership', '9': 0, '10': 'membership'},
{'1': 'moderation', '3': 11, '4': 1, '5': 11, '6': '.veilidchat.Message.ControlModeration', '9': 0, '10': 'moderation'},
{'1': 'signature', '3': 12, '4': 1, '5': 11, '6': '.veilid.Signature', '10': 'signature'},
],
'3': [Message_Text$json, Message_Secret$json, Message_ControlDelete$json, Message_ControlClear$json, Message_ControlSettings$json, Message_ControlPermissions$json, Message_ControlMembership$json, Message_ControlModeration$json],
'8': [
{'1': 'kind'},
],
};
@$core.Deprecated('Use messageDescriptor instead')
const Message_Text$json = {
'1': 'Text',
'2': [
{'1': 'text', '3': 1, '4': 1, '5': 9, '10': 'text'},
{'1': 'topic', '3': 2, '4': 1, '5': 9, '10': 'topic'},
{'1': 'reply_id', '3': 3, '4': 1, '5': 11, '6': '.veilid.TypedKey', '10': 'replyId'},
{'1': 'expiration', '3': 4, '4': 1, '5': 4, '10': 'expiration'},
{'1': 'view_limit', '3': 5, '4': 1, '5': 4, '10': 'viewLimit'},
{'1': 'attachments', '3': 6, '4': 3, '5': 11, '6': '.veilidchat.Attachment', '10': 'attachments'},
],
};
@$core.Deprecated('Use messageDescriptor instead')
const Message_Secret$json = {
'1': 'Secret',
'2': [
{'1': 'ciphertext', '3': 1, '4': 1, '5': 12, '10': 'ciphertext'},
{'1': 'expiration', '3': 2, '4': 1, '5': 4, '10': 'expiration'},
],
};
@$core.Deprecated('Use messageDescriptor instead')
const Message_ControlDelete$json = {
'1': 'ControlDelete',
'2': [
{'1': 'ids', '3': 1, '4': 3, '5': 11, '6': '.veilid.TypedKey', '10': 'ids'},
],
};
@$core.Deprecated('Use messageDescriptor instead')
const Message_ControlClear$json = {
'1': 'ControlClear',
'2': [
{'1': 'timestamp', '3': 1, '4': 1, '5': 4, '10': 'timestamp'},
],
};
@$core.Deprecated('Use messageDescriptor instead')
const Message_ControlSettings$json = {
'1': 'ControlSettings',
'2': [
{'1': 'settings', '3': 1, '4': 1, '5': 11, '6': '.veilidchat.ChatSettings', '10': 'settings'},
],
};
@$core.Deprecated('Use messageDescriptor instead')
const Message_ControlPermissions$json = {
'1': 'ControlPermissions',
'2': [
{'1': 'permissions', '3': 1, '4': 1, '5': 11, '6': '.veilidchat.Permissions', '10': 'permissions'},
],
};
@$core.Deprecated('Use messageDescriptor instead')
const Message_ControlMembership$json = {
'1': 'ControlMembership',
'2': [
{'1': 'membership', '3': 1, '4': 1, '5': 11, '6': '.veilidchat.Membership', '10': 'membership'},
],
};
@$core.Deprecated('Use messageDescriptor instead')
const Message_ControlModeration$json = {
'1': 'ControlModeration',
'2': [
{'1': 'accepted_ids', '3': 1, '4': 3, '5': 11, '6': '.veilid.TypedKey', '10': 'acceptedIds'},
{'1': 'rejected_ids', '3': 2, '4': 3, '5': 11, '6': '.veilid.TypedKey', '10': 'rejectedIds'},
],
};
/// Descriptor for `Message`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List messageDescriptor = $convert.base64Decode(
'CgdNZXNzYWdlEigKBmF1dGhvchgBIAEoCzIQLnZlaWxpZC5UeXBlZEtleVIGYXV0aG9yEhwKCX'
'RpbWVzdGFtcBgCIAEoBFIJdGltZXN0YW1wEhIKBHRleHQYAyABKAlSBHRleHQSLwoJc2lnbmF0'
'dXJlGAQgASgLMhEudmVpbGlkLlNpZ25hdHVyZVIJc2lnbmF0dXJlEjgKC2F0dGFjaG1lbnRzGA'
'UgAygLMhYudmVpbGlkY2hhdC5BdHRhY2htZW50UgthdHRhY2htZW50cw==');
'CgdNZXNzYWdlEiAKAmlkGAEgASgLMhAudmVpbGlkLlR5cGVkS2V5UgJpZBIoCgZhdXRob3IYAi'
'ABKAsyEC52ZWlsaWQuVHlwZWRLZXlSBmF1dGhvchIcCgl0aW1lc3RhbXAYAyABKARSCXRpbWVz'
'dGFtcBIuCgR0ZXh0GAQgASgLMhgudmVpbGlkY2hhdC5NZXNzYWdlLlRleHRIAFIEdGV4dBI0Cg'
'ZzZWNyZXQYBSABKAsyGi52ZWlsaWRjaGF0Lk1lc3NhZ2UuU2VjcmV0SABSBnNlY3JldBI7CgZk'
'ZWxldGUYBiABKAsyIS52ZWlsaWRjaGF0Lk1lc3NhZ2UuQ29udHJvbERlbGV0ZUgAUgZkZWxldG'
'USOAoFY2xlYXIYByABKAsyIC52ZWlsaWRjaGF0Lk1lc3NhZ2UuQ29udHJvbENsZWFySABSBWNs'
'ZWFyEkEKCHNldHRpbmdzGAggASgLMiMudmVpbGlkY2hhdC5NZXNzYWdlLkNvbnRyb2xTZXR0aW'
'5nc0gAUghzZXR0aW5ncxJKCgtwZXJtaXNzaW9ucxgJIAEoCzImLnZlaWxpZGNoYXQuTWVzc2Fn'
'ZS5Db250cm9sUGVybWlzc2lvbnNIAFILcGVybWlzc2lvbnMSRwoKbWVtYmVyc2hpcBgKIAEoCz'
'IlLnZlaWxpZGNoYXQuTWVzc2FnZS5Db250cm9sTWVtYmVyc2hpcEgAUgptZW1iZXJzaGlwEkcK'
'Cm1vZGVyYXRpb24YCyABKAsyJS52ZWlsaWRjaGF0Lk1lc3NhZ2UuQ29udHJvbE1vZGVyYXRpb2'
'5IAFIKbW9kZXJhdGlvbhIvCglzaWduYXR1cmUYDCABKAsyES52ZWlsaWQuU2lnbmF0dXJlUglz'
'aWduYXR1cmUa1gEKBFRleHQSEgoEdGV4dBgBIAEoCVIEdGV4dBIUCgV0b3BpYxgCIAEoCVIFdG'
'9waWMSKwoIcmVwbHlfaWQYAyABKAsyEC52ZWlsaWQuVHlwZWRLZXlSB3JlcGx5SWQSHgoKZXhw'
'aXJhdGlvbhgEIAEoBFIKZXhwaXJhdGlvbhIdCgp2aWV3X2xpbWl0GAUgASgEUgl2aWV3TGltaX'
'QSOAoLYXR0YWNobWVudHMYBiADKAsyFi52ZWlsaWRjaGF0LkF0dGFjaG1lbnRSC2F0dGFjaG1l'
'bnRzGkgKBlNlY3JldBIeCgpjaXBoZXJ0ZXh0GAEgASgMUgpjaXBoZXJ0ZXh0Eh4KCmV4cGlyYX'
'Rpb24YAiABKARSCmV4cGlyYXRpb24aMwoNQ29udHJvbERlbGV0ZRIiCgNpZHMYASADKAsyEC52'
'ZWlsaWQuVHlwZWRLZXlSA2lkcxosCgxDb250cm9sQ2xlYXISHAoJdGltZXN0YW1wGAEgASgEUg'
'l0aW1lc3RhbXAaRwoPQ29udHJvbFNldHRpbmdzEjQKCHNldHRpbmdzGAEgASgLMhgudmVpbGlk'
'Y2hhdC5DaGF0U2V0dGluZ3NSCHNldHRpbmdzGk8KEkNvbnRyb2xQZXJtaXNzaW9ucxI5CgtwZX'
'JtaXNzaW9ucxgBIAEoCzIXLnZlaWxpZGNoYXQuUGVybWlzc2lvbnNSC3Blcm1pc3Npb25zGksK'
'EUNvbnRyb2xNZW1iZXJzaGlwEjYKCm1lbWJlcnNoaXAYASABKAsyFi52ZWlsaWRjaGF0Lk1lbW'
'JlcnNoaXBSCm1lbWJlcnNoaXAafQoRQ29udHJvbE1vZGVyYXRpb24SMwoMYWNjZXB0ZWRfaWRz'
'GAEgAygLMhAudmVpbGlkLlR5cGVkS2V5UgthY2NlcHRlZElkcxIzCgxyZWplY3RlZF9pZHMYAi'
'ADKAsyEC52ZWlsaWQuVHlwZWRLZXlSC3JlamVjdGVkSWRzQgYKBGtpbmQ=');
@$core.Deprecated('Use reconciledMessageDescriptor instead')
const ReconciledMessage$json = {
'1': 'ReconciledMessage',
'2': [
{'1': 'content', '3': 1, '4': 1, '5': 11, '6': '.veilidchat.Message', '10': 'content'},
{'1': 'reconciled_time', '3': 2, '4': 1, '5': 4, '10': 'reconciledTime'},
],
};
/// Descriptor for `ReconciledMessage`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List reconciledMessageDescriptor = $convert.base64Decode(
'ChFSZWNvbmNpbGVkTWVzc2FnZRItCgdjb250ZW50GAEgASgLMhMudmVpbGlkY2hhdC5NZXNzYW'
'dlUgdjb250ZW50EicKD3JlY29uY2lsZWRfdGltZRgCIAEoBFIOcmVjb25jaWxlZFRpbWU=');
@$core.Deprecated('Use conversationDescriptor instead')
const Conversation$json = {
@ -132,6 +308,91 @@ final $typed_data.Uint8List conversationDescriptor = $convert.base64Decode(
'JvZmlsZRIwChRpZGVudGl0eV9tYXN0ZXJfanNvbhgCIAEoCVISaWRlbnRpdHlNYXN0ZXJKc29u'
'EiwKCG1lc3NhZ2VzGAMgASgLMhAudmVpbGlkLlR5cGVkS2V5UghtZXNzYWdlcw==');
@$core.Deprecated('Use chatDescriptor instead')
const Chat$json = {
'1': 'Chat',
'2': [
{'1': 'settings', '3': 1, '4': 1, '5': 11, '6': '.veilidchat.ChatSettings', '10': 'settings'},
{'1': 'local_conversation_record_key', '3': 2, '4': 1, '5': 11, '6': '.veilid.TypedKey', '10': 'localConversationRecordKey'},
{'1': 'remote_conversation_record_key', '3': 3, '4': 1, '5': 11, '6': '.veilid.TypedKey', '10': 'remoteConversationRecordKey'},
],
};
/// Descriptor for `Chat`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List chatDescriptor = $convert.base64Decode(
'CgRDaGF0EjQKCHNldHRpbmdzGAEgASgLMhgudmVpbGlkY2hhdC5DaGF0U2V0dGluZ3NSCHNldH'
'RpbmdzElMKHWxvY2FsX2NvbnZlcnNhdGlvbl9yZWNvcmRfa2V5GAIgASgLMhAudmVpbGlkLlR5'
'cGVkS2V5Uhpsb2NhbENvbnZlcnNhdGlvblJlY29yZEtleRJVCh5yZW1vdGVfY29udmVyc2F0aW'
'9uX3JlY29yZF9rZXkYAyABKAsyEC52ZWlsaWQuVHlwZWRLZXlSG3JlbW90ZUNvbnZlcnNhdGlv'
'blJlY29yZEtleQ==');
@$core.Deprecated('Use groupChatDescriptor instead')
const GroupChat$json = {
'1': 'GroupChat',
'2': [
{'1': 'settings', '3': 1, '4': 1, '5': 11, '6': '.veilidchat.ChatSettings', '10': 'settings'},
{'1': 'local_conversation_record_key', '3': 2, '4': 1, '5': 11, '6': '.veilid.TypedKey', '10': 'localConversationRecordKey'},
{'1': 'remote_conversation_record_keys', '3': 3, '4': 3, '5': 11, '6': '.veilid.TypedKey', '10': 'remoteConversationRecordKeys'},
],
};
/// Descriptor for `GroupChat`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List groupChatDescriptor = $convert.base64Decode(
'CglHcm91cENoYXQSNAoIc2V0dGluZ3MYASABKAsyGC52ZWlsaWRjaGF0LkNoYXRTZXR0aW5nc1'
'IIc2V0dGluZ3MSUwodbG9jYWxfY29udmVyc2F0aW9uX3JlY29yZF9rZXkYAiABKAsyEC52ZWls'
'aWQuVHlwZWRLZXlSGmxvY2FsQ29udmVyc2F0aW9uUmVjb3JkS2V5ElcKH3JlbW90ZV9jb252ZX'
'JzYXRpb25fcmVjb3JkX2tleXMYAyADKAsyEC52ZWlsaWQuVHlwZWRLZXlSHHJlbW90ZUNvbnZl'
'cnNhdGlvblJlY29yZEtleXM=');
@$core.Deprecated('Use profileDescriptor instead')
const Profile$json = {
'1': 'Profile',
'2': [
{'1': 'name', '3': 1, '4': 1, '5': 9, '10': 'name'},
{'1': 'pronouns', '3': 2, '4': 1, '5': 9, '10': 'pronouns'},
{'1': 'about', '3': 3, '4': 1, '5': 9, '10': 'about'},
{'1': 'status', '3': 4, '4': 1, '5': 9, '10': 'status'},
{'1': 'availability', '3': 5, '4': 1, '5': 14, '6': '.veilidchat.Availability', '10': 'availability'},
{'1': 'avatar', '3': 6, '4': 1, '5': 11, '6': '.veilid.TypedKey', '9': 0, '10': 'avatar', '17': true},
],
'8': [
{'1': '_avatar'},
],
};
/// Descriptor for `Profile`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List profileDescriptor = $convert.base64Decode(
'CgdQcm9maWxlEhIKBG5hbWUYASABKAlSBG5hbWUSGgoIcHJvbm91bnMYAiABKAlSCHByb25vdW'
'5zEhQKBWFib3V0GAMgASgJUgVhYm91dBIWCgZzdGF0dXMYBCABKAlSBnN0YXR1cxI8CgxhdmFp'
'bGFiaWxpdHkYBSABKA4yGC52ZWlsaWRjaGF0LkF2YWlsYWJpbGl0eVIMYXZhaWxhYmlsaXR5Ei'
'0KBmF2YXRhchgGIAEoCzIQLnZlaWxpZC5UeXBlZEtleUgAUgZhdmF0YXKIAQFCCQoHX2F2YXRh'
'cg==');
@$core.Deprecated('Use accountDescriptor instead')
const Account$json = {
'1': 'Account',
'2': [
{'1': 'profile', '3': 1, '4': 1, '5': 11, '6': '.veilidchat.Profile', '10': 'profile'},
{'1': 'invisible', '3': 2, '4': 1, '5': 8, '10': 'invisible'},
{'1': 'auto_away_timeout_sec', '3': 3, '4': 1, '5': 13, '10': 'autoAwayTimeoutSec'},
{'1': 'contact_list', '3': 4, '4': 1, '5': 11, '6': '.dht.OwnedDHTRecordPointer', '10': 'contactList'},
{'1': 'contact_invitation_records', '3': 5, '4': 1, '5': 11, '6': '.dht.OwnedDHTRecordPointer', '10': 'contactInvitationRecords'},
{'1': 'chat_list', '3': 6, '4': 1, '5': 11, '6': '.dht.OwnedDHTRecordPointer', '10': 'chatList'},
{'1': 'group_chat_list', '3': 7, '4': 1, '5': 11, '6': '.dht.OwnedDHTRecordPointer', '10': 'groupChatList'},
],
};
/// Descriptor for `Account`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List accountDescriptor = $convert.base64Decode(
'CgdBY2NvdW50Ei0KB3Byb2ZpbGUYASABKAsyEy52ZWlsaWRjaGF0LlByb2ZpbGVSB3Byb2ZpbG'
'USHAoJaW52aXNpYmxlGAIgASgIUglpbnZpc2libGUSMQoVYXV0b19hd2F5X3RpbWVvdXRfc2Vj'
'GAMgASgNUhJhdXRvQXdheVRpbWVvdXRTZWMSPQoMY29udGFjdF9saXN0GAQgASgLMhouZGh0Lk'
'93bmVkREhUUmVjb3JkUG9pbnRlclILY29udGFjdExpc3QSWAoaY29udGFjdF9pbnZpdGF0aW9u'
'X3JlY29yZHMYBSABKAsyGi5kaHQuT3duZWRESFRSZWNvcmRQb2ludGVyUhhjb250YWN0SW52aX'
'RhdGlvblJlY29yZHMSNwoJY2hhdF9saXN0GAYgASgLMhouZGh0Lk93bmVkREhUUmVjb3JkUG9p'
'bnRlclIIY2hhdExpc3QSQgoPZ3JvdXBfY2hhdF9saXN0GAcgASgLMhouZGh0Lk93bmVkREhUUm'
'Vjb3JkUG9pbnRlclINZ3JvdXBDaGF0TGlzdA==');
@$core.Deprecated('Use contactDescriptor instead')
const Contact$json = {
'1': 'Contact',
@ -158,68 +419,6 @@ final $typed_data.Uint8List contactDescriptor = $convert.base64Decode(
'lSGmxvY2FsQ29udmVyc2F0aW9uUmVjb3JkS2V5EisKEXNob3dfYXZhaWxhYmlsaXR5GAcgASgI'
'UhBzaG93QXZhaWxhYmlsaXR5');
@$core.Deprecated('Use profileDescriptor instead')
const Profile$json = {
'1': 'Profile',
'2': [
{'1': 'name', '3': 1, '4': 1, '5': 9, '10': 'name'},
{'1': 'pronouns', '3': 2, '4': 1, '5': 9, '10': 'pronouns'},
{'1': 'status', '3': 3, '4': 1, '5': 9, '10': 'status'},
{'1': 'availability', '3': 4, '4': 1, '5': 14, '6': '.veilidchat.Availability', '10': 'availability'},
{'1': 'avatar', '3': 5, '4': 1, '5': 11, '6': '.veilid.TypedKey', '9': 0, '10': 'avatar', '17': true},
],
'8': [
{'1': '_avatar'},
],
};
/// Descriptor for `Profile`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List profileDescriptor = $convert.base64Decode(
'CgdQcm9maWxlEhIKBG5hbWUYASABKAlSBG5hbWUSGgoIcHJvbm91bnMYAiABKAlSCHByb25vdW'
'5zEhYKBnN0YXR1cxgDIAEoCVIGc3RhdHVzEjwKDGF2YWlsYWJpbGl0eRgEIAEoDjIYLnZlaWxp'
'ZGNoYXQuQXZhaWxhYmlsaXR5UgxhdmFpbGFiaWxpdHkSLQoGYXZhdGFyGAUgASgLMhAudmVpbG'
'lkLlR5cGVkS2V5SABSBmF2YXRhcogBAUIJCgdfYXZhdGFy');
@$core.Deprecated('Use chatDescriptor instead')
const Chat$json = {
'1': 'Chat',
'2': [
{'1': 'type', '3': 1, '4': 1, '5': 14, '6': '.veilidchat.ChatType', '10': 'type'},
{'1': 'remote_conversation_record_key', '3': 2, '4': 1, '5': 11, '6': '.veilid.TypedKey', '10': 'remoteConversationRecordKey'},
{'1': 'reconciled_chat_record', '3': 3, '4': 1, '5': 11, '6': '.dht.OwnedDHTRecordPointer', '10': 'reconciledChatRecord'},
],
};
/// Descriptor for `Chat`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List chatDescriptor = $convert.base64Decode(
'CgRDaGF0EigKBHR5cGUYASABKA4yFC52ZWlsaWRjaGF0LkNoYXRUeXBlUgR0eXBlElUKHnJlbW'
'90ZV9jb252ZXJzYXRpb25fcmVjb3JkX2tleRgCIAEoCzIQLnZlaWxpZC5UeXBlZEtleVIbcmVt'
'b3RlQ29udmVyc2F0aW9uUmVjb3JkS2V5ElAKFnJlY29uY2lsZWRfY2hhdF9yZWNvcmQYAyABKA'
'syGi5kaHQuT3duZWRESFRSZWNvcmRQb2ludGVyUhRyZWNvbmNpbGVkQ2hhdFJlY29yZA==');
@$core.Deprecated('Use accountDescriptor instead')
const Account$json = {
'1': 'Account',
'2': [
{'1': 'profile', '3': 1, '4': 1, '5': 11, '6': '.veilidchat.Profile', '10': 'profile'},
{'1': 'invisible', '3': 2, '4': 1, '5': 8, '10': 'invisible'},
{'1': 'auto_away_timeout_sec', '3': 3, '4': 1, '5': 13, '10': 'autoAwayTimeoutSec'},
{'1': 'contact_list', '3': 4, '4': 1, '5': 11, '6': '.dht.OwnedDHTRecordPointer', '10': 'contactList'},
{'1': 'contact_invitation_records', '3': 5, '4': 1, '5': 11, '6': '.dht.OwnedDHTRecordPointer', '10': 'contactInvitationRecords'},
{'1': 'chat_list', '3': 6, '4': 1, '5': 11, '6': '.dht.OwnedDHTRecordPointer', '10': 'chatList'},
],
};
/// Descriptor for `Account`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List accountDescriptor = $convert.base64Decode(
'CgdBY2NvdW50Ei0KB3Byb2ZpbGUYASABKAsyEy52ZWlsaWRjaGF0LlByb2ZpbGVSB3Byb2ZpbG'
'USHAoJaW52aXNpYmxlGAIgASgIUglpbnZpc2libGUSMQoVYXV0b19hd2F5X3RpbWVvdXRfc2Vj'
'GAMgASgNUhJhdXRvQXdheVRpbWVvdXRTZWMSPQoMY29udGFjdF9saXN0GAQgASgLMhouZGh0Lk'
'93bmVkREhUUmVjb3JkUG9pbnRlclILY29udGFjdExpc3QSWAoaY29udGFjdF9pbnZpdGF0aW9u'
'X3JlY29yZHMYBSABKAsyGi5kaHQuT3duZWRESFRSZWNvcmRQb2ludGVyUhhjb250YWN0SW52aX'
'RhdGlvblJlY29yZHMSNwoJY2hhdF9saXN0GAYgASgLMhouZGh0Lk93bmVkREhUUmVjb3JkUG9p'
'bnRlclIIY2hhdExpc3Q=');
@$core.Deprecated('Use contactInvitationDescriptor instead')
const ContactInvitation$json = {
'1': 'ContactInvitation',

View file

@ -1,51 +1,230 @@
////////////////////////////////////////////////////////////////////////////////////
// VeilidChat Protocol Buffer Definitions
//
// * Timestamps are in microseconds (us) since epoch
// * Durations are in microseconds (us)
////////////////////////////////////////////////////////////////////////////////////
syntax = "proto3";
package veilidchat;
import "veilid.proto";
import "dht.proto";
// AttachmentKind
// Enumeration of well-known attachment types
enum AttachmentKind {
ATTACHMENT_KIND_UNSPECIFIED = 0;
ATTACHMENT_KIND_FILE = 1;
ATTACHMENT_KIND_IMAGE = 2;
////////////////////////////////////////////////////////////////////////////////////
// Enumerations
////////////////////////////////////////////////////////////////////////////////////
// Contact availability
enum Availability {
AVAILABILITY_UNSPECIFIED = 0;
AVAILABILITY_OFFLINE = 1;
AVAILABILITY_FREE = 2;
AVAILABILITY_BUSY = 3;
AVAILABILITY_AWAY = 4;
}
// Encryption used on secret keys
enum EncryptionKeyType {
ENCRYPTION_KEY_TYPE_UNSPECIFIED = 0;
ENCRYPTION_KEY_TYPE_NONE = 1;
ENCRYPTION_KEY_TYPE_PIN = 2;
ENCRYPTION_KEY_TYPE_PASSWORD = 3;
}
// Scope of a chat
enum Scope {
// Can read chats but not send messages
WATCHERS = 0;
// Can send messages subject to moderation
// If moderation is disabled, this is equivalent to WATCHERS
MODERATED = 1;
// Can send messages without moderation
TALKERS = 2;
// Can moderate messages sent my members if moderation is enabled
MODERATORS = 3;
// Can perform all actions
ADMINS = 4;
}
////////////////////////////////////////////////////////////////////////////////////
// Attachments
////////////////////////////////////////////////////////////////////////////////////
// A single attachment
message Attachment {
// Type of the data
AttachmentKind kind = 1;
// MIME type of the data
string mime = 2;
// Title or filename
string name = 3;
// Pointer to the data content
dht.DataReference content = 4;
oneof kind {
AttachmentMedia media = 1;
}
// Author signature over all attachment fields and content fields and bytes
veilid.Signature signature = 5;
veilid.Signature signature = 2;
}
// A file, audio, image, or video attachment
message AttachmentMedia {
// MIME type of the data
string mime = 1;
// Title or filename
string name = 2;
// Pointer to the data content
dht.DataReference content = 3;
}
////////////////////////////////////////////////////////////////////////////////////
// Chat room controls
////////////////////////////////////////////////////////////////////////////////////
// Permissions of a chat
message Permissions {
// Parties in this scope or higher can add members to their own group or lower
Scope can_add_members = 1;
// Parties in this scope or higher can change the 'info' of a group
Scope can_edit_info = 2;
// If moderation is enabled or not.
bool moderated = 3;
}
// The membership of a chat
message Membership {
// Conversation keys for parties in the 'watchers' group
repeated veilid.TypedKey watchers = 1;
// Conversation keys for parties in the 'moderated' group
repeated veilid.TypedKey moderated = 2;
// Conversation keys for parties in the 'talkers' group
repeated veilid.TypedKey talkers = 3;
// Conversation keys for parties in the 'moderators' group
repeated veilid.TypedKey moderators = 4;
// Conversation keys for parties in the 'admins' group
repeated veilid.TypedKey admins = 5;
}
// The chat settings
message ChatSettings {
// Title for the chat
string title = 1;
// Description for the chat
string description = 2;
// Icon for the chat
optional dht.DataReference icon = 3;
// Default message expiration duration (in us)
uint64 default_expiration = 4;
}
////////////////////////////////////////////////////////////////////////////////////
// Messages
////////////////////////////////////////////////////////////////////////////////////
// A single message as part of a series of messages
message Message {
// Author of the message
veilid.TypedKey author = 1;
// Time the message was sent (us since epoch)
uint64 timestamp = 2;
// Text of the message
string text = 3;
// A text message
message Text {
// Text of the message
string text = 1;
// Topic of the message / Content warning
string topic = 2;
// Message id replied to
veilid.TypedKey reply_id = 3;
// Message expiration timestamp
uint64 expiration = 4;
// Message view limit before deletion
uint64 view_limit = 5;
// Attachments on the message
repeated Attachment attachments = 6;
}
// A secret message
message Secret {
// Text message protobuf encrypted by a key
bytes ciphertext = 1;
// Secret expiration timestamp
// This is the time after which an un-revealed secret will get deleted
uint64 expiration = 2;
}
// A 'delete' control message
// Deletes a set of messages by their ids
message ControlDelete {
repeated veilid.TypedKey ids = 1;
}
// A 'clear' control message
// Deletes a set of messages from before some timestamp
message ControlClear {
// The latest timestamp to delete messages before
// If this is zero then all messages are cleared
uint64 timestamp = 1;
}
// A 'change settings' control message
message ControlSettings {
ChatSettings settings = 1;
}
// A 'change permissions' control message
// Changes the permissions of a chat
message ControlPermissions {
Permissions permissions = 1;
}
// A 'change membership' control message
// Changes the
message ControlMembership {
Membership membership = 1;
}
// A 'moderation' control message
// Accepts or rejects a set of messages
message ControlModeration {
repeated veilid.TypedKey accepted_ids = 1;
repeated veilid.TypedKey rejected_ids = 2;
}
//////////////////////////////////////////////////////////////////////////
// Hash of previous message from the same author,
// including its previous hash.
// Also serves as a unique key for the message.
veilid.TypedKey id = 1;
// Author of the message (identity public key)
veilid.TypedKey author = 2;
// Time the message was sent according to sender
uint64 timestamp = 3;
// Message kind
oneof kind {
Text text = 4;
Secret secret = 5;
ControlDelete delete = 6;
ControlClear clear = 7;
ControlSettings settings = 8;
ControlPermissions permissions = 9;
ControlMembership membership = 10;
ControlModeration moderation = 11;
}
// Author signature over all of the fields and attachment signatures
veilid.Signature signature = 4;
// Attachments on the message
repeated Attachment attachments = 5;
veilid.Signature signature = 12;
}
// Locally stored messages for chats
message ReconciledMessage {
// The message as sent
Message content = 1;
// The timestamp the message was reconciled
uint64 reconciled_time = 2;
}
////////////////////////////////////////////////////////////////////////////////////
// Chats
////////////////////////////////////////////////////////////////////////////////////
// The means of direct communications that is synchronized between
// two users. Visible and encrypted for the other party.
// Includes communications for:
// * Profile changes
// * Identity changes
// * 1-1 chat messages
// * Group chat messages
//
// DHT Schema: SMPL(0,1,[identityPublicKey])
// DHT Key (UnicastOutbox): localConversation
@ -54,12 +233,84 @@ message Message {
message Conversation {
// Profile to publish to friend
Profile profile = 1;
// Identity master (JSON) to publish to friend
// Identity master (JSON) to publish to friend or chat room
string identity_master_json = 2;
// Messages DHTLog (xxx for now DHTShortArray)
// Messages DHTLog
veilid.TypedKey messages = 3;
}
// Either a 1-1 conversation or a group chat
// Privately encrypted, this is the local user's copy of the chat
message Chat {
// Settings
ChatSettings settings = 1;
// Conversation key for this user
veilid.TypedKey local_conversation_record_key = 2;
// Conversation key for the other party
veilid.TypedKey remote_conversation_record_key = 3;
}
// A group chat
// Privately encrypted, this is the local user's copy of the chat
message GroupChat {
// Settings
ChatSettings settings = 1;
// Conversation key for this user
veilid.TypedKey local_conversation_record_key = 2;
// Conversation keys for the other parties
repeated veilid.TypedKey remote_conversation_record_keys = 3;
}
////////////////////////////////////////////////////////////////////////////////////
// Accounts
////////////////////////////////////////////////////////////////////////////////////
// Publicly shared profile information for both contacts and accounts
// Contains:
// Name - Friendly name
// Pronouns - Pronouns of user
// Icon - Little picture to represent user in contact list
message Profile {
// Friendy name
string name = 1;
// Pronouns of user
string pronouns = 2;
// Description of the user
string about = 3;
// Status/away message
string status = 4;
// Availability
Availability availability = 5;
// Avatar DHTData
optional veilid.TypedKey avatar = 6;
}
// A record of an individual account
// Pointed to by the identity account map in the identity key
//
// DHT Schema: DFLT(1)
// DHT Private: accountSecretKey
message Account {
// The user's profile that gets shared with contacts
Profile profile = 1;
// Invisibility makes you always look 'Offline'
bool invisible = 2;
// Auto-away sets 'away' mode after an inactivity time
uint32 auto_away_timeout_sec = 3;
// The contacts DHTList for this account
// DHT Private
dht.OwnedDHTRecordPointer contact_list = 4;
// The ContactInvitationRecord DHTShortArray for this account
// DHT Private
dht.OwnedDHTRecordPointer contact_invitation_records = 5;
// The Chats DHTList for this account
// DHT Private
dht.OwnedDHTRecordPointer chat_list = 6;
// The GroupChats DHTList for this account
// DHT Private
dht.OwnedDHTRecordPointer group_chat_list = 7;
}
// A record of a contact that has accepted a contact invitation
// Contains a copy of the most recent remote profile as well as
// a locally edited profile.
@ -80,87 +331,13 @@ message Contact {
veilid.TypedKey remote_conversation_record_key = 5;
// Our conversation key for friend to sync
veilid.TypedKey local_conversation_record_key = 6;
// Show availability
// Show availability to this contact
bool show_availability = 7;
}
// Contact availability
enum Availability {
AVAILABILITY_UNSPECIFIED = 0;
AVAILABILITY_OFFLINE = 1;
AVAILABILITY_FREE = 2;
AVAILABILITY_BUSY = 3;
AVAILABILITY_AWAY = 4;
}
// Publicly shared profile information for both contacts and accounts
// Contains:
// Name - Friendly name
// Pronouns - Pronouns of user
// Icon - Little picture to represent user in contact list
message Profile {
// Friendy name
string name = 1;
// Pronouns of user
string pronouns = 2;
// Status/away message
string status = 3;
// Availability
Availability availability = 4;
// Avatar DHTData
optional veilid.TypedKey avatar = 5;
}
enum ChatType {
CHAT_TYPE_UNSPECIFIED = 0;
SINGLE_CONTACT = 1;
GROUP = 2;
}
// Either a 1-1 conversation or a group chat (eventually)
// Privately encrypted, this is the local user's copy of the chat
message Chat {
// What kind of chat is this
ChatType type = 1;
// Conversation key for the other party
veilid.TypedKey remote_conversation_record_key = 2;
// Reconciled chat record DHTLog (xxx for now DHTShortArray)
dht.OwnedDHTRecordPointer reconciled_chat_record = 3;
}
// A record of an individual account
// Pointed to by the identity account map in the identity key
//
// DHT Schema: DFLT(1)
// DHT Private: accountSecretKey
message Account {
// The user's profile that gets shared with contacts
Profile profile = 1;
// Invisibility makes you always look 'Offline'
bool invisible = 2;
// Auto-away sets 'away' mode after an inactivity time
uint32 auto_away_timeout_sec = 3;
// The contacts DHTList for this account
// DHT Private
dht.OwnedDHTRecordPointer contact_list = 4;
// The ContactInvitationRecord DHTShortArray for this account
// DHT Private
dht.OwnedDHTRecordPointer contact_invitation_records = 5;
// The chats DHTList for this account
// DHT Private
dht.OwnedDHTRecordPointer chat_list = 6;
}
// EncryptionKeyType
// Encryption of secret
enum EncryptionKeyType {
ENCRYPTION_KEY_TYPE_UNSPECIFIED = 0;
ENCRYPTION_KEY_TYPE_NONE = 1;
ENCRYPTION_KEY_TYPE_PIN = 2;
ENCRYPTION_KEY_TYPE_PASSWORD = 3;
}
////////////////////////////////////////////////////////////////////////////////////
// Invitations
////////////////////////////////////////////////////////////////////////////////////
// Invitation that is shared for VeilidChat contact connections
// serialized to QR code or data blob, not send over DHT, out of band.