388 lines
No EOL
9.2 KiB
Protocol Buffer
388 lines
No EOL
9.2 KiB
Protocol Buffer
/**
|
|
* Copyright (C) 2014-2016 Open Whisper Systems
|
|
*
|
|
* Licensed according to the LICENSE file in this repository.
|
|
*/
|
|
|
|
syntax = "proto3";
|
|
|
|
package signal;
|
|
|
|
option java_package = "org.thoughtcrime.securesms.database.model.databaseprotos";
|
|
option java_multiple_files = true;
|
|
|
|
import Backup.proto;
|
|
|
|
// DEPRECATED -- only here for database migrations
|
|
message ReactionList {
|
|
option deprecated = true;
|
|
|
|
message Reaction {
|
|
string emoji = 1;
|
|
uint64 author = 2;
|
|
uint64 sentTime = 3;
|
|
uint64 receivedTime = 4;
|
|
}
|
|
|
|
repeated Reaction reactions = 1;
|
|
}
|
|
|
|
message BadgeList {
|
|
message Badge {
|
|
string id = 1;
|
|
string category = 2;
|
|
string name = 3;
|
|
string description = 4;
|
|
string imageUrl = 5;
|
|
uint64 expiration = 6;
|
|
bool visible = 7;
|
|
string imageDensity = 8;
|
|
}
|
|
|
|
repeated Badge badges = 1;
|
|
}
|
|
|
|
import "SignalService.proto";
|
|
import "DecryptedGroups.proto";
|
|
|
|
message DecryptedGroupV2Context {
|
|
signalservice.GroupContextV2 context = 1;
|
|
DecryptedGroupChange change = 2;
|
|
DecryptedGroup groupState = 3;
|
|
DecryptedGroup previousGroupState = 4;
|
|
}
|
|
|
|
message TemporalAuthCredentialResponse {
|
|
int64 date = 1;
|
|
bytes authCredentialResponse = 2;
|
|
}
|
|
|
|
message TemporalAuthCredentialResponses {
|
|
repeated TemporalAuthCredentialResponse credentialResponse = 1;
|
|
}
|
|
|
|
message AudioWaveFormData {
|
|
int64 durationUs = 1;
|
|
bytes waveForm = 2;
|
|
}
|
|
|
|
message ProfileChangeDetails {
|
|
message StringChange {
|
|
string previous = 1;
|
|
string newValue = 2;
|
|
}
|
|
|
|
StringChange profileNameChange = 1;
|
|
}
|
|
|
|
message BodyRangeList {
|
|
message BodyRange {
|
|
enum Style {
|
|
BOLD = 0;
|
|
ITALIC = 1;
|
|
SPOILER = 2;
|
|
STRIKETHROUGH = 3;
|
|
MONOSPACE = 4;
|
|
}
|
|
|
|
message Button {
|
|
string label = 1;
|
|
string action = 2;
|
|
}
|
|
|
|
int32 start = 1;
|
|
int32 length = 2;
|
|
|
|
oneof associatedValue {
|
|
string mentionUuid = 3;
|
|
Style style = 4;
|
|
string link = 5;
|
|
Button button = 6;
|
|
}
|
|
}
|
|
|
|
repeated BodyRange ranges = 1;
|
|
}
|
|
|
|
message CryptoValue {
|
|
oneof Value {
|
|
MobileCoinValue mobileCoinValue = 1;
|
|
}
|
|
|
|
message MobileCoinValue {
|
|
string picoMobileCoin = 1;
|
|
}
|
|
}
|
|
|
|
message GroupCallUpdateDetails {
|
|
string eraId = 1;
|
|
string startedCallUuid = 2;
|
|
int64 startedCallTimestamp = 3;
|
|
repeated string inCallUuids = 4;
|
|
bool isCallFull = 5;
|
|
}
|
|
|
|
message ExpiringProfileKeyCredentialColumnData {
|
|
bytes profileKey = 1;
|
|
bytes expiringProfileKeyCredential = 2;
|
|
}
|
|
|
|
message DeviceLastResetTime {
|
|
message Pair {
|
|
int32 deviceId = 1;
|
|
int64 lastResetTime = 2;
|
|
}
|
|
|
|
repeated Pair resetTime = 1;
|
|
}
|
|
|
|
message Wallpaper {
|
|
message SingleColor {
|
|
int32 color = 1;
|
|
}
|
|
|
|
message LinearGradient {
|
|
float rotation = 1;
|
|
repeated int32 colors = 2;
|
|
repeated float positions = 3;
|
|
}
|
|
|
|
message File {
|
|
string uri = 1;
|
|
}
|
|
|
|
oneof wallpaper {
|
|
SingleColor singleColor = 1;
|
|
LinearGradient linearGradient = 2;
|
|
File file = 3;
|
|
}
|
|
|
|
float dimLevelInDarkTheme = 4;
|
|
}
|
|
|
|
message ChatColor {
|
|
message SingleColor {
|
|
int32 color = 1;
|
|
}
|
|
|
|
message LinearGradient {
|
|
float rotation = 1;
|
|
repeated int32 colors = 2;
|
|
repeated float positions = 3;
|
|
}
|
|
|
|
message File {
|
|
string uri = 1;
|
|
}
|
|
|
|
oneof chatColor {
|
|
SingleColor singleColor = 1;
|
|
LinearGradient linearGradient = 2;
|
|
}
|
|
}
|
|
|
|
message RecipientExtras {
|
|
bool manuallyShownAvatar = 1;
|
|
bool hideStory = 2;
|
|
int64 lastStoryView = 3;
|
|
}
|
|
|
|
message CustomAvatar {
|
|
|
|
message Text {
|
|
string text = 1;
|
|
string colors = 2;
|
|
}
|
|
|
|
message Vector {
|
|
string key = 1;
|
|
string colors = 2;
|
|
}
|
|
|
|
message Photo {
|
|
string uri = 1;
|
|
int64 size = 2;
|
|
}
|
|
|
|
oneof avatar {
|
|
Text text = 1;
|
|
Vector vector = 2;
|
|
Photo photo = 3;
|
|
}
|
|
}
|
|
|
|
message StoryTextPost {
|
|
enum Style {
|
|
DEFAULT = 0;
|
|
REGULAR = 1;
|
|
BOLD = 2;
|
|
SERIF = 3;
|
|
SCRIPT = 4;
|
|
CONDENSED = 5;
|
|
}
|
|
|
|
string body = 1;
|
|
Style style = 2;
|
|
int32 textForegroundColor = 3;
|
|
int32 textBackgroundColor = 4;
|
|
ChatColor background = 5;
|
|
}
|
|
|
|
message GiftBadge {
|
|
enum RedemptionState {
|
|
PENDING = 0;
|
|
STARTED = 1;
|
|
REDEEMED = 2;
|
|
FAILED = 3;
|
|
}
|
|
|
|
bytes redemptionToken = 1;
|
|
RedemptionState redemptionState = 2;
|
|
}
|
|
|
|
message SignalStoreList {
|
|
repeated string contents = 1;
|
|
}
|
|
|
|
message PendingChangeNumberMetadata {
|
|
bytes previousPni = 1;
|
|
bytes pniIdentityKeyPair = 2;
|
|
int32 pniRegistrationId = 3;
|
|
int32 pniSignedPreKeyId = 4;
|
|
int32 pniLastResortKyberPreKeyId = 5;
|
|
}
|
|
|
|
message MessageExportState {
|
|
|
|
enum Progress {
|
|
INIT = 0;
|
|
STARTED = 1;
|
|
COMPLETED = 2;
|
|
}
|
|
|
|
int64 messageId = 1;
|
|
repeated string startedRecipients = 2;
|
|
repeated string completedRecipients = 3;
|
|
repeated string startedAttachments = 4;
|
|
repeated string completedAttachments = 5;
|
|
Progress progress = 6;
|
|
}
|
|
|
|
message ThreadMergeEvent {
|
|
string previousE164 = 1;
|
|
}
|
|
|
|
message SessionSwitchoverEvent {
|
|
string e164 = 1;
|
|
}
|
|
|
|
message DecimalValue {
|
|
uint32 scale = 1;
|
|
uint32 precision = 2;
|
|
bytes value = 3;
|
|
}
|
|
|
|
message FiatValue {
|
|
string currencyCode = 1;
|
|
DecimalValue amount = 2;
|
|
uint64 timestamp = 3;
|
|
}
|
|
|
|
message DonationErrorValue {
|
|
enum Type {
|
|
PROCESSOR_CODE = 0; // Generic processor error (e.g. Stripe returned an error code)
|
|
DECLINE_CODE = 1; // Stripe or PayPal decline Code
|
|
FAILURE_CODE = 2; // Stripe bank transfer failure code
|
|
REDEMPTION = 3; // Generic redemption error (status is HTTP code)
|
|
PAYMENT = 4; // Generic payment error (status is HTTP code)
|
|
}
|
|
|
|
Type type = 1;
|
|
string code = 2;
|
|
}
|
|
|
|
message PendingOneTimeDonation {
|
|
enum PaymentMethodType {
|
|
CARD = 0;
|
|
SEPA_DEBIT = 1;
|
|
PAYPAL = 2;
|
|
IDEAL = 3;
|
|
}
|
|
|
|
PaymentMethodType paymentMethodType = 1;
|
|
FiatValue amount = 2;
|
|
BadgeList.Badge badge = 3;
|
|
int64 timestamp = 4;
|
|
optional DonationErrorValue error = 5;
|
|
bool pendingVerification = 6;
|
|
bool checkedVerification = 7;
|
|
}
|
|
|
|
/**
|
|
* Contains the data necessary to show the corresponding terminal sheet
|
|
* for a given donation. Note that the word "terminal" here is used in
|
|
* the same way that it is used in Rx, where we simply mean that, regardless
|
|
* of outcome, a donation has completed processing.
|
|
*/
|
|
message TerminalDonationQueue {
|
|
message TerminalDonation {
|
|
int64 level = 1;
|
|
bool isLongRunningPaymentMethod = 2;
|
|
optional DonationErrorValue error = 3;
|
|
}
|
|
|
|
repeated TerminalDonation terminalDonations = 1;
|
|
}
|
|
|
|
/**
|
|
* Contains the data necessary to complete a transaction after the
|
|
* user completes authorization externally. This helps prevent
|
|
* scenarios where the application dies while the user is confirming
|
|
* a transaction in their bank app.
|
|
*/
|
|
message ExternalLaunchTransactionState {
|
|
|
|
message StripeIntentAccessor {
|
|
enum Type {
|
|
PAYMENT_INTENT = 0;
|
|
SETUP_INTENT = 1;
|
|
}
|
|
|
|
Type type = 1;
|
|
string intentId = 2;
|
|
string intentClientSecret = 3;
|
|
}
|
|
|
|
message GatewayRequest {
|
|
enum DonateToSignalType {
|
|
MONTHLY = 0;
|
|
ONE_TIME = 1;
|
|
GIFT = 2;
|
|
}
|
|
|
|
DonateToSignalType donateToSignalType = 1;
|
|
BadgeList.Badge badge = 2;
|
|
string label = 3;
|
|
DecimalValue price = 4;
|
|
string currencyCode = 5;
|
|
int64 level = 6;
|
|
int64 recipient_id = 7;
|
|
string additionalMessage = 8;
|
|
}
|
|
|
|
StripeIntentAccessor stripeIntentAccessor = 1;
|
|
GatewayRequest gatewayRequest = 2;
|
|
string paymentSourceType = 3;
|
|
}
|
|
|
|
message MessageExtras {
|
|
oneof extra {
|
|
GV2UpdateDescription gv2UpdateDescription = 1;
|
|
signalservice.GroupContext gv1Context = 2;
|
|
}
|
|
}
|
|
|
|
message GV2UpdateDescription {
|
|
optional DecryptedGroupV2Context gv2ChangeDescription = 1;
|
|
backup.GroupChangeChatUpdate groupChangeUpdate = 2;
|
|
} |